Provide the "Base CPU" in output of "info task" (if set by runtime).
[external/binutils.git] / gdb / ChangeLog
1 2017-11-21  Joel Brobecker  <brobecker@adacore.com>
2
3         * ada-lang.h (struct ada_task_info) <base_cpu>: New field.
4         * ada-lang.c (struct atcb_fieldno) <base_cpu>: New field.
5         (get_tcb_types_info): Set fieldnos.base_cpu.
6         (read_atcb): Set task_info->base_cpu.
7         (info_task): Print "Base CPU" info if set by runtime.
8
9 2017-11-21  Joel Brobecker  <brobecker@adacore.com>
10
11         * ravenscar-thread.c (ravenscar_stopped_by_sw_breakpoint)
12         (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
13         (ravenscar_stopped_data_address, ravenscar_core_of_thread):
14         New functions.
15         (init_ravenscar_thread_ops): Set the to_stopped_by_sw_breakpoint,
16         to_stopped_by_hw_breakpoint, to_stopped_by_watchpoint,
17         to_stopped_data_address and to_core_of_thread fields of
18         ravenscar_ops.
19
20 2017-11-21  Ulrich Weigand  <uweigand@de.ibm.com>
21
22         * ppc-tdep.h (enum powerpc_long_double_abi): New data type.
23         (struct gdbarch_tdep): New member long_double_abi.
24         * rs6000-tdep.c (rs6000_gdbarch_init): Initialize long_double_abi
25         member of tdep struct based on Tag_GNU_Power_ABI_FP attribute.
26         * ppc-linux-tdep.c (ppc_linux_init_abi): Install long double data
27         format depending on long_double_abi tdep member.
28         (ppc_floatformat_for_type): Handle __ibm128 type.
29
30 2017-11-20  Simon Marchi  <simon.marchi@polymtl.ca>
31
32         * darwin-nat.c (set_enable_mach_exceptions): Constify parameter.
33
34 2017-11-21  Pedro Alves  <palves@redhat.com>
35
36         * dwarf2read.c (mapped_index::find_name_components_bounds)
37         <completion mode, upper bound>: Use std::lower_bound instead of
38         std::upper_bound.
39         (test_mapped_index_find_name_component_bounds): Remove incorrect
40         "t1_fund" from expected symbols.
41
42 2017-11-21  Pedro Alves  <palves@redhat.com>
43
44         * dwarf2read.c (mapped_index::name_components_casing): New field.
45         (mapped_index) <build_name_components,
46         find_name_components_bounds): Declare new methods.
47         (mapped_index::find_name_components_bounds)
48         (mapped_index::build_name_components): New methods, factored out
49         from dw2_expand_symtabs_matching_symbol.
50         (check_find_bounds_finds)
51         (test_mapped_index_find_name_component_bounds): New.
52         (run_test): Rename to ...
53         (test_dw2_expand_symtabs_matching_symbol): ... this.
54         (run_test): Reimplement.
55
56 2017-11-21  Pedro Alves  <palves@redhat.com>
57
58         * cp-name-parser.y (cp_ident_is_alpha, cp_ident_is_alnum): New.
59         (symbol_end): Use cp_ident_is_alnum.
60         (yylex): Use cp_ident_is_alpha and cp_ident_is_alnum.
61         * dwarf2read.c (make_sort_after_prefix_name): New function.
62         (dw2_expand_symtabs_matching_symbol): Use it.
63         (test_symbols): Add more symbols.
64         (run_test): Add tests.
65
66 2017-11-17  Tom Tromey  <tom@tromey.com>
67
68         * symtab.h (enum symbol_subclass_kind): New.
69         (struct symbol) <is_cplus_template_function, is_rust_vtable>:
70         Remove.
71         <subclass>: New member.
72         (SYMBOL_IS_CPLUS_TEMPLATE_FUNCTION): Update.
73         * rust-lang.c (rust_get_trait_object_pointer): Update.
74         * dwarf2read.c (read_func_scope): Update.
75         (read_variable): Update.
76
77 2017-11-17  Tom Tromey  <tom@tromey.com>
78
79         * dwarf2read.c (read_func_scope): Update.
80         * symtab.h (struct template_symbol): Derive from symbol.
81         <base>: Remove.
82
83 2017-11-17  Tom Tromey  <tom@tromey.com>
84
85         * symtab.h (struct symbol) <is_rust_vtable>: New member.
86         (struct rust_vtable_symbol): New.
87         (find_symbol_at_address): Declare.
88         * symtab.c (find_symbol_at_address): New function.
89         * symfile.h (struct quick_symbol_functions)
90         <find_compunit_symtab_by_address>: New member.
91         * symfile-debug.c (debug_qf_find_compunit_symtab_by_address): New
92         function.
93         (debug_sym_quick_functions): Link to
94         debug_qf_find_compunit_symtab_by_address.
95         * rust-lang.c (rust_get_trait_object_pointer): New function.
96         (rust_evaluate_subexp) <case UNOP_IND>: New case.  Call
97         rust_get_trait_object_pointer.
98         * psymtab.c (psym_relocate): Clear psymbol_map.
99         (psym_fill_psymbol_map, psym_find_compunit_symtab_by_address): New
100         functions.
101         (psym_functions): Link to psym_find_compunit_symtab_by_address.
102         * objfiles.h (struct objfile) <psymbol_map>: New member.
103         * dwarf2read.c (dwarf2_gdb_index_functions): Update.
104         (process_die) <DW_TAG_variable>: New case.  Call read_variable.
105         (rust_containing_type, read_variable): New functions.
106
107 2017-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
108
109         * common/gdb_vecs.h (DEF_VEC_I (int)): Remove.
110
111 2017-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
112
113         * common/filestuff.c: Include <algorithm>.
114         (open_fds): Change type to std::vector<int>.
115         (do_mark_open_fd): Adjust.
116         (unmark_fd_no_cloexec): Adjust.
117         (do_close): Adjust.
118
119 2017-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
120
121         * breakpoint.c (output_thread_groups): Take an std::vector.
122         (print_one_breakpoint_location): Adjust.
123
124 2017-11-17  Joel Brobecker  <brobecker@adacore.com>
125
126         * ada-lang.c (resolve_subexp): Add handling of OP_VAR_MSYM_VALUE.
127         (ada_evaluate_subexp_for_cast): New function.
128         (ada_evaluate_subexp) <UNOP_CAST>: Replace code by call to
129         ada_evaluate_subexp_for_cast.
130         (ada_evaluate_subexp) <nosideret>: Replace code by call to
131         eval_skip_value.
132         * eval.c (evaluate_var_value): Make non-static.
133         (evaluate_var_msym_value, eval_skip_value): Likewise.
134         * value.h (evaluate_var_value, evaluate_var_msym_value)
135         (eval_skip_value): Declare.
136
137 2017-11-16  Joel Brobecker  <brobecker@adacore.com>
138
139         * ada-lang.c (ada_value_cast): Remove parameter "noside".
140         Update all callers.
141
142 2017-11-16  Pedro Alves  <palves@redhat.com>
143
144         * python/py-unwind.c (pyuw_sniffer): Translate
145         PyExc_KeyboardInterrupt to a GDB Quit exception.
146
147 2017-11-16  Pedro Alves  <palves@redhat.com>
148
149         * infrun.c (resume_cleanups): Delete.
150         (resume): No longer install a resume_cleanups cleanup nor call
151         QUIT.
152         (proceed): Pass the terminal to the inferior.
153         (keep_going_pass_signal): No longer install a resume_cleanups
154         cleanup.
155
156 2017-11-16  Pedro Alves  <palves@redhat.com>
157
158         * inf-loop.c (inferior_event_handler): Don't swallow the exception
159         if the prompt is blocked.
160
161 2017-11-16  Pedro Alves  <palves@redhat.com>
162
163         * breakpoint.c (insert_bp_location): Replace bp_err and
164         bp_err_message locals by a gdb_exception local.
165
166 2017-11-16  Pedro Alves  <palves@redhat.com>
167
168         * inflow.c (scoped_ignore_sigttou): New class.
169         (child_terminal_ours_1, new_tty): Use it.
170
171 2017-11-16  Ulrich Weigand  <uweigand@de.ibm.com>
172
173         * target-float.c (decimal_from_number): Add byte_order argument and
174         call match_endianness.  Error if unknown floating-point type.
175         (decimal_to_number): Add byte_order argument and call match_endianness.
176         (decimal_from_longest): Update call.  Do not call match_endianness.
177         (decimal_from_ulongest): Likewise.
178         (decimal_binop): Likewise.
179         (decimal_is_zero): Likewise.
180         (decimal_compare): Likewise.
181         (decimal_convert): Likewise.
182
183 2017-11-16  Phil Muldoon  <pmuldoon@redhat.com>
184
185         * python/python.c (gdbpy_rbreak): New function.
186         * NEWS: Document Python rbreak feature.
187
188 2017-11-16  Yao Qi  <yao.qi@linaro.org>
189
190         * features/tic6x-c62x.xml: Remove.
191         * features/tic6x-c64x.xml: Remove.
192         * features/tic6x-c64xp.xml: Remove.
193
194 2017-11-15  John Baldwin  <jhb@FreeBSD.org>
195
196         * symtab.h: Include <array>.
197
198 2017-11-15  John Baldwin  <jhb@FreeBSD.org>
199
200         * bsd-kvm.c (bsd_kvm_cmd): Constify 'arg'.
201         (bsd_kvm_proc_cmd): Likewise.
202
203 2017-11-15  Simon Marchi  <simon.marchi@ericsson.com>
204
205         * tui/tui-win.c (window_name_completer): Replace VEC with
206         std::vector.
207
208 2017-11-15  Andrew Cagney  <cagney@gnu.org>
209
210         * MAINTAINERS: Remove no-longer applicable entries.
211
212 2017-11-15  Andrew Cagney  <cagney@gnu.org>
213
214         * MAINTAINERS: Move self to Past Maintainers.
215
216 2017-11-15  Yao Qi  <yao.qi@linaro.org>
217
218         * features/Makefile (XMLTOC): Remove nios2-linux.xml.
219         * features/nios2-linux.c: Remove.
220         * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Don't call
221         initialize_tdesc_nios2_linux.
222
223 2017-11-15  Yao Qi  <yao.qi@linaro.org>
224
225         * m68hc11-tdep.c (M68HC11_NUM_REGS): Change it to
226         M68HC11_LAST_HARD_REG + 1.
227
228 2017-11-14  Paul Carroll  <pcarroll@codesourcery.com>
229
230         PR gdb/22388
231         * remote.c (remote_write_bytes_aux, remote_read_bytes_1,
232         remote_read_bytes, remote_write_qxfer, remote_xfer_partial):
233         Return TARGET_XFER_EOF if size of returned data is 0.
234
235 2017-11-14  Simon Marchi  <simon.marchi@ericsson.com>
236
237         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
238         memory-map-selftests.c.
239         (SUBDIR_UNITTESTS_OBS): Add memory-map-selftests.o.
240         * memory-map.c (memory_map_start_memory): Fix computation of hi
241         address.
242         * unittests/memory-map-selftests.c: New file.
243
244 2017-11-09  Joel Brobecker  <brobecker@adacore.com>
245
246         * ada-lang.c: Fix some typos in the general command documenting
247         how Ada expressions are being evaluated and how their result
248         is printed.
249
250 2017-11-09  Tom Tromey  <tom@tromey.com>
251
252         * psymtab.c (psymbol_hash): Do not hash string contents.
253         (psymbol_compare): Add comment.
254
255 2017-11-09  Tom Tromey  <tom@tromey.com>
256
257         * dictionary.c (dict_hash): Move "TKB" check into the "switch".
258
259 2017-11-08  Joel Brobecker  <brobecker@adacore.com>
260
261         * ada-exp.y (write_var_from_sym): Remove parameter
262         "orig_left_context".  Update all callers.
263
264 2017-11-08  Simon Marchi  <simon.marchi@ericsson.com>
265
266         * tracepoint.h (class collection_list) <stringify>: Return
267         std::vector<std::string>.
268         (encode_actions_rsp): Change parameters to
269         std::vector<std::string> *.
270         * tracepoint.c (collection_list::stringify): Return
271         std::vector<std::string> and adjust accordingly.
272         (encode_actions_rsp): Changee parameters to
273         std::vector<std::string> and adjust accordingly.
274         * remote.c (free_actions_list),
275         free_actions_list_cleanup_wrapper): Remove.
276         (remote_download_tracepoint): Adjust to std::vector.
277
278 2017-11-08  Tom Tromey  <tom@tromey.com>
279
280         * dwarf2read.c (symbolp): Remove typedef.
281         (read_func_scope): Use std::vector.
282         (process_structure_scope): Use std::vector.
283
284 2017-11-08  Pedro Alves  <palves@redhat.com>
285
286         * ada-lang.c (ada_make_symbol_completion_list): Use
287         completion_skip_symbol.
288         * symtab.c (symbol_is_function_or_method(minimal_symbol*)): New.
289         (symbol_is_function_or_method(symbol*)): New.
290         (add_symtab_completions): Add complete_symbol_mode parameter.  Use
291         completion_skip_symbol.
292         (default_collect_symbol_completion_matches_break_on): Use
293         completion_skip_symbol.  Pass down mode.
294         (collect_file_symbol_completion_matches): Pass down mode.
295         * symtab.h (symbol_is_function_or_method): New declarations.
296         (completion_skip_symbol): New template function.
297
298 2017-11-08  Pedro Alves  <palves@redhat.com>
299
300         * linespec.c (iterate_over_all_matching_symtabs): Add
301         search_domain parameter.  Pass it down to expand_symtabs_matching.
302         (decode_objc): Request FUNCTIONS_DOMAIN symbols only.
303         (lookup_prefix_sym): Adjust by passing ALL_DOMAIN as
304         search_domain.
305         (add_all_symbol_names_from_pspace): Add search_domain parameter.
306         Pass it down.
307         (find_method, find_function_symbols): Request FUNCTIONS_DOMAIN
308         symbols.
309         (add_matching_symbols_to_info): Add search_domain parameter.  Pass
310         it down.
311
312 2017-11-08  Pedro Alves  <palves@redhat.com>
313
314         * ada-lang.c (ada_make_symbol_completion_list): Remove text and
315         text_len locals and don't pass them down.
316         * symtab.c (completion_list_add_name): Remove
317         sym_text/sym_text_len parameters and adjust.
318         (completion_list_add_symbol, completion_list_add_msymbol)
319         (completion_list_objc_symbol, completion_list_add_fields)
320         (add_symtab_completions): Likewise.
321         (default_collect_symbol_completion_matches_break_on)
322         (collect_file_symbol_completion_matches): Remove sym_text_len
323         local and don't pass it down.
324         * symtab.h (completion_list_add_name): Remove
325         sym_text/sym_text_len parameters.
326
327 2017-11-08  Pedro Alves  <palves@redhat.com>
328
329         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
330         unittests/lookup_name_info-selftests.c.
331         (SUBDIR_UNITTESTS_OBS): Add lookup_name_info-selftests.o.
332         * cp-support.c: Include "selftest.h".
333         (cp_remove_params_1): Rename from cp_remove_params.  Add
334         'require_param' parameter, and handle it.
335         (cp_remove_params): Reimplement.
336         (cp_remove_params_if_any): New.
337         (selftests::quote): New.
338         (selftests::check_remove_params): New.
339         (selftests::test_cp_remove_params): New.
340         (_initialize_cp_support): Install
341         selftests::test_cp_remove_params.
342         * cp-support.h (cp_remove_params_if_any): Declare.
343         * dwarf2read.c :Include "selftest.h".
344         (dw2_expand_symtabs_matching_symbol): Use
345         lookup_name_info::make_ignore_params.
346         (selftests::dw2_expand_symtabs_matching::mock_mapped_index)
347         (selftests::dw2_expand_symtabs_matching::string_or_null)
348         (selftests::dw2_expand_symtabs_matching::check_match)
349         (selftests::dw2_expand_symtabs_matching::test_symbols)
350         (selftests::dw2_expand_symtabs_matching::run_test): New.
351         (_initialize_dwarf2_read): Register
352         selftests::dw2_expand_symtabs_matching::run_test.
353         * psymtab.c (psym_expand_symtabs_matching): Use
354         lookup_name_info::make_ignore_params.
355         * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info):
356         If the lookup name wants to ignore parameters, strip them.
357         (compare_symbol_name): Remove sym_text/sym_text_len parameters and
358         code handling '('.
359         (completion_list_add_name): Don't pass down sym_text/sym_text_len.
360         (default_collect_symbol_completion_matches_break_on): Don't try to
361         strip parameters.
362         * symtab.h (lookup_name_info::lookup_name_info): Add
363         'ignore_parameters' parameter.
364         (lookup_name_info::ignore_parameters)
365         (lookup_name_info::make_ignore_params): New methods.
366         (lookup_name_info::m_ignore_parameters): New field.
367         * unittests/lookup_name_info-selftests.c: New file.
368
369 2017-11-08  Pedro Alves  <palves@redhat.com>
370
371         * dwarf2read.c (dw2_expand_marked_cus)
372         (dw2_expand_symtabs_matching_symbol): Remove forward declarations.
373         (dw2_expand_symtabs_matching): Move further below.
374         (dw2_expand_marked_cus): Reindent.
375
376 2017-11-08  Pedro Alves  <palves@redhat.com>
377
378         * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
379         (struct name_component): New.
380         (mapped_index::name_components): New field.
381         (mapped_index::symbol_name_at): New method.
382         (dwarf2_read_index): Call mapped_index ctor.
383         (dw2_map_matching_symbols): Add comment about name_components
384         table.
385         (dw2_expand_symtabs_matching): Factor part to...
386         (dw2_expand_symtabs_matching_symbol): ... this new function.
387         Build name components table, and lookup symbols in it before
388         calling the name matcher.
389         (dw2_expand_marked_cus): New, factored out from
390         dw2_expand_symtabs_matching.
391         (dwarf2_per_objfile_free): Call the mapped_index's dtor.
392
393 2017-11-08   Pedro Alves  <palves@redhat.com>
394
395         * ada-lang.c (ada_encode): Rename to ..
396         (ada_encode_1): ... this.  Add throw_errors parameter and handle
397         it.
398         (ada_encode): Reimplement.
399         (match_name): Delete, folded into full_name.
400         (resolve_subexp): No longer pass the encoded name to
401         ada_lookup_symbol_list.
402         (should_use_wild_match): Delete.
403         (name_match_type_from_name): New.
404         (ada_lookup_simple_minsym): Use lookup_name_info and the
405         language's symbol_name_matcher_ftype.
406         (add_symbols_from_enclosing_procs, ada_add_local_symbols)
407         (ada_add_block_renamings): Adjust to use lookup_name_info.
408         (ada_lookup_name): New.
409         (add_nonlocal_symbols, ada_add_all_symbols)
410         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
411         (ada_iterate_over_symbols): Adjust to use lookup_name_info.
412         (ada_name_for_lookup): Delete.
413         (ada_lookup_encoded_symbol): Construct a verbatim name.
414         (wild_match): Reverse sense of return type.  Use bool.
415         (full_match): Reverse sense of return type.  Inline bits of old
416         match_name here.
417         (ada_add_block_symbols): Adjust to use lookup_name_info.
418         (symbol_completion_match): Delete, folded into...
419         (ada_lookup_name_info::matches): ... .this new method.
420         (symbol_completion_add): Delete.
421         (ada_collect_symbol_completion_matches): Add name_match_type
422         parameter.  Adjust to use lookup_name_info and
423         completion_list_add_name.
424         (get_var_value, ada_add_global_exceptions): Adjust to use
425         lookup_name_info.
426         (ada_get_symbol_name_cmp): Delete.
427         (do_wild_match, do_full_match): New functions.
428         (ada_lookup_name_info::ada_lookup_name_info): New method.
429         (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
430         functions.
431         (ada_language_defn): Install ada_get_symbol_name_matcher.
432         * ada-lex.l (processId): If name starts with '<', copy it
433         verbatim.
434         * block.c (block_iter_match_step, block_iter_match_first)
435         (block_iter_match_next, block_lookup_symbol)
436         (block_lookup_symbol_primary, block_find_symbol): Adjust to use
437         lookup_name_info.
438         * block.h (block_iter_match_first, block_iter_match_next)
439         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
440         * c-lang.c (c_language_defn, cplus_language_defn)
441         (asm_language_defn, minimal_language_defn): Adjust comments to
442         refer to la_get_symbol_name_matcher.
443         * completer.c (complete_files_symbols)
444         (collect_explicit_location_matches, symbol_completer): Pass a
445         symbol_name_match_type down.
446         * completer.h (class completion_match, completion_match_result):
447         New classes.
448         (completion_tracker::reset_completion_match_result): New method.
449         (completion_tracker::m_completion_match_result): New field.
450         * cp-support.c (make_symbol_overload_list_block): Adjust to use
451         lookup_name_info.
452         (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
453         functions.
454         * cp-support.h (cp_get_symbol_name_matcher): New declaration.
455         * d-lang.c: Adjust comments to refer to
456         la_get_symbol_name_matcher.
457         * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
458         Adjust to use lookup_name_info.
459         (dict_iter_match_first, dict_iter_match_next)
460         (iter_match_first_hashed, iter_match_next_hashed)
461         (iter_match_first_linear, iter_match_next_linear): Adjust to work
462         with a lookup_name_info.
463         * dictionary.h (dict_iter_match_first, dict_iter_match_next):
464         Likewise.
465         * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
466         (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
467         (gdb_index_symbol_name_matcher): New class.
468         (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
469         gdb_index_symbol_name_matcher.  Accept a NULL symbol_matcher.
470         * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
471         with a symbol_name_match_type.
472         (f_language_defn): Adjust comments to refer to
473         la_get_symbol_name_matcher.
474         * go-lang.c (go_language_defn): Adjust comments to refer to
475         la_get_symbol_name_matcher.
476         * language.c (default_symbol_name_matcher)
477         (language_get_symbol_name_matcher): New functions.
478         (unknown_language_defn, auto_language_defn): Adjust comments to
479         refer to la_get_symbol_name_matcher.
480         * language.h (symbol_name_cmp_ftype): Delete.
481         (language_defn) <la_collect_symbol_completion_matches>: Add match
482         type parameter.
483         <la_get_symbol_name_cmp>: Delete field.
484         <la_get_symbol_name_matcher>: New field.
485         <la_iterate_over_symbols>: Adjust to use lookup_name_info.
486         (default_symbol_name_matcher, language_get_symbol_name_matcher):
487         Declare.
488         * linespec.c (iterate_over_all_matching_symtabs)
489         (iterate_over_file_blocks): Adjust to use lookup_name_info.
490         (find_methods): Add language parameter, and use lookup_name_info
491         and the language's symbol_name_matcher_ftype.
492         (linespec_complete_function): Adjust.
493         (lookup_prefix_sym): Use lookup_name_info.
494         (add_all_symbol_names_from_pspace): Adjust.
495         (find_superclass_methods): Add language parameter and pass it
496         down.
497         (find_method): Pass symbol language down.
498         (find_linespec_symbols): Don't demangle or Ada encode here.
499         (search_minsyms_for_name): Add lookup_name_info parameter.
500         (add_matching_symbols_to_info): Add name_match_type parameter.
501         Use lookup_name_info.
502         * m2-lang.c (m2_language_defn): Adjust comments to refer to
503         la_get_symbol_name_matcher.
504         * minsyms.c: Include <algorithm>.
505         (add_minsym_to_demangled_hash_table): Remove table parameter and
506         add objfile parameter.  Use search_name_hash, and add language to
507         demangled languages vector.
508         (struct found_minimal_symbols): New struct.
509         (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
510         New functions.
511         (lookup_minimal_symbol): Adjust to use them.  Don't canonicalize
512         input names here.  Use lookup_name_info instead.  Lookup up
513         demangled names once for each language in the demangled names
514         vector.
515         (iterate_over_minimal_symbols): Use lookup_name_info.  Lookup up
516         demangled names once for each language in the demangled names
517         vector.
518         (build_minimal_symbol_hash_tables): Adjust.
519         * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
520         lookup_name_info.
521         * objc-lang.c (objc_language_defn): Adjust comment to refer to
522         la_get_symbol_name_matcher.
523         * objfiles.h: Include <vector>.
524         (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
525         * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
526         la_get_symbol_name_matcher.
527         * p-lang.c (pascal_language_defn): Adjust comment to refer to
528         la_get_symbol_name_matcher.
529         * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
530         (match_partial_symbol): Use symbol_name_match_type,
531         lookup_name_info and psymbol_name_matches.
532         (lookup_partial_symbol): Use lookup_name_info.
533         (map_block): Use symbol_name_match_type and lookup_name_info.
534         (psym_map_matching_symbols): Use symbol_name_match_type.
535         (psymbol_name_matches): New.
536         (recursively_search_psymtabs): Use lookup_name_info and
537         psymbol_name_matches.  Rename 'kind' parameter to 'domain'.
538         (psym_expand_symtabs_matching): Use lookup_name_info.  Rename
539         'kind' parameter to 'domain'.
540         * rust-lang.c (rust_language_defn): Adjust comment to refer to
541         la_get_symbol_name_matcher.
542         * symfile-debug.c (debug_qf_map_matching_symbols)
543         (debug_qf_map_matching_symbols): Use symbol_name_match_type.
544         (debug_qf_expand_symtabs_matching): Use lookup_name_info.
545         * symfile.c (expand_symtabs_matching): Use lookup_name_info.
546         * symfile.h (quick_symbol_functions) <map_matching_symbols>:
547         Adjust to use symbol_name_match_type.
548         <expand_symtabs_matching>: Adjust to use lookup_name_info.
549         (expand_symtabs_matching): Adjust to use lookup_name_info.
550         * symmisc.c (maintenance_expand_symtabs): Use
551         lookup_name_info::match_any ().
552         * symtab.c (symbol_matches_search_name): New.
553         (eq_symbol_entry): Adjust to use lookup_name_info and the
554         language's matcher.
555         (demangle_for_lookup_info::demangle_for_lookup_info): New.
556         (lookup_name_info::match_any): New.
557         (iterate_over_symbols, search_symbols): Use lookup_name_info.
558         (compare_symbol_name): Add language, lookup_name_info and
559         completion_match_result parameters, and use them.
560         (completion_list_add_name): Make extern.  Add language and
561         lookup_name_info parameters.  Use them.
562         (completion_list_add_symbol, completion_list_add_msymbol)
563         (completion_list_objc_symbol): Add lookup_name_info parameters and
564         adjust.  Pass down language.
565         (completion_list_add_fields): Add lookup_name_info parameters and
566         adjust.  Pass down language.
567         (add_symtab_completions): Add lookup_name_info parameters and
568         adjust.
569         (default_collect_symbol_completion_matches_break_on): Add
570         name_match_type parameter, and use it.  Use lookup_name_info.
571         (default_collect_symbol_completion_matches)
572         (collect_symbol_completion_matches): Add name_match_type
573         parameter, and pass it down.
574         (collect_symbol_completion_matches_type): Adjust.
575         (collect_file_symbol_completion_matches): Add name_match_type
576         parameter, and use lookup_name_info.
577         * symtab.h: Include <string> and "common/gdb_optional.h".
578         (enum class symbol_name_match_type): New.
579         (class ada_lookup_name_info): New.
580         (struct demangle_for_lookup_info): New.
581         (class lookup_name_info): New.
582         (symbol_name_matcher_ftype): New.
583         (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
584         (symbol_matches_search_name): Declare.
585         (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
586         (default_collect_symbol_completion_matches)
587         (collect_symbol_completion_matches)
588         (collect_file_symbol_completion_matches): Add name_match_type
589         parameter.
590         (iterate_over_symbols): Use lookup_name_info.
591         (completion_list_add_name): Declare.
592         * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
593         (strncmp_iw_with_mode): Now extern.
594         * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
595         (strncmp_iw_with_mode): Declare.
596
597 2017-11-08  Keith Seitz  <keiths@redhat.com>
598             Pedro Alves  <palves@redhat.com>
599
600         * ada-lang.c (ada_language_defn): Install
601         default_search_name_hash.
602         * buildsym.c (struct buildsym_compunit): <language>: New field.
603         (finish_block_internal): Pass language when creating dictionaries.
604         (start_buildsym_compunit, start_symtab): New language parameters.
605         Use them.
606         (restart_symtab): Pass down compilation unit's language.
607         * buildsym.h (enum language): Forward declare.
608         (start_symtab): New 'language' parameter.
609         * c-lang.c (c_language_defn, cplus_language_defn)
610         (asm_language_defn, minimal_language_defn): Install
611         default_search_name_hash.
612         * coffread.c (coff_start_symtab): Adjust.
613         * d-lang.c (d_language_defn): Install default_search_name_hash.
614         * dbxread.c (struct symloc): Add 'pst_language' field.
615         (PST_LANGUAGE): Define.
616         (start_psymtab, read_ofile_symtab): Use it.
617         (process_one_symbol): New 'language' parameter.  Pass it down.
618         * dictionary.c (struct dictionary) <language>: New field.
619         (DICT_LANGUAGE): Define.
620         (dict_create_hashed, dict_create_hashed_expandable)
621         (dict_create_linear, dict_create_linear_expandable): New parameter
622         'language'.  Set the dictionary's language.
623         (iter_match_first_hashed): Adjust to rename.
624         (insert_symbol_hashed): Assert we don't see mismatching
625         languages.  Adjust to rename.
626         (dict_hash): Rename to ...
627         (default_search_name_hash): ... this and make extern.
628         * dictionary.h (struct language_defn): Forward declare.
629         (dict_create_hashed): New parameter 'language'.
630         * dwarf2read.c (dwarf2_start_symtab): Pass down language.
631         * f-lang.c (f_language_defn): Install default_search_name_hash.
632         * go-lang.c (go_language_defn): Install default_search_name_hash.
633         * jit.c (finalize_symtab): Pass compunit's language to dictionary
634         creation.
635         * language.c (unknown_language_defn, auto_language_defn):
636         * language.h (language_defn::la_search_name_hash): New field.
637         (default_search_name_hash): Declare.
638         * m2-lang.c (m2_language_defn): Install default_search_name_hash.
639         * mdebugread.c (new_block): New parameter 'language'.
640         * mdebugread.c (parse_symbol): Pass symbol language to block
641         allocation.
642         (psymtab_to_symtab_1): Pass down language.
643         (new_symtab): Pass compunit's language to block allocation.
644         * objc-lang.c (objc_language_defn): Install
645         default_search_name_hash.
646         * opencl-lang.c (opencl_language_defn):
647         * p-lang.c (pascal_language_defn): Install
648         default_search_name_hash.
649         * rust-lang.c (rust_language_defn): Install
650         default_search_name_hash.
651         * stabsread.h (enum language): Forward declare.
652         (process_one_symbol): Add 'language' parameter.
653         * symtab.c (search_name_hash): New function.
654         * symtab.h (search_name_hash): Declare.
655         * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
656
657 2017-11-08  Pedro Alves  <palves@redhat.com>
658
659         * cp-name-parser.y (main): Don't initialize extra_chars.
660
661 2017-11-07  Tom Tromey  <tom@tromey.com>
662
663         * event-top.h (command_handler): Constify.
664         * record-full.c (cmd_record_full_start): Update.
665         * thread.c (thread_apply_all_command): Update.
666         * printcmd.c (eval_command): Update.
667         * mi/mi-main.c (mi_execute_cli_command): Update.
668         (mi_execute_async_cli_command): Update.
669         * tui/tui-stack.c (tui_update_command): Update.
670         * cli/cli-interp.c (safe_execute_command): Constify.
671         * record.c (record_start): Update.
672         (record_start, record_stop, cmd_record_start): Update.
673         * record-btrace.c (cmd_record_btrace_bts_start): Update.
674         (cmd_record_btrace_pt_start): Update.
675         (cmd_record_btrace_start): Update.
676         (cmd_record_btrace_start): Update.
677         * reverse.c (exec_reverse_once): Update.
678         * python/python.c (execute_gdb_command): Don't copy the command.
679         * event-top.c (command_line_handler): Update.
680         (command_handler): Constify.
681         * defs.h (deprecated_call_command_hook): Constify.
682         * cli/cli-script.h (execute_user_command): Constify.
683         * cli/cli-script.c (execute_user_command): Constify.
684         (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
685         (enum command_control_type): Update.
686         * main.c (catch_command_errors): Remove non-const overload.
687         (catch_command_errors_ftype): Remove.
688         * python/py-cmd.c (cmdpy_function): Constify.
689         * guile/scm-cmd.c (cmdscm_function): Constify.
690         * cli/cli-dump.c (call_dump_func): Constify.
691         * cli/cli-decode.c (do_const_cfunc): Constify.
692         (do_sfunc): Constify.
693         (cmd_func): Constify.
694         * gdbcmd.h (execute_command, execute_command_to_string): Constify.
695         * top.h (execute_command): Constify.
696         * top.c (execute_command): Constify.
697         (execute_command_to_string): Constify.
698         (deprecated_call_command_hook): Constify.
699         * command.h (cmd_func): Constify.
700         * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
701
702 2017-11-07  Tom Tromey  <tom@tromey.com>
703
704         * ada-lang.c (catch_ada_exception_command): Constify.
705         (catch_assert_command): Constify.
706         * break-catch-throw.c (catch_catch_command, catch_throw_command)
707         (catch_rethrow_command): Constify.
708         (catch_exception_command_1): Constify.
709         * breakpoint.h (add_catch_command): Constify.
710         * break-catch-syscall.c (catch_syscall_command_1): Constify.
711         (catch_syscall_split_args): Constify.
712         * break-catch-sig.c (catch_signal_command): Constify.
713         (catch_signal_split_args): Constify.
714         * cli/cli-decode.h (struct cmd_list_element) <function>: Use
715         cmd_const_sfunc_ftype.
716         * cli/cli-decode.c (add_setshow_cmd_full): Constify.
717         (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
718         (add_setshow_boolean_cmd, add_setshow_filename_cmd)
719         (add_setshow_string_cmd, struct cmd_list_element)
720         (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
721         (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
722         (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
723         Constify.
724         (set_cmd_sfunc): Constify.
725         (empty_sfunc): Constify.
726         * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
727         (add_setshow_boolean_cmd, add_setshow_filename_cmd)
728         (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
729         (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
730         (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
731         (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
732         Constify.
733         (set_cmd_sfunc): Constify.
734         (cmd_sfunc_ftype): Remove.
735         * compile/compile.c (set_compile_args): Constify.
736         * infrun.c (set_disable_randomization): Constify.
737         * infcmd.c (set_args_command, set_cwd_command): Constify.
738         * breakpoint.c (set_condition_evaluation_mode): Constify.
739         (add_catch_command): Constify.
740         (catch_fork_command_1, catch_exec_command_1)
741         (catch_load_command_1, catch_unload_command_1): Constify.
742         (catch_load_or_unload): Constify.
743         * guile/scm-param.c (pascm_set_func): Constify.
744         (add_setshow_generic): Constify.
745         * python/py-param.c (get_set_value): Constify.
746         * top.h (set_verbose): Constify.
747         * tui/tui-win.c (tui_set_var_cmd): Constify.
748         * mi/mi-main.c (set_mi_async_command): Constify.
749         * cli/cli-logging.c (set_logging_overwrite)
750         (set_logging_redirect): Constify.
751         * value.c (set_max_value_size): Constify.
752         * valprint.c (set_input_radix, set_output_radix): Constify.
753         * utils.c (set_width_command, set_height_command): Constify.
754         * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
755         * tracepoint.c (set_disconnected_tracing)
756         (set_circular_trace_buffer, set_trace_buffer_size)
757         (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
758         * top.c (set_history_size_command, set_verbose, set_editing)
759         (set_gdb_datadir, set_history_filename): Constify.
760         * target.c (set_targetdebug, maint_set_target_async_command)
761         (maint_set_target_non_stop_command, set_target_permissions)
762         (set_write_memory_permission): Constify.
763         (open_target): Constify.
764         * target-descriptions.c (set_tdesc_filename_cmd): Constify.
765         * target-dcache.c (set_stack_cache, set_code_cache): Constify.
766         * symtab.c (set_symbol_cache_size_handler): Constify.
767         * symfile.c (set_ext_lang_command): Constify.
768         * symfile-debug.c (set_debug_symfile): Constify.
769         * source.c (set_directories_command): Constify.
770         * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
771         * serial.c (set_parity): Constify.
772         * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
773         * remote.c (set_remote_exec_file, set_remotebreak)
774         (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
775         * record.c (set_record_insn_history_size)
776         (set_record_call_history_size): Constify.
777         * record-full.c (set_record_full_insn_max_num): Constify.
778         * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
779         * osabi.c (set_osabi): Constify.
780         * mips-tdep.c (set_mips64_transfers_32bit_regs)
781         (reinit_frame_cache_sfunc, mips_abi_update): Constify.
782         * maint.c (maintenance_set_profile_cmd): Constify.
783         * linux-thread-db.c (set_libthread_db_search_path): Constify.
784         * language.c (set_language_command, set_range_command)
785         (set_case_command): Constify.
786         * infrun.c (set_non_stop, set_observer_mode)
787         (set_stop_on_solib_events, set_schedlock_func)
788         (set_exec_direction_func): Constify.
789         * infcmd.c (set_inferior_tty_command): Constify.
790         * disasm.c (set_disassembler_options_sfunc): Constify.
791         * demangle.c (set_demangling_command): Constify.
792         * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
793         * cris-tdep.c (set_cris_version, set_cris_mode)
794         (set_cris_dwarf2_cfi): Constify.
795         * corefile.c (set_gnutarget_command): Constify.
796         * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
797         (set_target_wide_charset_sfunc): Constify.
798         * breakpoint.c (update_dprintf_commands): Constify.
799         * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
800         * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
801         (set_disassembly_style_sfunc): Constify.
802         * arch-utils.c (set_endian, set_architecture): Constify.
803         * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
804         * agent.c (set_can_use_agent): Constify.
805
806 2017-11-07  Tom Tromey  <tom@tromey.com>
807
808         * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
809         (go32_pde, go32_pte, go32_pte_for_address): Constify.
810         * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
811         (set_thread_default_pause_cmd, set_thread_default_run_cmd)
812         (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
813         (parse_int_arg, show_thread_default_detach_sc_cmd)
814         (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
815         (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
816         (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
817         (show_task_pause_cmd, set_task_detach_sc_cmd)
818         (show_task_detach_sc_cmd, set_task_exc_port_cmd)
819         (set_noninvasive_cmd, set_thread_pause_cmd)
820         (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
821         (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
822         (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
823         * windows-nat.c (display_selectors): Constify.
824         * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
825         non-const "cfunc".
826         * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
827         (cmd_cfunc_eq): Likewise.
828         (struct cmd_list_element): Likewise.
829         (do_cfunc): Remove.
830         (cli_user_command_p): Update.
831         * command.h (add_cmd): Remove non-const overload.
832         (cmd_cfunc_ftype): Remove typedef.
833         (cmd_cfunc_eq): Remove non-const overload.
834         * value.c (show_values): Constify.
835         * thread.c (thread_apply_all_command): Constify.
836         * symfile.c (load_command): Constify.
837         * source.c (directory_command): Constify.
838         * maint.c (maintenance_internal_error)
839         (maintenance_demangler_warning, maintenance_space_display)
840         (maintenance_print_architecture, maintenance_translate_address)
841         (maintenance_info_selftests, maintenance_internal_warning):
842         Constify.
843         * breakpoint.c (disable_trace_command, enable_trace_command):
844         Constify.
845         * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
846         Constify.
847         (add_auto_load_safe_path): Constify.
848         * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
849         * top.h (show_commands): Constify.
850         * linux-thread-db.c (info_auto_load_libthread_db): Constify.
851         * sparc64-tdep.c (adi_examine_command): Constify.
852         (adi_assign_command): Constify.
853
854 2017-11-07  Tom Tromey  <tom@tromey.com>
855
856         * frame.h (info_locals_command, info_args_command): Constify.
857         * auto-load.h (auto_load_info_scripts): Constify.
858         * inferior.h (registers_info): Constify.
859         * copying.c: Rebuild.
860         * copying.awk: Constify generated commands.
861         * auto-load.c (auto_load_info_scripts)
862         (info_auto_load_gdb_scripts): Constify.
863         * cli/cli-decode.c (struct cmd_list_element): Take a
864         cmd_const_cfunc_ftype.
865         * command.h (add_info): Take a cmd_const_cfunc_ftype.
866         * tui/tui-win.c (tui_all_windows_info): Constify.
867         * python/py-auto-load.c (info_auto_load_python_scripts):
868         Constify.
869         * cli/cli-cmds.c (show_command): Remove non-const overload.
870         * tracepoint.c (info_tvariables_command, info_scope_command):
871         Constify.
872         (info_static_tracepoint_markers_command): Constify.
873         * thread.c (info_threads_command): Constify.
874         (print_thread_info_1): Constify.
875         * target.c (info_target_command): Constify.
876         * symtab.c (info_sources_command, info_functions_command)
877         (info_types_command): Constify.
878         (info_variables_command): Remove non-const overload.
879         * symfile.c (info_ext_lang_command): Constify.
880         * stack.c (info_frame_command, info_locals_command)
881         (info_args_command): Constify.
882         (backtrace_command): Remove non-const overload.
883         * source.c (info_source_command, info_line_command): Constify.
884         * solib.c (info_sharedlibrary_command): Constify.
885         * skip.c (info_skip_command): Constify.
886         * ser-go32.c (info_serial_command): Constify.
887         * reverse.c (info_bookmarks_command): Constify.
888         * printcmd.c (info_symbol_command, info_address_command)
889         (info_display_command): Constify.
890         * osdata.c (info_osdata_command): Constify.
891         * objc-lang.c (info_selectors_command, info_classes_command):
892         Constify.
893         * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
894         * memattr.c (info_mem_command): Constify.
895         * macrocmd.c (info_macro_command, info_macros_command): Constify.
896         * linux-fork.c (info_checkpoints_command): Constify.
897         * infrun.c (info_signals_command): Constify.
898         * inflow.c (info_terminal_command): Constify.
899         * inferior.c (info_inferiors_command): Constify.
900         (print_inferior): Constify.
901         * infcmd.c (info_program_command, info_all_registers_command)
902         (info_registers_command, info_vector_command)
903         (info_float_command): Constify.
904         (registers_info): Constify.
905         * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
906         (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
907         Constify.
908         * f-valprint.c (info_common_command): Constify.
909         * dcache.c (info_dcache_command): Constify.
910         (dcache_info_1): Constify.
911         * darwin-nat-info.c (info_mach_tasks_command)
912         (info_mach_task_command, info_mach_ports_command)
913         (info_mach_port_command, info_mach_threads_command)
914         (info_mach_thread_command, info_mach_regions_command)
915         (info_mach_regions_recurse_command, info_mach_region_command)
916         (info_mach_exceptions_command): Constify.
917         (get_task_from_args): Constify.
918         * cp-support.c (info_vtbl_command): Constify.
919         * breakpoint.c (info_watchpoints_command)
920         (info_tracepoints_command): Constify.
921         (info_breakpoints_command): Remove non-const overload.
922         * avr-tdep.c (avr_io_reg_read_command): Constify.
923         * auxv.c (info_auxv_command): Constify.
924         * ada-tasks.c (info_tasks_command): Constify.
925         (info_task): Constify.
926         * ada-lang.c (info_exceptions_command): Constify.
927
928 2017-11-07  Tom Tromey  <tom@tromey.com>
929
930         * solib.h (no_shared_libraries): Constify.
931         * frame.h (return_command): Constify.
932         * cli/cli-cmds.h (quit_command): Constify.
933         * top.h (quit_command, execute_command): Constify.
934         * target.h (flash_erase_command): Constify.
935         * inferior.h (set_inferior_args, attach_command): Constify.
936         * tracepoint.h (start_tracing, stop_tracing): Constify.
937         * breakpoint.h (break_command, tbreak_command)
938         (hbreak_command_wrapper, thbreak_command_wrapper)
939         (rbreak_command_wrapper, watch_command_wrapper)
940         (awatch_command_wrapper, rwatch_command_wrapper)
941         (get_tracepoint_by_number): Constify.
942         * symtab.c (info_variables_command, rbreak_command)
943         (symtab_symbol_info): Constify.
944         (info_variables_command): Add non-const overload.
945         * top.c (dont_repeat_command): Constify.
946         * breakpoint.c (ignore_command, commands_command)
947         (condition_command, tbreak_command, hbreak_command)
948         (thbreak_command, clear_command, break_command)
949         (info_breakpoints_command, watch_command, rwatch_command)
950         (awatch_command, trace_command, ftrace_command, strace_command)
951         (trace_pass_command, break_range_command, dprintf_command)
952         (agent_printf_command, get_tracepoint_by_number)
953         (watch_maybe_just_location, trace_pass_command): Constify.
954         (info_breakpoints_command): Add non-const overload.
955         * tracefile.c (tsave_command): Constify.
956         * infcmd.c (attach_command, disconnect_command, signal_command)
957         (queue_signal_command, stepi_command, nexti_command)
958         (finish_command, next_command, step_command, until_command)
959         (advance_command, jump_command, continue_command, run_command)
960         (start_command, starti_command, interrupt_command)
961         (run_command_1, set_inferior_args, step_1): Constify.
962         * inferior.c (add_inferior_command, remove_inferior_command)
963         (clone_inferior_command): Constify.
964         * linux-fork.c (checkpoint_command, restart_command): Constify.
965         * windows-nat.c (signal_event_command): Constify.
966         * guile/guile.c (guile_repl_command, guile_command): Constify.
967         * printcmd.c (x_command, display_command, printf_command)
968         (output_command, set_command, call_command, print_command)
969         (eval_command): Constify.
970         (non_const_set_command): Remove.
971         (_initialize_printcmd): Update.
972         * source.c (forward_search_command, reverse_search_command):
973         Constify.
974         * jit.c (jit_reader_load_command, jit_reader_unload_command):
975         Constify.
976         * infrun.c (handle_command): Constify.
977         * memattr.c (mem_command): Constify.
978         * stack.c (return_command, up_command, up_silently_command)
979         (down_command, down_silently_command, frame_command)
980         (backtrace_command, func_command, backtrace_command_1): Constify.
981         (backtrace_command): Add non-const overload.
982         * remote-sim.c (simulator_command): Constify.
983         * exec.c (set_section_command): Constify.
984         * tracepoint.c (tdump_command, trace_variable_command)
985         (tstatus_command, tstop_command, tstart_command)
986         (end_actions_pseudocommand, while_stepping_pseudocommand)
987         (collect_pseudocommand, teval_pseudocommand, actions_command)
988         (start_tracing, stop_tracing): Constify.
989         * value.c (init_if_undefined_command): Constify.
990         * tui/tui-stack.c (tui_update_command): Constify.
991         * tui/tui-win.c (tui_refresh_all_command)
992         (tui_set_tab_width_command, tui_set_win_height_command)
993         (tui_set_focus_command, tui_scroll_forward_command)
994         (tui_scroll_backward_command, tui_scroll_left_command)
995         (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
996         (tui_set_win_height): Constify.
997         * tui/tui-layout.c (tui_layout_command): Constify.
998         * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
999         (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
1000         (proc_untrace_sysexit_cmd): Constify.
1001         * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
1002         (threadset_test_cmd, threadlist_update_test_cmd)
1003         (threadalive_test): Constify.
1004         * objc-lang.c (print_object_command): Constify.
1005         * command.h (add_com): Constify.
1006         * cli/cli-dump.c (restore_command): Constify.
1007         * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
1008         (help_command, complete_command, shell_command, edit_command)
1009         (list_command, disassemble_command, make_command)
1010         (apropos_command, alias_command): Constify.
1011         * cli/cli-script.c (document_command, define_command)
1012         (while_command, if_command, validate_comname): Constify.
1013         * cli/cli-decode.c (struct cmd_list_element): Change type of
1014         "fun".
1015         * target.c (do_monitor_command, flash_erase_command): Constify.
1016         * regcache.c (reg_flush_command): Constify.
1017         * reverse.c (reverse_step, reverse_next, reverse_stepi)
1018         (reverse_nexti, reverse_continue, reverse_finish)
1019         (save_bookmark_command, goto_bookmark_command)
1020         (exec_reverse_once): Constify.
1021         * python/python.c (python_interactive_command, python_command):
1022         Constify.
1023         * typeprint.c (ptype_command, whatis_command, whatis_exp):
1024         Constify.
1025         * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
1026         * gcore.c (gcore_command): Constify.
1027
1028 2017-11-07  Tom Tromey  <tom@tromey.com>
1029
1030         * printcmd.c (x_command): Call set_repeat_arguments.
1031         * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
1032         * top.c (repeat_arguments): New global.
1033         (set_repeat_arguments): New function.
1034         (execute_command): Handle repeat_arguments.
1035         (show_commands): Calls set_repeat_arguments.
1036         * command.h (set_repeat_arguments): Declare.
1037
1038 2017-11-07  Tom Tromey  <tom@tromey.com>
1039
1040         * stack.c (backtrace_command): Use std::string.
1041         (backtrace_command_1): Make "count_exp" const.
1042
1043 2017-11-07  Tom Tromey  <tom@tromey.com>
1044
1045         * source.c (directory_switch, mod_path, add_path): Constify.
1046         * defs.h (add_path, mod_path, directory_switch): Constify.
1047         * mi/mi-cmd-env.c (env_mod_path): Constify.
1048
1049 2017-11-07  Tom Tromey  <tom@tromey.com>
1050
1051         * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
1052         (run_command_1, continue_command, step_1, jump_command)
1053         (signal_command, until_command, advance_command, finish_command)
1054         (attach_command): Update.
1055
1056 2017-11-07  Tom Tromey  <tom@tromey.com>
1057
1058         * command.h (set_cmd_cfunc): Don't declare.
1059         * cli/cli-decode.c (set_cmd_cfunc): Now static.
1060
1061 2017-11-07  Tom Tromey  <tom@tromey.com>
1062
1063         * stack.c (select_frame_command): Constify.
1064         * cli/cli-decode.c (add_com_suppress_notification): Constify.
1065         * command.h (add_com_suppress_notification): Constify.
1066
1067 2017-11-07  Tom Tromey  <tom@tromey.com>
1068
1069         * breakpoint.c (stop_command): Constify.
1070         * cli/cli-decode.c (struct cmd_list_element): Constify.
1071         * command.h (add_abbrev_prefix_cmd): Constify.
1072
1073 2017-11-07  Pedro Alves  <palves@redhat.com>
1074
1075         * breakpoint.c (extract_bp_kind): New enum.
1076         (extract_bp_num, extract_bp_or_bp_range): New functions, partially
1077         factored out from ...
1078         (extract_bp_number_and_location): ... here.
1079         * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
1080
1081 2017-11-07  Pedro Alves  <palves@redhat.com>
1082
1083         * breakpoint.c (extract_bp_number_and_location): Change return
1084         type to void.  Throw error instead of warning.
1085         (enable_disable_command): Adjust.
1086
1087 2017-11-07  Xavier Roirand  <roirand@adacore.com>
1088             Pedro Alves  <palves@redhat.com>
1089
1090         * breakpoint.c (map_breakpoint_number_range): New, factored out
1091         from ...
1092         (map_breakpoint_numbers): ... here.
1093         (find_location_by_number): Change parameters from string to
1094         breakpoint number and location.
1095         (extract_bp_number_and_location): New function.
1096         (enable_disable_bp_num_loc)
1097         (enable_disable_breakpoint_location_range)
1098         (enable_disable_command): New functions, factored out ...
1099         (enable_command, disable_command): ... these functions, and
1100         adjusted to support ranges.
1101         * NEWS: Document enable/disable breakpoint location range feature.
1102
1103 2017-11-06  Luis Machado  <luis.machado@linaro.org>
1104
1105         * MAINTAINERS (Write After Approval): Update my e-mail address.
1106
1107 2017-11-06  Pedro Alves  <palves@redhat.com>
1108
1109         * gnu-nat.c (gnu_terminal_init): Delete.
1110         (gnu_target): Don't install gnu_terminal_init.
1111         * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
1112         (child_terminal_init): ... this function.
1113
1114 2017-11-06  Pedro Alves  <palves@redhat.com>
1115
1116         * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
1117         sgtty.h.
1118         * config.in, configure: Regenerate.
1119
1120 2017-11-06  Pedro Alves  <palves@redhat.com>
1121
1122         * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
1123         (async_init_signals): Adjust.
1124         (handle_stop_sig): Rename to ...
1125         (handle_sigtstp): ... this.
1126         (async_stop_sig): Rename to ...
1127         (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
1128         SIGTSTP path.
1129         * event-top.h: Move signal.h include to the top.  Check SIGTSTP
1130         instead of STOP_SIGNAL thoughout.
1131         (handle_stop_sig): Rename to ...
1132         (handle_sigtstp): ... this.
1133         * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
1134
1135 2017-11-06  Pedro Alves  <palves@redhat.com>
1136
1137         * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
1138         longer set flags twice in row.
1139
1140 2017-11-06  Pedro Alves  <palves@redhat.com>
1141
1142         * Makefile.in (SER_HARDWIRE): Update comment.
1143         (HFILES_NO_SRCDIR): Remove gdb_termios.h.
1144         * common/gdb_termios.h: Delete file.
1145         * common/job-control.c: Include termios.h and unistd.h instead of
1146         gdb_termios.h.
1147         (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
1148         check.
1149         (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
1150         Remove sgtty code.
1151         * configure.ac: No longer check for termio.h and sgtty.h.
1152         * configure: Regenerate.
1153         * inflow.c: Include termios.h instead of gdb_termios.h.  Replace
1154         PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
1155         Replace PROCESS_GROUP_TYPE references with pid_t references
1156         throughout.
1157         (gdb_getpgrp): Delete.
1158         (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
1159         (child_terminal_inferior): Remove comment.  Remove sgtty code.
1160         (child_terminal_ours_1): Use tcgetpgrp directly instead of
1161         gdb_getpgrp.  Use serial_set_tty_state instead aof
1162         serial_noflush_set_tty_state.  Remove sgtty code.
1163         * inflow.h: Include unistd.h instead of gdb_termios.h.  Replace
1164         PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
1165         (inferior_process_group): Now returns pid_t.
1166         * ser-base.c (ser_base_noflush_set_tty_state): Delete.
1167         * ser-base.h (ser_base_noflush_set_tty_state): Delete.
1168         * ser-event.c (serial_event_ops): Update.
1169         * ser-go32.c (dos_noflush_set_tty_state): Delete.
1170         (dos_ops): Update.
1171         * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
1172         * ser-pipe.c (pipe_ops): Update.
1173         * ser-tcp.c (tcp_ops): Update.
1174         * ser-unix.c: Include termios.h instead of gdb_termios.h.  Remove
1175         HAVE_TERMIOS checks.
1176         [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
1177         [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
1178         (get_tty_state, set_tty_state): Drop termio and sgtty code, and
1179         assume termios.
1180         (hardwire_noflush_set_tty_state): Delete.
1181         (hardwire_print_tty_state, hardwire_drain_output)
1182         (hardwire_flush_output, hardwire_flush_input)
1183         (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
1184         (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
1185         code, and assume termios.
1186         (hardwire_ops): Update.
1187         (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
1188         * serial.c (serial_noflush_set_tty_state): Delete.
1189         * serial.h (serial_noflush_set_tty_state): Delete.
1190         (serial_ops::noflush_set_tty_state): Delete.
1191
1192 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1193
1194         * Makefile.in (SFILES): Remove doublest.c and dfp.c.
1195         (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
1196         (COMMON_OBS): Remove doublest.o and dfp.o.
1197         Do not build target-float.c (instead of doublest.c)
1198         with -Wformat-nonliteral.
1199
1200         * doublest.c: Remove file.
1201         * doublest.h: Remove file.
1202         * dfp.c: Remove file.
1203         * dfp.h: Remove file.
1204
1205         * target-float.c: Do not include "doublest.h" and "dfp.h".
1206         (DOUBLEST): Move here from doublest.h.
1207         (enum float_kind): Likewise.
1208         (FLOATFORMAT_CHAR_BIT): Likewise.
1209         (FLOATFORMAT_LARGEST_BYTES): Likewise.
1210         (floatformat_totalsize_bytes): Move here from doublest.c.  Make static.
1211         (floatformat_precision): Likewise.
1212         (floatformat_normalize_byteorder, get_field, put_field): Likewise.
1213         (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
1214         Likewise.
1215         (host_float_format, host_double_format, host_long_double_format):
1216         Likewise.
1217         (floatformat_to_string, floatformat_from_string): Likewise.
1218         (floatformat_to_doublest): Likewise.  Also, inline the original
1219         convert_floatformat_to_doublest.
1220         (floatformat_from_doublest): Likewise.  Also, inline the original
1221         convert_floatformat_from_doublest.
1222
1223         Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
1224         (MAX_DECIMAL_STRING): Move here from dfp.c.
1225         (match_endianness): Likewise.
1226         (set_decnumber_context, decimal_check_errors): Likewise.
1227         (decimal_from_number, decimal_to_number): Likewise.
1228         (decimal_to_string, decimal_from_string): Likewise.  Make static.
1229         (decimal_from_longest, decimal_from_ulongest): Likewise.
1230         (decimal_to_longest): Likewise.
1231         (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
1232         (decimal_convert): Likewise.
1233
1234 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1235
1236         * doublest.c: Do not include "gdbtypes.h".
1237         (extract_typed_floating): Remove.
1238         (store_typed_floating): Remove.
1239         (convert_typed_floating): Remove.
1240         * doublest.h (struct type): Remove.
1241         (DOUBLEST_PRINT_FORMAT): Remove.
1242         (DOUBLEST_SCAN_FORMAT): Remove.
1243         (extract_typed_floating): Remove.
1244         (store_typed_floating): Remove.
1245         (convert_typed_floating): Remove.
1246
1247         * dfp.c (decimal_from_doublest): Remove.
1248         (decimal_to_doublest): Remove.
1249         * dfp.h: Do not include "doublest.h".
1250         (decimal_from_doublest): Remove.
1251         (decimal_to_doublest): Remove.
1252
1253         * value.c: Do not include "doublest.h" and "dfp.h".
1254         (value_as_double): Remove.
1255         (unpack_double): Remove.
1256         (value_from_double): Remove.
1257         (value_from_decfloat): Remove.
1258         * value.h: Do not include "doublest.h".
1259         (value_as_double): Remove.
1260         (unpack_double): Remove.
1261         (value_from_double): Remove.
1262         (value_from_decfloat): Remove.
1263
1264 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1265
1266         * i386-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1267         (i386_extract_return_value): Use target_float_convert.
1268         (i386_store_return_value): Likewise.
1269         * i387-tdep.c (i387_register_to_value): Use target_float_convert.
1270         (i387_value_to_register): Likewise.
1271         * ia64-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1272         (ia64_register_to_value): Use target_float_convert.
1273         (ia64_value_to_register): Likewise.
1274         (ia64_extract_return_value): Likewise.
1275         (ia64_store_return_value): Likewise.
1276         (ia64_push_dummy_call): Likewise.
1277         * m68k-tdep.c: Include "target-float.h".
1278         (m68k_register_to_value): Use target_float_convert.
1279         (m68k_value_to_register): Likewise.
1280         (m68k_svr4_extract_return_value): Likewise.
1281         (m68k_svr4_store_return_value): Likewise.
1282         * ppc-sysv-tdep.c: Include "target-float.h".
1283         (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
1284         (do_ppc_sysv_return_value): Likewise.
1285         (ppc64_sysv_abi_push_freg): Likewise.
1286         (ppc64_sysv_abi_return_value_base): Likewise.
1287         * rs6000-aix-tdep.c: Include "target-float.h".
1288         (rs6000_push_dummy_call): Use target_float_convert.
1289         (rs6000_return_value): Likewise.
1290         * rs6000-lynx178-tdep.c: Include "target-float.h".
1291         (rs6000_lynx178_push_dummy_call): Use target_float_convert.
1292         (rs6000_lynx178_return_value): Likewise.
1293         * rs6000-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1294         (rs6000_register_to_value): Use target_float_convert.
1295         (rs6000_value_to_register): Likewise.
1296         * arm-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1297         (arm_extract_return_value): Use target_float_convert.
1298         (arm_store_return_value): Likewise.
1299         * sh-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1300         (sh_register_convert_to_virtual): Use target_float_convert.
1301         (sh_register_convert_to_raw): Likewise.
1302         * sh64-tdep.c: Include "target-float.h".
1303         (sh64_extract_return_value): Use target_float_convert.
1304         (sh64_register_convert_to_virtual): Likewise.
1305         (sh64_register_convert_to_raw): Likewise.  Fix argument types.
1306
1307 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1308
1309         * target-float.c (floatformat_to_host_double): New function.
1310         (floatformat_from_host_double): Likewise.
1311         (target_float_to_host_double): Likewise.
1312         (target_float_from_host_double): Likewise.
1313         * target-float.h (target_float_to_host_double): Add prototype.
1314         (target_float_from_host_double): Likewise.
1315
1316         * guile/scm-value.c: Include "target-float.h".
1317         (gdbscm_value_to_real): Use target_float_to_host_double.
1318         Handle integer source values via value_as_long.
1319         * guile/scm-math.c: Include "target-float.h".  Do not include
1320         "doublest.h", "dfp.h", and "expression.h".
1321         (vlscm_convert_typed_number): Use target_float_from_host_double.
1322         (vlscm_convert_number): Likewise.
1323
1324         * python/py-value.c (valpy_float): Use target_float_to_host_double.
1325         (convert_value_from_python): Use target_float_from_host_double.
1326
1327 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1328
1329         * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
1330         (cast_from_fixed): Likewise.
1331         (ada_scaling_type): New function.
1332         (ada_delta): Return value instead of DOUBLEST.  Perform target
1333         arithmetic instead of host arithmetic.
1334         (scaling_factor): Rename to ...
1335         (ada_scaling_factor) ... this.  Make non-static.  Return value instead
1336         of DOUBLEST.  Perform target arithmetic instead of host arithmetic.
1337         (ada_fixed_to_float): Remove.
1338         (ada_float_to_fixed): Remove.
1339         * ada-lang.h (ada_fixed_to_float): Remove.
1340         (ada_float_to_fixed): Remove.
1341         (ada_delta): Return value instead of DOUBLEST.
1342         (ada_scaling_factor): Add prototype.
1343
1344         * ada-typeprint.c: Include "target-float.h".
1345         (print_fixed_point_type): Perform target arithmetic instead of
1346         host arithmetic.
1347         * ada-valprint.c: Include "target-float.h".
1348         (ada_val_print_num): Perform target arithmetic instead of
1349         host arithmetic for fixed-point types.
1350
1351 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1352
1353         * target-float.c: Include <math.h>.
1354         (floatformat_binop): New function.
1355         (floatformat_compare): Likewise.
1356         (target_float_binop): Likewise.
1357         (target_float_compare): Likewise.
1358         * target-float.h: Include "expression.h".
1359         (target_float_binop): Add prototype.
1360         (target_float_compare): Likewise.
1361
1362         * valarith.c: Do not include "doublest.h" and "dfp.h".
1363         Include "common/byte-vector.h".
1364         (value_args_as_decimal): Remove, replace by ...
1365         (value_args_as_target_float): ... this function.  Handle both
1366         binary and decimal target floating-point formats.
1367         (scalar_binop): Handle both binary and decimal FP using
1368         value_args_as_target_float and target_float_binop.
1369         (value_equal): Handle both binary and decimal FP using
1370         value_args_as_target_float and target_float_compare.
1371         (value_less): Likewise.
1372         (value_pos): Handle all scalar types as simple copy.
1373         (value_neg): Handle all scalar types via BINOP_SUB from 0.
1374         * dfp.c (decimal_binop): Throw error instead of internal_error
1375         when called with an unsupported operation code.
1376
1377 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1378
1379         * target-float.c (target_float_to_string): New function.
1380         (target_float_from_string): New function.
1381         * target-float.h (target_float_to_string): Add prototype.
1382         (target_float_from_string): Add prototype.
1383
1384         * valprint.c: Include "target-float.h".  Do not include
1385         "doublest.h" and "dfp.h".
1386         (print_floating): Use target_float_to_string.
1387         * printcmd.c: Include "target-float.h".  Do not include "dfp.h".
1388         (printf_floating): Use target_float_to_string.
1389         * i387-tdep.c: Include "target-float.h".  Do not include "doublest.h".
1390         (print_i387_value): Use target_float_to_string.
1391         * mips-tdep.c: Include "target-float.h".
1392         (mips_print_fp_register): Use target_float_to_string.
1393         * sh64-tdep.c: Include "target-float.h".
1394         (sh64_do_fp_register): Use target_float_to_string.
1395
1396         * parse.c: Include "target-float.h".  Do not include
1397         "doublest.h" and "dfp.h".
1398         (parse_float): Use target_float_from_string.
1399         * stabsread.c: Include "target-float.h".  Do not include "doublest.h".
1400         (define_symbol): Use target_float_from_string.
1401         * gdbarch-selftests.c: Include "target-float.h".
1402         (register_to_value_test): Use target_float_from_string.
1403
1404 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
1405
1406         * Makefile.c (SFILES): Add target-float.c.
1407         (HFILES_NO_SRCDIR): Add target-float.h.
1408         (COMMON_OBS): Add target-float.o.
1409         * target-float.h: New file.
1410         * target-float.c: New file.
1411
1412         * doublest.c (floatformat_classify): Fix detection of float_zero.
1413
1414         * gdbtypes.c (is_floating_type): New function.
1415         * gdbtypes.h (is_floating_type): Add prototype.
1416
1417         * value.c: Do not include "floatformat.h".
1418         (unpack_double): Use target_float_is_valid.
1419         (is_floating_value): New function.
1420         * value.h (is_floating_value): Add prototype-
1421
1422         * valarith.c: Include "target-float.h".
1423         (value_logical_not): Use target_float_is_zero.
1424
1425         * python/py-value.c: Include "target-float.h".
1426         (valpy_nonzero): Use target_float_is_zero.
1427
1428 2017-11-04  Tom Tromey  <tom@tromey.com>
1429
1430         * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
1431
1432 2017-11-04  Tom Tromey  <tom@tromey.com>
1433
1434         * breakpoint.c (set_momentary_breakpoint): Return
1435         breakpoint_up.
1436         (until_break_command): Update.
1437         (new_until_break_fsm): Change argument types to
1438         breakpoint_up.
1439         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1440         (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
1441         Remove.
1442         * infcmd.c (finish_forward): Update.
1443         * breakpoint.h (set_momentary_breakpoint)
1444         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
1445         (make_cleanup_delete_breakpoint): Remove.
1446         (struct breakpoint_deleter): New.
1447         (breakpoint_up): New typedef.
1448         * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
1449         (insert_exception_resume_breakpoint): Update.
1450         (insert_exception_resume_from_probe): Update.
1451         (insert_longjmp_resume_breakpoint): Update.
1452         * arm-linux-tdep.c (arm_linux_copy_svc): Update.
1453         * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
1454         * infcall.c (call_function_by_hand_dummy): Update
1455
1456 2017-11-04  Tom Tromey  <tom@tromey.com>
1457
1458         * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
1459
1460 2017-11-04  Tom Tromey  <tom@tromey.com>
1461
1462         * linux-tdep.c (linux_core_info_proc_mappings): Use
1463         gdb::def_vector.
1464         (linux_get_siginfo_data): Return gdb::byte_vector.  Remove
1465         "size" argument.
1466         (linux_corefile_thread): Update.
1467         (linux_make_corefile_notes): Remove unused variable.
1468
1469 2017-11-04  Tom Tromey  <tom@tromey.com>
1470
1471         * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
1472         gdb::byte_vector.
1473
1474 2017-11-04  Tom Tromey  <tom@tromey.com>
1475
1476         * objfiles.c (do_free_objfile_cleanup): Remove.
1477         * compile/compile-object-load.c (compile_object_load): Update.
1478         * objfiles.h (make_cleanup_free_objfile): Remove.
1479
1480 2017-11-04  Tom Tromey  <tom@tromey.com>
1481
1482         * sparc64-tdep.c (do_examine): Use gdb::def_vector.
1483         (adi_read_versions): Change "tags" to "gdb_byte *".
1484         (adi_print_versions): Likewise.
1485
1486 2017-11-04  Tom Tromey  <tom@tromey.com>
1487
1488         * breakpoint.c
1489         (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
1490         from start_rbreak_breakpoints.
1491         (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
1492         * breakpoint.h (class scoped_rbreak_breakpoints): New.
1493         (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
1494         * symtab.c (do_end_rbreak_breakpoints): Remove.
1495         (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
1496
1497 2017-11-04  Tom Tromey  <tom@tromey.com>
1498
1499         * cp-namespace.c (reset_directive_searched): Remove.
1500         (cp_lookup_symbol_via_imports): Use scoped_restore.
1501         * cp-support.c (reset_directive_searched): Remove.
1502         (make_symbol_overload_list_using): Use scoped_restore.
1503         * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
1504         (reset_directive_searched): Remove.
1505
1506 2017-11-04  Tom Tromey  <tom@tromey.com>
1507
1508         * symfile.c (find_separate_debug_file_by_debuglink): Use
1509         unique_xmalloc_ptr.
1510
1511 2017-11-04  Tom Tromey  <tom@tromey.com>
1512
1513         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
1514         type of "info".
1515         (compute_stack_depth): Likewise.
1516         (do_compile_dwarf_expr_to_c): Use std::vector.
1517
1518 2017-11-04  Tom Tromey  <tom@tromey.com>
1519
1520         * compile/compile-object-load.c (link_callbacks_einfo): Use
1521         std::string.
1522
1523 2017-11-04  Tom Tromey  <tom@tromey.com>
1524
1525         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
1526         Use scoped_free_pendings.
1527         * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
1528         scoped_free_pendings.
1529         * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
1530         (xcoff_initial_scan): Likewise.
1531         * buildsym.c (reset_symtab_globals): Update comment.
1532         (scoped_free_pendings): Rename from really_free_pendings.
1533         (prepare_for_building): Update comment.
1534         (buildsym_init): Likewise.
1535         * buildsym.h (class scoped_free_pendings): New class.
1536         (really_free_pendings): Don't declare.
1537
1538 2017-11-03  Ulrich Weigand  <uweigand@de.ibm.com>
1539
1540         * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
1541         output when converting a zero value to a special byteorder format.
1542
1543 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1544
1545         * frame.c (do_frame_register_read): Remove aspace.
1546         * jit.c (jit_frame_sniffer): Likwise.
1547         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
1548         * regcache.c (regcache::regcache): Pass nullptr.
1549         (regcache_print): Caller updated.
1550         * regcache.h (regcache::regcache): Remove one constructor
1551         parameter aspace.
1552
1553 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1554
1555         * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
1556
1557 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1558
1559         * breakpoint.c (insert_single_step_breakpoints): Update.
1560         * frame.c (struct frame_info) <aspace>: Add const.
1561         (frame_save_as_regcache): Add const.
1562         (get_frame_address_space): Return const address_space *.
1563         * frame.h (get_frame_address_space): Update declaration.
1564         * infrun.c (struct step_over_info) <aspace>: Add const.
1565         (set_step_over_info): Make aspace const.
1566         (displaced_step_prepare_throw): Change variable const.
1567         (resume): Likewise.
1568         (proceed): Likewise.
1569         (adjust_pc_after_break): Likewise.
1570         (save_waitstatus): Likewise.
1571         (handle_signal_stop): Likewise.
1572         (keep_going_pass_signal): Likewise.
1573         * jit.c (jit_frame_sniffer): Add const.
1574         * mips-tdep.c (mips_single_step_through_delay): Likewise.
1575         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
1576         * record-full.c (record_full_wait_1): Likewise.
1577         * regcache.c (regcache::regcache): Change parameter to const.
1578         * regcache.h (regcache::regcache): Likewise.
1579         (regcache::aspace): Return const address_space *.
1580         (regcache) <m_aspace>: Add const.
1581
1582 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1583
1584         * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
1585         * frame.c (create_sentinel_frame): Likewise.
1586         * infrun.c (displaced_step_prepare_throw): Likewise.
1587         (resume): Likewise.
1588         (thread_still_needs_step_over_bp): Likewise.
1589         (proceed): Likewise.
1590         (do_target_wait): Likewise.
1591         (adjust_pc_after_break): Likewise.
1592         (handle_syscall_event): Likewise.
1593         (save_waitstatus): Likewise.
1594         (handle_inferior_event_1): Likewise.
1595         (handle_signal_stop): Likewise.
1596         (keep_going_pass_signal): Likewise.
1597         * linux-nat.c (status_callback): Likewise.
1598         (save_stop_reason): Likewise.
1599         (resume_stopped_resumed_lwps): Likewise.
1600         * record-full.c (record_full_exec_insn): Likewise.
1601         (record_full_wait_1): Likewise.
1602         * regcache.c (get_regcache_aspace): Remove.
1603         * regcache.h (get_regcache_aspace): Remove.
1604
1605 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1606
1607         * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
1608         (init_regcache_descr): Use gdbarch_num_regs.
1609         (regcache::regcache): Likewise.
1610         (regcache::get_register_status): Likewise.
1611         (regcache::assert_raw_regnum): Likewise.
1612         (regcache::cooked_read): Likewise.
1613         (regcache::cooked_read_value): Likewise.
1614         (regcache::cooked_write): Likewise.
1615         (regcache::dump): Likewise.
1616         (regcache::num_raw_registers): New method.
1617         * regcache.h (class regcache) <num_raw_registers>: New.
1618
1619 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1620
1621         * regcache.c (regcache::assert_regnum): New method.
1622         (regcache::invalidate): Call assert_regnum.
1623         (regcache::raw_update): Likewise.
1624         (regcache::raw_write): Likewise.
1625         (regcache::raw_read_part): Likewise.
1626         (regcache::raw_write_part): Likewise.
1627         (regcache::raw_supply): Likewise.
1628         (regcache::raw_supply_integer): Likewise.
1629         (regcache::raw_supply_zeroed): Likewise.
1630         (regcache::raw_collect): Likewise.
1631         (regcache::raw_collect_integer): Likewise.
1632         * regcache.h (regcache::assert_regnum): Declare.
1633
1634 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1635
1636         * regcache.c (regcache::dump): Remove code.
1637
1638 2017-11-02  Yao Qi  <yao.qi@linaro.org>
1639
1640         * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
1641         Remove.
1642         <sizeof_cooked_register_status>: Remove.
1643         (init_regcache_descr): Update.
1644         (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
1645         (regcache::save): Likewise.
1646         (regcache::dump): Likewise.
1647
1648 2017-11-01  James Bowman  <james.bowman@ftdichip.com>
1649
1650         * ft32-tdep.c (ft32_fetch_instruction): New function.
1651         (ft32_analyze_prologue): Use ft32_fetch_instruction().
1652
1653 2017-10-31  Simon Marchi  <simon.marchi@polymtl.ca>
1654
1655         * cli/cli-script.c (execute_control_command): Rename to ...
1656         (execute_control_command_1): ... this.
1657         (execute_control_command): New function.
1658
1659 2017-10-31  Simon Marchi  <simon.marchi@ericsson.com>
1660
1661         * tracepoint.c (tfind_command): Remove const_cast.
1662
1663 2017-10-30  Mike Gulick  <mgulick@mathworks.com>
1664
1665         * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
1666
1667 2017-10-30  Simon Marchi  <simon.marchi@ericsson.com>
1668
1669         * common/common-utils.h (in_inclusive_range): New function.
1670         * arm-tdep.c (arm_record_extension_space): Use
1671         in_inclusive_range.
1672         (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
1673         * cris-tdep.c (cris_spec_reg_applicable): Use
1674         in_inclusive_range.
1675
1676 2017-10-30  Pedro Alves  <palves@redhat.com>
1677             Simon Marchi <simon.marchi@ericsson.com>
1678
1679         * remote.c (remote_set_syscall_catchpoint): Build a std::string
1680         instead of a gdb::unique_xmalloc_ptr, using string_appendf.
1681
1682 2017-10-30  Pedro Alves  <palves@redhat.com>
1683
1684         * common/common-utils.c (string_appendf, string_vappendf): New
1685         functions.
1686         * common/common-utils.h (string_appendf, string_vappendf): New
1687         declarations.
1688         * unittests/common-utils-selftests.c (string_appendf_func)
1689         (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
1690         (string_vappendf_tests): New functions.
1691         (_initialize_common_utils_selftests): Register "string_appendf" and
1692         "string_vappendf tests".
1693
1694 2017-10-30  Pedro Alves  <palves@redhat.com>
1695
1696         * unittests/common-utils-selftests.c (format_func): New typedef.
1697         (string_printf_tests, string_vprintf_tests): Tests factored out
1698         and merged to ...
1699         (test_format_func): ... this new function.
1700         (string_printf_tests, string_vprintf_tests): Reimplement on top of
1701         test_format_func.
1702
1703 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
1704
1705         * darwin-nat.c: Remove include of gdb.h.
1706
1707 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
1708
1709         * xtensa-xtregs.c: Fix formatting issues.
1710
1711 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
1712
1713         * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
1714
1715 2017-10-28  Maksim Dzabraev  <dzabraew@gmail.com>
1716
1717         PR python/21213
1718         * python/py-infthread.c (thpy_get_inferior): Increment reference
1719         of inferior before returning it.
1720
1721 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1722
1723         * unittests/common-utils-selftests.c (format): Add
1724         ATTRIBUTE_PRINTF.
1725
1726 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
1727
1728         * xml-syscall.c (struct syscall_desc): Add constructor.
1729         <name>: Change type to std::string.
1730         (syscall_desc_up): New typedef.
1731         (syscall_desc_p): Remove typeder.
1732         (DEF_VEC_P(syscall_desc_p)): Remove.
1733         (struct syscall_group_desc): Add constructor.
1734         <name>: Change type to std::string.
1735         <syscalls>: Change type to std::vector.
1736         (syscall_group_desc_up): New typedef.
1737         (syscall_group_desc_p): Remove typedef.
1738         (DEF_VEC_P(syscall_group_desc_p)): Remove.
1739         (struct syscalls_info) <syscalls>: Change type to std::vector of
1740         unique_ptr.
1741         <groups>: Likewise.
1742         <my_gdb_datadir>: Change type to std::string.
1743         (syscalls_info_up): New typedef.
1744         (allocate_syscalls_info): Remove.
1745         (syscalls_info_free_syscalls_desc): Remove.
1746         (syscalls_info_free_syscall_group_desc): Remove.
1747         (free_syscalls_info): Remove.
1748         (make_cleanup_free_syscalls_info): Remove.
1749         (syscall_group_create_syscall_group_desc): Adjust.
1750         (syscall_group_add_syscall): Adjust.
1751         (syscall_create_syscall_desc): Adjust.
1752         (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
1753         (init_syscalls_info): Adjust.
1754         (syscall_group_get_group_by_name): Adjust.
1755         (xml_get_syscall_number): Adjust.
1756         (xml_get_syscall_name): Adjust.
1757         (xml_list_of_syscalls): Adjust.
1758         (xml_list_syscalls_by_group): Adjust.
1759         (xml_list_of_groups): Adjust.
1760
1761 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1762
1763         * probe.h: Don't include gdb_vecs.h.
1764         (DEF_VEC_P (probe_p)): Remove.
1765         (find_probes_in_objfile): Return an std::vector.
1766         * probe.c (find_probes_in_objfile): Likewise.
1767         * breakpoint.c (breakpoint_objfile_data)
1768         <longjmp_probes>: Change type to std::vector.
1769         <exception_probes>: Likewise.
1770         (free_breakpoint_probes): Don't manually free vectors.
1771         (create_longjmp_master_breakpoint): Adjust.
1772         (create_exception_master_breakpoint): Adjust.
1773         * solib-svr4.c (svr4_create_probe_breakpoints): Change
1774         parameter type, adjust.
1775         (svr4_create_solib_event_breakpoints): Adjust.
1776
1777 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1778
1779         * breakpoint.c (breakpoint_objfile_data): Initialize fields.
1780         (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
1781         with new.
1782         (free_breakpoint_probes): Rename to ...
1783         (free_breakpoint_objfile_data): ... this, and call delete on
1784         bp_objfile_data..
1785
1786 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
1787
1788         * auto-load.c: Don't include gdb_vecs.h, include algorithm.
1789         (loaded_script_ptr): Remove typedef.
1790         (DEF_VEC_P (loaded_script_ptr)): Remove.
1791         (struct collect_matching_scripts_data): Add constructor.
1792         <scripts_p>: Change type to (pointer to) std::vector.
1793         (collect_matching_scripts_data): Adjust.
1794         (sort_scripts_by_name): Make suitable for std::sort.
1795         (print_scripts): Don't sort vector, adjust to std::vector.
1796         (auto_load_info_scripts): Sort vectors, adjust to std::vector.
1797
1798 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1799
1800         * symfile.c (filename_language): Make struct, not typedef.  Add
1801         constructor.
1802         <ext>: Change type to std::string.
1803         (DEF_VEC_O (filename_language)): Remove.
1804         (filename_language_table): Change type to std::vector.
1805         (add_filename_language): Adjust.
1806         (set_ext_lang_command): Adjust.
1807         (info_ext_lang_command): Adjust.
1808         (deduce_language_from_filename): Adjust.
1809         (class scoped_restore_filename_language_table): Remove.
1810         (test_filename_language): Use scoped_restore.
1811         (test_set_ext_lang_command): Use scoped_restore, adjust to
1812         std::vector change.
1813
1814 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
1815
1816         * symfile.c: Include selftest.h.
1817         (class scoped_restore_filename_language_table): New.
1818         (test_filename_language): New test.
1819         (test_set_ext_lang_command): New test.
1820         (_initialize_symfile): Register tests.
1821
1822 2017-10-27  Keith Seitz  <keiths@redhat.com>
1823
1824         * breakpoint.c (print_breakpoint_location): Use the symbol saved
1825         in the bp_location, falling back to find_pc_sect_function when
1826         needed.
1827         (add_location_to_breakpoint): Save sal->symbol.
1828         * breakpoint.h (struct bp_location) <symbol>: New field.
1829         * symtab.c (find_function_start_sal): Save the symbol into the SaL.
1830         * symtab.h (struct symtab_and_line) <symbol>: New field.
1831
1832 2017-10-26  Patrick Frants  <osscontribute@gmail.com>
1833
1834         PR gdb/13669
1835         * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
1836         to rewind obstack.
1837
1838 2017-10-26  Pedro Alves  <palves@redhat.com>
1839
1840         * remote.c (remote_async_terminal_ours_p): Delete.
1841         (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
1842         Remove references to 'remote_async_terminal_ours_p'.
1843
1844 2017-10-26  Yao Qi  <yao.qi@linaro.org>
1845
1846         * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
1847
1848 2017-10-26  Yao Qi  <yao.qi@linaro.org>
1849
1850         * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
1851         aspace const.
1852         * break-catch-syscall.c (breakpoint_hit_catch_syscall):
1853         Likewise.
1854         * breakpoint.c (bpstat_check_location): Remove cast.
1855         (breakpoint_hit_catch_fork): Make aspce const.
1856         (breakpoint_hit_catch_solib): Likewise.
1857         (breakpoint_hit_catch_exec): Likewise.
1858         (breakpoint_hit_ranged_breakpoint): Likewise.
1859         (breakpoint_hit_watchpoint): Likewise.
1860         (base_breakpoint_breakpoint_hit): Likewise.
1861         (bkpt_breakpoint_hit): Likewise.
1862         (dprintf_breakpoint_hit): Likewise.
1863         (tracepoint_breakpoint_hit): Likewise.
1864         * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
1865
1866 2017-10-26  Yao Qi  <yao.qi@linaro.org>
1867
1868         * breakpoint.c (breakpoint_location_address_match): Change
1869         "struct address_space *" to "const address_space".
1870         (breakpoint_location_address_range_overlap): Likewise.
1871         (breakpoint_here_p): Likewise.
1872         (breakpoint_in_range_p): Likewise.
1873         (moribund_breakpoint_here_p): Likewise.
1874         (bp_location_inserted_here_p): Likewise.
1875         (software_breakpoint_inserted_here_p): Likewise.
1876         (hardware_breakpoint_inserted_here_p): Likewise.
1877         (hardware_watchpoint_inserted_in_range): Likewise.
1878         (bpstat_check_location): Likewise.
1879         (bpstat_stop_status): Likewise.
1880         (breakpoint_address_match): Likewise.
1881         (breakpoint_address_match_range): Likewise.
1882         (breakpoint_location_address_match): Likewise.
1883         (breakpoint_location_address_range_overlap): Likewise.
1884         (insert_single_step_breakpoint): Likewise.
1885         (breakpoint_has_location_inserted_here): Likewise.
1886         (single_step_breakpoint_inserted_here_p): Likewise.
1887         (pc_at_non_inline_function): Likewise.
1888         * breakpoint.h (bpstat_stop_status): Update declaration.
1889         (breakpoint_here_p): Likewise.
1890         (breakpoint_in_range_p): Likewise.
1891         (moribund_breakpoint_here_p): Likewise.
1892         (breakpoint_inserted_here_p): Likewise.
1893         (software_breakpoint_inserted_here_p): Likewise.
1894         (hardware_breakpoint_inserted_here_p): Likewise.
1895         (breakpoint_has_location_inserted_here): Likewise.
1896         (single_step_breakpoint_inserted_here_p): Likewise.
1897         (hardware_watchpoint_inserted_in_range): Likewise.
1898         (breakpoint_address_match): Likewise.
1899         (insert_single_step_breakpoint): Likewise.
1900         (pc_at_non_inline_function): Likewise.
1901         * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
1902         * record.c (record_check_stopped_by_breakpoint): Likewise.
1903         * record.h (record_check_stopped_by_breakpoint): Likewise.
1904         * thread.c (thread_has_single_step_breakpoint_here): Likewise.
1905
1906 2017-10-25  Yao Qi  <yao.qi@linaro.org>
1907
1908         * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
1909         regcache->arch () instead get_regcache_arch.
1910         * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
1911         Likewise.
1912         (aarch64_fbsd_store_inferior_registers): Likewise.
1913         * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
1914         (store_gregs_to_thread): Likewise.
1915         (fetch_fpregs_from_thread): Likewise.
1916         (store_fpregs_to_thread): Likewise.
1917         * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
1918         (aarch64_store_return_value): Likewise.
1919         (aarch64_software_single_step): Likewise.
1920         * aix-thread.c (aix_thread_wait): Likewise.
1921         (supply_reg32): Likewise.
1922         (supply_sprs64): Likewise.
1923         (supply_sprs32): Likewise.
1924         (fill_gprs64): Likewise.
1925         (fill_gprs32): Likewise.
1926         (fill_sprs64): Likewise.
1927         (fill_sprs32): Likewise.
1928         (store_regs_user_thread): Likewise.
1929         (store_regs_kernel_thread): Likewise.
1930         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
1931         (alphabsd_store_inferior_registers): Likewise.
1932         * alpha-tdep.c (alpha_extract_return_value): Likewise.
1933         (alpha_store_return_value): Likewise.
1934         (alpha_deal_with_atomic_sequence): Likewise.
1935         (alpha_next_pc): Likewise.
1936         (alpha_software_single_step): Likewise.
1937         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
1938         (amd64bsd_store_inferior_registers): Likewise.
1939         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
1940         Likewise.
1941         (amd64_linux_store_inferior_registers): Likewise.
1942         * amd64-nat.c (amd64_supply_native_gregset): Likewise.
1943         (amd64_collect_native_gregset): Likewise.
1944         * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
1945         (amd64obsd_collect_uthread): Likewise.
1946         * amd64-tdep.c (amd64_supply_fpregset): Likewise.
1947         (amd64_collect_fpregset): Likewise.
1948         (amd64_supply_fxsave): Likewise.
1949         (amd64_supply_xsave): Likewise.
1950         (amd64_collect_fxsave): Likewise.
1951         (amd64_collect_xsave): Likewise.
1952         * arc-tdep.c (arc_write_pc): Likewise.
1953         * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
1954         * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
1955         (arm_fbsd_store_inferior_registers): Likewise.
1956         * arm-linux-nat.c (fetch_vfp_regs): Likewise.
1957         (store_vfp_regs): Likewise.
1958         (arm_linux_fetch_inferior_registers): Likewise.
1959         (arm_linux_store_inferior_registers): Likewise.
1960         * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
1961         (arm_linux_sigreturn_next_pc): Likewise.
1962         (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
1963         * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
1964         (fetch_register): Likewise.
1965         (store_register): Likewise.
1966         * arm-tdep.c (arm_is_thumb): Likewise.
1967         (displaced_in_arm_mode): Likewise.
1968         (bx_write_pc): Likewise.
1969         (arm_get_next_pcs_addr_bits_remove): Likewise.
1970         (arm_software_single_step): Likewise.
1971         (arm_extract_return_value): Likewise.
1972         (arm_store_return_value): Likewise.
1973         (arm_write_pc): Likewise.
1974         * bfin-tdep.c (bfin_extract_return_value): Likewise.
1975         * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
1976         (bsd_uthread_store_registers): Likewise.
1977         * core-regset.c (fetch_core_registers): Likewise.
1978         * corelow.c (get_core_registers): Likewise.
1979         * cris-tdep.c (cris_store_return_value): Likewise.
1980         (cris_extract_return_value): Likewise.
1981         (find_step_target): Likewise.
1982         (find_step_target): Likewise.
1983         (cris_software_single_step): Likewise.
1984         * ctf.c (ctf_fetch_registers): Likewise.
1985         * darwin-nat.c (cancel_breakpoint): Likewise.
1986         * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
1987         * frv-tdep.c (frv_extract_return_value): Likewise.
1988         * ft32-tdep.c (ft32_store_return_value): Likewise.
1989         (ft32_extract_return_value): Likewise.
1990         * go32-nat.c (fetch_register): Likewise.
1991         (go32_fetch_registers): Likewise.
1992         (go32_store_registers): Likewise.
1993         (store_register): Likewise.
1994         * h8300-tdep.c (h8300_extract_return_value): Likewise.
1995         (h8300_store_return_value): Likewise.
1996         * hppa-linux-nat.c (fetch_register): Likewise.
1997         (store_register): Likewise.
1998         (hppa_linux_fetch_inferior_registers): Likewise.
1999         (hppa_linux_store_inferior_registers): Likewise.
2000         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
2001         (i386_darwin_store_inferior_registers): Likewise.
2002         * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
2003         (gnu_store_registers): Likewise.
2004         * i386-linux-nat.c (fetch_register): Likewise.
2005         (store_register): Likewise.
2006         (supply_gregset): Likewise.
2007         (fill_gregset): Likewise.
2008         (i386_linux_fetch_inferior_registers): Likewise.
2009         (i386_linux_store_inferior_registers): Likewise.
2010         (i386_linux_resume): Likewise.
2011         * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
2012         Likewise.
2013         * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
2014         * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
2015         * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
2016         (i386obsd_collect_uthread): Likewise.
2017         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
2018         (i386_supply_gregset): Likewise.
2019         (i386_collect_gregset): Likewise.
2020         (i386_supply_fpregset): Likewise.
2021         (i386_collect_fpregset): Likewise.
2022         (i386_mpx_bd_base): Likewise.
2023         * i386-v4-nat.c (supply_fpregset): Likewise.
2024         (fill_fpregset): Likewise.
2025         * i387-tdep.c (i387_supply_fsave): Likewise.
2026         (i387_collect_fsave): Likewise.
2027         (i387_supply_fxsave): Likewise.
2028         (i387_collect_fxsave): Likewise.
2029         (i387_supply_xsave): Likewise.
2030         (i387_collect_xsave): Likewise.
2031         * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
2032         (ia64_linux_store_registers): Likewise.
2033         * ia64-tdep.c (ia64_access_rse_reg): Likewise.
2034         (ia64_extract_return_value): Likewise.
2035         (ia64_store_return_value): Likewise.
2036         (find_func_descr): Likewise.
2037         * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
2038         * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
2039         (inf_ptrace_store_registers): Likewise.
2040         * infrun.c (use_displaced_stepping): Likewise.
2041         (displaced_step_prepare_throw): Likewise.
2042         (resume): Likewise.
2043         (proceed): Likewise.
2044         (do_target_wait): Likewise.
2045         (adjust_pc_after_break): Likewise.
2046         (handle_inferior_event_1): Likewise.
2047         (handle_signal_stop): Likewise.
2048         (save_infcall_suspend_state): Likewise.
2049         (restore_infcall_suspend_state): Likewise.
2050         * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
2051         * jit.c (jit_frame_prev_register): Likewise.
2052         * linux-nat.c (save_stop_reason): Likewise.
2053         (linux_nat_wait_1): Likewise.
2054         (resume_stopped_resumed_lwps): Likewise.
2055         * linux-record.c (record_linux_sockaddr): Likewise.
2056         (record_linux_msghdr): Likewise.
2057         (record_linux_system_call): Likewise.
2058         * linux-tdep.c (linux_collect_thread_registers): Likewise.
2059         * lm32-tdep.c (lm32_extract_return_value): Likewise.
2060         (lm32_store_return_value): Likewise.
2061         * m32c-tdep.c (m32c_read_flg): Likewise.
2062         (m32c_pseudo_register_read): Likewise.
2063         (m32c_pseudo_register_write): Likewise.
2064         * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
2065         (m32r_linux_collect_gregset): Likewise.
2066         * m32r-tdep.c (m32r_store_return_value): Likewise.
2067         (m32r_extract_return_value): Likewise.
2068         * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
2069         (m68kbsd_collect_fpregset): Likewise.
2070         * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
2071         * m68k-linux-nat.c (fetch_register): Likewise.
2072         (old_fetch_inferior_registers): Likewise.
2073         (old_store_inferior_registers): Likewise.
2074         (store_regs): Likewise.
2075         * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
2076         (m68k_svr4_store_return_value): Likewise.
2077         * m88k-tdep.c (m88k_store_arguments): Likewise.
2078         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
2079         (mi_cmd_data_write_register_values): Likewise.
2080         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
2081         (mips_fbsd_store_inferior_registers): Likewise.
2082         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
2083         (mips_fbsd_supply_gregs): Likewise.
2084         (mips_fbsd_collect_fpregs): Likewise.
2085         (mips_fbsd_collect_gregs): Likewise.
2086         (mips_fbsd_supply_fpregset): Likewise.
2087         (mips_fbsd_collect_fpregset): Likewise.
2088         (mips_fbsd_supply_gregset): Likewise.
2089         (mips_fbsd_collect_gregset): Likewise.
2090         * mips-linux-nat.c (supply_gregset): Likewise.
2091         (fill_gregset): Likewise.
2092         (supply_fpregset): Likewise.
2093         (fill_fpregset): Likewise.
2094         * mips-linux-tdep.c (mips_supply_gregset): Likewise.
2095         (mips_fill_gregset): Likewise.
2096         (mips_supply_fpregset): Likewise.
2097         (mips_fill_fpregset): Likewise.
2098         (mips64_supply_gregset): Likewise.
2099         (micromips_linux_sigframe_validate): Likewise.
2100         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
2101         (mipsnbsd_fetch_inferior_registers): Likewise.
2102         (mipsnbsd_store_inferior_registers): Likewise.
2103         * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
2104         (mipsnbsd_supply_gregset): Likewise.
2105         (mipsnbsd_iterate_over_regset_sections): Likewise.
2106         (mipsnbsd_supply_reg): Likewise.
2107         (mipsnbsd_supply_fpreg): Likewise.
2108         * mips-tdep.c (mips_in_frame_stub): Likewise.
2109         (mips_dummy_id): Likewise.
2110         (is_octeon_bbit_op): Likewise.
2111         (micromips_bc1_pc): Likewise.
2112         (extended_mips16_next_pc): Likewise.
2113         (mips16_next_pc): Likewise.
2114         (deal_with_atomic_sequence): Likewise.
2115         * moxie-tdep.c (moxie_process_readu): Likewise.
2116         * nios2-tdep.c (nios2_get_next_pc): Likewise.
2117         * nto-procfs.c (procfs_store_registers): Likewise.
2118         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
2119         (ppcfbsd_store_inferior_registers): Likewise.
2120         * ppc-linux-nat.c (fetch_vsx_register): Likewise.
2121         (fetch_altivec_register): Likewise.
2122         (get_spe_registers): Likewise.
2123         (fetch_spe_register): Likewise.
2124         (fetch_altivec_registers): Likewise.
2125         (fetch_all_gp_regs): Likewise.
2126         (fetch_all_fp_regs): Likewise.
2127         (store_vsx_register): Likewise.
2128         (store_altivec_register): Likewise.
2129         (set_spe_registers): Likewise.
2130         (store_spe_register): Likewise.
2131         (store_altivec_registers): Likewise.
2132         (store_all_gp_regs): Likewise.
2133         (store_all_fp_regs): Likewise.
2134         * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
2135         (ppc_linux_collect_gregset): Likewise.
2136         (ppc_canonicalize_syscall): Likewise.
2137         (ppc_linux_record_signal): Likewise.
2138         (ppu2spu_prev_register): Likewise.
2139         * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
2140         * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
2141         (ppcobsd_store_registers): Likewise.
2142         * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
2143         Likewise.
2144         (ppc_ravenscar_generic_store_registers): Likewise.
2145         * procfs.c (procfs_fetch_registers): Likewise.
2146         (procfs_store_registers): Likewise.
2147         * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
2148         (ravenscar_store_registers): Likewise.
2149         (ravenscar_prepare_to_store): Likewise.
2150         * record-btrace.c (record_btrace_fetch_registers): Likewise.
2151         * record-full.c (record_full_wait_1): Likewise.
2152         (record_full_registers_change): Likewise.
2153         (record_full_store_registers): Likewise.
2154         (record_full_core_fetch_registers): Likewise.
2155         (record_full_save): Likewise.
2156         (record_full_goto_insn): Likewise.
2157         * regcache.c (regcache_register_size): Likewise.
2158         (get_regcache_arch): Remove.
2159         (regcache_read_pc): Likewise.
2160         * regcache.h (get_regcache_arch): Remove.
2161         * remote-sim.c (gdbsim_fetch_register): Likewise.
2162         (gdbsim_store_register): Likewise.
2163         * remote.c (fetch_register_using_p): Likewise.
2164         (send_g_packet): Likewise.
2165         (remote_prepare_to_store): Likewise.
2166         (store_registers_using_G): Likewise.
2167         * reverse.c (save_bookmark_command): Likewise.
2168         (goto_bookmark_command): Likewise.
2169         * rs6000-aix-tdep.c (branch_dest): Likewise.
2170         * rs6000-nat.c (rs6000_ptrace64): Likewise.
2171         (fetch_register): Likewise.
2172         * rs6000-tdep.c (ppc_supply_reg): Likewise.
2173         (ppc_collect_reg): Likewise.
2174         (ppc_collect_gregset): Likewise.
2175         (ppc_collect_fpregset): Likewise.
2176         (ppc_collect_vsxregset): Likewise.
2177         (ppc_collect_vrregset): Likewise.
2178         (ppc_displaced_step_hw_singlestep): Likewise.
2179         (rs6000_pseudo_register_read): Likewise.
2180         (rs6000_pseudo_register_write): Likewise.
2181         * s390-linux-nat.c (supply_gregset): Likewise.
2182         (fill_gregset): Likewise.
2183         (s390_linux_fetch_inferior_registers): Likewise.
2184         * s390-linux-tdep.c (s390_write_pc): Likewise.
2185         (s390_software_single_step): Likewise.
2186         (s390_all_but_pc_registers_record): Likewise.
2187         (s390_linux_syscall_record): Likewise.
2188         * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
2189         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
2190         (shnbsd_store_inferior_registers): Likewise.
2191         * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
2192         (sh_extract_return_value_fpu): Likewise.
2193         (sh_store_return_value_nofpu): Likewise.
2194         (sh_corefile_supply_regset): Likewise.
2195         (sh_corefile_collect_regset): Likewise.
2196         * sh64-tdep.c (sh64_extract_return_value): Likewise.
2197         (sh64_store_return_value): Likewise.
2198         * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
2199         * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
2200         (sparc_store_inferior_registers): Likewise.
2201         * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
2202         (sparc_ravenscar_prepare_to_store): Likewise.
2203         * sparc-tdep.c (sparc32_store_arguments): Likewise.
2204         (sparc_analyze_control_transfer): Likewise.
2205         (sparc_step_trap): Likewise.
2206         (sparc_software_single_step): Likewise.
2207         (sparc32_gdbarch_init): Likewise.
2208         (sparc_supply_rwindow): Likewise.
2209         (sparc_collect_rwindow): Likewise.
2210         * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
2211         * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
2212         (sparc64nbsd_collect_gregset): Likewise.
2213         (sparc64nbsd_supply_fpregset): Likewise.
2214         (sparc64nbsd_collect_fpregset): Likewise.
2215         * sparc64-tdep.c (sparc64_store_arguments): Likewise.
2216         (sparc64_supply_gregset): Likewise.
2217         (sparc64_collect_gregset): Likewise.
2218         (sparc64_supply_fpregset): Likewise.
2219         (sparc64_collect_fpregset): Likewise.
2220         * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
2221         * spu-tdep.c (spu_unwind_sp): Likewise.
2222         (spu2ppu_prev_register): Likewise.
2223         (spu_memory_remove_breakpoint): Likewise.
2224         * stack.c (return_command): Likewise.
2225         * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
2226         * tracefile-tfile.c (tfile_fetch_registers): Likewise.
2227         * tracefile.c (trace_save_ctf): Likewise.
2228         * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
2229         (do_windows_store_inferior_registers): Likewise.
2230         (windows_resume): Likewise.
2231         * xtensa-linux-nat.c (fill_gregset): Likewise.
2232         (supply_gregset_reg): Likewise.
2233         * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
2234         (xtensa_register_read_masked): Likewise.
2235         (xtensa_supply_gregset): Likewise.
2236         (xtensa_extract_return_value): Likewise.
2237         (xtensa_store_return_value): Likewise.
2238
2239 2017-10-25  Ulrich Weigand  <uweigand@de.ibm.com>
2240
2241         * doublest.c (floatformat_from_string): New function.
2242         * doublest.h (floatformat_from_string): Add prototype.
2243
2244         * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
2245         (OP_FLOAT): ... this.
2246         * expression.h: Do not include "doublest.h".
2247         (union exp_element): Replace doubleconst and decfloatconst by
2248         new element floatconst.
2249         * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
2250         (ada_evaluate_subexp): Likewise.
2251         * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
2252         OP_DOUBLE and OP_DECFLOAT.
2253         * expprint.c (print_subexp_standard): Likewise.
2254         (dump_subexp_body_standard): Likewise.
2255         * breakpoint.c (watchpoint_exp_is_const): Likewise.
2256
2257         * parse.c: Include "dfp.h".
2258         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2259         (write_exp_elt_floatcst): New function.
2260         (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
2261         and OP_DECFLOAT.
2262         (operator_check_standard): Likewise.
2263         (parse_float): Do not accept suffix.  Take type as input.  Return bool.
2264         Return target format buffer instead of host DOUBLEST.
2265         Use floatformat_from_string and decimal_from_string to parse
2266         either binary or decimal floating-point types.
2267         (parse_c_float): Remove.
2268         * parser-defs.h: Do not include "doublest.h".
2269         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
2270         (write_exp_elt_floatcst): Add prototype.
2271         (parse_float): Update prototype.
2272         (parse_c_float): Remove.
2273
2274         * c-exp.y: Do not include "dfp.h".
2275         (typed_val_float): Use byte buffer instead of DOUBLEST.
2276         (typed_val_decfloat): Remove.
2277         (DECFLOAT): Remove.
2278         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2279         (parse_number): Update to new parse_float interface.
2280         Parse suffixes and determine type before calling parse_float.
2281         Handle decimal and binary FP types the same way.
2282
2283         * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2284         (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
2285         (parse_number): Update to new parse_float interface.
2286         Parse suffixes and determine type before calling parse_float.
2287
2288         * f-exp.y: Replace dval by typed_val_float.
2289         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2290         (parse_number): Use parse_float instead of atof.
2291
2292         * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2293         (parse_go_float): Remove.
2294         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2295         (parse_number): Call parse_float instead of parse_go_float.
2296         Parse suffixes and determine type before calling parse_float.
2297
2298         * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2299         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2300         (parse_number): Update to new parse_float interface.
2301         Parse suffixes and determine type before calling parse_float.
2302
2303         * m2-exp.y: Replace dval by byte buffer val.
2304         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2305         (parse_number): Call parse_float instead of atof.
2306
2307         * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
2308         (lex_number): Call parse_float instead of strtod.
2309         (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
2310         (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
2311         Use write_exp_elt_floatcst.
2312         (unit_testing): Remove static variable.
2313         (rust_type): Do not check unit_testing.
2314         (rust_lex_tests): Do not set uint_testing.  Set up dummy rust_parser.
2315
2316         * ada-exp.y (type_float, type_double): Remove.
2317         (typed_val_float): Use byte buffer instead of DOUBLEST.
2318         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
2319         * ada-lex.l (processReal): Use parse_float instead of sscanf.
2320
2321 2017-10-25  Alan Hayward  <alan.hayward@arm.com>
2322
2323         * aarch64-tdep.h (enum aarch64_regnum): Remove.
2324         * arch/aarch64.h: New file.
2325
2326 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2327
2328         * dfp.h (decimal_from_string): Use const reference for argument.
2329         * dfp.c (decimal_from_string): Likewise.
2330
2331 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2332
2333         * i387-tdep.c (print_i387_value): Use floatformat_to_string.
2334         * sh64-tdep.c (sh64_do_fp_register): Likewise.
2335         * mips-tdep.c (mips_print_fp_register): Likewise.
2336
2337 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2338
2339         * common/format.h (enum argclass): Replace decfloat_arg by
2340         dec32float_arg, dec64float_arg, and dec128float_arg.
2341         * common/format.c (parse_format_string): Update to return
2342         new decimal float argument classes.
2343
2344         * printcmd.c (printf_decfloat): Rename to ...
2345         (printf_floating): ... this.  Add argclass argument, and use it
2346         instead of parsing the format string again.  Add support for
2347         binary floating-point values, using floatformat_to_string.
2348         Convert value to the target format if it doesn't already match.
2349         (ui_printf): Call printf_floating instead of printf_decfloat,
2350         also for double_arg / long_double_arg.  Pass argclass.
2351
2352         * dfp.c (decimal_to_string): Add format string argument.
2353         * dfp.h (decimal_to_string): Likewise.
2354
2355         * doublest.c (floatformat_to_string): Add format string argument.
2356         * doublest.h (floatformat_to_string): Likewise.
2357
2358 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2359
2360         * doublest.c (floatformat_precision): New routine.
2361         (floatformat_to_string): Likewise.
2362         * doublest.c (floatformat_to_string): Add prototype.
2363
2364         * printcmd.c (print_scalar_formatted): Only call print_floating
2365         on floating-point types.
2366         * valprint.c: Do not include "floatformat.h".
2367         (generic_val_print_decfloat): Remove.
2368         (generic_val_print): Call generic_val_print_float for both
2369         TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
2370         (print_floating): Use floatformat_to_string.  Handle decimal float.
2371         (print_decimal_floating): Remove, merge into floatformat_to_string.
2372         * value.h (print_decimal_floating): Remove.
2373
2374         * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
2375
2376 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
2377
2378         * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
2379
2380 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
2381
2382         * memattr.h: Don't include vec.h.
2383         (struct mem_attrib): Initialize fields.
2384         <unknown>: New static method.
2385         (struct mem_region): Add constructors, operator<, initialize
2386         fields.
2387         * memattr.c: Include algorithm.
2388         (default_mem_attrib, unknown_mem_attrib): Remove.
2389         (user_mem_region_list): New global.
2390         (target_mem_region_list, mem_region_list): Change type to
2391         std::vector<mem_region>.
2392         (mem_use_target): Now a function.
2393         (target_mem_regions_valid): Change type to bool.
2394         (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
2395         (require_user_regions): Adjust.
2396         (require_target_regions): Adjust.
2397         (create_mem_region): Adjust.
2398         (lookup_mem_region): Adjust.
2399         (invalidate_target_mem_regions): Adjust.
2400         (mem_clear): Rename to...
2401         (user_mem_clear): ... this, and adjust.
2402         (mem_command): Adjust.
2403         (info_mem_command): Adjust.
2404         (mem_enable, enable_mem_command, mem_disable,
2405         disable_mem_command): Adjust.
2406         (mem_delete): Adjust.
2407         (delete_mem_command): Adjust.
2408         * memory-map.h (parse_memory_map): Return an std::vector.
2409         * memory-map.c (parse_memory_map): Likewise.
2410         (struct memory_map_parsing_data): Add constructor.
2411         <memory_map>: Point to std::vector.
2412         (memory_map_start_memory): Adjust.
2413         (memory_map_end_memory): Adjust.
2414         (memory_map_end_property): Adjust.
2415         (clear_result): Remove.
2416         * remote.c (remote_memory_map): Return an std::vector.
2417         * target-debug.h (target_debug_print_VEC_mem_region_s__p):
2418         Remove.
2419         (target_debug_print_mem_region_vector): New.
2420         * target-delegates.c: Regenerate.
2421         * target.h (mem_region_vector): New typedef.
2422         (to_memory_map): Return mem_region_vector.
2423         (target_memory_map): Return an std::vector.
2424         * target.c (target_memory_map): Return an std::vector.
2425         (flash_erase_command): Adjust.
2426
2427 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
2428
2429         * memory-map.c (struct memory_map_parsing_data) <property_name>:
2430         Change type to std::string.
2431         (memory_map_start_property): Adjust.
2432         (memory_map_end_property): Adjust.
2433
2434 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
2435
2436         * infrun.h: Include common/byte-vector.h.
2437         (struct displaced_step_closure): New struct.
2438         (struct buf_displaced_step_closure): New struct.
2439         * infrun.c (displaced_step_closure::~displaced_step_closure):
2440         Provide default implementation.
2441         (displaced_step_clear): Deallocate step closure with delete.
2442         * aarch64-tdep.c (displaced_step_closure): Rename to ...
2443         (aarch64_displaced_step_closure): ... this, extend
2444         displaced_step_closure.
2445         (aarch64_displaced_step_data) <dsc>: Change type to
2446         aarch64_displaced_step_closure.
2447         (aarch64_displaced_step_copy_insn): Adjust to type change, use
2448         unique_ptr.
2449         (aarch64_displaced_step_fixup): Add cast for displaced step
2450         closure.
2451         * amd64-tdep.c (displaced_step_closure): Rename to ...
2452         (amd64_displaced_step_closure): ... this, extend
2453         displaced_step_closure.
2454         <insn_buf>: Change type to std::vector<gdb_byte>.
2455         <max_len>: Remove.
2456         (fixup_riprel): Change type of DSC parameter, adjust to type
2457         change of insn_buf.
2458         (fixup_displaced_copy): Change type of DSC parameter.
2459         (amd64_displaced_step_copy_insn): Instantiate
2460         amd64_displaced_step_closure.
2461         (amd64_displaced_step_fixup): Add cast for closure type, adjust
2462         to type change of insn_buf.
2463         * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
2464         parameter DSC.
2465         (arm_linux_copy_svc): Likewise.
2466         (cleanup_kernel_helper_return): Likewise.
2467         (arm_catch_kernel_helper_return): Likewise.
2468         (arm_linux_displaced_step_copy_insn): Instantiate
2469         arm_displaced_step_closure.
2470         * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
2471         (displaced_read_reg): Change type of parameter DSC.
2472         (branch_write_pc): Likewise.
2473         (load_write_pc): Likewise.
2474         (alu_write_pc): Likewise.
2475         (displaced_write_reg): Likewise.
2476         (arm_copy_unmodified): Likewise.
2477         (thumb_copy_unmodified_32bit): Likewise.
2478         (thumb_copy_unmodified_16bit): Likewise.
2479         (cleanup_preload): Likewise.
2480         (install_preload): Likewise.
2481         (arm_copy_preload): Likewise.
2482         (thumb2_copy_preload): Likewise.
2483         (install_preload_reg): Likewise.
2484         (arm_copy_preload_reg): Likewise.
2485         (cleanup_copro_load_store): Likewise.
2486         (install_copro_load_store): Likewise.
2487         (arm_copy_copro_load_store) Likewise.
2488         (thumb2_copy_copro_load_store): Likewise.
2489         (cleanup_branch): Likewise.
2490         (install_b_bl_blx): Likewise.
2491         (arm_copy_b_bl_blx): Likewise.
2492         (thumb2_copy_b_bl_blx): Likewise.
2493         (thumb_copy_b): Likewise.
2494         (install_bx_blx_reg): Likewise.
2495         (arm_copy_bx_blx_reg): Likewise.
2496         (thumb_copy_bx_blx_reg): Likewise.
2497         (cleanup_alu_imm): Likewise.
2498         (arm_copy_alu_imm): Likewise.
2499         (thumb2_copy_alu_imm): Likewise.
2500         (cleanup_alu_reg): Likewise.
2501         (install_alu_reg): Likewise.
2502         (arm_copy_alu_reg): Likewise.
2503         (thumb_copy_alu_reg): Likewise.
2504         (cleanup_alu_shifted_reg): Likewise.
2505         (install_alu_shifted_reg): Likewise.
2506         (arm_copy_alu_shifted_reg): Likewise.
2507         (cleanup_load): Likewise.
2508         (cleanup_store): Likewise.
2509         (arm_copy_extra_ld_st): Likewise.
2510         (install_load_store): Likewise.
2511         (thumb2_copy_load_literal): Likewise.
2512         (thumb2_copy_load_reg_imm): Likewise.
2513         (arm_copy_ldr_str_ldrb_strb): Likewise.
2514         (cleanup_block_load_all): Likewise.
2515         (cleanup_block_store_pc): Likewise.
2516         (cleanup_block_load_pc): Likewise.
2517         (arm_copy_block_xfer): Likewise.
2518         (thumb2_copy_block_xfer): Likewise.
2519         (cleanup_svc): Likewise.
2520         (install_svc): Likewise.
2521         (arm_copy_svc): Likewise.
2522         (thumb_copy_svc): Likewise.
2523         (arm_copy_undef): Likewise.
2524         (thumb_32bit_copy_undef): Likewise.
2525         (arm_copy_unpred): Likewise.
2526         (arm_decode_misc_memhint_neon): Likewise.
2527         (arm_decode_unconditional): Likewise.
2528         (arm_decode_miscellaneous): Likewise.
2529         (arm_decode_dp_misc): Likewise.
2530         (arm_decode_ld_st_word_ubyte): Likewise.
2531         (arm_decode_media): Likewise.
2532         (arm_decode_b_bl_ldmstm): Likewise.
2533         (arm_decode_ext_reg_ld_st): Likewise.
2534         (thumb2_decode_dp_shift_reg): Likewise.
2535         (thumb2_decode_ext_reg_ld_st): Likewise.
2536         (arm_decode_svc_copro): Likewise.
2537         (thumb2_decode_svc_copro): Likewise.
2538         (install_pc_relative): Likewise.
2539         (thumb_copy_pc_relative_16bit): Likewise.
2540         (thumb_decode_pc_relative_16bit): Likewise.
2541         (thumb_copy_pc_relative_32bit): Likewise.
2542         (thumb_copy_16bit_ldr_literal): Likewise.
2543         (thumb_copy_cbnz_cbz): Likewise.
2544         (thumb2_copy_table_branch): Likewise.
2545         (cleanup_pop_pc_16bit_all): Likewise.
2546         (thumb_copy_pop_pc_16bit): Likewise.
2547         (thumb_process_displaced_16bit_insn): Likewise.
2548         (decode_thumb_32bit_ld_mem_hints): Likewise.
2549         (thumb_process_displaced_32bit_insn): Likewise.
2550         (thumb_process_displaced_insn): Likewise.
2551         (arm_process_displaced_insn): Likewise.
2552         (arm_displaced_init_closure): Likewise.
2553         (arm_displaced_step_fixup): Add cast for closure.
2554         * arm-tdep.h: Include infrun.h.
2555         (displaced_step_closure): Rename to ...
2556         (arm_displaced_step_closure): ... this, extend
2557         displaced_step_closure.
2558         <u::svc::copy_svc_os>: Change type of parameter DSC.
2559         <cleanup>: Likewise.
2560         (arm_process_displaced_insn): Likewise.
2561         (arm_displaced_init_closure): Likewise.
2562         (displaced_read_reg): Likewise.
2563         (displaced_write_reg): Likewise.
2564         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
2565         Adjust.
2566         * i386-tdep.h: Include infrun.h.
2567         (i386_displaced_step_closure): New typedef.
2568         * i386-tdep.c (i386_displaced_step_copy_insn): Use
2569         i386_displaced_step_closure.
2570         (i386_displaced_step_fixup): Adjust.
2571         * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
2572         (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
2573         and unique_ptr.
2574         (ppc_displaced_step_fixup): Adjust.
2575         * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
2576         (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
2577         and unique_ptr.
2578         (s390_displaced_step_fixup): Adjust.
2579
2580 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
2581
2582         * interps.h (interp_resume, interp_suspend, interp_set_temp):
2583         Remove declarations.
2584
2585 2017-10-20  Tom Tromey  <tom@tromey.com>
2586
2587         * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
2588         std::vector.
2589         (gdb_bfd_record_inclusion): Update.
2590         (bfdp): Remove typedef.
2591
2592 2017-10-20  Tom Tromey  <tom@tromey.com>
2593
2594         * gdb_bfd.c (gdb_bfd_ref): Use new.
2595         (struct gdb_bfd_data): Add constructor, destructor, and member
2596         initializers.
2597         (gdb_bfd_unref): Use delete.
2598
2599 2017-10-20  Tom Tromey  <tom@tromey.com>
2600
2601         * exec.c (exec_file_attach): Use new_bfd_ref.
2602         * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
2603         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
2604         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
2605         new_bfd_ref.
2606         * gdb_bfd.h (new_bfd_ref): New function.
2607
2608 2017-10-20  Pedro Alves  <palves@redhat.com>
2609
2610         * main.c (captured_command_loop): Add attribute noinline.
2611
2612 2017-10-19  Simon Marchi  <simon.marchi@ericsson.com>
2613
2614         * interps.c (struct interp_factory): Add constructor.
2615         (interp_factory_p): Remove typedef.
2616         (DEF_VEC_P(interp_factory_p)): Remove.
2617         (interpreter_factories): Change type to std::vector.
2618         (interp_factory_register): Adjust.
2619         (interp_lookup): Adjust.
2620         (interpreter_completer): Adjust.
2621
2622 2017-10-19  Tom Tromey  <tom@tromey.com>
2623
2624         * break-catch-syscall.c (catch_syscall_completer): Use
2625         std::string, gdb::unique_xmalloc_ptr.
2626
2627 2017-10-19  Tom Tromey  <tom@tromey.com>
2628
2629         * infcall.c (call_function_by_hand_dummy): Use std::string.
2630
2631 2017-10-19  Tom Tromey  <tom@tromey.com>
2632
2633         * mi/mi-main.c (mi_cmd_execute): Update.
2634         * top.h (prepare_execute_command): Return scoped_value_mark.
2635         * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
2636         Add move constructor.
2637         * top.c (prepare_execute_command): Return scoped_value_mark.
2638         (execute_command): Update.
2639
2640 2017-10-19  Pedro Alves  <palves@redhat.com>
2641
2642         * xml-support.c (xml_fetch_content_from_file): Check fread's
2643         return.
2644
2645 2017-10-19  Pedro Alves  <palves@redhat.com>
2646
2647         * ser-base.c (ser_base_read_error_fd): Delete the file handler if
2648         async.
2649         (handle_error_fd): New function.
2650         (ser_base_async): Add/delete an event loop file handler for
2651         error_fd.
2652
2653 2017-10-19  Pedro Alves  <palves@redhat.com>
2654
2655         * xml-support.c (xml_fetch_content_from_file): Don't read in
2656         chunks.  Instead use fseek to determine the file's size, and read
2657         it in one go.
2658
2659 2017-11-18  Keith Seitz  <keiths@redhat.com>
2660
2661         * c-exp.y (oper): Canonicalize conversion operators of user-defined
2662         types.
2663         Add whitespace to front of type name.
2664
2665 2017-10-18  Keith Seitz  <keiths@redhat.com>
2666
2667         * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
2668         DW_AT_accessibility.
2669
2670 2017-10-18  Yao Qi  <yao.qi@linaro.org>
2671
2672         * features/tic6x-c62x-linux.c: Remove.
2673
2674 2017-10-17  Tom Tromey  <tom@tromey.com>
2675
2676         * disasm.c (do_mixed_source_and_assembly_deprecated): Use
2677         gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
2678         (do_mixed_source_and_assembly): Likewise.
2679
2680 2017-10-17  Tom Tromey  <tom@tromey.com>
2681
2682         * regcache.c (regcache::xfer_part): Remove assertion.
2683
2684 2017-10-17  Pedro Alves  <palves@redhat.com>
2685
2686         * xml-support.c (xml_fetch_content_from_file): Call
2687         unique_ptr::release() instead unique_ptr::get() when passing
2688         through xrealloc.
2689
2690 2017-10-17  Yao Qi  <yao.qi@linaro.org>
2691
2692         * regcache.c (regcache::xfer_part): Remove parameters read and
2693         write, add parameter is_raw.  All callers are updated.
2694
2695 2017-10-16  Keith Seitz  <keiths@redhat.com>
2696
2697         * c-typeprint.c (enum access_specifier): Moved here from
2698         c_type_print_base.
2699         (output_access_specifier): New function.
2700         (c_type_print_base): Consider typedefs when assessing
2701         whether access labels are needed.
2702         Use output_access_specifier as needed.
2703         Output access specifier for typedefs, if needed.
2704         * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
2705         * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
2706         fields.
2707         (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
2708         accessor macros.
2709
2710 2017-10-16  Tom Tromey  <tom@tromey.com>
2711
2712         * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
2713         (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
2714         * target.c (target_fileio_read_stralloc): Update.
2715         * sparc64-tdep.c (adi_is_addr_mapped): Update.
2716         * target.h (target_fileio_read_stralloc): Return
2717         unique_xmalloc_ptr.
2718
2719 2017-10-16  Tom Tromey  <tom@tromey.com>
2720
2721         * xml-syscall.c (xml_init_syscalls_info): Update.
2722         * xml-support.c (xinclude_start_include): Update.
2723         (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
2724         * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
2725         (xml_fetch_content_from_file): Likewise.
2726         * osdata.c (get_osdata): Update.
2727         * target.h (target_read_stralloc, target_get_osdata): Return
2728         unique_xmalloc_ptr.
2729         * solib-aix.c (solib_aix_get_library_list): Update.
2730         * solib-target.c (solib_target_current_sos): Update.
2731         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
2732         * xml-tdesc.c (fetch_available_features_from_target): Update.
2733         (target_fetch_description_xml): Update.
2734         (file_read_description_xml): Update.
2735         * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
2736         (remote_traceframe_info, btrace_read_config, remote_read_btrace)
2737         (remote_pid_to_exec_file): Update.
2738         * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
2739         (target_get_osdata): Likewise.
2740
2741 2017-10-16  Tom Tromey  <tom@tromey.com>
2742
2743         * remote.c (remote_register_number_and_offset): Use std::vector.
2744         (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
2745         (putpkt_binary): Use gdb::def_vector.
2746         (compare_sections_command): Use gdb::byte_vector.
2747
2748 2017-10-16  Tom Tromey  <tom@tromey.com>
2749
2750         * ppc-linux-nat.c (hwdebug_insert_point): Use
2751         gdb::unique_xmalloc_ptr, XDUP.
2752
2753 2017-10-16  Tom Tromey  <tom@tromey.com>
2754
2755         * probe.c (parse_probes): Use std::string.
2756         (info_probes_for_ops, enable_probes_command)
2757         (disable_probes_command): Remove cleanups.
2758
2759 2017-10-16  Tom Tromey  <tom@tromey.com>
2760
2761         * buildsym.c (block_compar): Remove.
2762         (end_symtab_get_static_block): Use std::vector.
2763
2764 2017-10-16  Simon Marchi  <simon.marchi@ericsson.com>
2765
2766         * memrange.h (struct mem_range): Define operator< and operator==.
2767         (mem_range_s): Remove.
2768         (DEF_VEC_O (mem_range_s)): Remove.
2769         (normalize_mem_ranges): Change parameter type to std::vector.
2770         * memrange.c (compare_mem_ranges): Remove.
2771         (normalize_mem_ranges): Change parameter type to std::vector,
2772         adjust to vector change.
2773         * exec.c (section_table_available_memory): Return vector, remove
2774         parameter.
2775         (section_table_read_available_memory): Adjust to std::vector
2776         change.
2777         * remote.c (remote_read_bytes): Adjust to std::vector
2778         change.
2779         * tracepoint.h (traceframe_available_memory): Change parameter
2780         type to std::vector.
2781         * tracepoint.c (traceframe_available_memory): Change parameter
2782         type to std::vector, adjust.
2783         * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
2784         std::vector change.
2785         * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2786         unittests/memrange-selftests.c.
2787         (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
2788         * gdb/unittests/memrange-selftests.c: New file.
2789
2790 2017-10-16  Pedro Alves  <palves@redhat.com>
2791
2792         * elfread.c (probe_key_free): Rename range-for variable.
2793         * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
2794         (find_probe_by_pc, collect_probes): Rename range-for variable.
2795
2796 2017-10-16  Yao Qi  <yao.qi@linaro.org>
2797
2798         * features/Makefile (XMLTOC): Remove tic6x-*.xml.
2799         * features/tic6x-c62x.c: Remove.
2800         * features/tic6x-c64x-linux.c: Remove.
2801         * features/tic6x-c64x.c: Remove.
2802         * features/tic6x-c64xp-linux.c: Remove.
2803         * features/tic6x-c64xp.c: Remove.
2804         * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
2805         initialize_tdesc_tic6x_*_linux functions.
2806         * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
2807         initialize_tdesc_tic6x_* functions.
2808
2809 2017-10-16  Yao Qi  <yao.qi@linaro.org>
2810
2811         * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
2812         tic6x-c62x.
2813         * regformats/tic6x-c62x.dat: Remove.
2814         * regformats/tic6x-c64x.dat: Remove.
2815         * regformats/tic6x-c64xp.dat: Remove.
2816
2817 2017-10-15  Simon Marchi  <simon.marchi@ericsson.com>
2818
2819         * tracepoint.c (parse_traceframe_info): Return a unique_ptr
2820         (the !HAVE_LIBEXPAT version).
2821
2822 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
2823
2824         * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
2825         const.
2826
2827 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2828
2829         * target.h: Include tracepoint.h.
2830         (enum trace_find_type): Move to tracepoint.h.
2831         (struct target_ops) <to_traceframe_info>: Return a unique ptr.
2832         * tracepoint.h: Don't include target.h
2833         (enum trace_find_type): Move from target.h.
2834         (parse_traceframe_info): Return a unique ptr.
2835         * tracepoint.c (current_traceframe_info): Change type to unique
2836         ptr.
2837         (free_traceframe_info): Remove.
2838         (clear_traceframe_info): Don't manually free
2839         current_traceframe_info.
2840         (free_result): Remove.
2841         (parse_traceframe_info): Return a unique ptr.
2842         (get_traceframe_info): Adjust to unique ptr.
2843         * ctf.c (ctf_traceframe_info): Return a unique ptr.
2844         * remote.c (remote_traceframe_info): Return a unique ptr.
2845         * tracefile-tfile.c (tfile_traceframe_info): Return a unique
2846         ptr.
2847         * target-debug.h (target_debug_print_traceframe_info_up): New
2848         macro.
2849         * target-delegates.c: Regenerate.
2850
2851 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2852
2853         * memrange.h (struct mem_range): Add constructors.
2854         * tracepoint.h (struct traceframe_info) <memory>: Change type to
2855         std::vector<mem_range>.
2856         * tracepoint.c (free_traceframe_info): Don't manually free
2857         vector.
2858         (traceframe_info_start_memory): Adjust to vector change.
2859         (traceframe_available_memory): Likewise.
2860         * tracefile-tfile.c (build_traceframe_info): Likewise.
2861         * ctf.c (ctf_traceframe_info): Likewise.
2862
2863 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2864
2865         * tracepoint.h (struct traceframe_info) <tvars>: Change type to
2866         std::vector<int>.
2867         * tracepoint.c (free_traceframe_info): Deallocate with delete.
2868         (traceframe_info_start_tvar): Adjust to vector change.
2869         (parse_traceframe_info): Allocate with new.
2870         * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
2871         vector change.
2872         * tracefile-tfile.c (build_traceframe_info): Adjust to vector
2873         change.
2874         tfile_traceframe_info): Allocate with new.
2875         * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
2876         change.
2877
2878 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
2879
2880         * tracepoint.c (traceframe_info): Rename to...
2881         (current_traceframe_info): ...this.
2882         (clear_traceframe_info): Adjust.
2883         (get_traceframe_info): Adjust.
2884
2885 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
2886
2887         * nat/linux-osdata.c: Include algorithm.
2888         (compare_processes): Remove.
2889         (struct pid_pgid_entry): New struct.
2890         (linux_xfer_osdata_processgroups): Use std::vector instead of
2891         XNEWVEC.
2892
2893 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
2894
2895         * objfiles.h: Don't include symfile.h.
2896         (struct partial_symbol): Remove forward-declaration.
2897         (struct objfile) <global_psymbols, static_psymbols>: Change type
2898         to std::vector<partial_symbol *>.
2899         * objfiles.c (objfile::objfile): Don't memset those fields.
2900         (objfile::~objfile): Don't free those fields.
2901         * psympriv.h (struct psymbol_allocation_list): Remove
2902         forward-declaration.
2903         (add_psymbol_to_list): Change psymbol_allocation_list parameter
2904         to std::vector.
2905         (start_psymtab_common): Change parameters to std::vector.
2906         * psymtab.c: Include algorithm.
2907         (require_partial_symbols): Call shrink_to_fit.
2908         (find_pc_sect_psymbol): Adjust to vector change.
2909         (match_partial_symbol): Likewise.
2910         (lookup_partial_symbol): Likewise.
2911         (psym_relocate): Likewise.
2912         (dump_psymtab): Likewise.
2913         (recursively_search_psymtabs): Likewise.
2914         (compare_psymbols): Remove.
2915         (sort_pst_symbols): Adjust to vector change.
2916         (start_psymtab_common): Likewise.
2917         (end_psymtab_common): Likewise.
2918         (psymbol_bcache_full): De-constify return value.
2919         (add_psymbol_to_bcache): Likewise.
2920         (extend_psymbol_list): Remove.
2921         (append_psymbol_to_list): Adjust to vector change.
2922         (add_psymbol_to_list): Likewise.
2923         (init_psymbol_list): Likewise.
2924         (maintenance_info_psymtabs): Likewise.
2925         (maintenance_check_psymtabs): Likewise.
2926         * symfile.h (struct psymbol_allocation_list): Remove.
2927         * symfile.c (reread_symbols): Adjust to vector change.
2928         * dbxread.c (start_psymtab): Change type of parameters.
2929         (dbx_symfile_read): Adjust to vector change.
2930         (read_dbx_symtab): Likewise.
2931         (start_psymtab): Change type of parameters.
2932         * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
2933         (create_partial_symtab): Likewise.
2934         (add_partial_symbol): Likewise.
2935         (write_one_signatured_type): Likewise.
2936         (recursively_write_psymbols): Likewise.
2937         * mdebugread.c (parse_partial_symbols): Likewise.
2938         * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
2939         (scan_xcoff_symtab): Adjust to vector change.
2940         (xcoff_initial_scan): Likewise.
2941
2942 2017-10-13  Simon Marchi  <simon.marchi@ericsson.com>
2943
2944         * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
2945
2946 2017-10-13  Yao Qi  <yao.qi@linaro.org>
2947
2948         * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
2949         Remove s390x-*-expedite, add s390x-expedite.
2950
2951 2017-10-13  Yao Qi  <yao.qi@linaro.org>
2952
2953         * features/s390-gs-linux64.c: Regenerated.
2954         * features/s390x-gs-linux64.c: Regenerated.
2955
2956 2017-10-13  Tom Tromey  <tom@tromey.com>
2957
2958         * compile/compile-object-run.c (do_module_cleanup): Use delete.
2959         * solib.c (update_solib_list, reload_shared_libraries_1): Use
2960         delete.
2961         * symfile.c (symbol_file_add_with_addrs): Use new.
2962         (symbol_file_add_separate): Update comment.
2963         (syms_from_objfile_1, remove_symbol_file_command): Use delete.
2964         * jit.c (jit_object_close_impl): Use new.
2965         (jit_unregister_code): Use delete.
2966         * objfiles.c (objfile::objfile): Rename from allocate_objfile.
2967         (~objfile): Rename from free_objfile.
2968         (free_objfile_separate_debug, do_free_objfile_cleanup)
2969         (free_all_objfiles, objfile_purge_solibs): Use delete.
2970         * objfiles.h (struct objfile): Add constructor and destructor.
2971         Use DISABLE_COPY_AND_ASSIGN.  Add initializers to data members.
2972         (allocate_objfile, free_objfile): Don't declare.
2973         (struct objstats): Add initializers.
2974
2975 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
2976
2977         * arch-utils.h (simple_displaced_step_copy_insn): Remove.
2978         * arch-utils.c (simple_displaced_step_copy_insn): Remove.
2979         * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
2980         * gdbarch.h: Regenerate.
2981         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
2982         Adjust comment.
2983         * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
2984         (i386_displaced_step_fixup): Adjust comment.
2985         * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
2986
2987 2017-10-12  Tom Tromey  <tom@tromey.com>
2988
2989         * prologue-value.h (pv_area::store_would_trash): Return bool.
2990         (pv_area::find_reg): Likewise.
2991         * prologue-value.c (pv_area::store_would_trash): Return bool.
2992         (pv_area::find_reg): Likewise.
2993
2994 2017-10-12  Tom Tromey  <tom@tromey.com>
2995
2996         * s390-linux-tdep.c (s390_store, s390_load)
2997         (s390_check_for_saved, s390_analyze_prologue): Update.
2998         * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
2999         * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
3000         * prologue-value.h (class pv_area): Move from prologue-value.c.
3001         Change names of members.  Add constructor, destructor, member
3002         functions.
3003         (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
3004         (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
3005         (pv_area_fetch, pv_area_scan): Don't declare.
3006         * prologue-value.c (struct pv_area::area_entry): Now member of
3007         pv_area.
3008         (struct pv_area): Move to prologue-value.h.
3009         (pv_area::pv_area): Rename from make_pv_area.
3010         (pv_area::~pv_area): Rename from free_pv_area.
3011         (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
3012         (clear_entries, find_entry, overlaps, store_would_trash, store)
3013         (fetch, find_reg, scan): Now member of pv_area.
3014         Remove "area" argument.  Update.
3015         * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
3016         Update.
3017         * mn10300-tdep.c (push_reg, check_for_saved)
3018         (mn10300_analyze_prologue): Update.
3019         * mep-tdep.c (is_arg_spill, check_for_saved)
3020         (mep_analyze_prologue): Update.
3021         * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
3022         (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
3023         (m32c_is_struct_return, m32c_analyze_prologue): Update.
3024         * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
3025         Update.
3026         * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
3027         * aarch64-tdep.c (aarch64_analyze_prologue): Update.
3028
3029 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
3030
3031         * linux-nat.h (linux_nat_set_delete_thread): New declaration.
3032         * linux-nat.c (linux_nat_delete_thread): New variable.
3033         (lwp_free): Invoke linux_nat_delete_thread if set.
3034         (linux_nat_set_delete_thread): New function.
3035         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
3036         thread delete callback.
3037         * arm-linux-nat.c (arm_linux_delete_thread): New function.
3038         (_initialize_arm_linux_nat): Assign thread delete callback.
3039         * s390-linux-nat.c (s390_delete_thread): New function.
3040         (_initialize_s390_nat): Assign thread delete callback.
3041         * x86-linux-nat.c (x86_linux_add_target): Likewise.
3042         * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
3043         function.
3044         * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
3045         declaration.
3046         * nat/x86-linux.c (x86_linux_delete_thread): New function.
3047         * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
3048
3049 2017-10-09  Tom Tromey  <tom@tromey.com>
3050
3051         * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
3052         std::string.
3053         * tui/tui-layout.c (enum tui_status): Use std::string.
3054
3055 2017-10-11  Tom Tromey  <tom@tromey.com>
3056
3057         * gdbthread.h (thread_command): Constify.
3058         * inferior.h (detach_command): Constify.
3059         * top.h (set_history, show_history): Constify.
3060         * arm-tdep.c (set_arm_command, show_arm_command): Constify.
3061         * serial.c (serial_set_cmd, serial_show_cmd): Constify.
3062         * bsd-kvm.c (bsd_kvm_cmd): Constify.
3063         * printcmd.c (set_command): Constify.
3064         (non_const_set_command): New function.
3065         * dcache.c (set_dcache_command, show_dcache_command): Constify.
3066         * breakpoint.c (enable_command, disable_command, delete_command)
3067         (catch_command, tcatch_command, set_breakpoint_cmd)
3068         (show_breakpoint_cmd): Constify.
3069         * macrocmd.c (macro_command): Constify.
3070         * infcmd.c (unset_command, kill_command, detach_command)
3071         (info_proc_cmd): Constify.
3072         * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
3073         * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
3074         (info_auto_load_cmd): Constify.
3075         * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
3076         (unset_tdesc_cmd): Constify.
3077         * ada-lang.c (set_ada_command, show_ada_command)
3078         (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
3079         * guile/guile.c (set_guile_command, show_guile_command)
3080         (info_guile_command): Constify.
3081         * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
3082         Constify.
3083         * skip.c (skip_command): Constify.
3084         * compile/compile.c (_initialize_compile): Constify.
3085         * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
3086         * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
3087         (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
3088         (maint_btrace_pt_show_cmd): Constify.
3089         * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
3090         Constify.
3091         * python/python.c (user_show_python, user_set_python): Constify.
3092         * mips-tdep.c (set_mips_command, show_mips_command)
3093         (set_mipsfpu_command): Constify.
3094         * record-btrace.c (cmd_record_btrace_start)
3095         (cmd_set_record_btrace, cmd_show_record_btrace)
3096         (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
3097         (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
3098         * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
3099         Constify.
3100         * symfile.c (overlay_command): Constify.
3101         * spu-tdep.c (set_spu_command, show_spu_command): Constify.
3102         * cli/cli-logging.c (set_logging_command, show_logging_command):
3103         Constify.
3104         * cli/cli-dump.c (dump_command, append_command)
3105         (srec_dump_command, ihex_dump_command, verilog_dump_command)
3106         (tekhex_dump_command, binary_dump_command)
3107         (binary_append_command): Constify.
3108         * cli/cli-decode.c (struct cmd_list_element): Change type of
3109         "fun".
3110         * cli/cli-cmds.c (info_command, show_command, set_debug)
3111         (show_debug): Constify.
3112         (show_command): Add non-const overload.
3113         * top.c (set_history, show_history): Constify.
3114         * sh-tdep.c (set_sh_command, show_sh_command): Constify.
3115         * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
3116         * target.c (target_command): Constify.
3117         * sparc64-tdep.c (info_adi_command): Constify.
3118         * record-full.c (cmd_record_full_start): Constify.
3119         (set_record_full_command): Constify.  Fix typo.
3120         (show_record_full_command): Constify.
3121         * thread.c (thread_command, thread_apply_command): Constify.
3122         * memattr.c (dummy_cmd): Constify.
3123         * value.c (function_command): Constify.
3124         * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
3125         * probe.c (info_probes_command): Constify.
3126         * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
3127         * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
3128         (show_thread_cmd, set_thread_default_cmd)
3129         (show_thread_default_cmd): Constify.
3130         (check_empty): Constify.
3131         * tracepoint.c (tfind_command): Constify.
3132         * cp-support.c (maint_cplus_command): Constify.
3133         * windows-tdep.c (info_w32_command): Constify.
3134         * record.c (cmd_record_start, set_record_command)
3135         (show_record_command, info_record_command, cmd_record_goto):
3136         Constify.
3137         * ravenscar-thread.c (set_ravenscar_command)
3138         (show_ravenscar_command): Constify.
3139         * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
3140         Constify.
3141         (add_internal_problem_command): Remove casts.
3142         * arc-tdep.c (maintenance_print_arc_command): Constify.
3143         * valprint.c (set_print, show_print, set_print_raw)
3144         (show_print_raw): Constify.
3145         * maint.c (maintenance_command, maintenance_info_command)
3146         (maintenance_print_command, maintenance_set_cmd)
3147         (maintenance_show_cmd, set_per_command_cmd)
3148         (show_per_command_cmd, maintenance_check_command): Constify.
3149         * language.c (set_check, show_check): Constify.
3150         * typeprint.c (show_print_type, set_print_type): Constify.
3151         * go32-nat.c (go32_info_dos_command): Constify.
3152
3153 2017-10-11  Tom Tromey  <tom@tromey.com>
3154
3155         * breakpoint.c (prepare_re_set_context): Remove.
3156         (breakpoint_re_set_one): Update.  Don't use cleanups.
3157         (breakpoint_re_set): Use scoped_restore, std::string, and
3158         scoped_restore_current_language.
3159
3160 2017-10-11  Tom Tromey  <tom@tromey.com>
3161
3162         * breakpoint.c (commands_command_1): Use std::string.
3163         (cleanup_executing_breakpoints): Remove.
3164         (bpstat_do_actions_1): Use scoped_restore.
3165         (bpstat_check_watchpoint): Use std::string.
3166         (decode_static_tracepoint_spec): Likewise.
3167         (break_range_command): Likewise.
3168         (watch_command_1): Likewise.
3169         (compare_breakpoints): Change argument types.
3170         (clear_command): Use std::vector.
3171         (cleanup_executing_breakpoints): Remove.
3172         (update_global_location_list): Use unique_xmalloc_ptr.
3173         (strace_command): Remove unused declaration.
3174
3175 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
3176
3177         * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
3178         * NEWS: Mention new FreeBSD/arm native configuration.
3179         * configure.host: Add arm*-*-freebsd*.
3180         * configure.nat: Likewise.
3181         * arm-fbsd-nat.c: New file.
3182
3183 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
3184
3185         * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
3186         (ALLDEPFILES): Add arm-fbsd-tdep.c.
3187         * NEWS: Mention new FreeBSD/arm target.
3188         * configure.tgt: Add arm*-*-freebsd*.
3189         * arm-fbsd-tdep.c: New file.
3190         * arm-fbsd-tdep.h: New file.
3191
3192 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
3193
3194         * linux-tdep.c (linux_make_corefile_notes): Remove call to
3195         `gdbarch_elfcore_write_linux_prpsinfo'.
3196         * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
3197         method.
3198         (elf_internal_linux_prpsinfo): Remove declaration.
3199         * gdbarch.h: Regenerate.
3200         * gdbarch.c: Regenerate.
3201
3202 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
3203
3204         * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
3205         `set_gdbarch_elfcore_write_linux_prpsinfo'.
3206
3207 2017-10-11  Pedro Alves  <palves@redhat.com>
3208
3209         * breakpoint.c (reattach_breakpoints): Delete.
3210         * breakpoint.h (reattach_breakpoints): Delete.
3211
3212 2017-10-11  Simon Marchi  <simon.marchi@ericsson.com>
3213
3214         * symfile.c (registered_sym_fns): Make struct, not typedef.
3215         (DEF_VEC_O (registered_sym_fns)): Remove.
3216         (symtab_fns): Change type to std::vector.
3217         (add_symtab_fns): Adjust.
3218         (find_sym_fns): Adjust.
3219
3220 2017-10-11  Anton Kolesov  <Anton.Kolesov@synopsys.com>
3221
3222         * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
3223         * arc-tdep.h (arc_arch_is_em): New function.
3224         (arc_arch_is_hs): Likewise.
3225
3226 2017-10-11  Egeyar Bagcioglu  <egeyar.bagcioglu@oracle.com>
3227
3228         * macrotab.h (macro_lookup_inclusion): Remove unnecessary
3229         parentheses in the declaration.
3230         (macro_lookup_inclusion): Likewise.
3231         (macro_lookup_definition): Likewise.
3232         * p-lang.h (pascal_builtin_types): Likewise.
3233         * tui/tui-data.c (tui_win_list): Likewise.
3234         * tui/tui-data.h (tui_win_list): Likewise.
3235         * utils.h (make_cleanup_free_section_addr_info): Likewise.
3236
3237 2017-10-11  Mark Rages  <markrages@gmail.com>
3238
3239         * target-memory.c (block_boundaries): Fix for block address not
3240         aligned on block size.
3241
3242 2017-10-10  Pedro Alves <palves@redhat.com>
3243             Tom Tromey  <tom@tromey.com>
3244
3245         * breakpoint.c (struct captured_breakpoint_query_args)
3246         (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
3247         (print_breakpoint): New.
3248         * breakpoint.h (print_breakpoint): Declare.
3249         * common/common-exceptions.h (enum return_reason): Remove
3250         references to catch_exceptions.
3251         * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
3252         Delete.
3253         * exceptions.h (catch_exceptions_ftype, catch_exceptions)
3254         (catch_exception_ftype, catch_exceptions_with_msg): Delete.
3255         * gdb.h: Delete.
3256         * gdbthread.h (thread_select): Declare.
3257         * mi/mi-cmd-break.c: Don't include gdb.h.
3258         (breakpoint_notify): Use print_breakpoint.
3259         * mi/mi-cmd-catch.c: Don't include gdb.h.
3260         * mi/mi-interp.c: Don't include gdb.h.
3261         (mi_print_breakpoint_for_event): New.
3262         (mi_breakpoint_created, mi_breakpoint_modified): Use
3263         mi_print_breakpoint_for_event.
3264         * mi/mi-main.c: Don't include gdb.h.
3265         (mi_cmd_thread_select): Parse the global thread ID here.  Use
3266         thread_select instead of gdb_thread_select.
3267         (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
3268         of using gdb_list_thread_ids.
3269         * remote-fileio.c (do_remote_fileio_request): Change type.  Reply
3270         FILEIO_ENOSYS here.
3271         (remote_fileio_request): Use TRY/CATCH instead of
3272         catch_exceptions.
3273         * symfile-mem.c (struct symbol_file_add_from_memory_args)
3274         (symbol_file_add_from_memory_wrapper): Delete.
3275         (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
3276         * thread.c: Don't include gdb.h.
3277         (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
3278         (thread_alive): Use thread_select.
3279         (do_captured_thread_select): Delete, parts salvaged as ...
3280         (thread_select): ... this new function.
3281         (gdb_thread_select): Delete.
3282
3283 2017-10-10  Pedro Alves  <palves@redhat.com>
3284             Tom Tromey  <tom@tromey.com>
3285
3286         * breakpoint.c (breakpoint_cond_eval): Change return type to bool
3287         and reverse logic.
3288         (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
3289         No longer macros.  Instead ...
3290         (enum wp_check_result): They're now values of this new
3291         enumeration.
3292         (watchpoint_check): Change return type to wp_check_result and
3293         parameter type to bpstat.
3294         (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
3295         (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
3296         catch_errors.  Reverse logic of watchpoint_check call.
3297         (breakpoint_re_set_one): Now returns void and takes a breakpoint
3298         pointer as parameter.
3299         (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
3300         * common/common-exceptions.c (throw_exception_sjlj): Update
3301         comments to avoid mentioning catch_errors.
3302         * exceptions.c (catch_errors): Delete.
3303         * exceptions.h: Update comments to avoid mentioning catch_errors.
3304         (catch_errors_ftype, catch_errors): Delete.
3305         * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
3306         (hook_stop_stub): Delete.
3307         (restore_selected_frame): Change return type to void, and
3308         parameter type to const frame_id &.
3309         (restore_infcall_control_state): Use TRY/CATCH instead of
3310         catch_errors.
3311         * main.c (captured_command_loop): Return void and remove
3312         parameter.  Remove references to catch_errors.
3313         (captured_main): Use TRY/CATCH instead of catch_errors.
3314         * objc-lang.c (objc_submethod_helper_data)
3315         (find_objc_msgcall_submethod_helper): Delete.
3316         (find_objc_msgcall_submethod): Use TRY/CATCH instead of
3317         catch_errors.
3318         * record-full.c (record_full_message): Return void.
3319         (record_full_message_args, record_full_message_wrapper): Delete.
3320         (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
3321         instead of catch_errors.
3322         * solib-aix.c (solib_aix_open_symbol_file_object): Change
3323         parameter type to int.
3324         * solib-darwin.c (open_symbol_file_object): Ditto.
3325         * solib-dsbt.c (open_symbol_file_object): Ditto.
3326         * solib-frv.c (open_symbol_file_object): Ditto.
3327         * solib-svr4.c (open_symbol_file_object): Ditto.
3328         * solib-target.c (solib_target_open_symbol_file_object): Ditto.
3329         * solib.c (update_solib_list): Use TRY/CATCH instead of
3330         catch_errors.
3331         * solist.h (struct target_so_ops) <open_symbol_file_object>:
3332         Change type.
3333         * symmisc.c (struct print_symbol_args): Remove.
3334         (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
3335         (print_symbol): Change type.
3336         * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
3337         and remove parameters.
3338         (catch_errors): New.
3339         (get_windows_debug_event): Adjust.
3340
3341 2017-10-09  Tom Tromey  <tom@tromey.com>
3342
3343         * mi/mi-main.c (free_splay_tree): Remove.
3344         (list_available_thread_groups): Use splay_tree_up.
3345         * common/gdb_splay_tree.h: New file.
3346
3347 2017-10-09  Tom Tromey  <tom@tromey.com>
3348
3349         * mi/mi-main.c (do_nothing): Remove.
3350         (list_available_thread_groups): Update.
3351
3352 2017-10-09  Pedro Alves  <palves@redhat.com>
3353
3354         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
3355         reading registers when switching context.
3356
3357 2017-10-09  John Baldwin  <jhb@FreeBSD.org>
3358
3359         * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
3360         (fbsd_convert_siginfo): Likewise.
3361         * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
3362
3363 2017-10-09  Simon Marchi  <simon.marchi@polymtl.ca>
3364
3365         * configure.ac (try_guile_versions): Remove guile-2.2.
3366         * configure: Regenerate.
3367
3368 2017-10-09  Tom Tromey  <tom@tromey.com>
3369
3370         * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
3371         (COMPILE.pre): Use $(CXX).
3372
3373 2017-10-09  Pedro Alves  <palves@redhat.com>
3374
3375         * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
3376         Use bool.
3377         (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3378         * cp-support.h (cp_remove_params): Now returns a
3379         gdb::unique_xmalloc_ptr.
3380         * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
3381         Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
3382         * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
3383         returning a gdb::unique_xmalloc_ptr.
3384         (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
3385         * stack.c (find_frame_funname): Adjust to cp_remove_params
3386         returning a gdb::unique_xmalloc_ptr.
3387
3388 2017-10-08  Tom Tromey  <tom@tromey.com>
3389
3390         * dwarf2read.c (dwarf2_get_dwz_file): Use
3391         gdb::unique_xmalloc_ptr.
3392         (find_slot_in_mapped_hash): Likewise.
3393         (dwarf2_physname): Likewise.
3394         (create_dwo_unit_in_dwp_v1): Use std::string.
3395         (create_dwo_unit_in_dwp_v2): Likewise.
3396         (lookup_dwo_cutu): Likewise.
3397         (inherit_abstract_dies): Use std::vector.
3398         (read_array_type): Likewise.
3399         (dwarf_decode_macros): Remove unused declaration.
3400         (unsigned_int_compar): Remove.
3401         (dwarf2_build_psymtabs_hard): Use scoped_restore.
3402         (psymtabs_addrmap_cleanup): Remove.
3403
3404 2017-10-08  Tom Tromey  <tom@tromey.com>
3405
3406         * frame-unwind.c (frame_unwind_try_unwinder): Update.
3407         * frame.h (frame_cleanup_after_sniffer): Declare.
3408         (frame_prepare_for_sniffer): Return void.
3409         * frame.c (frame_cleanup_after_sniffer): No longer static.  Change
3410         type of argument.
3411         (frame_prepare_for_sniffer): Return void.
3412
3413 2017-10-08  Tom Tromey  <tom@tromey.com>
3414
3415         * utils.h (make_cleanup_value_free): Remove.
3416         * utils.c (do_value_free, struct cleanup): Remove.
3417         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
3418         Use gdb_value_up.
3419         * value.h (struct value_deleter): New.
3420         (gdb_value_up): New typedef.
3421
3422 2017-10-08  Tom Tromey  <tom@tromey.com>
3423
3424         * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
3425         (make_cleanup_free_search_symbols): Remove.
3426         (search_symbols): Return std::vector.
3427         (symbol_search::compare_search_syms): Now member of
3428         symbol_search.  Change arguments.
3429         (sort_search_symbols_remove_dups): Change arguments.  Rewrite.
3430         (symtab_symbol_info, rbreak_command): Update.
3431         * symtab.h (struct symbol_search) <next>: Remove.
3432         Add constructors.
3433         (symbol_search::operator<): New function.
3434         (symbol_search::operator==): New function.
3435         (search_symbols): Remove std::vector.
3436         (free_search_symbols, make_cleanup_free_search_symbols): Remove.
3437         (symbol_search::compare_search_syms): Declare.
3438
3439 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3440
3441         * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
3442         arch/aarch64-insn.o.
3443         Remove one rule.
3444         * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
3445
3446 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3447
3448         * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
3449         and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
3450         arch/arm-linux.o respectively.
3451         * configure.tgt: Likewise.
3452
3453 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3454
3455         * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
3456         * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
3457
3458 2017-10-06  Pedro Alves  <palves@redhat.com>
3459
3460         * windows-nat.c: Include <algorithm>.
3461
3462 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3463
3464         * configure.tgt (i386_tobjs): New variable.
3465         (amd64_tobjs): New variable.
3466         Set $cpu_obs and $os_obs.
3467
3468 2017-10-06  Yao Qi  <yao.qi@linaro.org>
3469
3470         * Makefile.in (CONFIG_SRC_SUBDIR): New.
3471         (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
3472         (clean): Remove object files and dependency files.
3473         (distclean): Remove the directory.
3474         * configure.ac: Invoke AC_CONFIG_COMMANDS.
3475         * configure: Re-generated.
3476         * configure.tgt: Replace amd64.o with arch/amd64.o.
3477
3478 2017-10-05  Jose E. Marchesi  <jose.marchesi@oracle.com>
3479
3480         PR build/22188
3481         * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
3482         and SETEND.
3483
3484 2017-10-05  Pedro Alves  <palves@redhat.com>
3485
3486         * linux-nat.c (linux_child_follow_fork): When following the parent
3487         and detaching the child, consult the parent thread's architecture
3488         instead of the child's.
3489
3490 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
3491
3492         * ax.h: Do not include "doublest.h".
3493         (union agent_val): Remove.
3494
3495 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
3496
3497         * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
3498         (decimal_to_string): Return std::string object.
3499         (decimal_from_string): Accept std::string object.  Return bool.
3500         (decimal_from_integral, decimal_from_doublest): Remove.
3501         (decimal_from_longest): Add prototype.
3502         (decimal_from_ulongest): Likewise.
3503         (decimal_to_longest): Likewise.
3504         (decimal_from_doublest): Likewise.
3505         * dfp.c: Do not include "gdbtypes.h" or "value.h".
3506         (MAX_DECIMAL_STRING): Move here.
3507         (decimal_to_string): Return std::string object.
3508         (decimal_from_string): Accept std::string object.  Return bool.
3509         (decimal_from_integral): Remove, replace by ...
3510         (decimal_from_longest, decimal_from_ulongest): ... these new functions.
3511         (decimal_to_longest): New function.
3512         (decimal_from_floating): Remove, replace by ...
3513         (decimal_from_doublest): ... this new function.
3514         (decimal_to_doublest): Update to new decimal_to_string interface.
3515
3516         * value.c (unpack_long): Use decimal_to_longest.
3517         * valops.c (value_cast): Use decimal_from_doublest instead of
3518         decimal_from_floating.  Use decimal_from_[u]longest isntead of
3519         decimal_from_integral.
3520         * valarith.c (value_args_as_decimal): Likewise.
3521         * valprint.c (print_decimal_floating): Update to new
3522         decimal_to_string interface.
3523         * printcmd.c (printf_decfloat): Likewise.
3524         * c-exp.y (parse_number): Update to new decimal_from_string interface.
3525
3526 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
3527
3528         * doublest.h: Do not include "floatformat.h".  Remove stale comments.
3529         * gdbtypes.c: Include "floatformat.h".
3530         * value.c: Likewise.
3531         * m68k-tdep.c: Likewise.
3532
3533         * findvar.c: Do not include "floatformat.h".
3534         * amd64-darwin-tdep.c: Likewise.
3535         * arm-linux-tdep.c: Likewise.
3536         * i386-darwin-tdep.c: Likewise.
3537         * i387-tdep.c: Likewise.
3538         * m68k-linux-tdep.c: Likewise.
3539         * mep-tdep.c: Likewise.
3540         * mips-tdep.c: Likewise.
3541         * nios2-tdep.c: Likewise.
3542         * s390-linux-tdep.c: Likewise.
3543         * sparc-obsd-tdep.c: Likewise.
3544         * sparc-tdep.c: Likewise.
3545         * sparc64-tdep.c: Likewise.
3546         * spu-tdep.c: Likewise.
3547         * tic6x-tdep.c: Likewise.
3548         * tilegx-tdep.c: Likewise.
3549         * vax-tdep.c: Likewise.
3550         * xstormy16-tdep.c: Likewise.
3551         * xtensa-tdep.c: Likewise.
3552
3553         * top.c: Do not include "doublest.h".
3554         * aarch64-tdep.c: Likewise.
3555         * alpha-tdep.c: Likewise.
3556         * arm-linux-tdep.c: Likewise.
3557         * m68k-linux-tdep.c: Likewise.
3558         * tilegx-tdep.c: Likewise.
3559         * xstormy16-tdep.c: Likewise.
3560
3561 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
3562
3563         * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
3564         (mipsn32_fbsd_sigframe): Define.
3565         (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
3566         for FreeBSD/mipsn32.
3567
3568 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
3569
3570         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
3571         AT_HWCAP.
3572
3573 2017-10-05  Tristan Gingold  <tgingold@free.fr>
3574
3575         * MAINTAINERS (Misc): Update my email address.
3576
3577 2017-10-04  Pedro Alves  <palves@redhat.com>
3578
3579         * remote.c (get_remote_arch_state): New 'gdbarch' parameter.  Use
3580         it instead of target_gdbarch.
3581         (get_remote_state, get_remote_packet_size): Adjust
3582         get_remote_arch_state calls, passing down target_gdbarch
3583         explicitly.
3584         (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
3585         'gdbarch' and use it instead of target_gdbarch.
3586         (get_memory_packet_size): Adjust get_remote_arch_state calls,
3587         passing down target_gdbarch explicitly.
3588         (struct stop_reply) <arch>: New field.
3589         (remote_parse_stop_reply): Use the stopped thread's architecture,
3590         not the current inferior's.  Save the architecture in the
3591         stop_reply.
3592         (process_stop_reply): Use the stop reply's architecture.
3593         (process_g_packet, remote_fetch_registers)
3594         (remote_prepare_to_store, store_registers_using_G)
3595         (remote_store_registers): Adjust get_remote_arch_state calls,
3596         using the regcache's architecture.
3597         (remote_get_trace_status): Adjust get_remote_arch_state calls,
3598         passing down target_gdbarch explicitly.
3599         * spu-multiarch.c (spu_thread_architecture): Defer to the target
3600         beneath instead of calling target_gdbarch.
3601         * target.c (default_thread_architecture): Use the specified
3602         inferior's architecture, instead of the current inferior's
3603         architecture (via target_gdbarch).
3604
3605 2017-10-04  Pedro Alves  <palves@redhat.com>
3606
3607         * regcache.c (get_thread_arch_regcache): Remove null_ptid special
3608         case.
3609         (regcache_print): Handle !target_has_registers here instead.
3610
3611 2017-10-04  Pedro Alves  <palves@redhat.com>
3612
3613         * frame.c (create_test_frame): Delete.
3614         * frame.h (create_test_frame): Delete.
3615         * gdbarch-selftests.c: Include gdbthread.h and target.h.
3616         (class regcache_test): Delete.
3617         (test_target_has_registers, test_target_has_stack)
3618         (test_target_has_memory, test_target_prepare_to_store)
3619         (test_target_store_registers): New functions.
3620         (test_target_ops): New class.
3621         (register_to_value_test): Error out if there's already a
3622         process_stratum (or higher) target pushed.  Create a fuller mock
3623         environment, with mock target_ops, inferior, address space, thread
3624         and inferior_ptid.
3625         * progspace.c (struct address_space): Move to ...
3626         * progspace.h (struct address_space): ... here.
3627         * regcache.h (regcache::~regcache, regcache::raw_write)
3628         [GDB_SELF_TEST]: No longer virtual.
3629
3630 2017-10-04  Simon Marchi  <simon.marchi@ericsson.com>
3631
3632         * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
3633
3634 2017-10-04  Pedro Alves  <palves@redhat.com>
3635
3636         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
3637         out of 'between TRY and CATCH'.
3638
3639 2017-10-04  Pedro Alves  <palves@redhat.com>
3640
3641         * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
3642         * common/common-exceptions.h (TRY): Open an outermost scope.
3643         Expand intro comment.
3644         (CATCH): Reindent.
3645         (END_CATCH): Close the outermost scope.
3646         * completer.c (complete_line_internal): Add missing END_CATCH.
3647
3648 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3649
3650         * NEWS (Changes since GDB 8.0): Add entry about new
3651         'set-cwd-on-gdbserver' feature.
3652         (New remote packets): Add entry for QSetWorkingDir.
3653         * common/common-inferior.h (set_inferior_cwd): New prototype.
3654         * infcmd.c (set_inferior_cwd): Remove "static".
3655         (show_cwd_command): Expand text to include remote debugging.
3656         * remote.c: Add PACKET_QSetWorkingDir.
3657         (remote_protocol_features) <QSetWorkingDir>: New entry for
3658         PACKET_QSetWorkingDir.
3659         (extended_remote_set_inferior_cwd): New function.
3660         (extended_remote_create_inferior): Call
3661         "extended_remote_set_inferior_cwd".
3662         (_initialize_remote): Call "add_packet_config_cmd" for
3663         QSetWorkingDir.
3664
3665 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3666
3667         * NEWS (New commands): Mention "set/show cwd".
3668         * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
3669         "cd" command's help text.
3670         * common/common-inferior.h (get_inferior_cwd): New prototype.
3671         * infcmd.c (inferior_cwd_scratch): New global variable.
3672         (set_inferior_cwd): New function.
3673         (get_inferior_cwd): Likewise.
3674         (set_cwd_command): Likewise.
3675         (show_cwd_command): Likewise.
3676         (_initialize_infcmd): Add "set/show cwd" commands.
3677         * inferior.h (class inferior) <cwd>: New field.
3678         * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
3679         (fork_inferior): Change inferior's cwd before its execution.
3680         * windows-nat.c (windows_create_inferior): Pass inferior's cwd
3681         to CreateProcess.
3682
3683 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
3684
3685         * Makefile.in (SFILES): Add gdb_tilde_expand.c.
3686         (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
3687         (COMMON_OBS): Add gdb_tilde_expand.o.
3688         * common/gdb_tilde_expand.c: New file.
3689         * common/gdb_tilde_expand.h: Likewise.
3690
3691 2017-10-03  Maciej W. Rozycki  <macro@imgtec.com>
3692
3693         * gdbarch.sh (objfile): Remove duplicate declaration.
3694         * gdbarch.h: Regenerate.
3695
3696 2017-10-03  Tom Tromey  <tom@tromey.com>
3697
3698         * utils.c (internal_vproblem): Use string_vprintf.
3699
3700 2017-10-03  Tom Tromey  <tom@tromey.com>
3701
3702         * printcmd.c (info_symbol_command): Use std::string.
3703
3704 2017-10-03  Tom Tromey  <tom@tromey.com>
3705
3706         * top.c (gdb_safe_append_history): Use std::string.
3707
3708 2017-10-03  Tom Tromey  <tom@tromey.com>
3709
3710         * event-top.c (stdin_event_handler): Update.
3711         * main.c (captured_main_1): Update.
3712         * top.h (make_delete_ui_cleanup): Remove.
3713         (struct ui): Add constructor and destructor.
3714         (new_ui, delete_ui): Remove.
3715         * top.c (make_delete_ui_cleanup): Remove.
3716         (new_ui_command): Use std::unique_ptr.
3717         (delete_ui_cleanup): Remove.
3718         (ui::ui): Rename from new_ui.  Update.
3719         (free_ui): Remove.
3720         (ui::~ui): Rename from delete_ui.  Update.
3721
3722 2017-10-03  Tom Tromey  <tom@tromey.com>
3723
3724         * symfile.c (load_progress): Use gdb::byte_vector.
3725
3726 2017-10-03  Tom Tromey  <tom@tromey.com>
3727
3728         * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
3729         declaration.
3730         * printcmd.c (x_command): Remove unused declaration.
3731         * symfile.c (symbol_file_command): Remove unused declaration.
3732
3733 2017-10-03  Tom Tromey  <tom@tromey.com>
3734
3735         * utils.c (internal_vproblem): Use std::string.
3736         (defaulted_query): Likewise.
3737
3738 2017-10-03  Tom Tromey  <tom@tromey.com>
3739
3740         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
3741         * top.c (execute_command_to_string): Update.
3742         * utils.c (make_cleanup_restore_page_info): Remove.
3743         (do_restore_page_info_cleanup): Remove.
3744         (set_batch_flag_and_restore_page_info):
3745         New.
3746         (make_cleanup_restore_page_info): Remove.
3747         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
3748         (~set_batch_flag_and_restore_page_info): New
3749         (make_cleanup_restore_uinteger): Remove.
3750         (make_cleanup_restore_integer): Remove.
3751         (struct restore_integer_closure): Remove.
3752         (restore_integer): Remove.
3753         * utils.h (struct set_batch_flag_and_restore_page_info): New
3754         class.
3755         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
3756         (make_cleanup_restore_page_info): Remove.
3757         (make_cleanup_restore_uinteger) Remove.
3758         (make_cleanup_restore_integer) Remove.
3759
3760 2017-10-03  Tom Tromey  <tom@tromey.com>
3761
3762         * record-full.h (record_full_gdb_operation_disable_set): Return
3763         scoped_restore_tmpl<int>.
3764         * infrun.c (adjust_pc_after_break): Update.
3765         (handle_signal_stop): Update.
3766         * record-full.c (record_full_gdb_operation_disable_set): Return
3767         scoped_restore_tmpl<int>.
3768         (record_full_wait_1, record_full_insert_breakpoint)
3769         (record_full_remove_breakpoint, record_full_save)
3770         (record_full_goto_insn): Update.
3771
3772 2017-10-02  Tom Tromey  <tom@tromey.com>
3773
3774         PR rust/22236:
3775         * rust-lang.c (rust_val_print_str): New function.
3776         (val_print_struct): Call it.
3777         (rust_subscript): Preserve name of slice type.
3778
3779 2017-10-02  Tom Tromey  <tom@tromey.com>
3780
3781         * rust-lang.c (rust_subscript): Handle slices in
3782         EVAL_AVOID_SIDE_EFFECTS case.
3783
3784 2017-10-02  Tom Tromey  <tom@tromey.com>
3785
3786         * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
3787
3788 2017-10-02  Tom Tromey  <tom@tromey.com>
3789
3790         * rust-lang.h (rust_slice_type): Add "extern".
3791
3792 2017-10-02  Tom Tromey  <tom@tromey.com>
3793             Pedro Alves  <palves@redhat.com>
3794
3795         * ada-lang.h (ada_exc_info::operator<): Make const.
3796         (ada_exc_info::operator==): Make const.
3797         * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
3798         Make const.
3799
3800 2017-09-29  Tom Tromey  <tom@tromey.com>
3801
3802         * target.c (read_whatever_is_readable): Change type of "result".
3803         Update.
3804         (free_memory_read_result_vector): Remove.
3805         (read_memory_robust): Change return type.  Update.
3806         * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update.  Use
3807         bin2hex, std::string.
3808         * target.h (memory_read_result_s): Remove typedef.
3809         (free_memory_read_result_vector): Remove.
3810         (read_memory_robust): Return std::vector.
3811
3812 2017-09-29  Tom Tromey  <tom@tromey.com>
3813
3814         * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
3815
3816 2017-09-29  Tom Tromey  <tom@tromey.com>
3817
3818         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
3819         * ada-lang.h (struct ada_exc_info): Remove typedef.  Declare
3820         operator< and operator==.
3821         (ada_exceptions_list): Return a std::vector.
3822         * ada-lang.c (ada_exc_info::operator<): Rename from
3823         compare_ada_exception_info.
3824         (ada_exc_info::operator==): New.
3825         (sort_remove_dups_ada_exceptions_list): Change type of
3826         "exceptions".
3827         (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
3828         (ada_add_global_exceptions): Likewise.
3829         (ada_exceptions_list_1): Return a std::vector.
3830         (ada_exceptions_list): Likewise.
3831
3832 2017-09-29  Tom Tromey  <tom@tromey.com>
3833
3834         * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
3835         'std::set *'.
3836         (print_one_inferior): Update.
3837         (free_vector_of_ints): Remove.
3838         (list_available_thread_groups): Change "ids" to std::set.
3839         (mi_cmd_list_thread_groups): Update.
3840         (struct collect_cores_data) <core>: Now a std::set.
3841         (collect_cores): Update.
3842         (unique): Remove.
3843         (print_one_inferior): Update.
3844
3845 2017-09-29  Tom Tromey  <tom@tromey.com>
3846
3847         * mi/mi-main.c (mi_execute_cli_command): Use std::string.
3848         (mi_execute_async_cli_command): Likewise.
3849         (mi_cmd_trace_frame_collected): Use field_fmt.
3850
3851 2017-09-29  Tom Tromey  <tom@tromey.com>
3852
3853         * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
3854         gdb::byte_vector.
3855
3856 2017-09-29  Tom Tromey  <tom@tromey.com>
3857
3858         * mi/mi-parse.c (mi_parse): Remove unused declaration.
3859
3860 2017-09-29  Tom Tromey  <tom@tromey.com>
3861
3862         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
3863
3864 2017-09-29  Tom Tromey  <tom@tromey.com>
3865
3866         * varobj.h (varobj_gen_name): Return std::string.
3867         * varobj.c (varobj_gen_name): Return std::string.
3868         * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
3869         (mi_cmd_var_delete): Don't copy "name".
3870
3871 2017-09-29  Tom Tromey  <tom@tromey.com>
3872
3873         * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
3874         (mi_cmd_break_insert_1): Update.
3875
3876 2017-09-29  Tom Tromey  <tom@tromey.com>
3877
3878         * target.h (make_scoped_defer_target_commit_resume): Update.
3879         * target.c (make_scoped_defer_target_commit_resume): Rename from
3880         make_cleanup_defer_target_commit_resume.  Return a
3881         scoped_restore.
3882         * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
3883
3884 2017-09-29  Tom Tromey  <tom@tromey.com>
3885
3886         * main.c (captured_main_1): Remove unused declaration.
3887         * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
3888
3889 2017-09-29  Tom Tromey  <tom@tromey.com>
3890
3891         * symtab.c (search_symbols): Remove unused outer cleanup.
3892         (make_source_files_completion_list): Remove unused declaration.
3893
3894 2017-09-29  Tom Tromey  <tom@tromey.com>
3895
3896         * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
3897
3898 2017-09-29  Tom Tromey  <tom@tromey.com>
3899
3900         * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
3901         gdb::byte_vector.
3902
3903 2017-09-29  Tom Tromey  <tom@tromey.com>
3904
3905         * complaints.c (vcomplaint): Use std::string.
3906
3907 2017-09-29  Tom Tromey  <tom@tromey.com>
3908
3909         * tracepoint.c (trace_variable_command): Use std::string.
3910         (encode_actions_1): Remove unused declarations.
3911         (create_tsv_from_upload): Use std::string.
3912
3913 2017-09-29  Tom Tromey  <tom@tromey.com>
3914
3915         * cp-support.c (gdb_demangle): Use std::string.
3916
3917 2017-09-29  Tom Tromey  <tom@tromey.com>
3918
3919         * stack.c (parse_frame_specification): Use std::string
3920         (info_frame_command): Use gdb::unique_xmalloc_ptr.
3921
3922 2017-09-29  Tom Tromey  <tom@tromey.com>
3923
3924         * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
3925
3926 2017-09-29  Tom Tromey  <tom@tromey.com>
3927
3928         * utils.c (vfprintf_maybe_filtered): Use std::string.
3929         (vfprintf_unfiltered): Likewise.
3930
3931 2017-09-29  Tom Tromey  <tom@tromey.com>
3932
3933         * event-top.c (top_level_prompt): Return std::string.
3934         (display_gdb_prompt): Update.
3935
3936 2017-09-29  Tom Tromey  <tom@tromey.com>
3937
3938         * unittests/common-utils-selftests.c (format): New function.
3939         (string_vprintf_tests): New function.
3940         (_initialize_common_utils_selftests): Register new tests.
3941         * common/common-utils.c (string_vprintf): New function.
3942         * common/common-utils.h (string_vprintf): Declare.
3943
3944 2017-09-29  Pedro Alves  <palves@redhat.com>
3945
3946         * common/rsp-low.c (unpack_varlen_hex): Constify.
3947         * common/rsp-low.h (unpack_varlen_hex): Constify.
3948         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
3949         Constify.
3950         * remote.c (remote_set_permissions, read_ptid)
3951         (remote_current_thread, remote_get_threads_with_qthreadinfo)
3952         (remote_static_tracepoint_marker_at)
3953         (remote_static_tracepoint_markers_by_strid)
3954         (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
3955         * tracepoint.c (parse_trace_status, parse_tracepoint_status)
3956         (parse_tracepoint_definition, parse_tsv_definition)
3957         (parse_static_tracepoint_marker_definition): Constify.
3958         * tracepoint.h (parse_static_tracepoint_marker_definition)
3959         (parse_trace_status, parse_tracepoint_status)
3960         (parse_tracepoint_definition, parse_tsv_definition): Constify.
3961
3962 2017-09-29  Pedro Alves  <palves@redhat.com>
3963
3964         * remote.c (target_buf, target_buf_size): Delete.
3965         (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
3966         Use the connection's packet buffer instead.
3967         All callers adjusted.
3968         (_initialize_remote): Remove references to target_buf and
3969         target_buf_size.
3970
3971 2017-09-28  Pedro Alves  <palves@redhat.com>
3972
3973         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
3974         unittests/common-utils-selftests.c.
3975         (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
3976         (COMMON_OBS): Remove utils-selftests.o.
3977         * utils-selftests.c: Move to ...
3978         * unittests/common-utils-selftests.c: ... here and rename self
3979         test to "string_printf".
3980
3981 2017-09-28  Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
3982
3983         * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
3984         having NULL cus or tus.
3985
3986 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
3987
3988         * arm-tdep.c: (convert_from_extended): Remove.
3989         (convert_to_extended): Likewise.
3990         (arm_extract_return_value): Use convert_typed_floating.
3991         (arm_store_return_value): Likewise.
3992
3993         * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
3994         * sh-tdep.c: Do not include "floatformat.h".
3995         (sh_littlebyte_bigword_type): New function.
3996         (sh_register_convert_to_virtual): Use convert_typed_floating.
3997         (sh_register_convert_to_raw): Likewise.
3998         * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
3999         (sh64_littlebyte_bigword_type): New function.
4000         (sh64_extract_return_value): Use convert_typed_floating.
4001         (sh64_register_convert_to_virtual): Likewise.
4002         (sh64_register_convert_to_raw): Likewise.
4003
4004 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
4005
4006         * doublest.h (floatformat_from_type): Move to gdbtypes.h.
4007         * doublest.c (floatformat_from_type): Move to gdbtypes.c.
4008
4009         * gdbtypes.h (union type_specific): Make field floatformat hold
4010         just a single struct floatformat, not an array.
4011         (floatformat_from_type): Move here.
4012         * gdbtypes.c (floatformat_from_type): Move here.  Update to
4013         changed TYPE_FLOATFORMAT definition.
4014         (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
4015         (recursive_dump_type): Likewise.
4016         (init_float_type): Install correct floatformat for byte order.
4017         (arch_float_type): Likewise.
4018
4019 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
4020
4021         * gdbtypes.c (init_type): Change incoming argument from
4022         length-in-bytes to length-in-bits.  Assert length is a
4023         multiple of TARGET_CHAR_BITS.
4024         (arch_type, arch_flags_type): Likewise.
4025         (init_integer_type): Update call to init_type.
4026         (init_character_type): Likewise.
4027         (init_boolean_type): Likewise.
4028         (init_float_type): Likewise.
4029         (init_decfloat_type): Likewise.
4030         (init_complex_type): Likewise.
4031         (init_pointer_type): Likewise.
4032         (objfile_type): Likewise.
4033         (arch_integer_type): Update call to arch_type.
4034         (arch_character_type): Likewise.
4035         (arch_boolean_type): Likewise.
4036         (arch_float_type): Likewise.
4037         (arch_decfloat_type): Likewise.
4038         (arch_complex_type): Likewise.
4039         (arch_pointer_type): Likewise.
4040         (gdbtypes_post_init): Likewise.
4041
4042         * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
4043         (read_base_type): Likewise.
4044         * mdebugread.c (basic_type): Likewise.
4045         * stabsread.c (dbx_init_float_type): Likewise.
4046         (rs6000_builtin_type): Likewise.
4047         (read_range_type): Likewise.  Also, fix call to init_integer_type
4048         with erroneous length argument.
4049
4050         * ada-lang.c (ada_language_arch_info): Update call to arch_type.
4051         * d-lang.c (build_d_types): Likewise.
4052         * f-lang.c (build_fortran_types): Likewise.
4053         * go-lang.c (build_go_types): Likewise.
4054         * opencl-lang.c (build_opencl_types): Likewise.
4055         * jit.c (finalize_symtab): Likewise.
4056         * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
4057         (build_std_type_info_type): Likewise.
4058         * target-descriptions.c (tdesc_gdb_type): Likewise.  Also,
4059         update call to arch_flags_type.
4060
4061         * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
4062         arch_type.
4063         * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
4064         * windows-tdep.c (windows_get_tlb_type): Likewise.
4065
4066         * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
4067         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
4068         * m32c-tdep.c (make_types): Likewise.
4069         * rl78-tdep.c (rl78_gdbarch_init): Likewise.
4070         (rl78_psw_type): Update call to arch_flags_type.
4071         * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
4072         * rx-tdep.c (rx_psw_type): Likewise.
4073         (rx_fpsw_type): Likewise.
4074         * sparc-tdep.c (sparc_psr_type): Likewise.
4075         (sparc_fsr_type): Likewise.
4076         * sparc64-tdep.c (sparc64_pstate_type): Likewise.
4077         (sparc64_ccr_type): Likewise.
4078         (sparc64_fsr_type): Likewise.
4079         (sparc64_fprs_type): Likewise.
4080
4081 2017-09-27  Tom Tromey  <tom@tromey.com>
4082
4083         * findcmd.c (find_command): Constify.
4084
4085 2017-09-27  Tom Tromey  <tom@tromey.com>
4086
4087         * ada-tasks.c (task_command_1, task_command): Constify.
4088
4089 2017-09-27  Tom Tromey  <tom@tromey.com>
4090
4091         * symtab.c (maintenance_print_symbol_cache)
4092         (maintenance_flush_symbol_cache)
4093         (maintenance_print_symbol_cache_statistics): Constify.
4094
4095 2017-09-27  Tom Tromey  <tom@tromey.com>
4096
4097         * inferior.c (detach_inferior_command, kill_inferior_command)
4098         (inferior_command): Constify.
4099
4100 2017-09-27  Tom Tromey  <tom@tromey.com>
4101
4102         * regcache.c (regcache_print, maintenance_print_registers)
4103         (maintenance_print_raw_registers)
4104         (maintenance_print_cooked_registers)
4105         (maintenance_print_register_groups)
4106         (maintenance_print_remote_registers): Constify.
4107
4108 2017-09-27  Tom Tromey  <tom@tromey.com>
4109
4110         * printcmd.c (map_display_numbers, undisplay_command)
4111         (enable_disable_display_command, enable_display_command)
4112         (disable_display_command): Constify.
4113
4114 2017-09-27  Tom Tromey  <tom@tromey.com>
4115
4116         * breakpoint.h (delete_command): Don't declare.
4117         * breakpoint.c (delete_command, enable_once_command)
4118         (enable_count_command, enable_delete_command, breakpoint_1)
4119         (maintenance_info_breakpoints, stopin_command, stopat_command)
4120         (delete_command, delete_trace_command, save_breakpoints)
4121         (save_breakpoints_command, save_tracepoints_command): Constify.
4122
4123 2017-09-27  Tom Tromey  <tom@tromey.com>
4124
4125         * macrocmd.c (macro_expand_command, macro_expand_once_command)
4126         (skip_ws, extract_identifier, macro_define_command)
4127         (macro_undef_command, macro_list_command): Constify.
4128
4129 2017-09-27  Tom Tromey  <tom@tromey.com>
4130
4131         * infcmd.c (environment_info, set_environment_command)
4132         (unset_environment_command, path_info, info_proc_cmd_1)
4133         (info_proc_cmd_mappings, info_proc_cmd_stat)
4134         (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
4135         (info_proc_cmd_exe, info_proc_cmd_all): Constify.
4136
4137 2017-09-27  Tom Tromey  <tom@tromey.com>
4138
4139         * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
4140         Constify.
4141
4142 2017-09-27  Tom Tromey  <tom@tromey.com>
4143
4144         * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
4145
4146 2017-09-27  Tom Tromey  <tom@tromey.com>
4147
4148         * demangle.c (demangle_command): Constify.
4149
4150 2017-09-27  Tom Tromey  <tom@tromey.com>
4151
4152         * progspace.c (maintenance_info_program_spaces_command):
4153         Constify.
4154
4155 2017-09-27  Tom Tromey  <tom@tromey.com>
4156
4157         * compile/compile.c (check_raw_argument, compile_file_command)
4158         (compile_code_command, compile_print_command): Constify.
4159
4160 2017-09-27  Tom Tromey  <tom@tromey.com>
4161
4162         * reggroups.c (maintenance_print_reggroups): Constify.
4163
4164 2017-09-27  Tom Tromey  <tom@tromey.com>
4165
4166         * dwarf2read.c (save_gdb_index_command): Constify.
4167
4168 2017-09-27  Tom Tromey  <tom@tromey.com>
4169
4170         * stap-probe.c (info_probes_stap_command): Constify.
4171
4172 2017-09-27  Tom Tromey  <tom@tromey.com>
4173
4174         * fork-child.c (unset_exec_wrapper_command): Constify.
4175
4176 2017-09-27  Tom Tromey  <tom@tromey.com>
4177
4178         * btrace.c (get_uint, get_context_size, no_chunk)
4179         (maint_btrace_packet_history_cmd)
4180         (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
4181         (maint_info_btrace_cmd): Constify.
4182
4183 2017-09-27  Tom Tromey  <tom@tromey.com>
4184
4185         * reverse.c (delete_bookmark_command): Constify.
4186
4187 2017-09-27  Tom Tromey  <tom@tromey.com>
4188
4189         * remote.c (set_memory_packet_size)
4190         (set_memory_write_packet_size, show_memory_write_packet_size)
4191         (set_memory_read_packet_size, show_memory_read_packet_size)
4192         (compare_sections_command, packet_command, remote_put_command)
4193         (remote_get_command, remote_delete_command): Constify.
4194
4195 2017-09-27  Tom Tromey  <tom@tromey.com>
4196
4197         * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
4198         (set_mipsfpu_double_command, set_mipsfpu_none_command)
4199         (set_mipsfpu_auto_command): Constify.
4200
4201 2017-09-27  Tom Tromey  <tom@tromey.com>
4202
4203         * cli/cli-cmds.h (cd_command): Constify.
4204         * cli/cli-cmds.c (cd_command): Constify.
4205
4206 2017-09-27  Tom Tromey  <tom@tromey.com>
4207
4208         * thread.c (thread_name_command, thread_find_command): Constify.
4209
4210 2017-09-27  Tom Tromey  <tom@tromey.com>
4211
4212         * probe.c (enable_probes_command, disable_probes_command):
4213         Constify.
4214
4215 2017-09-27  Tom Tromey  <tom@tromey.com>
4216
4217         * symfile.c (symbol_file_command): Constify.
4218         * gdbcore.h (deprecated_file_changed_hook): Constify.
4219         * exec.c (deprecated_file_changed_hook, exec_file_command)
4220         (file_command): Constify.
4221         * defs.h (symbol_file_command): Constify.
4222
4223 2017-09-27  Tom Tromey  <tom@tromey.com>
4224
4225         * remote-fileio.c (set_system_call_allowed)
4226         (show_system_call_allowed): Constify.
4227
4228 2017-09-27  Tom Tromey  <tom@tromey.com>
4229
4230         * tracepoint.c (delete_trace_variable_command)
4231         (tfind_end_command, tfind_start_command, tfind_pc_command)
4232         (tfind_tracepoint_command, tfind_line_command)
4233         (tfind_range_command, tfind_outside_command): Constify.
4234
4235 2017-09-27  Tom Tromey  <tom@tromey.com>
4236
4237         * ax-gdb.c (maint_agent_printf_command, agent_command)
4238         (agent_eval_command): Constify.
4239
4240 2017-09-27  Tom Tromey  <tom@tromey.com>
4241
4242         * tracepoint.c (info_scope_command): Constify.
4243         * python/python.c (gdbpy_decode_line): Constify.
4244         * python/py-breakpoint.c (bppy_init): Constify.
4245         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
4246         * location.h: (new_linespec_location)
4247         (string_to_event_location_basic, string_to_event_location):
4248         Constify.
4249         * location.c (new_linespec_location)
4250         (string_to_event_location_basic, string_to_event_location):
4251         Constify.
4252         * linespec.h (decode_line_with_current_source)
4253         (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
4254         * linespec.c (linespec_lex_to_end)
4255         (decode_line_with_current_source)
4256         (decode_line_with_last_displayed): Constify.
4257         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
4258         Constify.
4259         * cli/cli-cmds.c (edit_command, list_command): Constify.
4260         * breakpoint.h (until_break_command, watch_command_wrapper)
4261         (awatch_command_wrapper, rwatch_command_wrapper)
4262         (init_ada_exception_breakpoint): Constify.
4263         * breakpoint.c (break_command_1, dprintf_command)
4264         (break_range_command, watch_command_wrapper)
4265         (rwatch_command_wrapper, awatch_command_wrapper)
4266         (until_break_command, init_ada_exception_breakpoint)
4267         (strace_marker_create_sals_from_location, trace_command)
4268         (ftrace_command, strace_command, struct tracepoint): Constify.
4269         * ax-gdb.c (agent_command_1): Constify.
4270         * ada-lang.c (ada_exception_sal): Constify.
4271
4272 2017-09-27  Tom Tromey  <tom@tromey.com>
4273
4274         * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
4275         (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
4276         (get_context_size, no_chunk, get_insn_history_modifiers)
4277         (cmd_record_insn_history, get_call_history_modifiers)
4278         (cmd_record_call_history): Constify.
4279
4280 2017-09-27  Tom Tromey  <tom@tromey.com>
4281
4282         * source.c (show_substitute_path_command)
4283         (unset_substitute_path_command, set_substitute_path_command):
4284         Constify.
4285
4286 2017-09-27  Tom Tromey  <tom@tromey.com>
4287
4288         * typeprint.c (maintenance_print_type): Constify.
4289         * maint.c (maintenance_dump_me, maintenance_demangle)
4290         (maintenance_time_display, maintenance_info_sections)
4291         (maintenance_print_statistics, maintenance_deprecate)
4292         (maintenance_undeprecate): Constify.
4293         (maintenance_do_deprecate): Constify.  Use std::string.
4294         (maintenance_selftest): Constify.
4295         * gdbtypes.h (maintenance_print_type): Constify.
4296
4297 2017-09-27  Tom Tromey  <tom@tromey.com>
4298
4299         * hppa-tdep.c (unwind_command): Constify.
4300
4301 2017-09-27  Tom Tromey  <tom@tromey.com>
4302
4303         * target-descriptions.c (unset_tdesc_filename_cmd)
4304         (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
4305         Constify.
4306
4307 2017-09-27  Tom Tromey  <tom@tromey.com>
4308
4309         * dummy-frame.c (maintenance_print_dummy_frames): Constify.
4310
4311 2017-09-27  Tom Tromey  <tom@tromey.com>
4312
4313         * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
4314
4315 2017-09-27  Tom Tromey  <tom@tromey.com>
4316
4317         * tui/tui-regs.c (tui_reg_command): Constify.
4318
4319 2017-09-27  Tom Tromey  <tom@tromey.com>
4320
4321         * skip.c (skip_file_command, skip_function_command)
4322         (skip_enable_command, skip_disable_command, skip_delete_command):
4323         Constify.
4324
4325 2017-09-27  Tom Tromey  <tom@tromey.com>
4326
4327         * record-btrace.c (cmd_record_btrace_bts_start)
4328         (cmd_record_btrace_pt_start): Constify.
4329
4330 2017-09-27  Tom Tromey  <tom@tromey.com>
4331
4332         * symmisc.c (maintenance_print_symbols)
4333         (maintenance_print_msymbols, maintenance_print_objfiles)
4334         (maintenance_info_symtabs, maintenance_check_symtabs)
4335         (maintenance_expand_symtabs, maintenance_info_line_tables):
4336         Constify.
4337
4338 2017-09-27  Tom Tromey  <tom@tromey.com>
4339
4340         * top.c (new_ui_command): Constify.
4341
4342 2017-09-27  Tom Tromey  <tom@tromey.com>
4343
4344         * symfile.c (add_symbol_file_command)
4345         (remove_symbol_file_command, list_overlays_command)
4346         (map_overlay_command, unmap_overlay_command)
4347         (overlay_auto_command, overlay_manual_command)
4348         (overlay_off_command, overlay_load_command): Constify.
4349
4350 2017-09-27  Tom Tromey  <tom@tromey.com>
4351
4352         * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
4353         (info_spu_mailbox_command, info_spu_dma_command)
4354         (info_spu_proxydma_command): Constify.
4355
4356 2017-09-27  Tom Tromey  <tom@tromey.com>
4357
4358         * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
4359
4360 2017-09-27  Tom Tromey  <tom@tromey.com>
4361
4362         * cli/cli-script.c (user_defined_command): Constify.
4363
4364 2017-09-27  Tom Tromey  <tom@tromey.com>
4365
4366         * cli/cli-dump.c (dump_memory_command, dump_value_command)
4367         (dump_srec_memory, dump_srec_value, dump_ihex_memory)
4368         (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
4369         (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
4370         (dump_binary_value, append_binary_memory, append_binary_value):
4371         Constify.
4372         (struct dump_context) <func>: Constify.
4373         (add_dump_command): Update.
4374
4375 2017-09-27  Tom Tromey  <tom@tromey.com>
4376
4377         * cli/cli-cmds.c (show_version, show_configuration)
4378         (source_command, show_user): Constify.
4379
4380 2017-09-27  Tom Tromey  <tom@tromey.com>
4381
4382         * target.c (maintenance_print_target_stack): Constify.
4383
4384 2017-09-27  Tom Tromey  <tom@tromey.com>
4385
4386         * interps.c (interpreter_exec_cmd): Constify.
4387
4388 2017-09-27  Tom Tromey  <tom@tromey.com>
4389
4390         * record-full.c (cmd_record_full_restore): Constify.
4391
4392 2017-09-27  Tom Tromey  <tom@tromey.com>
4393
4394         * memattr.c (enable_mem_command, disable_mem_command)
4395         (delete_mem_command): Constify.
4396
4397 2017-09-27  Tom Tromey  <tom@tromey.com>
4398
4399         * value.c (show_convenience): Constify.
4400
4401 2017-09-27  Tom Tromey  <tom@tromey.com>
4402
4403         * gdbcore.h (core_file_command): Update.
4404         * corefile.c (core_file_command): Constify.
4405
4406 2017-09-27  Tom Tromey  <tom@tromey.com>
4407
4408         * user-regs.c (maintenance_print_user_registers): Constify.
4409
4410 2017-09-27  Tom Tromey  <tom@tromey.com>
4411
4412         * cp-namespace.c (maintenance_cplus_namespace): Constify.
4413
4414 2017-09-27  Tom Tromey  <tom@tromey.com>
4415
4416         * cp-support.c (first_component_command): Constify.
4417
4418 2017-09-27  Tom Tromey  <tom@tromey.com>
4419
4420         * psymtab.c (maintenance_print_psymbols)
4421         (maintenance_info_psymtabs, maintenance_check_psymtabs):
4422         Constify.
4423
4424 2017-09-27  Tom Tromey  <tom@tromey.com>
4425
4426         * windows-tdep.c (display_tib): Constify.
4427
4428 2017-09-27  Tom Tromey  <tom@tromey.com>
4429
4430         * linux-fork.c (delete_checkpoint_command)
4431         (detach_checkpoint_command): Constify.
4432
4433 2017-09-27  Tom Tromey  <tom@tromey.com>
4434
4435         * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
4436
4437 2017-09-27  Tom Tromey  <tom@tromey.com>
4438
4439         * arc-tdep.c (dump_arc_instruction_command): Constify.
4440
4441 2017-09-27  Tom Tromey  <tom@tromey.com>
4442
4443         * valprint.c (set_radix, show_radix): Constify.
4444
4445 2017-09-27  Tom Tromey  <tom@tromey.com>
4446
4447         * dtrace-probe.c (info_probes_dtrace_command): Constify.
4448
4449 2017-09-27  Tom Tromey  <tom@tromey.com>
4450
4451         * command.h (not_just_help_class_command): Update.
4452         * cli/cli-decode.h (not_just_help_class_command): Update.
4453         * cli/cli-decode.c (not_just_help_class_command): Constify.
4454
4455 2017-09-27  Tom Tromey  <tom@tromey.com>
4456
4457         * gdb_bfd.c (maintenance_info_bfds): Constify.
4458
4459 2017-09-27  Tom Tromey  <tom@tromey.com>
4460
4461         * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
4462         overloads.
4463         (do_add_cmd): Rename from add_cmd.  Don't call set_cmd_cfunc.
4464         (do_const_cfunc): New function.
4465         (cmd_cfunc_eq): New overload.
4466         (cli_user_command_p): Check do_const_cfunc.
4467         * cli/cli-decode.h (struct cmd_list_element) <function>: New field
4468         const_cfunc.
4469         * command.h (add_cmd): Add const overload and no-function
4470         overload.
4471         (set_cmd_cfunc): Add const overload.
4472         (cmd_const_cfunc_ftype): Declare.
4473         (cmd_cfunc_eq): Add const overload.
4474         * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
4475         python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
4476         overload.
4477
4478 2017-09-27  Tom Tromey  <tom@tromey.com>
4479
4480         * macroexp.c (get_next_token_for_substitution): New function.
4481         (substitute_args): Call it.  Check for __VA_OPT__.
4482
4483 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4484             Pedro Alves <palves@redhat.com>
4485
4486         * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
4487         producer_is_icc_lt_14.
4488         (producer_is_icc_lt_14): New function.
4489         (check_producer): Add code for checking version of ICC.
4490         (producer_is_icc): Move to producer.c.
4491         (read_structure_type): Restrict ICC workaround to ICC<14.
4492         * producer.c: Include selftest.h.
4493         (producer_is_icc, producer_parsing_tests, _initialize_producer):
4494         New functions.
4495         * producer.h (producer_is_icc): New declaration.
4496
4497 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4498
4499         * Makefile.in (SFILES): Add producer.c.
4500         (COMMON_OBS): Add producer.o
4501         * amd64-tdep.c (producer.h): Add new include.
4502         * dwarf2read.c (producer.h): Add new include.
4503         * producer.c: New file.
4504         * producer.h: New file.
4505         * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
4506         producer.c.
4507         * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
4508         producer.h.
4509
4510 2017-09-26  Matthias Klose  <doko@ubuntu.com>
4511
4512         * configure.ac: Search ncursesw before ncurses.
4513         Check ncursesw/ncurses.h before ncurses/ncurses.h.
4514         * gdb_curses.h: Include <ncursesw/ncurses.h>
4515         * config.in, configure: Regenerate.
4516
4517 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4518
4519         PR gdb/22185
4520         * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
4521         obsolete.
4522         Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
4523         Remove i386sol2 support.
4524         * configure.nat <i386sol2>: Remove.
4525         <sol2-64>: Fold into ...
4526         <sol2>: ... this.
4527         Move common settings to default section.
4528         Add sol-thread.o.
4529         * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
4530         x86_64-*-solaris2.1[0-9]*>: Rename to ...
4531         <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
4532         <i[34567]86-*-solaris*>: Remove.
4533         <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
4534
4535         * configure.ac: Remove wctype in libw check.
4536         (_MSE_INT_H): Don't define on Solaris 7-9.
4537         <solaris*>: Remove libthread_db.so.1 check.
4538         * configure: Regenerate.
4539         * config.in: Regenerate.
4540
4541         * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
4542         (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
4543         (gdb_ps_size_t): Remove.
4544         Use base types in users.
4545         * sol-thread.c: Likewise, also for gdb_ps_addr_t.
4546
4547         * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
4548
4549 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4550
4551         PR build/22206
4552         * sparc64-tdep.c (adi_tag_fd): Print pid as long.
4553         (adi_is_addr_mapped): Likewise.
4554         (PSR_ICC): Don't redefine.
4555         (PSR_IMPL): Likewise.
4556
4557 2017-09-25  Tom Tromey  <tom@tromey.com>
4558
4559         * regcache.c (regcache::dump): Use string_printf.
4560
4561 2017-09-25  Tom Tromey  <tom@tromey.com>
4562
4563         * regcache.c (class regcache_invalidator): New.
4564         (struct register_to_invalidate): Remove.
4565         (make_cleanup_regcache_invalidate): Remove.
4566         (regcache::raw_write): Use regcache_invalidator.
4567
4568 2017-09-25  Tom Tromey  <tom@tromey.com>
4569
4570         * spu-tdep.c (spu2ppu_sniffer): Update.
4571         * regcache.h (make_cleanup_regcache_xfree): Don't declare.
4572         * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
4573         Remove.
4574         * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
4575         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
4576         * frame.h (frame_save_as_regcache): Return std::unique_ptr.
4577         * frame.c (frame_save_as_regcache): Return std::unique_ptr.
4578         (frame_pop): Update.
4579
4580 2017-09-25  Tom Tromey  <tom@tromey.com>
4581
4582         * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
4583         * regcache.h (regcache_xfree): Don't declare.
4584         * regcache.c (regcache_xfree): Remove.
4585         (do_regcache_xfree): Use delete.
4586         * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
4587         * linux-fork.c (free_fork): Use delete.
4588         (fork_save_infrun_state): Likewise.
4589         * jit.c (jit_dealloc_cache): Use delete.
4590         * infrun.c (discard_infcall_suspend_state): Use delete.
4591
4592 2017-09-25  Tom Tromey  <tom@tromey.com>
4593
4594         * regcache.h (regcache_xmalloc): Don't declare.
4595         (regcache_raw_set_cached_value): Update comment.
4596         * regcache.c (regcache_xmalloc): Remove.
4597         * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
4598         * jit.c (jit_frame_sniffer): Use new.
4599         * frame.c (frame_save_as_regcache): Use new.
4600
4601 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4602
4603         * NEWS: Advertise support for guarded-storage registers on IBM z.
4604
4605 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4606
4607         * s390-linux-nat.c (have_regset_gs): New static variable.
4608         (s390_linux_fetch_inferior_registers): Handle guarded-storage
4609         control block and guarded-storage broadcast control regsets.
4610         (s390_read_description): Detect whether the target has
4611         guarded-storage support, return appropriate tdesc.
4612         * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
4613         (features/s390x-gs-linux64.c): Likewise.
4614         (struct gdbarch_tdep) <have_gs>: New field.
4615         (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
4616         (s390_gsbc_regset): New variables.
4617         (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
4618         and s390_gsbc_regset, if applicable.
4619         (s390_core_read_description): Check whether core file was from a
4620         target with guarded-storage support; include appropriate regsets.
4621         (s390_gdbarch_init): Add registers for guarded-storage support.
4622         (_initialize_s390_tdep): Initialize new target descriptions that
4623         include registers for guarded-storage support.
4624         * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
4625         (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
4626         (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
4627         (S390_NUM_REGS): Adjust macro definition.
4628         (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
4629         (tdesc_s390x_gs_linux64): New declarations.
4630
4631 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
4632
4633         * features/s390-gs-linux64.xml: New file.
4634         * features/s390-gs.xml: New file.
4635         * features/s390-gsbc.xml: New file.
4636         * features/s390x-gs-linux64.xml: New file.
4637         * features/Makefile (WHICH): Add s390-gs-linux64 and
4638         s390x-gs-linux64.
4639         (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
4640         (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
4641         * features/s390-gs-linux64.c: New generated file.
4642         * features/s390x-gs-linux64.c: New file.
4643         * regformats/s390-gs-linux64.dat: New file.
4644         * regformats/s390x-gs-linux64.dat: New file.
4645
4646 2017-09-23  Tom Tromey  <tom@tromey.com>
4647
4648         * defs.h (make_cleanup_override_quit_handler): Don't declare.
4649
4650 2017-09-22  Tom Tromey  <tom@tromey.com>
4651
4652         * utils.c (class scoped_input_handler) <m_quit_handler>: Change
4653         type to scoped_restore_tmpl.
4654         <scoped_input_handler>: Initialize m_quit_handler directly.
4655
4656 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
4657
4658         * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
4659         (cd_command): Likewise.  Free "current_directory" before
4660         assigning to it.
4661         * main.c (captured_main_1): Use "getcwd (NULL, 0)".
4662         * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
4663         * top.c (gdb_dirbuf): Remove global declaration.
4664         * top.h (gdb_dirbuf): Likewise.
4665
4666 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
4667
4668         * gnulib/aclocal.m4: Regenerate.
4669         * gnulib/config.in: Regenerate.
4670         * gnulib/configure: Regenerate.
4671         * gnulib/import/Makefile.am: Regenerate.
4672         * gnulib/import/Makefile.in: Regenerate.
4673         * gnulib/import/assure.h: New file.
4674         * gnulib/import/at-func.c: Likewise
4675         * gnulib/import/chdir-long.c: New file.
4676         * gnulib/import/chdir-long.h: New file.
4677         * gnulib/import/cloexec.c: New file.
4678         * gnulib/import/cloexec.h: New file.
4679         * gnulib/import/close.c: New file.
4680         * gnulib/import/closedir.c: New file.
4681         * gnulib/import/dirent-private.h: New file.
4682         * gnulib/import/dup-safer.c: New file.
4683         * gnulib/import/dup.c: New file.
4684         * gnulib/import/dup2.c: New file.
4685         * gnulib/import/error.c: New file.
4686         * gnulib/import/error.h: New file.
4687         * gnulib/import/exitfail.c: New file.
4688         * gnulib/import/exitfail.h: New file.
4689         * gnulib/import/fchdir.c: New file.
4690         * gnulib/import/fcntl.c: New file.
4691         * gnulib/import/fcntl.in.h: New file.
4692         * gnulib/import/fd-hook.c: New file.
4693         * gnulib/import/fd-hook.h: New file.
4694         * gnulib/import/fd-safer.c: New file.
4695         * gnulib/import/fdopendir.c: New file.
4696         * gnulib/import/filename.h: New file.
4697         * gnulib/import/filenamecat-lgpl.c: New file.
4698         * gnulib/import/filenamecat.h: New file.
4699         * gnulib/import/fstat.c: New file.
4700         * gnulib/import/fstatat.c: New file.
4701         * gnulib/import/getcwd-lgpl.c: New file.
4702         * gnulib/import/getcwd.c: New file.
4703         * gnulib/import/getdtablesize.c: New file.
4704         * gnulib/import/getlogin_r.c: New file.
4705         * gnulib/import/getprogname.c: New file.
4706         * gnulib/import/getprogname.h: New file.
4707         * gnulib/import/gettext.h: New file.
4708         * gnulib/import/glob-libc.h: New file.
4709         * gnulib/import/glob.c: New file.
4710         * gnulib/import/glob.in.h: New file.
4711         * gnulib/import/intprops.h: New file.
4712         * gnulib/import/m4/chdir-long.m4: New file.
4713         * gnulib/import/m4/close.m4: New file.
4714         * gnulib/import/m4/closedir.m4: New file.
4715         * gnulib/import/m4/d-ino.m4: New file.
4716         * gnulib/import/m4/d-type.m4: New file.
4717         * gnulib/import/m4/dup.m4: New file.
4718         * gnulib/import/m4/dup2.m4: New file.
4719         * gnulib/import/m4/error.m4: New file.
4720         * gnulib/import/m4/fchdir.m4: New file.
4721         * gnulib/import/m4/fcntl.m4: New file.
4722         * gnulib/import/m4/fcntl_h.m4: New file.
4723         * gnulib/import/m4/fdopendir.m4: New file.
4724         * gnulib/import/m4/filenamecat.m4: New file.
4725         * gnulib/import/m4/fstat.m4: New file.
4726         * gnulib/import/m4/fstatat.m4: New file.
4727         * gnulib/import/m4/getcwd-abort-bug.m4: New file.
4728         * gnulib/import/m4/getcwd-path-max.m4: New file.
4729         * gnulib/import/m4/getcwd.m4: New file.
4730         * gnulib/import/m4/getdtablesize.m4: New file.
4731         * gnulib/import/m4/getlogin_r.m4: New file.
4732         * gnulib/import/m4/getprogname.m4: New file.
4733         * gnulib/import/m4/glob.m4: New file.
4734         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
4735         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
4736         * gnulib/import/m4/mempcpy.m4: New file.
4737         * gnulib/import/m4/memrchr.m4: New file.
4738         * gnulib/import/m4/mode_t.m4: New file.
4739         * gnulib/import/m4/msvc-inval.m4: New file.
4740         * gnulib/import/m4/msvc-nothrow.m4: New file.
4741         * gnulib/import/m4/open.m4: New file.
4742         * gnulib/import/m4/openat.m4: New file.
4743         * gnulib/import/m4/opendir.m4: New file.
4744         * gnulib/import/m4/readdir.m4: New file.
4745         * gnulib/import/m4/realloc.m4: New file.
4746         * gnulib/import/m4/rewinddir.m4: New file.
4747         * gnulib/import/m4/save-cwd.m4: New file.
4748         * gnulib/import/m4/strdup.m4: New file.
4749         * gnulib/import/m4/strerror.m4: New file.
4750         * gnulib/import/m4/unistd-safer.m4: New file.
4751         * gnulib/import/mempcpy.c: New file.
4752         * gnulib/import/memrchr.c: New file.
4753         * gnulib/import/msvc-inval.c: New file.
4754         * gnulib/import/msvc-inval.h: New file.
4755         * gnulib/import/msvc-nothrow.c: New file.
4756         * gnulib/import/msvc-nothrow.h: New file.
4757         * gnulib/import/open.c: New file.
4758         * gnulib/import/openat-die.c: New file.
4759         * gnulib/import/openat-priv.h: New file.
4760         * gnulib/import/openat-proc.c: New file.
4761         * gnulib/import/openat.c: New file.
4762         * gnulib/import/openat.h: New file.
4763         * gnulib/import/opendir.c: New file.
4764         * gnulib/import/pipe-safer.c: New file.
4765         * gnulib/import/readdir.c: New file.
4766         * gnulib/import/realloc.c: New file.
4767         * gnulib/import/rewinddir.c: New file.
4768         * gnulib/import/save-cwd.c: New file.
4769         * gnulib/import/save-cwd.h: New file.
4770         * gnulib/import/strdup.c: New file.
4771         * gnulib/import/strerror-override.c: New file.
4772         * gnulib/import/strerror-override.h: New file.
4773         * gnulib/import/strerror.c: New file.
4774         * gnulib/import/unistd--.h: New file.
4775         * gnulib/import/unistd-safer.h: New file.
4776         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
4777         "getcwd" and "glob".
4778         * ser-tcp.c: Undefine "close" before redefining it.
4779
4780 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
4781
4782         * guile/scm-value.c (gdbscm_value_address): Initialize address,
4783         get rid of res_val.
4784
4785 2017-09-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
4786
4787         * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
4788         <sol2,sparc>: Likewise.
4789         <sol2-64,i386>: Likewise.
4790
4791         * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
4792         -Wdeprecated-declarations on *-*-solaris*.
4793         * configure: Regenerate.
4794
4795         * procfs.c: Include "nat/inferior.h".
4796         (procfs_info_proc): Fix typo.
4797
4798 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
4799
4800         * remote.c (vector): Include.
4801         (struct private_thread_info): Add field, thread_handle.
4802         (free_private_thread_info): Deallocate storage associated with
4803         thread handle.
4804         (get_private_info_thread): Initialize `thread_handle' field.
4805         (struct thread_item): Add field, thread_handle.
4806         (clear_threads_listing_context): Deallocate storage associated
4807         with thread handle.
4808         (start_thread): Add support for "handle" attribute.
4809         (thread_attributes): Add "handle".
4810         (remote_get_threads_with_qthreadinfo): Initialize thread_handle
4811         field.
4812         (remote_update_thread_list): Update thread_handle.
4813         (remote_thread_handle_to_thread_info): New function.
4814         (init_remote_ops): Initialize to_thread_handle_to_thread_info.
4815
4816 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
4817
4818         * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
4819         function.
4820         (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
4821         * python/python-internal.h (thread_object_type): Declare.
4822
4823 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
4824
4825         * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
4826         (target_thread_handle_to_thread_info): Declare.
4827         * target.c (target_thread_handle_to_thread_info): New function.
4828         * target-delegates.c: Regenerate.
4829         * gdbthread.h (find_thread_by_handle): Declare.
4830         * thread.c (find_thread_by_handle): New function.
4831         * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
4832         function.
4833         (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
4834
4835 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
4836
4837         * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
4838
4839 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
4840
4841         * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
4842
4843 2017-09-21  Yao Qi  <yao.qi@linaro.org>
4844
4845         * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
4846         to gdb_target_obs.
4847
4848 2017-09-20  Tom Tromey  <tom@tromey.com>
4849
4850         * breakpoint.c (struct counted_command_line): Remove.
4851         (breakpoint_commands): Update.
4852         (alloc_counted_command_line, incref_counted_command_line)
4853         (decref_counted_command_line, do_cleanup_counted_command_line)
4854         (make_cleanup_decref_counted_command_line): Remove.
4855         (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
4856         (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
4857         (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
4858         (save_breakpoints): Update.
4859         * breakpoint.h (counted_command_line): Now a typedef to
4860         shared_ptr.
4861         (struct breakpoint) <commands>: Now a counted_command_line.
4862         (struct bpstats) <command>: Likewise.
4863
4864 2017-09-20  Tom Tromey  <tom@tromey.com>
4865
4866         * breakpoint.c (struct commands_info, do_map_commands_command):
4867         Remove.
4868         (commands_command_1): Update.
4869         (iterate_over_related_breakpoints): Take a function_view.
4870         (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
4871         (delete_command): Update.
4872         (map_breakpoint_numbers): Take a function_view.
4873         (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
4874         (disable_command): Update.
4875         (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
4876         (enable_command): Update.
4877         (struct disp_data, do_enable_breakpoint_disp)
4878         (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
4879         (do_map_enable_delete_breakpoint): Remove.
4880         (enable_once_command, enable_count_command, enable_delete_command)
4881         (delete_trace_variable_command): Update.
4882
4883 2017-09-20  Tom Tromey  <tom@tromey.com>
4884
4885         * breakpoint.c (~bpstats): Rename from bpstat_free.  Update.
4886         (bpstat_clear): Use delete.
4887         (bpstats): New constructors.
4888         (bpstat_copy, bpstat_stop_status): Use new.
4889         (dprintf_after_condition_true): Update.
4890         * breakpoint.h (bpstats::bpstats): Add constructors.
4891         (bpstats::~bpstats): Add destructor.
4892
4893 2017-09-20  Pedro Alves  <palves@redhat.com>
4894
4895         * eval.c (make_params): Delete, refactored as ...
4896         (class fake_method): ... this new type's ctor.
4897         (fake_method::~fake_method): New.
4898         (evaluate_subexp_standard): Use 'fake_method'.
4899
4900 2017-09-20  Tom Tromey  <tom@tromey.com>
4901
4902         * windows-nat.c (get_windows_debug_event, windows_wait)
4903         (do_initial_windows_stuff, windows_attach): Update.
4904         * utils.c (vwarning, internal_vproblem): Update.
4905         (ui_unregister_input_event_handler_cleanup)
4906         (prepare_to_handle_input): Remove.
4907         (class scoped_input_handler): New.
4908         (defaulted_query, prompt_for_continue): Update.
4909         * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
4910         Update.
4911         * top.c (undo_terminal_modifications_before_exit): Update.
4912         * target/target.h (target_terminal_init, target_terminal_inferior)
4913         (target_terminal_ours): Don't declare.
4914         (class target_terminal): New.
4915         * target.h (target_terminal_is_inferior, target_terminal_is_ours)
4916         (target_terminal_ours_for_output)
4917         (make_cleanup_restore_target_terminal): Don't declare.
4918         (target_terminal_info): Remove.
4919         * target.c (enum terminal_state, terminal_state): Remove.
4920         (target_terminal::terminal_state): Define.
4921         (target_terminal::init): Rename from target_terminal_init.
4922         (target_terminal::inferior): Rename from
4923         target_terminal_inferior.
4924         (target_terminal::ours): Rename from target_terminal_ours.
4925         (target_terminal::ours_for_output): Rename from
4926         target_terminal_ours_for_output.
4927         (target_terminal::info): New method.
4928         (cleanup_restore_target_terminal)
4929         (make_cleanup_restore_target_terminal): Remove.
4930         * solib.c (handle_solib_event): Update.
4931         * remote.c (remote_serial_quit_handler): Update.
4932         (remote_terminal_inferior, remote_wait_as): Update.
4933         * record-full.c (record_full_wait_1): Update.
4934         * nto-procfs.c (procfs_create_inferior): Update.
4935         * nat/fork-inferior.c (startup_inferior): Update.
4936         * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
4937         (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
4938         (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
4939         (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
4940         (mi_breakpoint_created, mi_breakpoint_deleted)
4941         (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
4942         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
4943         (mi_user_selected_context_changed, report_initial_inferior):
4944         Update.
4945         * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
4946         (linux_nat_terminal_inferior): Update.
4947         * infrun.c (follow_fork_inferior)
4948         (handle_vfork_child_exec_or_exit, do_target_resume)
4949         (check_curr_ui_sync_execution_done, handle_inferior_event_1)
4950         (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
4951         Update.
4952         * inflow.c (child_terminal_init, info_terminal_command): Update.
4953         * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
4954         (attach_command): Update.
4955         * infcall.c (call_thread_fsm_should_stop): Update.
4956         * gnu-nat.c (gnu_attach): Update.
4957         * extension.c (struct active_ext_lang_state)
4958         (restore_active_ext_lang): Update.
4959         * exceptions.c (print_flush): Update.
4960         * event-top.c (async_enable_stdin, default_quit_handler): Update.
4961         (struct quit_handler_cleanup_data, restore_quit_handler)
4962         (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
4963         Remove.
4964         * cp-support.c (gdb_demangle): Update.
4965         * breakpoint.c (update_inserted_breakpoint_locations)
4966         (insert_breakpoint_locations, handle_jit_event)
4967         (disable_breakpoints_in_unloaded_shlib): Update.
4968         * annotate.c (annotate_breakpoints_invalid)
4969         (annotate_frames_invalid): Update.
4970
4971 2017-09-20  Tom Tromey  <tom@tromey.com>
4972
4973         * main.c (catch_command_errors): Rename from
4974         catch_command_errors_const.
4975         (captured_main_1): Update.
4976
4977 2017-09-20  Pedro Alves  <palves@redhat.com>
4978
4979         * cli/cli-cmds.c (list_command): Use print_sal_location.
4980         (print_sal_location): New function.
4981         (ambiguous_line_spec): Use print_sal_location.
4982         * linespec.c (symbol_to_sal): Record the symbol in the sal.
4983         * symtab.c (find_function_start_sal): Likewise.
4984         * symtab.h (symtab_and_line::symbol): New field.
4985
4986 2017-09-20  Pedro Alves  <palves@redhat.com>
4987
4988         * linespec.c (minsym_found): Handle non-text minsyms.
4989         (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
4990
4991 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4992
4993         * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
4994         backslash.
4995
4996 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
4997
4998         * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
4999         vmovups instead vmovaps.
5000         (move_zmm_data_to_memory): Use vmovups instead vmovaps.
5001
5002 2017-09-19  John Baldwin  <jhb@FreeBSD.org>
5003
5004         * NEWS (Changes since GDB 8.0): Add starti.
5005         * infcmd.c (enum run_break): New.
5006         (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
5007         case.
5008         (run_command): Use enum run_how.
5009         (start_command): Likewise.
5010         (starti_command): New function.
5011         (RUN_ARGS_HELP): New macro.
5012         (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
5013         commands.  Add starti command.
5014
5015 2017-09-19  Yao Qi  <yao.qi@linaro.org>
5016
5017         * Makefile.in (monitor.o): Remove the rule.
5018
5019 2017-09-19  Yao Qi  <yao.qi@linaro.org>
5020
5021         * annotate.h (struct annotate_arg_emitter): Use
5022         DISABLE_COPY_AND_ASSIGN.
5023         * common/refcounted-object.h (refcounted_object): Likewise.
5024         * completer.h (struct completion_result): Likewise.
5025         * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
5026         * filename-seen-cache.h (filename_seen_cache): Likewise.
5027         * gdbcore.h (thread_section_name): Likewise.
5028         * gdb_regex.h (compiled_regex): Likewise.
5029         * gdbthread.h (scoped_restore_current_thread): Likewise.
5030         * inferior.h (scoped_restore_current_inferior): Likewise.
5031         * jit.c (jit_reader): Likewise.
5032         * linespec.h (struct linespec_result): Likewise.
5033         * mi/mi-parse.h (struct mi_parse): Likewise.
5034         * nat/fork-inferior.c (execv_argv): Likewise.
5035         * progspace.h (scoped_restore_current_program_space): Likewise.
5036         * python/python-internal.h (class gdbpy_enter): Likewise.
5037         * regcache.h (regcache): Likewise.
5038         * target-descriptions.c (struct tdesc_reg): Likewise.
5039         (struct tdesc_type): Likewise.
5040         (struct tdesc_feature): Likewise.
5041         * ui-out.h (ui_out_emit_type): Likewise.
5042
5043 2017-09-18  Simon Marchi  <simon.marchi@ericsson.com>
5044
5045         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
5046         label abort_expression.
5047
5048 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
5049
5050         * common/buffer.c (buffer_xml_printf): Adjust.
5051         * common/xml-utils.c (xml_escape_text): Change return type to
5052         std::string, update code accordingly.
5053         * common/xml-utils.h (xml_escape_text): Change return type to
5054         std::string.
5055         * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
5056         * windows-tdep.c (windows_xfer_shared_library): Adjust.
5057         * unittests/xml-utils-selftests.c (test_xml_escape_text):
5058         Adjust.
5059
5060 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
5061
5062         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
5063         (SUBDIR_UNITTESTS_OBS): Add new object file.
5064         * unittests/xml-utils-selftests.c: New file.
5065
5066 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
5067
5068         * common/selftest.h (selftest): New struct/interface.
5069         (register_test): Add name parameter, add new overload.
5070         (run_tests): Add filter parameter.
5071         (for_each_selftest_ftype): New typedef.
5072         (for_each_selftest): New declaration.
5073         * common/selftest.c (tests): Change type to
5074         map<string, unique_ptr<selftest>>.
5075         (simple_selftest): New struct.
5076         (register_test): New function.
5077         (register_test): Add name parameter and use it.
5078         (run_tests): Add filter parameter and use it.  Add prints.
5079         Adjust to vector -> map change.
5080         * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
5081         registering selftests.
5082         * arm-tdep.c (_initialize_arm_tdep): Likewise.
5083         * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
5084         * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
5085         * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
5086         * findvar.c (_initialize_findvar): Likewise.
5087         * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
5088         * maint.c (maintenance_selftest): Update call to run_tests.
5089         (maintenance_info_selftests): New function.
5090         (_initialize_maint_cmds): Register "maintenance info selftests"
5091         command.  Update "maintenance selftest" doc.
5092         * regcache.c (_initialize_regcache): Add names when registering
5093         selftests.
5094         * rust-exp.y (_initialize_rust_exp): Likewise.
5095         * selftest-arch.c (gdbarch_selftest): New struct.
5096         (gdbarch_tests): Remove.
5097         (register_test_foreach_arch): Add name parameter.  Call
5098         register_test.
5099         (tests_with_arch): Remove, move most content to
5100         gdbarch_selftest::operator().
5101         (_initialize_selftests_foreach_arch): Remove.
5102         * selftest-arch.h (register_test_foreach_arch): Add name
5103         parameter.
5104         (run_tests_with_arch): New declaration.
5105         * utils-selftests.c (_initialize_utils_selftests): Add names
5106         when registering selftests.
5107         * utils.c (_initialize_utils): Likewise.
5108         * unittests/array-view-selftests.c
5109         (_initialize_array_view_selftests): Likewise.
5110         * unittests/environ-selftests.c (_initialize_environ_selftests):
5111         Likewise.
5112         * unittests/function-view-selftests.c
5113         (_initialize_function_view_selftests): Likewise.
5114         * unittests/offset-type-selftests.c
5115         (_initialize_offset_type_selftests): Likewise.
5116         * unittests/optional-selftests.c
5117         (_initialize_optional_selftests): Likewise.
5118         * unittests/scoped_restore-selftests.c
5119         (_initialize_scoped_restore_selftests): Likewise.
5120         * NEWS: Document "maintenance selftest" and "maint info
5121         selftests".
5122
5123 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
5124
5125         * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
5126         scoped_restore.
5127
5128 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
5129
5130         * mi/mi-main.c (mi_load_progress): Make uiout variable
5131         a unique_ptr.
5132
5133 2017-09-15  Pedro Alves  <palves@redhat.com>
5134
5135         * compile/compile-c-types.c (convert_enum, convert_int)
5136         (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
5137
5138 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
5139
5140         * dwarf2read.c (copy_string): Remove.
5141         (parse_macro_definition): Replace copy_string with savestring.
5142
5143 2017-09-15  Yao Qi  <yao.qi@linaro.org>
5144
5145         * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
5146         gdb_target_obs.
5147         (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
5148         Likewise.
5149         (i[34567]86-*-linux*): Likewise.
5150
5151 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
5152
5153         * dwarf2expr.h (dwarf_stack_value): Add constructor.
5154         (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
5155         <stack>: Change type to std::vector.
5156         <stack_len, stack_allocated>: Remove.
5157         <grow_stack>: Remove.
5158         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
5159         (dwarf_expr_context::~dwarf_expr_context): Remove.
5160         (dwarf_expr_context::grow_stack): Remove.
5161         (dwarf_expr_context::push): Adjust.
5162         (dwarf_expr_context::pop): Adjust.
5163         (dwarf_expr_context::fetch): Adjust.
5164         (dwarf_expr_context::fetch_in_stack_memory): Adjust.
5165         (dwarf_expr_context::stack_empty_p): Adjust.
5166         (dwarf_expr_context::execute_stack_op): Adjust.
5167
5168 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
5169
5170         * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
5171         return type to bool.
5172         * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
5173
5174 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
5175
5176         * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
5177         Change type to bool.
5178         (dwarf_stack_value) <in_stack_memory>: Likewise.
5179         (dwarf_expr_context) <push_address>: Change parameter type to
5180         bool.
5181         <fetch_in_stack_memory>: Change return type to bool.
5182         <push>: Change parameter type to bool.
5183         * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
5184         to bool.
5185         (dwarf_expr_context::push_address): Likewise.
5186         (dwarf_expr_context::fetch_in_stack_memory): Change return type
5187         to bool.
5188         (dwarf_expr_context::execute_stack_op): Adjust.
5189         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
5190
5191 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
5192
5193         * dwarf2expr.h (struct dwarf_expr_piece): Move up.
5194         (struct dwarf_expr_context) <n_pieces>: Remove.
5195         <pieces>: Change type to std::vector.
5196         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
5197         (dwarf_expr_context::~dwarf_expr_context): Don't manually free
5198         pieces.
5199         (dwarf_expr_context::add_piece): Adjust.
5200         * dwarf2loc.c (struct piece_closure): Initialize fields.
5201         <n_pieces>: Remove.
5202         <pieces>: Change type to std::vector.
5203         (allocate_piece_closure): Adjust, change parameter to
5204         std::vector rvalue and std::move it to piece_closure.
5205         (rw_pieced_value): Adjust.
5206         (check_pieced_synthetic_pointer): Adjust.
5207         (indirect_synthetic_pointer): Adjust.
5208         (coerce_pieced_ref): Adjust.
5209         (free_pieced_value_closure):  Adjust.  Use delete to free
5210         piece_closure.
5211         (dwarf2_evaluate_loc_desc_full): Adjust.  std::move ctx.pieces
5212         to allocate_piece_closure.
5213         (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
5214
5215 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
5216
5217         * probe.h (probe_ops_cp): Remove typedef.
5218         (DEF_VEC_P (probe_ops_cp)): Remove.
5219         (all_probe_ops): Change type to std::vector.
5220         * probe.c (info_probes_for_ops): Adjust to vector change.
5221         (probe_linespec_to_ops): Likewise.
5222         (all_probe_ops): Change type to std::vector.
5223         (_initialize_probe): Adjust to vector change.
5224         * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
5225         * elfread.c (elf_get_probes): Likewise.
5226         * stap-probe.c (_initialize_stap_probe): Likewise.
5227
5228 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
5229
5230         * probe.h (struct bound_probe): Define constructors.
5231         * probe.c (bound_probe_s): Remove typedef.
5232         (DEF_VEC_O (bound_probe_s)): Remove VEC.
5233         (collect_probes): Change return type to std::vector, remove
5234         cleanup.
5235         (compare_probes): Return bool, change parameter type.  Change
5236         semantic to "less than".
5237         (gen_ui_out_table_header_info): Change parameter to std::vector
5238         and update.
5239         (exists_probe_with_pops): Likewise.
5240         (info_probes_for_ops): Update to std::vector change.
5241         (enable_probes_command): Likewise.
5242         (disable_probes_command): Likewise.
5243
5244 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
5245
5246         * probe.h (struct probe_ops) <get_probes>: Change parameter from
5247         vec to std::vector.
5248         * probe.c (parse_probes_in_pspace): Update.
5249         (find_probes_in_objfile): Update.
5250         (find_probe_by_pc): Update.
5251         (collect_probes): Update.
5252         (probe_any_get_probes): Update.
5253         * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
5254         return type to reference to std::vector.
5255         * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
5256         std::vector and update.
5257         (dtrace_process_dof): Likewise.
5258         (dtrace_get_probes): Likewise.
5259         * elfread.c (elf_get_probes): Change return type to std::vector,
5260         store an std::vector in bfd_data.
5261         (probe_key_free): Update to std::vector.
5262         * stap-probe.c (handle_stap_probe): Change parameter to
5263         std::vector and update.
5264         (stap_get_probes): Likewise.
5265         * symfile-debug.c (debug_sym_get_probes): Change return type to
5266         std::vector and update.
5267
5268 2017-09-11  Tom Tromey  <tom@tromey.com>
5269
5270         * breakpoint.c (program_breakpoint_here_p): Update.
5271         * target.c (make_scoped_restore_show_memory_breakpoints): Rename
5272         from make_show_memory_breakpoints_cleanup.  Return a
5273         scoped_restore_tmpl<int>.
5274         (restore_show_memory_breakpoints): Remove.
5275         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
5276         * mem-break.c (memory_validate_breakpoint): Update.
5277         * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
5278         (ia64_memory_remove_breakpoint): Update.
5279         (ia64_breakpoint_from_pc): Update.
5280         * target.h (make_scoped_restore_show_memory_breakpoints): Rename
5281         from make_show_memory_breakpoints_cleanup.
5282
5283 2017-09-11  Tom Tromey  <tom@tromey.com>
5284
5285         * d-namespace.c (d_lookup_symbol): Use std::string.
5286         (find_symbol_in_baseclass): Likewise.
5287
5288 2017-09-11  Tom Tromey  <tom@tromey.com>
5289
5290         * ctf.c (ctf_start): Use std::string.
5291
5292 2017-09-11  Tom Tromey  <tom@tromey.com>
5293
5294         * ada-lang.c (is_known_support_routine): Update.
5295         (ada_unhandled_exception_name_addr_from_raise): Update.
5296         * guile/scm-frame.c (gdbscm_frame_name): Update.
5297         * python/py-frame.c (frapy_name): Update.
5298         (frapy_function): Update.
5299         * stack.h (find_frame_funname): Update.
5300         * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
5301         (print_frame): Update.
5302
5303 2017-09-11  Tom Tromey  <tom@tromey.com>
5304
5305         * findcmd.c (put_bits): Take a gdb::byte_vector.
5306         (parse_find_args): Return gdb::byte_vector.  "args" now const.
5307         Remove "pattern_bufp" and "pattern_lenp" parameters.  Remove
5308         cleanups.
5309         (find_command): Update.
5310
5311 2017-09-11  Tom Tromey  <tom@tromey.com>
5312
5313         * cli/cli-script.c (class scoped_restore_hook_in): New.
5314         (clear_hook_in_cleanup): Remove.
5315         (execute_cmd_pre_hook, execute_cmd_post_hook): Use
5316         scoped_restore_hook_in.
5317
5318 2017-09-11  Tom Tromey  <tom@tromey.com>
5319
5320         * cli/cli-script.c (restore_interp): Remove.
5321         (read_command_lines): Use scoped_restore_interp.
5322         * interps.c (scoped_restore_interp::set_temp): Rename from
5323         interp_set_temp.
5324         * interps.h (class scoped_restore_interp): New.
5325         (interp_set_temp): Remove.
5326
5327 2017-09-11  Tom Tromey  <tom@tromey.com>
5328
5329         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
5330         (mi_cmd_catch_exception, mi_catch_load_unload): Update.
5331         * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
5332         scoped_restore.
5333         (mi_cmd_break_insert_1): Update.
5334         * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
5335         scoped_restore.
5336
5337 2017-09-11  Tom Tromey  <tom@tromey.com>
5338
5339         * demangle.c (demangle_command): Update.
5340         * breakpoint.c (disable_command): Update.
5341         (enable_command): Update.
5342         (find_location_by_number): Make "number" const.  Use
5343         get_number_trailer.
5344         * cli/cli-utils.c (extract_arg): Return std::string.
5345         * probe.c (parse_probe_linespec): Update.  Change types.
5346         (collect_probes): Take string arguments.
5347         (parse_probe_linespec): Likewise.
5348         (info_probes_for_ops): Update.
5349         (enable_probes_command): Update.
5350         (disable_probes_command): Update.
5351         * break-catch-sig.c (catch_signal_split_args): Update.
5352         * mi/mi-parse.c (mi_parse): Update.
5353
5354 2017-09-11  Tom Tromey  <tom@tromey.com>
5355
5356         * language.h (language_enum): Make argument const.
5357         * language.c (language_enum): Make argument const.
5358
5359 2017-09-11  Tom Tromey  <tom@tromey.com>
5360
5361         * common/common-utils.h (skip_to_space): Remove macro, redeclare
5362         as function.
5363         (skip_to_space): Rename from skip_to_space_const.
5364         * common/common-utils.c (skip_to_space): New function.
5365         (skip_to_space): Rename from skip_to_space_const.
5366         * cli/cli-utils.h (get_number): Rename from get_number_const.
5367         (extract_arg): Rename from extract_arg_const.
5368         * cli/cli-utils.c (get_number): Rename from get_number_const.
5369         (extract_arg): Rename from extract_arg_const.
5370         (number_or_range_parser::get_number): Use ::get_number.
5371         * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
5372         break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
5373         cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
5374         completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
5375         linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
5376         minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
5377         python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
5378         stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
5379
5380 2017-09-11  Tom Tromey  <tom@tromey.com>
5381
5382         * python/python.c (do_start_initialization): Use
5383         py-event-types.def to initialize types.
5384         Define all object type structures.
5385         * python/python-internal.h: Don't declare event initialization
5386         functions.
5387         * python/py-threadevent.c (thread_event_object_type): Don't
5388         define.
5389         * python/py-stopevent.c (stop_event_object_type): Don't define.
5390         * python/py-signalevent.c (signal_event_object_type): Don't
5391         declare or define.
5392         * python/py-newobjfileevent.c (new_objfile_event_object_type)
5393         (clear_objfiles_event_object_type): Don't declare or define.
5394         * python/py-infevents.c (inferior_call_pre_event_object_type)
5395         (inferior_call_post_event_object_type)
5396         (register_changed_event_object_type)
5397         (memory_changed_event_object_type): Don't declare or define.
5398         * python/py-inferior.c (new_thread_event_object_type)
5399         (new_inferior_event_object_type)
5400         (inferior_deleted_event_object_type): Don't declare or define.
5401         * python/py-exitedevent.c (exited_event_object_type): Don't
5402         declare or define.
5403         * python/py-evts.c (gdbpy_initialize_py_events): Use
5404         py-all-events.def.
5405         * python/py-events.h (thread_event_object_type): Don't declare.
5406         (events_object): Use py-all-events.def.
5407         * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove.  Use
5408         py-event-types.def.
5409         * python/py-event-types.def: New file.
5410         * python/py-continueevent.c (create_continue_event_object): Don't
5411         declare or define.
5412         * python/py-bpevent.c (breakpoint_event_object_type): Don't
5413         declare or define.
5414         * python/py-all-events.def: New file.
5415
5416 2017-09-11  Tom Tromey  <tom@tromey.com>
5417
5418         * python/py-threadevent.c (create_thread_event_object): Return
5419         gdbpy_ref.
5420         * python/py-stopevent.h (create_stop_event_object)
5421         (create_breakpoint_event_object, create_signal_event_object):
5422         Update.
5423         * python/py-stopevent.c (create_stop_event_object): Return
5424         gdbpy_ref.
5425         (emit_stop_event): Update.
5426         * python/py-signalevent.c (create_signal_event_object): Return
5427         gdbpy_ref.
5428         * python/py-infevents.c (create_inferior_call_event_object):
5429         Update.
5430         * python/py-event.h (create_event_object)
5431         (create_thread_event_object): Update.
5432         * python/py-event.c (create_event_object): Return gdbpy_ref.
5433         * python/py-continueevent.c: Return gdbpy_ref.
5434         * python/py-bpevent.c (create_breakpoint_event_object): Return
5435         gdbpy_ref.
5436
5437 2017-09-11  Tom Tromey  <tom@tromey.com>
5438
5439         PR python/15622:
5440         * NEWS: Add entry.
5441         * python/python.c (do_start_initialization): Initialize new event
5442         types.
5443         * python/python-internal.h (gdbpy_initialize_new_inferior_event)
5444         (gdbpy_initialize_inferior_deleted_event)
5445         (gdbpy_initialize_new_thread_event): Declare.
5446         * python/py-threadevent.c (create_thread_event_object): Add option
5447         "thread" parameter.
5448         * python/py-inferior.c (new_thread_event_object_type)
5449         (new_inferior_event_object_type)
5450         (inferior_deleted_event_object_type): Declare.
5451         (python_new_inferior, python_inferior_deleted): New functions.
5452         (add_thread_object): Emit new_thread event.
5453         (gdbpy_initialize_inferior): Attach new functions to corresponding
5454         observers.
5455         (new_thread, new_inferior, inferior_deleted): Define new event
5456         types.
5457         * python/py-evts.c (gdbpy_initialize_py_events): Add new
5458         registries.
5459         * python/py-events.h (events_object) <new_inferior,
5460         inferior_deleted, new_thread>: New fields.
5461         * python/py-event.h (create_thread_event_breakpoint): Add optional
5462         "thread" parameter.
5463
5464 2017-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
5465
5466         * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
5467         check current_ui instead.
5468         (internal_vproblem): Likewise.
5469
5470 2017-09-09  Simon Marchi  <simon.marchi@ericsson.com>
5471
5472         * thread.c (print_thread_info_1): Remove unnecessary calls to
5473         uiout->is_mi_like_p.
5474
5475 2017-09-09  Tom Tromey  <tom@tromey.com>
5476
5477         * namespace.h (add_using_directive): Update.
5478         * namespace.c (add_using_directive): Change type of excludes to
5479         std::vector.
5480         * dwarf2read.c (read_import_statement): Use std::vector.
5481         (read_namespace): Update.
5482         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
5483
5484 2017-09-09  Tom Tromey  <tom@tromey.com>
5485
5486         * linespec.c (create_sals_line_offset): Use gdb::def_vector.
5487
5488 2017-09-09  Tom Tromey  <tom@tromey.com>
5489
5490         * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
5491
5492 2017-09-09  Tom Tromey  <tom@tromey.com>
5493
5494         * stack.c (func_command): Use gdb::def_vector.
5495
5496 2017-09-09  Tom Tromey  <tom@tromey.com>
5497
5498         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
5499         ui_out_emit_list, ui_out_emit_tuple.
5500         (mi_cmd_var_update): Likewise.
5501
5502 2017-09-09  Tom Tromey  <tom@tromey.com>
5503
5504         * mi/mi-interp.c (mi_user_selected_context_changed): Use
5505         ui_out_redirect_pop.
5506         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
5507         ui_out_redirect_pop.
5508         * utils.c (do_ui_out_redirect_pop)
5509         (make_cleanup_ui_out_redirect_pop): Remove.
5510         * top.c (execute_command_to_string): Use ui_out_redirect_pop.
5511         * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
5512         * ui-out.h (ui_out_redirect_pop): New class.
5513
5514 2017-09-09  Tom Tromey  <tom@tromey.com>
5515
5516         * mi/mi-main.c (output_cores): Use ui_out_emit_list.
5517         (list_available_thread_groups, mi_cmd_list_thread_groups)
5518         (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
5519         (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
5520         Likewise.
5521
5522 2017-09-09  Tom Tromey  <tom@tromey.com>
5523
5524         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
5525         ui_out_emit_tuple.
5526
5527 2017-09-09  Tom Tromey  <tom@tromey.com>
5528
5529         * target.c (flash_erase_command): Use ui_out_emit_tuple.
5530         * stack.c (print_frame): Use ui_out_emit_tuple.
5531         * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
5532         (info_spu_mailbox_command, info_spu_dma_command)
5533         (info_spu_proxydma_command): Likewise.
5534         * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
5535         ui_out_emit_tuple, gdb::byte_vector, bin2hex.
5536         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
5537         ui_out_emit_tuple.
5538         * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
5539
5540 2017-09-09  Tom Tromey  <tom@tromey.com>
5541
5542         * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
5543         (class ui_out_emit_table): Update comment.
5544         * ui-out.c (do_cleanup_table_end)
5545         (make_cleanup_ui_out_table_begin_end): Remove.
5546         * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
5547         (info_spu_dma_cmdlist): Likewise.
5548         * probe.c (info_probes_for_ops): Use ui_out_emit_table.
5549         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
5550         ui_out_emit_table.
5551
5552 2017-09-09  Tom Tromey  <tom@tromey.com>
5553
5554         * thread.c (print_thread_info_1): Use ui_out_emit_table,
5555         ui_out_emit_list, gdb::optional.
5556
5557 2017-09-09  John Baldwin  <jhb@FreeBSD.org>
5558
5559         * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
5560         prototype.
5561         * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
5562         prototype.
5563         * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
5564         prototype.
5565         * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
5566         * ada-exp.y: Remove _initialize_ada_exp prototype.
5567         * ada-lang.c: Remove _initialize_ada_language prototype.
5568         * ada-tasks.c: Remove _initialize_tasks prototype.
5569         * addrmap.c: Remove _initialize_addrmap prototype.
5570         * agent.c: Remove _initialize_agent prototype.
5571         * aix-thread.c: Remove _initialize_aix_thread prototype.
5572         * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
5573         * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
5574         * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
5575         prototype.
5576         * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
5577         * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
5578         * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
5579         * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
5580         prototype.
5581         * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
5582         prototype.
5583         * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
5584         * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
5585         * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
5586         * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
5587         prototype.
5588         * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
5589         * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
5590         * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
5591         * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
5592         * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
5593         * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
5594         * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
5595         prototype.
5596         * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
5597         prototype.
5598         * annotate.c: Remove _initialize_annotate prototype.
5599         * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
5600         * arc-tdep.c: Remove _initialize_arc_tdep prototype.
5601         * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
5602         * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
5603         * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
5604         * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
5605         * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
5606         * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
5607         prototype.
5608         * arm-tdep.c: Remove _initialize_arm_tdep prototype.
5609         * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
5610         * auto-load.c: Remove _initialize_auto_load prototype.
5611         * auxv.c: Remove _initialize_auxv prototype.
5612         * avr-tdep.c: Remove _initialize_avr_tdep prototype.
5613         * ax-gdb.c: Remove _initialize_ax_gdb prototype.
5614         * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
5615         * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
5616         * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
5617         * break-catch-syscall.c: Remove _initialize_break_catch_syscall
5618         prototype.
5619         * break-catch-throw.c: Remove _initialize_break_catch_throw
5620         prototype.
5621         * breakpoint.c: Remove _initialize_breakpoint prototype.
5622         * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
5623         * btrace.c: Remove _initialize_btrace prototype.
5624         * charset.c: Remove _initialize_charset prototype.
5625         * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
5626         * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
5627         * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
5628         * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
5629         * cli/cli-script.c: Remove _initialize_cli_script prototype.
5630         * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
5631         * coffread.c: Remove _initialize_coffread prototype.
5632         * compile/compile.c: Remove _initialize_compile prototype.
5633         * complaints.c: Remove _initialize_complaints prototype.
5634         * completer.c: Remove _initialize_completer prototype.
5635         * copying.awk: Remove _initialize_copying prototype.
5636         * copying.c: Regenerate.
5637         * core-regset.c: Remove _initialize_core_regset prototype.
5638         * corefile.c: Remove _initialize_core prototype.
5639         * corelow.c: Remove _initialize_corelow prototype.
5640         * cp-abi.c: Remove _initialize_cp_abi prototype.
5641         * cp-namespace.c: Remove _initialize_cp_namespace prototype.
5642         * cp-support.c: Remove _initialize_cp_support prototype.
5643         * cp-valprint.c: Remove _initialize_cp_valprint prototype.
5644         * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
5645         * cris-tdep.c: Remove _initialize_cris_tdep prototype.
5646         * ctf.c: Remove _initialize_ctf prototype.
5647         * d-lang.c: Remove _initialize_d_language prototype.
5648         * darwin-nat-info.c: Remove _initialize_darwin_info_commands
5649         prototype.
5650         * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
5651         * dbxread.c: Remove _initialize_dbxread prototype.
5652         * dcache.c: Remove _initialize_dcache prototype.
5653         * demangle.c: Remove _initialize_demangler prototype.
5654         * disasm-selftests.c: Remove _initialize_disasm_selftests
5655         prototype.
5656         * disasm.c: Remove _initialize_disasm prototype.
5657         * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
5658         * dummy-frame.c: Remove _initialize_dummy_frame prototype.
5659         * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
5660         prototype.
5661         * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
5662         * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
5663         * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
5664         * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
5665         * elfread.c: Remove _initialize_elfread prototype.
5666         * exec.c: Remove _initialize_exec prototype.
5667         * extension.c: Remove _initialize_extension prototype.
5668         * f-lang.c: Remove _initialize_f_language prototype.
5669         * f-valprint.c: Remove _initialize_f_valprint prototype.
5670         * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
5671         * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
5672         * filesystem.c: Remove _initialize_filesystem prototype.
5673         * findcmd.c: Remove _initialize_mem_search prototype.
5674         * fork-child.c: Remove _initialize_fork_child prototype.
5675         * frame-base.c: Remove _initialize_frame_base prototype.
5676         * frame-unwind.c: Remove _initialize_frame_unwind prototype.
5677         * frame.c: Remove _initialize_frame prototype.
5678         * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
5679         * frv-tdep.c: Remove _initialize_frv_tdep prototype.
5680         * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
5681         * gcore.c: Remove _initialize_gcore prototype.
5682         * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
5683         * gdbarch.c: Regenerate.
5684         * gdbarch.sh: Remove _initialize_gdbarch prototype.
5685         * gdbtypes.c: Remove _initialize_gdbtypes prototype.
5686         * gnu-nat.c: Remove _initialize_gnu_nat prototype.
5687         * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
5688         * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
5689         * go-lang.c: Remove _initialize_go_language prototype.
5690         * go32-nat.c: Remove _initialize_go32_nat prototype.
5691         * guile/guile.c: Remove _initialize_guile prototype.
5692         * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
5693         * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
5694         * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
5695         * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
5696         * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
5697         * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
5698         * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
5699         * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
5700         * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
5701         * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
5702         prototype.
5703         * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
5704         prototype.
5705         * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
5706         * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
5707         * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
5708         * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
5709         * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
5710         * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
5711         * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
5712         * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
5713         * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
5714         * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
5715         * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
5716         * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
5717         * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
5718         * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
5719         * i386-tdep.c: Remove _initialize_i386_tdep prototype.
5720         * i386-windows-nat.c: Remove _initialize_i386_windows_nat
5721         prototype.
5722         * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
5723         prototype.
5724         * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
5725         * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
5726         * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
5727         * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
5728         * infcall.c: Remove _initialize_infcall prototype.
5729         * infcmd.c: Remove _initialize_infcmd prototype.
5730         * inferior.c: Remove _initialize_inferiors prototype.
5731         * inflow.c: Remove _initialize_inflow prototype.
5732         * infrun.c: Remove _initialize_infrun prototype.
5733         * interps.c: Remove _initialize_interpreter prototype.
5734         * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
5735         * jit.c: Remove _initialize_jit prototype.
5736         * language.c: Remove _initialize_language prototype.
5737         * linux-fork.c: Remove _initialize_linux_fork prototype.
5738         * linux-nat.c: Remove _initialize_linux_nat prototype.
5739         * linux-tdep.c: Remove _initialize_linux_tdep prototype.
5740         * linux-thread-db.c: Remove _initialize_thread_db prototype.
5741         * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
5742         * m2-lang.c: Remove _initialize_m2_language prototype.
5743         * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
5744         * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
5745         * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
5746         * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
5747         * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
5748         * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
5749         * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
5750         * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
5751         * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
5752         * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
5753         * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
5754         * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
5755         * machoread.c: Remove _initialize_machoread prototype.
5756         * macrocmd.c: Remove _initialize_macrocmd prototype.
5757         * macroscope.c: Remove _initialize_macroscope prototype.
5758         * maint.c: Remove _initialize_maint_cmds prototype.
5759         * mdebugread.c: Remove _initialize_mdebugread prototype.
5760         * memattr.c: Remove _initialize_mem prototype.
5761         * mep-tdep.c: Remove _initialize_mep_tdep prototype.
5762         * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
5763         * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
5764         * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
5765         * mi/mi-main.c: Remove _initialize_mi_main prototype.
5766         * microblaze-linux-tdep.c: Remove
5767         _initialize_microblaze_linux_tdep prototype.
5768         * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
5769         * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
5770         * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
5771         * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
5772         * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
5773         * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
5774         * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
5775         * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
5776         * mips-tdep.c: Remove _initialize_mips_tdep prototype.
5777         * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
5778         * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
5779         prototype.
5780         * mipsread.c: Remove _initialize_mipsread prototype.
5781         * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
5782         prototype.
5783         * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
5784         * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
5785         * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
5786         * mt-tdep.c: Remove _initialize_mt_tdep prototype.
5787         * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
5788         * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
5789         prototype.
5790         * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
5791         * nto-procfs.c: Remove _initialize_procfs prototype.
5792         * nto-tdep.c: Remove _initialize_nto_tdep prototype.
5793         * objc-lang.c: Remove _initialize_objc_language prototype.
5794         * objfiles.c: Remove _initialize_objfiles prototype.
5795         * observer.c: Remove observer_test_first_notification_function,
5796         observer_test_second_notification_function,
5797         observer_test_third_notification_function, and
5798         _initialize_observer prototypes.
5799         * opencl-lang.c: Remove _initialize_opencl_language prototypes.
5800         * osabi.c: Remove _initialize_gdb_osabi prototype.
5801         * osdata.c: Remove _initialize_osdata prototype.
5802         * p-valprint.c: Remove _initialize_pascal_valprint prototype.
5803         * parse.c: Remove _initialize_parse prototype.
5804         * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
5805         * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
5806         * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
5807         * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
5808         * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
5809         * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
5810         * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
5811         * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
5812         * printcmd.c: Remove _initialize_printcmd prototype.
5813         * probe.c: Remove _initialize_probe prototype.
5814         * proc-api.c: Remove _initialize_proc_api prototype.
5815         * proc-events.c: Remove _initialize_proc_events prototype.
5816         * proc-service.c: Remove _initialize_proc_service prototype.
5817         * procfs.c: Remove _initialize_procfs prototype.
5818         * psymtab.c: Remove _initialize_psymtab prototype.
5819         * python/python.c: Remove _initialize_python prototype.
5820         * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
5821         * record-btrace.c: Remove _initialize_record_btrace prototype.
5822         * record-full.c: Remove _initialize_record_full prototype.
5823         * record.c: Remove _initialize_record prototype.
5824         * regcache.c: Remove _initialize_regcache prototype.
5825         * reggroups.c: Remove _initialize_reggroup prototype.
5826         * remote-notif.c: Remove _initialize_notif prototype.
5827         * remote-sim.c: Remove _initialize_remote_sim prototype.
5828         * remote.c: Remove _initialize_remote prototype.
5829         * reverse.c: Remove _initialize_reverse prototype.
5830         * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
5831         * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
5832         * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
5833         prototype.
5834         * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
5835         * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
5836         * rust-exp.y: Remove _initialize_rust_exp prototype.
5837         * rx-tdep.c: Remove _initialize_rx_tdep prototype.
5838         * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
5839         * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
5840         * score-tdep.c: Remove _initialize_score_tdep prototype.
5841         * selftest-arch.c: Remove _initialize_selftests_foreach_arch
5842         prototype.
5843         * ser-go32.c: Remove _initialize_ser_dos prototype.
5844         * ser-mingw.c: Remove _initialize_ser_windows prototype.
5845         * ser-pipe.c: Remove _initialize_ser_pipe prototype.
5846         * ser-tcp.c: Remove _initialize_ser_tcp prototype.
5847         * ser-unix.c: Remove _initialize_ser_hardwire prototype.
5848         * serial.c: Remove _initialize_serial prototype.
5849         * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
5850         * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
5851         * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
5852         * sh-tdep.c: Remove _initialize_sh_tdep prototype.
5853         * skip.c: Remove _initialize_step_skip prototype.
5854         * sol-thread.c: Remove _initialize_sol_thread prototype.
5855         * solib-aix.c: Remove _initialize_solib_aix prototype.
5856         * solib-darwin.c: Remove _initialize_darwin_solib prototype.
5857         * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
5858         * solib-frv.c: Remove _initialize_frv_solib prototype.
5859         * solib-spu.c: Remove _initialize_spu_solib prototype.
5860         * solib-svr4.c: Remove _initialize_svr4_solib prototype.
5861         * solib-target.c: Remove _initialize_solib_target prototype.
5862         * solib.c: Remove _initialize_solib prototype.
5863         * source.c: Remove _initialize_source prototype.
5864         * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
5865         * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
5866         prototype.
5867         * sparc-nat.c: Remove _initialize_sparc_nat prototype.
5868         * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
5869         * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
5870         * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
5871         prototype.
5872         * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
5873         * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
5874         * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
5875         * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
5876         prototype.
5877         * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
5878         prototype.
5879         * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
5880         prototype.
5881         * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
5882         prototype.
5883         * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
5884         * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
5885         prototype.
5886         * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
5887         prototype.
5888         * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
5889         prototype.
5890         * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
5891         prototype.
5892         * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
5893         prototype.
5894         * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
5895         * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
5896         * spu-tdep.c: Remove _initialize_spu_tdep prototype.
5897         * stabsread.c: Remove _initialize_stabsread prototype.
5898         * stack.c: Remove _initialize_stack prototype.
5899         * stap-probe.c: Remove _initialize_stap_probe prototype.
5900         * std-regs.c: Remove _initialize_frame_reg prototype.
5901         * symfile-debug.c: Remove _initialize_symfile_debug prototype.
5902         * symfile-mem.c: Remove _initialize_symfile_mem prototype.
5903         * symfile.c: Remove _initialize_symfile prototype.
5904         * symmisc.c: Remove _initialize_symmisc prototype.
5905         * symtab.c: Remove _initialize_symtab prototype.
5906         * target-dcache.c: Remove _initialize_target_dcache prototype.
5907         * target-descriptions.c: Remove _initialize_target_descriptions
5908         prototype.
5909         * thread.c: Remove _initialize_thread prototype.
5910         * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
5911         prototype.
5912         * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
5913         * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
5914         * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
5915         prototype.
5916         * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
5917         * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
5918         * tracefile.c: Remove _initialize_tracefile prototype.
5919         * tracepoint.c: Remove _initialize_tracepoint prototype.
5920         * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
5921         * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
5922         * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
5923         * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
5924         * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
5925         * tui/tui-win.c: Remove _initialize_tui_win prototype.
5926         * tui/tui.c: Remove _initialize_tui prototype.
5927         * typeprint.c: Remove _initialize_typeprint prototype.
5928         * user-regs.c: Remove _initialize_user_regs prototype.
5929         * utils.c: Remove _initialize_utils prototype.
5930         * v850-tdep.c: Remove _initialize_v850_tdep prototype.
5931         * valarith.c: Remove _initialize_valarith prototype.
5932         * valops.c: Remove _initialize_valops prototype.
5933         * valprint.c: Remove _initialize_valprint prototype.
5934         * value.c: Remove _initialize_values prototype.
5935         * varobj.c: Remove _initialize_varobj prototype.
5936         * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
5937         * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
5938         * vax-tdep.c: Remove _initialize_vax_tdep prototype.
5939         * windows-nat.c: Remove _initialize_windows_nat,
5940         _initialize_check_for_gdb_ini, and _initialize_loadable
5941         prototypes.
5942         * windows-tdep.c: Remove _initialize_windows_tdep prototype.
5943         * xcoffread.c: Remove _initialize_xcoffread prototype.
5944         * xml-support.c: Remove _initialize_xml_support prototype.
5945         * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
5946         * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
5947         prototype.
5948         * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
5949         prototype.
5950         * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
5951
5952 2017-09-08  Keith Seitz  <keiths@redhat.com>
5953
5954         * dwarf2read.c (struct field_info) <fnfields>: Remove unused
5955         field.
5956
5957 2017-09-08  Christoph Weinmann  <christoph.t.weinmann@intel.com>
5958
5959         * f-valprint.c (f_val_print): Remove check for one byte
5960         sized integers. Remove printing of character type.
5961
5962 2017-09-08  Frank Penczek  <frank.penczek@intel.com>
5963             Christoph Weinmann  <christoph.t.weinmann@intel.com>
5964             Bernhard Heckel  <bernhard.heckel@intel.com>
5965
5966         * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
5967         to maintain proper indentation when printing pointers/refs.
5968
5969 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
5970
5971         GDB 8.0.1 released.
5972
5973 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
5974
5975         * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
5976
5977 2017-09-05  Tom Tromey  <tom@tromey.com>
5978
5979         * parse.c (funcall_chain): Now a std::vector.
5980         (start_arglist, end_arglist): Simplify.
5981         (free_funcalls): Remove.
5982         (parse_exp_in_context_1): Remove cleanup.
5983
5984 2017-09-05  Tom Tromey  <tom@tromey.com>
5985
5986         * go-exp.y (go_parse): Don't create a cleanup.
5987
5988 2017-09-05  Tom Tromey  <tom@tromey.com>
5989
5990         * d-exp.y (PrimaryExpression): Use std::string.
5991         (d_parse): Don't create a cleanup.
5992
5993 2017-09-05  Tom Tromey  <tom@tromey.com>
5994
5995         * utils.c (do_clear_parser_state): Remove.
5996         (make_cleanup_clear_parser_state): Remove.
5997         * p-exp.y (pascal_parse): Use scoped_restore.
5998         * m2-exp.y (m2_parse): Use scoped_restore.
5999         * f-exp.y (f_parse): Use scoped_restore.
6000         * d-exp.y (d_parse): Use scoped_restore.
6001         * c-exp.y (c_parse): Use scoped_restore.
6002         * ada-exp.y (ada_parse): Use scoped_restore.
6003         * utils.h (make_cleanup_clear_parser_state): Remove.
6004
6005 2017-09-06  Keith Seitz  <keiths@redhat.com>
6006
6007         * dwarf2read.c (dw2_linkage_name_attr): New function.
6008         (dw2_linkage_name): New function.
6009         (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
6010         (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
6011         (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
6012
6013 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
6014
6015         * config/djgpp/djconfig.sh: Correct shell portability issue.
6016
6017 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
6018
6019         * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
6020
6021 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
6022
6023         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
6024         * NEWS: Mention new FreeBSD/mips native configuration.
6025         * configure.host: Add aarch64*-*-freebsd*.
6026         * configure.nat: Likewise.
6027         * aarch64-fbsd-nat.c: New file.
6028
6029 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
6030
6031         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
6032         (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
6033         * NEWS: Mention new FreeBSD/aarch64 target.
6034         * configure.tgt: Add aarch64*-*-freebsd*.
6035         * aarch64-fbsd-tdep.c: New file.
6036         * aarch64-fbsd-tdep.h: New file.
6037
6038 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
6039
6040         * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
6041
6042 2017-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
6043
6044         * parse.c (find_minsym_type_and_address): Don't relocate addresses
6045         of TLS symbols.
6046
6047 2017-09-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
6048
6049         * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
6050         call.
6051
6052 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
6053
6054         * infrun.c (follow_exec): Call add_thread after
6055         target_find_description.
6056
6057 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
6058
6059         * infrun.c (handle_inferior_event_1): When exec'ing, read
6060         stop_pc after follow_exec.
6061
6062 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
6063
6064         * remote.c (process_g_packet): Update error message.
6065
6066 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6067
6068         * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
6069         targets.
6070
6071 2017-09-05  Pedro Alves  <palves@redhat.com>
6072
6073         * eval.c (eval_call, evaluate_funcall): New functions, factored
6074         out from ...
6075         (evaluate_subexp_standard): ... this.
6076
6077 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6078
6079         * amd64-tdep.c (amd64_target_description): Create target
6080         descriptions.
6081         (_initialize_amd64_tdep): Don't call functions
6082         initialize_tdesc_amd64_*.  Add self tests.
6083         * arch/amd64.c (amd64_create_target_description): Add parameter
6084         is_linux.  Call set_tdesc_osabi if is_linux is true.
6085         * arch/amd64.h (amd64_create_target_description): Update the
6086         declaration.
6087         * arch/i386.c (i386_create_target_description): Add parameter
6088         is_linux.  Call set_tdesc_osabi if is_linux is true.
6089         * arch/i386.h (i386_create_target_description): Update
6090         declaration.
6091         * configure.tgt: Add i386.o to gdb_target_obs.
6092         * features/Makefile (XMLTOC): Remove i386/*.xml.
6093         * features/i386/amd64-avx-avx512.c: Remove.
6094         * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
6095         * features/i386/amd64-avx-mpx.c: Remove.
6096         * features/i386/amd64-avx.c: Remove.
6097         * features/i386/amd64-mpx.c: Remove.
6098         * features/i386/amd64.c: Remove.
6099         * features/i386/i386-avx-avx512.c: Remove.
6100         * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
6101         * features/i386/i386-avx-mpx.c: Remove.
6102         * features/i386/i386-avx.c: Remove.
6103         * features/i386/i386-mmx.c: Remove.
6104         * features/i386/i386-mpx.c: Remove.
6105         * features/i386/i386.c: Remove.
6106         * i386-tdep.c: Don't include features/i386/i386*.c., include
6107         target-descriptions.h and arch/i386.h.
6108         (i386_target_description): Create target descriptions.
6109         (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
6110         functions.  Do self tests.
6111
6112 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6113
6114         * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
6115         * features/i386/amd64-avx-avx512-linux.c: Removed.
6116         * features/i386/amd64-avx-linux.c: Removed.
6117         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
6118         * features/i386/amd64-avx-mpx-linux.c: Removed.
6119         * features/i386/amd64-linux.c: Removed.
6120         * features/i386/amd64-mpx-linux.c: Removed.
6121         * features/i386/x32-avx-avx512-linux.c: Removed.
6122         * features/i386/x32-avx-linux.c: Removed.
6123         * features/i386/x32-linux.c: Removed.
6124
6125 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6126
6127         * amd64-linux-tdep.c: Include arch/amd64.h.  Don't include
6128         features/i386/*.c.
6129         (amd64_linux_read_description): Call
6130         amd64_create_target_description.
6131         * arch/amd64.c: New file.
6132         * arch/amd64.h: New file.
6133         * configure.tgt (x86_64-*-linux*): Append amd64.o.
6134         * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
6135
6136 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6137
6138         * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
6139         x32-XXX-linux.c.  Include 64bit-XX.c and x32-XX.c.
6140         (amd64_linux_read_description): Create target descriptions.
6141         (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
6142         functions.  Add unit tests.
6143         * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
6144         x32-core.xml.
6145         * features/i386/64bit-avx.c: Generated.
6146         * features/i386/64bit-avx512.c: Generated.
6147         * features/i386/64bit-core.c: Generated.
6148         * features/i386/64bit-linux.c: Generated.
6149         * features/i386/64bit-mpx.c: Generated.
6150         * features/i386/64bit-pkeys.c: Generated.
6151         * features/i386/64bit-segments.c: Generated.
6152         * features/i386/64bit-sse.c: Generated.
6153         * features/i386/x32-core.c: Generated.
6154         * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
6155         c files for amd64-linux and x32-linux.
6156
6157 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6158
6159         * amd64-linux-tdep.c (amd64_linux_read_description): New
6160         function.
6161         (amd64_linux_core_read_description): Call
6162         amd64_linux_read_description.
6163         (amd64_linux_init_abi): Likewise.
6164         (amd64_x32_linux_init_abi): Likewise.
6165         * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
6166         * x86-linux-nat.c (x86_linux_read_description): Call
6167         amd64_linux_read_description.
6168
6169 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6170
6171         * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
6172         comments.
6173
6174 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6175
6176         * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
6177         * features/i386/i386-avx-avx512-linux.c: Remove.
6178         * features/i386/i386-avx-linux.c: Remove.
6179         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
6180         * features/i386/i386-avx-mpx-linux.c: Remove.
6181         * features/i386/i386-linux.c: Remove.
6182         * features/i386/i386-mmx-linux.c: Remove.
6183         * features/i386/i386-mpx-linux.c: Remove.
6184
6185 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6186
6187         * Makefile.in (ALL_TARGET_OBS): Add i386.o.
6188         (SFILES): Add arch/i386.c.
6189         (HFILES_NO_SRCDIR): Add arch/i386.h.
6190         * arch/i386.c: New file.
6191         * arch/i386.h: New file.
6192         * arch/tdesc.h (allocate_target_description): Declare.
6193         (set_tdesc_architecture): Declare.
6194         (set_tdesc_osabi): Declare.
6195         * configure.tgt (i[34567]86-*-linux*): Add i386.o.
6196         * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
6197         include arch/i386.h.
6198         (i386_linux_read_description): Remove code and call
6199         i386_create_target_description.
6200         (set_tdesc_architecture): New function.
6201         (set_tdesc_osabi): New function.
6202         * target-descriptions.h (allocate_target_description): Remove.
6203
6204 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6205
6206         * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
6207         * target-descriptions.c (tdesc_create_feature): Likewise, and
6208         adjust code.
6209         * features/i386/32bit-avx.c: Re-generated.
6210         * features/i386/32bit-avx512.c: Re-generated.
6211         * features/i386/32bit-core.c: Re-generated.
6212         * features/i386/32bit-linux.c: Re-generated.
6213         * features/i386/32bit-mpx.c: Re-generated.
6214         * features/i386/32bit-pkeys.c: Re-generated.
6215         * features/i386/32bit-sse.c: Re-generated.
6216
6217 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6218
6219         * regformats/regdef.h (struct reg): Override operator == and !=.
6220
6221 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6222
6223         * arch/tdesc.h: New file.
6224         * regformats/regdat.sh: Generate code using tdesc_create_reg.
6225         * target-descriptions.c: Update comments.
6226         * target-descriptions.h: Include "arch/tdesc.h".  Remove the
6227         declarations.
6228         * features/i386/32bit-avx.c: Re-generated.
6229         * features/i386/32bit-avx512.c: Re-generated.
6230         * features/i386/32bit-core.c: Re-generated.
6231         * features/i386/32bit-linux.c: Re-generated.
6232         * features/i386/32bit-mpx.c: Re-generated.
6233         * features/i386/32bit-pkeys.c: Re-generated.
6234         * features/i386/32bit-sse.c: Re-generated.
6235
6236 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6237
6238         * regformats/regdat.sh: Update generated code.
6239
6240 2017-09-05  Yao Qi  <yao.qi@linaro.org>
6241
6242         * regformats/regdat.sh: Adjust code order.
6243
6244 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
6245
6246         * expprint.c (dump_subexp_body_standard): Use constant format
6247         string in fprintf_filtered call.
6248
6249 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6250
6251         * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
6252         NetBSD/i386.
6253         * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
6254
6255 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6256
6257         * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
6258
6259 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6260
6261         * bsd-kvm.o: Define _KMEMUSER.
6262         * configure.ac: Define _KMEMUSER when checking for "struct lwp".
6263         * configure: Regenerate.
6264
6265 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6266
6267         * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
6268         * i386-fbsd-nat.c: Likewise.
6269
6270 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6271
6272         * unittests/array-view-selftests.c: Add include of <array>.
6273
6274 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
6275
6276         * spu-tdep.c (flush_ea_cache): Add missing argument to
6277         call_function_by_hand.
6278
6279 2017-09-04  Pedro Alves  <palves@redhat.com>
6280
6281         * NEWS (Safer support for debugging with no debug info): New.
6282
6283 2017-09-04  Pedro Alves  <palves@redhat.com>
6284
6285         * c-exp.y (function_method, function_method_void): Add current
6286         instance flags to TYPE_INSTANCE.
6287         * dwarf2read.c (check_modifier): New.
6288         (compute_delayed_physnames): Assert that only C++ adds delayed
6289         physnames.  Mark fn_fields as const/volatile depending on
6290         physname.
6291         * eval.c (make_params): New type_instance_flags parameter.  Use
6292         it as the new type's instance flags.
6293         (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
6294         flags element and pass it to make_params.
6295         * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
6296         instance flags element.
6297         (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
6298         * gdbtypes.h: Include "enum-flags.h".
6299         (type_instance_flags): New enum-flags type.
6300         (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
6301         (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
6302         * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
6303         (follow_type_instance_flags): New function.
6304         (operator_check_standard) <TYPE_INSTANCE>: Adjust.
6305         * parser-defs.h (follow_type_instance_flags): Declare.
6306         * valops.c (value_struct_elt_for_reference): const/volatile must
6307         match too.
6308
6309 2017-09-04  Pedro Alves  <palves@redhat.com>
6310
6311         * cp-namespace.c (cp_search_static_and_baseclasses): Handle
6312         function/method scopes; lookup the nested name as a function local
6313         static variable.
6314
6315 2017-09-04  Pedro Alves  <palves@redhat.com>
6316
6317         (%type <voidval>): Add function_method.
6318         * c-exp.y (exp): New production for calls with no arguments.
6319         (function_method, function_method_void_or_typelist): New
6320         productions.
6321         (exp): New production for "method()::static_var".
6322         * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
6323         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6324         Handle OP_FUNC_STATIC_VAR.
6325         * parse.c (operator_length_standard):
6326         Handle OP_FUNC_STATIC_VAR.
6327
6328 2017-09-04  Pedro Alves  <palves@redhat.com>
6329
6330         * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
6331         handling.
6332         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6333         Ditto.
6334         * parse.c (operator_length_standard, operator_check_standard):
6335         Ditto.
6336         * std-operator.def (UNOP_MEMVAL_TLS): Delete.
6337
6338 2017-09-04  Pedro Alves  <palves@redhat.com>
6339
6340         * ax-gdb.c: Include "typeprint.h".
6341         (gen_expr_for_cast): New function.
6342         (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
6343         <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
6344         type is unknown.
6345         * dwarf2read.c (new_symbol_full): Fallback to int instead of
6346         nodebug_data_symbol.
6347         * eval.c: Include "typeprint.h".
6348         (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
6349         Error out if symbol has unknown type.
6350         <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
6351         evaluate_subexp_for_cast.
6352         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
6353         OP_VAR_MSYM_VALUE.
6354         (evaluate_subexp_for_cast): New function.
6355         * gdbtypes.c (init_nodebug_var_type): New function.
6356         (objfile_type): Use it to initialize types of variables with no
6357         debug info.
6358         * typeprint.c (error_unknown_type): New.
6359         * typeprint.h (error_unknown_type): New declaration.
6360         * compile/compile-c-types.c (convert_type_basic): Handle
6361         TYPE_CODE_ERROR; warn and fallback to int for variables with
6362         unknown type.
6363
6364 2017-09-04  Pedro Alves  <palves@redhat.com>
6365
6366         * eval.c (evaluate_var_value): New function, factored out from ...
6367         (evaluate_subexp_standard): ... here.
6368
6369 2017-09-04  Pedro Alves  <palves@redhat.com>
6370
6371         * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
6372         Remove useless assignments to 'op'.
6373
6374 2017-09-04  Pedro Alves  <palves@redhat.com>
6375
6376         * eval.c (eval_skip_value): New function.
6377         (evaluate_subexp_standard): Use it.
6378
6379 2017-09-04  Pedro Alves  <palves@redhat.com>
6380
6381         * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
6382         function name from symbol/minsym and pass it to
6383         error_call_unknown_return_type.
6384
6385 2017-09-04  Pedro Alves  <palves@redhat.com>
6386
6387         * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
6388         * ax-gdb.c (gen_msym_var_ref): New function.
6389         (gen_expr): Handle OP_VAR_MSYM_VALUE.
6390         * eval.c (evaluate_var_msym_value): New function.
6391         * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
6392         <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
6393         to call_function_by_hand.
6394         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
6395         Handle OP_VAR_MSYM_VALUE.
6396         (union exp_element) <msymbol>: New field.
6397         * minsyms.h (struct type): Forward declare.
6398         (find_minsym_type_and_address): Declare.
6399         * parse.c (write_exp_elt_msym): New function.
6400         (write_exp_msymbol): Delete, refactored as ...
6401         (find_minsym_type_and_address): ... this new function.
6402         (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
6403         (operator_length_standard, operator_check_standard): Handle
6404         OP_VAR_MSYM_VALUE.
6405         * std-operator.def (OP_VAR_MSYM_VALUE): New.
6406
6407 2017-09-04  Pedro Alves  <palves@redhat.com>
6408
6409         * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
6410         TYPE_GNU_IFUNC specially here.  Throw error if return type is
6411         unknown.
6412         * ada-typeprint.c (print_func_type): Handle functions with unknown
6413         return type.
6414         * c-typeprint.c (c_type_print_base): Handle functions and methods
6415         with unknown return type.
6416         * compile/compile-c-symbols.c (convert_symbol_bmsym)
6417         <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
6418         * compile/compile-c-types.c: Include "objfiles.h".
6419         (convert_func): For functions with unknown return type, warn and
6420         default to int.
6421         * compile/compile-object-run.c (compile_object_run): Adjust call
6422         to call_function_by_hand_dummy.
6423         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
6424         call_function_by_hand.
6425         * eval.c (evaluate_subexp_standard): Adjust calls to
6426         call_function_by_hand.  Handle functions and methods with unknown
6427         return type.  Pass expect_type to call_function_by_hand.
6428         * f-typeprint.c (f_type_print_base): Handle functions with unknown
6429         return type.
6430         * gcore.c (call_target_sbrk): Adjust call to
6431         call_function_by_hand.
6432         * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
6433         return type instead of int.  Make nodebug_text_gnu_ifunc_symbol be
6434         an integer address type instead of nodebug.
6435         * guile/scm-value.c (gdbscm_value_call): Adjust call to
6436         call_function_by_hand.
6437         * infcall.c (error_call_unknown_return_type): New function.
6438         (call_function_by_hand): New "default_return_type" parameter.
6439         Pass it down.
6440         (call_function_by_hand_dummy): New "default_return_type"
6441         parameter.  Use it instead of defaulting to int.  If there's no
6442         default and the return type is unknown, throw an error.  If
6443         there's a default return type, and the called function has no
6444         debug info, then assume the function is prototyped.
6445         * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
6446         New "default_return_type" parameter.
6447         (error_call_unknown_return_type): New declaration.
6448         * linux-fork.c (call_lseek): Cast return type of lseek.
6449         (inferior_call_waitpid, checkpoint_command): Adjust calls to
6450         call_function_by_hand.
6451         * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
6452         calls to call_function_by_hand.
6453         * m2-typeprint.c (m2_procedure): Handle functions with unknown
6454         return type.
6455         * objc-lang.c (lookup_objc_class, lookup_child_selector)
6456         (value_nsstring, print_object_command): Adjust calls to
6457         call_function_by_hand.
6458         * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
6459         functions with unknown return type.
6460         (pascal_type_print_func_varspec_suffix): New function.
6461         (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
6462         TYPE_CODE_METHOD>: Use it.
6463         * python/py-value.c (valpy_call): Adjust call to
6464         call_function_by_hand.
6465         * rust-lang.c (rust_evaluate_funcall): Adjust call to
6466         call_function_by_hand.
6467         * valarith.c (value_x_binop, value_x_unop): Adjust calls to
6468         call_function_by_hand.
6469         * valops.c (value_allocate_space_in_inferior): Adjust call to
6470         call_function_by_hand.
6471         * typeprint.c (type_print_unknown_return_type): New function.
6472         * typeprint.h (type_print_unknown_return_type): New declaration.
6473
6474 2017-09-04  Pedro Alves  <palves@redhat.com>
6475
6476         * gdbtypes.c (lookup_function_type_with_arguments): Mark function
6477         types with more than one parameter as prototyped.
6478
6479 2017-09-04  Pedro Alves  <palves@redhat.com>
6480
6481         * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
6482         (disassemble_command): Use gdb_disassembly_flags instead of bare
6483         int.
6484         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
6485         (dump_insns, do_mixed_source_and_assembly_deprecated)
6486         (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
6487         Use gdb_disassembly_flags instead of bare int.
6488         * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
6489         (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
6490         (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
6491         (DISASSEMBLY_SPECULATIVE): No longer macros.  Instead they're...
6492         (enum gdb_disassembly_flag): ... values of this new enumeration.
6493         (gdb_disassembly_flags): Define.
6494         (gdb_disassembly)
6495         (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
6496         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
6497         gdb_disassembly_flags instead of bare int.
6498         * record-btrace.c (btrace_insn_history)
6499         (record_btrace_insn_history, record_btrace_insn_history_range)
6500         (record_btrace_insn_history_from): Use gdb_disassembly_flags
6501         instead of bare int.
6502         * record.c (get_insn_history_modifiers, cmd_record_insn_history):
6503         Use gdb_disassembly_flags instead of bare int.
6504         * target-debug.h (target_debug_print_gdb_disassembly_flags):
6505         Define.
6506         * target-delegates.c: Regenerate.
6507         * target.c (target_insn_history, target_insn_history_from)
6508         (target_insn_history_range): Use gdb_disassembly_flags instead of
6509         bare int.
6510         * target.h: Include "disasm.h".
6511         (struct target_ops) <to_insn_history, to_insn_history_from,
6512         to_insn_history_range>: Use gdb_disassembly_flags instead of bare
6513         int.
6514         (target_insn_history, target_insn_history_from)
6515         (target_insn_history_range): Use gdb_disassembly_flags instead of
6516         bare int.
6517
6518 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
6519
6520         * cli/cli-script.c (build_command_line): For if/while commands,
6521         check whether args is empty.
6522
6523 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
6524
6525         * cli/cli-script.h (enum misc_command_type): Move from defs.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         * defs.h (enum misc_command_type): Move to cli/cli-script.h.
6534         (enum command_control_type): Likewise.
6535         (struct command_line): Likewise.
6536         (free_command_lines): Likewise.
6537         (struct command_lines_deleter): Likewise.
6538         (command_line_up): Likewise.
6539         (read_command_lines): Likewise.
6540         (read_command_lines_1): Likewise.
6541         * breakpoint.h: Include cli/cli-script.h.
6542         * extension-priv.h: Likewise.
6543         * gdbcmd.h: Likewise.
6544
6545 2017-09-04  Pedro Alves  <palves@redhat.com>
6546
6547         * ada-lang.c (is_known_support_routine): Move sal declaration to
6548         where it is initialized.
6549         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
6550         (parse_breakpoint_sals, decode_static_tracepoint_spec)
6551         (clear_command, update_static_tracepoint): Remove init_sal
6552         references.  Move declarations closer to initializations.
6553         * cli/cli-cmds.c (list_command): Move sal declarations closer to
6554         initializations.
6555         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
6556         references.  Move sal declarations closer to initializations.
6557         * frame.c (find_frame_sal): Return a symtab_and_line via function
6558         return instead of output parameter.  Remove init_sal references.
6559         * frame.h (find_frame_sal): Return a symtab_and_line via function
6560         return instead of output parameter.
6561         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
6562         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
6563         instead of memset.
6564         (gdbscm_find_pc_line): Remove init_sal reference.
6565         * infcall.c (call_function_by_hand_dummy): Remove init_sal
6566         references.  Move declarations closer to initializations.
6567         * infcmd.c (set_step_frame): Update.  Move declarations closer to
6568         initializations.
6569         (finish_backward): Remove init_sal references.  Move declarations
6570         closer to initializations.
6571         * infrun.c (process_event_stop_test, handle_step_into_function)
6572         (insert_hp_step_resume_breakpoint_at_frame)
6573         (insert_step_resume_breakpoint_at_caller): Likewise.
6574         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
6575         (symbol_to_sal): Likewise.
6576         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
6577         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
6578         to its initialization.
6579         * reverse.c (save_bookmark_command): Use new/delete.  Remove
6580         init_sal references.  Move declarations closer to initializations.
6581         * source.c (get_current_source_symtab_and_line): Remove brace
6582         initialization.
6583         (set_current_source_symtab_and_line): Now takes the sal by const
6584         reference.  Remove brace initialization.
6585         (line_info): Remove init_sal reference.
6586         * source.h (set_current_source_symtab_and_line): Now takes a
6587         symtab_and_line via const reference.
6588         * stack.c (set_current_sal_from_frame): Adjust.
6589         (print_frame_info): Adjust.
6590         (get_last_displayed_sal): Return the sal via function return
6591         instead of via output parameter.  Simplify.
6592         (frame_info): Adjust.
6593         * stack.h (get_last_displayed_sal): Return the sal via function
6594         return instead of via output parameter.
6595         * symtab.c (init_sal): Delete.
6596         (find_pc_sect_line): Remove init_sal references.  Move
6597         declarations closer to initializations.
6598         (find_function_start_sal): Remove init_sal references.  Move
6599         declarations closer to initializations.
6600         * symtab.h (struct symtab_and_line): In-class initialize all
6601         fields.
6602         * tracepoint.c (set_traceframe_context)
6603         (print_one_static_tracepoint_marker): Remove init_sal references.
6604         Move declarations closer to initializations.
6605         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
6606         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
6607         declarations closer to initializations.
6608         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
6609         init_sal references.  Adjust.
6610
6611 2017-09-04  Pedro Alves  <palves@redhat.com>
6612
6613         * ax-gdb.c (agent_command_1): Use range-for.
6614         * break-catch-throw.c (re_set_exception_catchpoint): Update.
6615         * breakpoint.c: Include "common/array-view.h".
6616         (init_breakpoint_sal, create_breakpoint_sal): Change sals
6617         parameter from struct symtabs_and_lines to
6618         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
6619         (breakpoint_sals_to_pc): Change sals parameter from struct
6620         symtabs_and_lines to std::vector reference.
6621         (check_fast_tracepoint_sals): Change sals parameter from struct
6622         symtabs_and_lines to std::array_view.  Use range-for.
6623         (decode_static_tracepoint_spec): Return a std::vector instead of
6624         symtabs_and_lines.  Update.
6625         (create_breakpoint): Update.
6626         (break_range_command, until_break_command, clear_command): Update.
6627         (base_breakpoint_decode_location, bkpt_decode_location)
6628         (bkpt_probe_create_sals_from_location)
6629         (bkpt_probe_decode_location, tracepoint_decode_location)
6630         (tracepoint_probe_decode_location)
6631         (strace_marker_create_sals_from_location): Return a std::vector
6632         instead of symtabs_and_lines.
6633         (strace_marker_create_breakpoints_sal): Update.
6634         (strace_marker_decode_location): Return a std::vector instead of
6635         symtabs_and_lines.  Update.
6636         (update_breakpoint_locations): Change struct symtabs_and_lines
6637         parameters to gdb::array_view.  Adjust.
6638         (location_to_sals): Return a std::vector instead of
6639         symtabs_and_lines.  Update.
6640         (breakpoint_re_set_default): Use std::vector instead of struct
6641         symtabs_and_lines.
6642         (decode_location_default): Return a std::vector instead of
6643         symtabs_and_lines.  Update.
6644         * breakpoint.h: Include "common/array-view.h".
6645         (struct breakpoint_ops) <decode_location>: Now returns a
6646         std::vector instead of returning a symtabs_and_lines via output
6647         parameter.
6648         (update_breakpoint_locations): Change sals parameters to use
6649         gdb::array_view.
6650         * cli/cli-cmds.c (edit_command, list_command): Update to use
6651         std::vector and gdb::array_view.
6652         (ambiguous_line_spec): Adjust to use gdb::array_view and
6653         range-for.
6654         (compare_symtabs): Rename to ...
6655         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
6656         const reference and adjust.
6657         (filter_sals): Rewrite using std::vector and standard algorithms.
6658         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
6659         (jump_command): Update to use std::vector.
6660         * linespec.c (struct linespec_state) <canonical_names>: Update
6661         comment.
6662         (add_sal_to_sals_basic): Delete.
6663         (add_sal_to_sals, filter_results, convert_results_to_lsals)
6664         (decode_line_2, create_sals_line_offset)
6665         (convert_address_location_to_sals, convert_linespec_to_sals)
6666         (convert_explicit_location_to_sals, parse_linespec)
6667         (event_location_to_sals, decode_line_full, decode_line_1)
6668         (decode_line_with_current_source)
6669         (decode_line_with_last_displayed, decode_objc)
6670         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
6671         (linespec_result::~linespec_result): Adjust to use std::vector
6672         instead of symtabs_and_lines.
6673         * linespec.h (linespec_sals::sals): Now a std::vector.
6674         (struct linespec_result): Use std::vector, bool, and in-class
6675         initialization.
6676         (decode_line_1, decode_line_with_current_source)
6677         (decode_line_with_last_displayed): Return std::vector.
6678         * macrocmd.c (info_macros_command): Use std::vector.
6679         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
6680         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
6681         std::vector.
6682         * probe.h (parse_probes): Return a std::vector.
6683         * python/python.c (gdbpy_decode_line): Use std::vector and
6684         gdb::array_view.
6685         * source.c (select_source_symtab, line_info): Use std::vector.
6686         * stack.c (func_command): Use std::vector.
6687         * symtab.h (struct symtabs_and_lines): Delete.
6688         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
6689
6690 2017-09-04  Pedro Alves  <palves@redhat.com>
6691
6692         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6693         unittests/array-view-selftests.c.
6694         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
6695         * common/array-view.h: New file.
6696         * unittests/array-view-selftests.c: New file.
6697
6698 2017-09-04  Pedro Alves  <palves@redhat.com>
6699
6700         * cli/cli-cmds.c (edit_command): Pass message to
6701         ambiguous_line_spec.
6702         (list_command): Pass message to ambiguous_line_spec.  Say
6703         "first"/"last" instead of "start" and "end" to be consistent with
6704         the manual.
6705         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
6706         them to print formatted message.
6707
6708 2017-09-04  Pedro Alves  <palves@redhat.com>
6709
6710         * btrace.c (ftrace_add_pt): Pass btrace_insn to
6711         ftrace_update_insns by reference instead of pointer.
6712
6713 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6714
6715         * i386-go32-tdep.c: Include x86-xstate.h.
6716         (i386_go32_init_abi): Call i386_target_description.
6717         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
6718         if xcr0 is X86_XSTATE_X87_MASK.
6719         * i386-tdep.h (tdesc_i386): Remove the declaration.
6720         (tdesc_i386_mmx): Likewise.
6721
6722 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6723
6724         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
6725         X86_XSTATE_SSE_MASK instead of 0.
6726
6727 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6728
6729         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
6730         i386_target_description.
6731         * i386-fbsd-nat.c (i386fbsd_read_description): Call
6732         i386_target_description.
6733         * i386-tdep.c (i386_gdbarch_init): Likewise.
6734
6735 2017-09-04  Yao Qi  <yao.qi@linaro.org>
6736
6737         * amd64-darwin-tdep.c: Include "x86-xstate.h".
6738         (x86_darwin_init_abi_64): Call amd64_target_description.
6739         * amd64-dicos-tdep.c: Likewise.
6740         * amd64-fbsd-nat.c: Likewise.
6741         * amd64-fbsd-tdep.c: Likewise.
6742         * amd64-nbsd-tdep.c: Likewise.
6743         * amd64-obsd-tdep.c: Likewise.
6744         * amd64-sol2-tdep.c: Likewise.
6745         * amd64-windows-tdep.c: Likewise.
6746         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
6747
6748 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
6749
6750         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
6751         (btrace_function) <insn>: Change type to use std::vector.
6752         * btrace.c (ftrace_debug, ftrace_call_num_insn,
6753         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
6754         ftrace_update_insns, ftrace_compute_global_level_offset,
6755         btrace_stitch_bts, btrace_clear, btrace_insn_get,
6756         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
6757         change to std::vector.
6758         (ftrace_update_insns): Adjust to change to std::vector, change
6759         type of INSN parameter.
6760         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
6761         * record-btrace.c (btrace_call_history_insn_range,
6762         btrace_compute_src_line_range,
6763         record_btrace_frame_prev_register): Adjust to change to
6764         std::vector.
6765         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
6766         to change to std::vector.
6767
6768 2017-09-03  Tom Tromey  <tom@tromey.com>
6769
6770         * corefile.c (reopen_exec_file): Use std::string.
6771
6772 2017-09-03  Tom Tromey  <tom@tromey.com>
6773
6774         * compile/compile.c (compile_register_name_mangled): Return
6775         std::string.
6776         * compile/compile-loc2c.c (pushf_register_address): Update.
6777         (pushf_register): Update.
6778         * compile/compile-c-types.c (convert_array): Update.
6779         * compile/compile-c-symbols.c (generate_vla_size): Update.
6780         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
6781         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
6782         (convert_one_symbol): Update.
6783         (generate_c_for_for_one_variable): Update.
6784         * compile/compile-c-support.c (c_get_range_decl_name): Return a
6785         std::string.
6786         (generate_register_struct): Update.
6787         * compile/compile-internal.h (c_get_range_decl_name): Return a
6788         std::string.
6789         (compile_register_name_mangled): Return std::string.
6790
6791 2017-09-03  Tom Tromey  <tom@tromey.com>
6792
6793         * utils.c (perror_string): Return a std::string.
6794         (throw_perror_with_name, perror_warning_with_name): Update.
6795
6796 2017-09-03  Tom Tromey  <tom@tromey.com>
6797
6798         * demangle.c (demangle_command): Use std::string,
6799         unique_xmalloc_ptr.
6800
6801 2017-09-03  Tom Tromey  <tom@tromey.com>
6802
6803         * cli/cli-setshow.c (do_set_command): Use std::string.
6804
6805 2017-09-03  Tom Tromey  <tom@tromey.com>
6806
6807         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
6808
6809 2017-09-03  Tom Tromey  <tom@tromey.com>
6810
6811         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
6812
6813 2017-09-03  Tom Tromey  <tom@tromey.com>
6814
6815         * mi/mi-cmd-env.c (env_execute_cli_command): Use
6816         gdb::unique_xmalloc_ptr.
6817
6818 2017-09-03  Tom Tromey  <tom@tromey.com>
6819
6820         * thread.c (print_thread_info_1): Use string_printf.
6821         (thread_apply_command, thread_apply_all_command): Use
6822         std::string.
6823
6824 2017-09-03  Tom Tromey  <tom@tromey.com>
6825
6826         * valprint.c (val_print_string): Update.
6827         * gdbcore.h (memory_error_message): Return std::string.
6828         * corefile.c (memory_error_message): Return std::string.
6829         (memory_error): Update.
6830         * breakpoint.c (insert_bp_location): Update.
6831
6832 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
6833
6834         * target/waitstatus.h (target_waitstatus_to_string): Change
6835         return type to std::string.
6836         * target/waitstatus.c (target_waitstatus_to_string): Return
6837         std::string.
6838         * target.h (target_waitstatus_to_string): Remove declaration.
6839         * infrun.c (resume, clear_proceed_status_thread,
6840         print_target_wait_results, do_target_wait, save_waitstatus,
6841         stop_all_threads): Adjust.
6842         * record-btrace.c (record_btrace_wait): Adjust.
6843         * target-debug.h
6844         (target_debug_print_struct_target_waitstatus_p): Adjust.
6845
6846 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
6847
6848         PR gdb/22046
6849         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
6850         detection.
6851
6852 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
6853
6854         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
6855         for setting/unsetting environment variables on the remote target.
6856         (New remote packets): Add entries for QEnvironmentHexEncoded,
6857         QEnvironmentUnset and QEnvironmentReset.
6858         * common/environ.c (gdb_environ::operator=): Extend method to
6859         handle m_user_set_env_list and m_user_unset_env_list.
6860         (gdb_environ::clear): Likewise.
6861         (match_var_in_string): Change type of first parameter from 'char
6862         *' to 'const char *'.
6863         (gdb_environ::set): Extend method to handle
6864         m_user_set_env_list and m_user_unset_env_list.
6865         (gdb_environ::unset): Likewise.
6866         (gdb_environ::clear_user_set_env): New method.
6867         (gdb_environ::user_set_envp): Likewise.
6868         (gdb_environ::user_unset_envp): Likewise.
6869         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
6870         m_user_unset_env_list on move constructor/assignment.
6871         (unset): Add new default parameter 'update_unset_list = true'.
6872         (clear_user_set_env): New method.
6873         (user_set_envp): Likewise.
6874         (user_unset_envp): Likewise.
6875         (m_user_set_env_list): New std::set.
6876         (m_user_unset_env_list): Likewise.
6877         * common/rsp-low.c (hex2str): New function.
6878         (bin2hex): New overload for bin2hex function.
6879         * common/rsp-low.c (hex2str): New prototype.
6880         (str2hex): New overload prototype.
6881         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
6882         QEnvironmentUnset and QEnvironmentReset.
6883         (remote_protocol_features): Add QEnvironmentHexEncoded,
6884         QEnvironmentUnset and QEnvironmentReset packets.
6885         (send_environment_packet): New function.
6886         (extended_remote_environment_support): Likewise.
6887         (extended_remote_create_inferior): Call
6888         extended_remote_environment_support.
6889         (_initialize_remote): Add QEnvironmentHexEncoded,
6890         QEnvironmentUnset and QEnvironmentReset packet configs.
6891         * unittests/environ-selftests.c (gdb_selftest_env_var):
6892         New variable.
6893         (test_vector_initialization): New function.
6894         (test_init_from_host_environ): Likewise.
6895         (test_reinit_from_host_environ): Likewise.
6896         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
6897         Likewise.
6898         (test_unset_set_empty_vector): Likewise.
6899         (test_vector_clear): Likewise.
6900         (test_std_move): Likewise.
6901         (test_move_constructor):
6902         (test_self_move): Likewise.
6903         (test_set_unset_reset): Likewise.
6904         (run_tests): Rewrite in terms of the functions above.
6905
6906 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
6907
6908         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
6909         (adi_available): Use a temp variable of type CORE_ADDR as argument
6910         3 when calling target_auxv_search.
6911         (adi_normalize_address): Use masks and xor operators to calculate
6912         normalized address.
6913         (adi_read_versions, adi_write_versions, adi_print_versions)
6914         (do_examine, do_assign): Use paddress.
6915
6916 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
6917
6918         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
6919         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
6920         out of loop and add supply of FIR.
6921         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
6922         add collect of FIR.
6923
6924 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
6925
6926         PR gdb/21827
6927         * cli/cli-script.c (define_command): Don't convert command name
6928         to lower case.
6929
6930 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
6931
6932         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
6933         Update all callers accordingly. Remove all code blocks handling
6934         the case where DISPP is not NULL.
6935
6936 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
6937
6938         PR symtab/22003
6939         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
6940         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
6941         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
6942
6943 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
6944
6945         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
6946         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
6947         (read_comp_units_from_section): New parameter abbrev_section, use
6948         read_and_check_comp_unit_head, allocate signatured_type if needed.
6949         (create_all_comp_units): Update read_comp_units_from_section caller.
6950
6951 2017-08-23  Pedro Alves  <palves@redhat.com>
6952
6953         PR remote/21852
6954         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
6955         to null_ptid and switch to thread without reading the registers
6956         after adding the inferior.
6957
6958 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
6959
6960         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
6961         compile-gcc.
6962         * compile/compile.c (compile_gcc, show_compile_gcc): New.
6963         (compile_to_object): Implement compile_gcc.
6964         (_initialize_compile): Install "set compile-gcc".  Initialize
6965         compile_gcc.
6966
6967 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
6968
6969         * compile/compile.c (compile_to_object): Conditionally call
6970         set_verbose.  Conditionally call compile or compile_v0.
6971
6972 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
6973
6974         * sparc64-tdep.h: (adi_normalize_address): New export.
6975         * sparc-nat.h: (open_adi_tag_fd): New export.
6976         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
6977         * sparc64-linux-tdep.c:
6978         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
6979         (sparc64_linux_handle_segmentation_fault): New function.
6980         (sparc64_linux_init_abi): Register
6981         sparc64_linux_handle_segmentation_fault
6982         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
6983         (sparc64_addr_bits_remove): New function.
6984         (sparc64_init_abi): Register sparc64_addr_bits_remove.
6985         (MAX_PROC_NAME_SIZE): New macro.
6986         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
6987         (sparc64adilist): New variable.
6988         (adi_proc_list): New variable.
6989         (find_adi_info): New function.
6990         (add_adi_info): New function.
6991         (get_adi_info_proc): New function.
6992         (get_adi_info): New function.
6993         (info_adi_command): New function.
6994         (read_maps_entry): New function.
6995         (adi_available): New function.
6996         (adi_normalize_address): New function.
6997         (adi_align_address): New function.
6998         (adi_convert_byte_count): New function.
6999         (adi_tag_fd): New function.
7000         (adi_is_addr_mapped): New function.
7001         (adi_read_versions): New function.
7002         (adi_write_versions): New function.
7003         (adi_print_versions): New function.
7004         (do_examine): New function.
7005         (do_assign): New function.
7006         (adi_examine_command): New function.
7007         (adi_assign_command): New function.
7008         (_initialize_sparc64_adi_tdep): New function.
7009
7010 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
7011
7012         * breakpoint.c (breakpoints_info): Rename to ...
7013         (info_breakpoints_command): ... this.
7014         (watchpoints_info): Rename to ...
7015         (info_watchpoints_command): ... this.
7016         (tracepoints_info): Rename to ...
7017         (info_tracepoints_command): ... this.
7018         (_initialize_breakpoint): Adjust.
7019         * dcache.c (dcache_info): Rename to ...
7020         (info_display_command): ... this.
7021         (_initialize_dcache): Adjust.
7022         * frame.h (args_info): Rename to ...
7023         (info_args_command): ... this.
7024         (locals_info): Rename to ...
7025         (info_locals_command): ... this.
7026         * infcmd.c (nofp_registers_info): Rename to ...
7027         (info_registers_command): ... this.
7028         (float_info): Rename to ...
7029         (info_float_command): ... this.
7030         (program_info): Rename to ...
7031         (info_program_command): ... this.
7032         (all_registers_info): Rename to ...
7033         (info_all_registers_command): ... this.
7034         (vector_info): Rename to ...
7035         (info_vector_command): ... this.
7036         (float_info): Rename to ...
7037         (info_float_command): ... this.
7038         (_initialize_infcmd): Adjust.
7039         * inferior.h (term_info): Rename to ...
7040         (info_terminal_command): ... this.
7041         * inflow.c (term_info): Rename to ...
7042         (info_terminal_command): ... this.
7043         (_initialize_inflow): Adjust.
7044         * infrun.c (signals_info): Rename to ...
7045         (info_signals_command): ... this.
7046         (_initialize_infrun): Adjust.
7047         * objc-lang.c (classes_info): Rename to ...
7048         (info_classes_command): ... this.
7049         (selectors_info): Rename to ...
7050         (info_selectors_command): ... this.
7051         (_initialize_objc_language): Adjust.
7052         * printcmd.c (sym_info): Rename to ...
7053         (info_symbol_command): ... this.
7054         (address_info): Rename to ...
7055         (info_address_command): ... this.
7056         (display_info): Rename to ...
7057         (info_display_command): ... this.
7058         (_initialize_printcmd): Adjust.
7059         * reverse.c (bookmarks_info): Rename to ...
7060         (info_breakpoints_command): ... this.
7061         (_initialize_reverse): Adjust.
7062         * ser-go32.c (dos_info): Rename to ...
7063         (info_serial_command): ... this.
7064         (_initialize_ser_dos): Adjust.
7065         * skip.c (skip_info): Rename to ...
7066         (info_skip_command): ... this.
7067         (_initialize_step_skip): Adjust.
7068         * source.c (line_info): Rename to ...
7069         (info_line_command): ... this.
7070         (source_info): Rename to ...
7071         (info_source_command)
7072         * stack.c (frame_info): Rename to ...
7073         (info_frame_command): ... this.
7074         (locals_info): Rename to ...
7075         (info_locals_command): ... this.
7076         (args_info): Rename to ...
7077         (info_args_command): ... this.
7078         (_initialize_stack): Adjust.
7079         * symtab.c (sources_info): Rename to ...
7080         (info_sources_command): ... this.
7081         (variables_info): Rename to ...
7082         (info_variables_command): ... this.
7083         (functions_info): Rename to ...
7084         (info_functions_command): ... this.
7085         (types_info): Rename to ...
7086         (info_types_command): ... this.
7087         (_initialize_symtab): Adjust.
7088         * target.c (target_info): Rename to ...
7089         (info_target_command): ... this.
7090         (initialize_targets): Adjust.
7091         * tracepoint.c (tvariables_info): Rename to ...
7092         (info_tvariables_command): ... this.
7093         (scope_info): Rename to ...
7094         (info_scope_command): ... this.
7095         (trace_dump_actions): Adjust.
7096         (_initialize_tracepoint): Adjust.
7097
7098 2017-08-22  Tom Tromey  <tom@tromey.com>
7099
7100         * breakpoint.h (install_breakpoint): Update.
7101         * breakpoint.c (add_solib_catchpoint): Update.
7102         (install_breakpoint): Change argument to a std::unique_ptr.
7103         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
7104         (create_breakpoint_sal, create_breakpoint): Update.
7105         (watch_command_1, catch_exec_command_1)
7106         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
7107         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
7108         Return the breakpoint.
7109         (set_raw_breakpoint_without_location, set_raw_breakpoint)
7110         (new_single_step_breakpoint): Update.
7111         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
7112         std::unique_ptr.
7113         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
7114         std::unique_ptr.
7115         * break-catch-sig.c (create_signal_catchpoint): Use
7116         std::unique_ptr.
7117         * ada-lang.c (create_ada_exception_catchpoint): Use
7118         std::unique_ptr.
7119
7120 2017-08-22  Tom Tromey  <tom@tromey.com>
7121
7122         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
7123
7124 2017-08-22  Tom Tromey  <tom@tromey.com>
7125
7126         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
7127         (lookup_partial_symbol): Update.
7128
7129 2017-08-22  Tom Tromey  <tom@tromey.com>
7130
7131         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
7132         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
7133         (find_and_open_source, symtab_to_fullname): Update.
7134         * psymtab.c (psymtab_to_fullname): Update.
7135
7136 2017-08-22  Tom Tromey  <tom@tromey.com>
7137
7138         * exec.c (exec_file_attach): Update.
7139         * linux-thread-db.c (try_thread_db_load): Update.
7140         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
7141         * utils.c (gdb_realpath): Change return type.
7142         (gdb_realpath_keepfile): Update.
7143         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
7144         (_initialize_utils): Register the new self test.
7145         * source.c (openp): Update.
7146         (find_and_open_source): Update.
7147         * nto-tdep.c (nto_find_and_open_solib): Update.
7148         * main.c (set_gdb_data_directory): Update.
7149         (captured_main_1): Update.
7150         * dwarf2read.c (dwarf2_get_dwz_file): Update
7151         (dw2_map_symbol_filenames): Update.
7152         * auto-load.c (auto_load_safe_path_vec_update): Update.
7153         (filename_is_in_auto_load_safe_path_vec): Change type of
7154         "filename_realp".
7155         (auto_load_objfile_script): Update.
7156         (file_is_auto_load_safe): Update.  Use std::string.
7157         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
7158
7159 2017-08-22  Tom Tromey  <tom@tromey.com>
7160
7161         * utils.c (gdb_realpath_keepfile): Return a
7162         gdb::unique_xmalloc_ptr.
7163         * exec.c (exec_file_attach): Update.
7164         * utils.h (gdb_realpath_keepfile): Return a
7165         gdb::unique_xmalloc_ptr.
7166
7167 2017-08-22  Tom Tromey  <tom@tromey.com>
7168
7169         * compile/compile.c (compile_file_command): Use
7170         gdb::unique_xmalloc_ptr, std::string.
7171         * utils.c (gdb_abspath): Change return type.
7172         * source.c (openp): Update.
7173         * objfiles.c (allocate_objfile): Update.
7174         * main.c (set_gdb_data_directory): Update.
7175         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
7176
7177 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
7178
7179         * cli-cmds.c (list_commands): List actual code around more than
7180         one location.
7181
7182 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
7183
7184         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
7185
7186 2017-08-21  Pedro Alves  <palves@redhat.com>
7187
7188         PR gdb/19487
7189         * c-exp.y (variable production): Handle function aliases.
7190         * minsyms.c (msymbol_is_text): New function.
7191         * minsyms.h (msymbol_is_text): Declare.
7192         * symtab.c (find_function_alias_target): New function.
7193         * symtab.h (find_function_alias_target): Declare.
7194
7195 2017-08-21  Pedro Alves  <palves@redhat.com>
7196
7197         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
7198         typedefs.
7199         * typeprint.c (whatis_exp): If handling "whatis", and expression
7200         is OP_TYPE, strip one typedef level.  Otherwise don't strip
7201         typedefs here.
7202         * valops.c (value_cast): Save "to" type before resolving
7203         stubs/typedefs.  Use that type as resulting value's type.
7204
7205 2017-08-18  Tom Tromey  <tom@tromey.com>
7206             Pedro Alves  <palves@redhat.com>
7207
7208         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
7209         * sol-thread.c (sol_thread_resume, sol_thread_wait)
7210         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
7211         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
7212         * proc-service.c (ps_xfer_memory): Use scoped_restore.
7213         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
7214         (linux_get_siginfo_data): Add "thread" argument.  Use
7215         scoped_restore.
7216         * linux-nat.c (linux_child_follow_fork)
7217         (check_stopped_by_watchpoint): Use scoped_restore.
7218         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
7219         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
7220         (restore_inferior_ptid, save_inferior_ptid): Remove.
7221         * btrace.c (btrace_fetch): Use scoped_restore.
7222         * bsd-uthread.c (bsd_uthread_fetch_registers)
7223         (bsd_uthread_store_registers): Use scoped_restore.
7224         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
7225         scoped_restore.
7226         * aix-thread.c (aix_thread_resume, aix_thread_wait)
7227         (aix_thread_xfer_partial): Use scoped_restore.
7228         * inferior.h (save_inferior_ptid): Remove.
7229
7230 2017-08-18  Yao Qi  <yao.qi@linaro.org>
7231
7232         PR tdep/21818
7233         * arm-tdep.c (gdb_print_insn_arm): Mark
7234         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
7235
7236 2017-08-18  Yao Qi  <yao.qi@linaro.org>
7237
7238         * NEWS: Mention GDBserver's new option "--selftest".
7239         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
7240         * selftest.c: Move it to common/selftest.c.
7241         * selftest.h: Move it to common/selftest.h.
7242         * selftest-arch.c (reset): New function.
7243         (tests_with_arch): Call reset.
7244
7245 2017-08-18  Yao Qi  <yao.qi@linaro.org>
7246
7247         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
7248         instead of exception_fprintf and printf_filtered.
7249
7250 2017-08-18  Yao Qi  <yao.qi@linaro.org>
7251
7252         * selftest.c (register_self_test): Rename it to
7253         selftests::register_test.
7254         (run_self_tests): selftest::run_tests.
7255         * selftest.h: Update declarations.
7256         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
7257         selftests::register_test_foreach_arch.
7258         * selftest-arch.h: Update declaration.
7259         * aarch64-tdep.c: Update.
7260         * arm-tdep.c: Likewise.
7261         * disasm-selftests.c: Likewise.
7262         * dwarf2loc.c: Likewise.
7263         * dwarf2-frame.c: Likewise.
7264         * findvar.c: Likewise.
7265         * gdbarch-selftests.c: Likewise.
7266         * maint.c (maintenance_selftest): Likewise.
7267         * regcache.c: Likewise.
7268         * rust-exp.y: Likewise.
7269         * selftest-arch.c: Likewise.
7270         * unittests/environ-selftests.c: Likewise.
7271         * unittests/function-view-selftests.c: Likewise.
7272         * unittests/offset-type-selftests.c: Likewise.
7273         * unittests/optional-selftests.c: Likewise.
7274         * unittests/scoped_restore-selftests.c: Likewise.
7275         * utils-selftests.c: Likewise.
7276
7277 2017-08-17  Pedro Alves  <palves@redhat.com>
7278
7279         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
7280         local.
7281
7282 2017-08-17  Pedro Alves  <palves@redhat.com>
7283
7284         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
7285         field.
7286         (reset_die_in_process): Delete, replaced by ...
7287         (process_die_scope): ... this new class.  Make it responsible for
7288         freeing cu->line_header too.
7289         (process_die): Use process_die_scope.
7290         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
7291         cu->line_header_die_owner.  Don't release the line header if it's
7292         owned by the CU.
7293         (setup_type_unit_groups): Make the CU/DIE own the line header.
7294         Don't release the line header here.
7295
7296 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
7297
7298         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
7299
7300 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
7301
7302         * NEWS: Mention new shortcuts for nexti and stepi in TUI
7303         Single-Key mode
7304
7305 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
7306
7307         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
7308         mode command list.
7309
7310 2017-08-15  Stafford Horne  <shorne@gmail.com>
7311
7312         * MAINTAINERS (Write After Approval): Add Stafford Horne.
7313
7314 2017-08-15  Stafford Horne  <shorne@gmail.com>
7315
7316         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
7317
7318 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
7319
7320         PR gdb/21954
7321         * infcmd.c (unset_environment_command): Use the 'clear' method on
7322         the environment instead of resetting it.
7323
7324 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
7325
7326         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
7327         platforms.
7328
7329 2017-08-14  Tom Tromey  <tom@tromey.com>
7330
7331         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
7332         (print_binary_chars): Likewise.
7333         (BITS_IN_BYTES): Remove.
7334
7335 2017-08-14  Tom Tromey  <tom@tromey.com>
7336
7337         PR gdb/21675
7338         * valprint.c (LOW_ZERO): Change value to 034.
7339         (print_octal_chars): Add static_asserts for octal constants.
7340         * printcmd.c (print_scalar_formatted): Add 'd' case.
7341
7342 2017-08-11  Tom Tromey  <tom@tromey.com>
7343
7344         * symfile.c (add_symbol_file_command): Use std::vector.
7345
7346 2017-08-14  Tom Tromey  <tom@tromey.com>
7347
7348         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
7349         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
7350         std::move.
7351         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
7352
7353 2017-08-11  Pedro Alves  <palves@redhat.com>
7354
7355         * infrun.c (process_event_stop_test): Adjust
7356         function_name_is_marked_for_skip call.
7357         * skip.c: Include <list>.
7358         (skiplist_entry): Make it a class with private fields, and
7359         getters/setters.
7360         (skiplist_entry_chain): Delete.
7361         (skiplist_entries): New.
7362         (skiplist_entry_count): Delete.
7363         (highest_skiplist_entry_num): New.
7364         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
7365         (add_skiplist_entry): Delete.
7366         (skiplist_entry::skiplist_entry): New.
7367         (skiplist_entry::add_entry): New.
7368         (skip_file_command, skip_function): Adjust.
7369         (compile_skip_regexp): Delete.
7370         (skip_command): Don't compile regexp here.  Adjust to use
7371         skiplist_entry::add_entry.
7372         (skip_info): Adjust to use range-for and getters.
7373         (skip_enable_command, skip_disable_command): Adjust to use
7374         range-for and setters.
7375         (skip_delete_command): Adjust to use std::list.
7376         (add_skiplist_entry): Delete.
7377         (skip_file_p): Delete, refactored as ...
7378         (skiplist_entry::do_skip_file_p): ... this new method.
7379         (skip_gfile_p): Delete, refactored as ...
7380         (skiplist_entry::do_gskip_file_p): ... this new method.
7381         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
7382         (skiplist_entry::skip_function_p): ... this new method.
7383         (function_name_is_marked_for_skip): Now returns bool, and takes
7384         the function sal by const reference.  Adjust to use range-for and
7385         skiplist_entry methods.
7386         (_initialize_step_skip): Remove references to
7387         skiplist_entry_chain, skiplist_entry_count.
7388         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
7389         takes the function sal by const reference.
7390
7391 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7392
7393         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
7394         (dwarf2_frame_cache): Remove reset_cache_cleanup.
7395         (dwarf2_frame_cache):
7396         * frame-unwind.c (frame_unwind_try_unwinder): Catch
7397         RETURN_MASK_ALL and set *this_case to NULL.
7398         * frame-unwind.h: Update comments.
7399
7400 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7401
7402         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
7403         (dwarf2_frame_state_copy_regs): Remove.
7404         (dwarf2_frame_state_free_regs): Remove.
7405         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
7406         (dwarf2_restore_rule): Call method .alloc_regs instead of
7407         dwarf2_frame_state_alloc_regs.
7408         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
7409         constructor.  Call std::move.
7410         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
7411         (dwarf2_frame_cache): Likewise.
7412
7413         [GDB_SELF_TEST]: Include selftest.h and
7414         selftest-arch.h.
7415         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
7416         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
7417         execute_cfa_program_test.
7418
7419         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
7420         copy ctor, assignment operator, move assignment.
7421         <alloc_regs>: New method.
7422         <swap>: New method.
7423         (struct dwarf2_frame_state): Delete dtor.
7424         (dwarf2_frame_state_alloc_regs): Remove declaration.
7425         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
7426         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
7427
7428 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7429
7430         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
7431         (dwarf2_frame_state::dwarf2_frame_state): New.
7432         (dwarf2_frame_state::~dwarf2_frame_state): New.
7433         (dwarf2_fetch_cfa_info): Update.
7434         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
7435         rather than a pointer.  Update code.
7436         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
7437         dtor.
7438         <data_align, code_align, retaddr_column>: Change them to const.
7439         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
7440         to bool.
7441
7442 2017-08-11  Yao Qi  <yao.qi@linaro.org>
7443
7444         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
7445         <loc.exp>: New field.
7446         * dwarf2-frame.c (execute_cfa_program): Update.
7447         (dwarf2_frame_prev_register): Update.
7448
7449 2017-08-10  Pedro Alves  <palves@redhat.com>
7450
7451         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
7452
7453 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
7454
7455         * fbsd-nat.c (struct fbsd_fork_info): Remove.
7456         (fbsd_pending_children): Use std::list.
7457         (fbsd_remember_child): Likewise.
7458         (fbsd_is_child_pending): Likewise.
7459         (fbsd_pending_vfork_done): Use std::forward_list.
7460         (fbsd_add_vfork_done): Likewise.
7461         (fbsd_is_vfork_done_pending): Likewise.
7462         (fbsd_next_vfork_done): Likewise.
7463
7464 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
7465
7466         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
7467         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
7468         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
7469         for `mapfilename'.
7470         (fbsd_xfer_partial): Use gdb::byte_vector.
7471         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
7472
7473 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
7474
7475         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
7476         "filestuff.h".
7477         (fbsd_find_memory_regions): Fix `mapfile' initialization.
7478
7479 2017-08-09  Tom Tromey  <tom@tromey.com>
7480
7481         * skip.c (skiplist_entry): New constructor.
7482         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
7483         (skiplist_entry::file_is_glob): Now bool.
7484         (skiplist_entry::file, skiplist_entry::function): Now
7485         std::string.
7486         (make_skip_entry): Return a unique_ptr.  Use new.
7487         (free_skiplist_entry, free_skiplist_entry_cleanup)
7488         (make_free_skiplist_entry_cleanup): Remove.
7489         (skip_command, skip_disable_command, add_skiplist_entry)
7490         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
7491         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
7492         (function_name_is_marked_for_skip): Update.
7493         (skip_delete_command): Update.  Use delete.
7494
7495 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
7496
7497         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
7498         (aarch64_linux_core_read_description): New function.
7499         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
7500
7501 2017-08-09  Pedro Alves  <palves@redhat.com>
7502
7503         * cp-name-parser.y (cp_comp_to_string): Return a
7504         gdb::unique_xmalloc_ptr<char>.
7505         * cp-support.c (replace_typedefs_qualified_name)
7506         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
7507         (cp_canonicalize_string_full): Use op= instead of explicit
7508         convertion.
7509         (cp_class_name_from_physname, method_name_from_physname)
7510         (cp_func_name, cp_remove_params): Adjust to use
7511         gdb::unique_xmalloc_ptr<char>.
7512         * cp-support.h (cp_comp_to_string): Return a
7513         gdb::unique_xmalloc_ptr<char>.
7514         * python/py-type.c (typy_lookup_type): Adjust to use
7515         gdb::unique_xmalloc_ptr<char>.
7516
7517 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
7518
7519         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
7520
7521 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
7522             Yao Qi  <yao.qi@linaro.org>
7523
7524         * cp-support.c (cp_canonicalize_string_full): Use
7525         gdb::unique_xmalloc_ptr<char>.
7526         (cp_canonicalize_string): Likewise.
7527
7528 2017-08-09  Yao Qi  <yao.qi@linaro.org>
7529
7530         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
7531         * regformats/i386/amd64-avx-avx512.dat: Remove.
7532         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
7533         * regformats/i386/amd64-avx-mpx.dat:Remove.
7534         * regformats/i386/amd64-avx.dat: Remove.
7535         * regformats/i386/amd64-mpx.dat: Remove.
7536         * regformats/i386/i386-avx-avx512.dat: Remove.
7537         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
7538         * regformats/i386/i386-avx-mpx.dat: Remove.
7539         * regformats/i386/i386-mmx.dat: Remove.
7540         * regformats/i386/i386-mpx.dat: Remove.
7541
7542 2017-08-09  Yao Qi  <yao.qi@linaro.org>
7543
7544         * amd64-tdep.h (tdesc_x32): Remove the declaration.
7545         * amd64-tdep.c: Don't include features/i386/x32*.c.
7546         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
7547         functions.
7548         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
7549         and i386/x32-avx-avx512.
7550         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
7551         and i386/x32.xml.
7552         * features/i386/x32-avx-avx512.c: Removed.
7553         * features/i386/x32-avx-avx512.xml: Removed.
7554         * features/i386/x32-avx.c: Removed.
7555         * features/i386/x32-avx.xml: Removed.
7556         * features/i386/x32.c: Removed.
7557         * features/i386/x32.xml: Removed.
7558         * regformats/i386/x32-avx-avx512.dat: Removed.
7559         * regformats/i386/x32-avx.dat: Removed.
7560         * regformats/i386/x32.dat: Removed.
7561
7562 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
7563
7564         PR breakpoints/21886
7565         * mem-break.c (default_memory_insert_breakpoint): Use
7566         `->placed_address' rather than `->reqstd_address' for the
7567         breakpoint location.
7568
7569 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
7570
7571         * arch-utils.c (default_print_insn): Remove arch/mach/endian
7572         assertions.
7573
7574 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
7575
7576         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
7577         a union of `tdep_info', `tdesc_data' and `id'.
7578         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
7579         rather than `info.tdep_info'.
7580         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
7581         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
7582         * i386-tdep.c (i386_gdbarch_init): Likewise.
7583         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
7584         * mips-tdep.c (mips_gdbarch_init): Likewise.
7585         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
7586         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
7587         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
7588         `info.tdep_info'.
7589         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
7590         `info.tdep_info'.
7591         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
7592         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
7593         `info.tdep_info'.
7594         * spu-tdep.c (spu_gdbarch_init): Likewise.
7595         * gdbarch.h: Regenerate.
7596
7597 2017-08-07  Leszek Swirski  <leszeks@google.com>
7598
7599         PR symtab/20899
7600         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
7601
7602 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
7603
7604         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
7605         (gdbsim_open): Rename gdb_argv args object to argv.
7606
7607 2017-08-05  Tom Tromey  <tom@tromey.com>
7608
7609         * compile/compile-object-load.c (compile_object_load): Use
7610         gdb::unique_xmalloc_ptr.
7611         * cli/cli-dump.c (scan_filename): Rename from
7612         scan_filename_with_cleanup.  Change return type.
7613         (scan_expression): Rename from scan_expression_with_cleanup.
7614         Change return type.
7615         (dump_memory_to_file, dump_value_to_file, restore_command):
7616         Use gdb::unique_xmalloc_ptr.  Update.
7617         * cli/cli-cmds.c (find_and_open_script): Use
7618         gdb::unique_xmalloc_ptr.
7619         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
7620         * symmisc.c (maintenance_print_symbols)
7621         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
7622         * symfile.c (symfile_bfd_open, generic_load)
7623         (add_symbol_file_command, remove_symbol_file_command): Use
7624         gdb::unique_xmalloc_ptr.
7625         * source.c (openp): Use gdb::unique_xmalloc_ptr.
7626         * psymtab.c (maintenance_print_psymbols): Use
7627         gdb::unique_xmalloc_ptr.
7628         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
7629         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
7630         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
7631         (reload_shared_libraries_1): Likewise.
7632
7633 2017-08-05  Tom Tromey  <tom@tromey.com>
7634
7635         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
7636         (rust_op_vector, rust_set_vector): New typedefs.
7637         (current_parser): New global.
7638         (work_obstack): Change to pointer type.  Update all users.
7639         (rust_ast, pstate): Remove globals.
7640         (struct rust_parser): New.
7641         (%union) <params, field_inits>: Change type.
7642         (start, tuple_expr, unit_expr, struct_expr_list, literal)
7643         (field_expr, expr_list, maybe_expr_list, type_list): Update.
7644         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
7645         (convert_params_to_types, convert_params_to_expression): Change
7646         type of "params".
7647         (ast_string): Change type of "fields".
7648         (rust_parse): Make a rust_parser.  Remove cleanups.
7649         (rust_lex_tests): Make and install an auto_obstack.
7650
7651 2017-08-04  Yao Qi  <yao.qi@linaro.org>
7652
7653         * configure.srv (ipa_x32_linux_regobj): New.
7654         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
7655         instead of X86_TDESC_AVX512.
7656         (initialize_low_tracepoint): Call
7657         init_registers_x32_avx_avx512_linux.
7658
7659 2017-08-04  Yao Qi  <yao.qi@linaro.org>
7660
7661         * utils.h (gdb_argv): Add namespace std for nullptr_t.
7662
7663 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
7664
7665         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
7666
7667 2017-08-03  Tom Tromey  <tom@tromey.com>
7668
7669         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
7670         Remove.
7671         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
7672
7673 2017-08-03  Tom Tromey  <tom@tromey.com>
7674
7675         * python/py-param.c (compute_enum_values): Use gdb_argv.
7676
7677 2017-08-03  Tom Tromey  <tom@tromey.com>
7678
7679         * utils.h (struct gdb_argv_deleter): New.
7680         (gdb_argv): New class.
7681         * utils.c (gdb_argv::reset): New method.
7682         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
7683         * tracefile.c (tsave_command): Use gdb_argv.
7684         * top.c (new_ui_command): Use gdb_argv.
7685         * symmisc.c (maintenance_print_symbols)
7686         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
7687         * symfile.c (symbol_file_command, generic_load)
7688         (remove_symbol_file_command): Use gdb_argv.
7689         * stack.c (backtrace_command): Use gdb_argv.
7690         * source.c (add_path, show_substitute_path_command)
7691         (unset_substitute_path_command, set_substitute_path_command):
7692         Use gdb_argv.
7693         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
7694         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
7695         * remote.c (extended_remote_run, remote_put_command)
7696         (remote_get_command, remote_delete_command): Use gdb_argv.
7697         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
7698         (gdbsim_open): Use gdb_argv.
7699         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
7700         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
7701         * procfs.c (procfs_info_proc): Use gdb_argv.
7702         * interps.c (interpreter_exec_cmd): Use gdb_argv.
7703         * infrun.c (handle_command): Use gdb_argv.
7704         * inferior.c (add_inferior_command, clone_inferior_command):
7705         Use gdb_argv.
7706         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
7707         * exec.c (exec_file_command): Use gdb_argv.
7708         * cli/cli-cmds.c (alias_command): Use gdb_argv.
7709         * compile/compile.c (build_argc_argv): Use gdb_argv.
7710
7711 2017-08-03  Tom Tromey  <tom@tromey.com>
7712
7713         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
7714
7715 2017-08-03  Tom Tromey  <tom@tromey.com>
7716
7717         * python/python.c (compute_python_string): Return std::string.
7718         (gdbpy_eval_from_control_command): Update.
7719         (do_start_initialization): Use std::string.
7720         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
7721         xstrprintf.
7722         * python/py-breakpoint.c (local_setattro): Use string_printf, not
7723         xstrprintf.
7724
7725 2017-08-03  Tom Tromey  <tom@tromey.com>
7726
7727         * top.h (do_restore_instream_cleanup): Remove.
7728         * top.c (do_restore_instream_cleanup): Remove.
7729         (read_command_file): Use scoped_restore.
7730         * cli/cli-script.c (execute_user_command): Use scoped_restore.
7731
7732 2017-08-03  Tom Tromey  <tom@tromey.com>
7733
7734         * cli/cli-script.c (execute_user_command)
7735         (execute_control_command): Use scoped_restore.
7736
7737 2017-08-03  Tom Tromey  <tom@tromey.com>
7738
7739         * cli/cli-script.c (do_restore_user_call_depth): Remove.
7740         (execute_user_command): Remove user_call_depth; use
7741         user_args_stack's size instead.
7742
7743 2017-08-03  Tom Tromey  <tom@tromey.com>
7744
7745         * top.h (in_user_command): Remove.
7746         * top.c (in_user_command): Remove.
7747         * cli/cli-script.c (do_restore_user_call_depth)
7748         (execute_user_command): Update.
7749
7750 2017-08-03  Tom Tromey  <tom@tromey.com>
7751
7752         * valops.c (search_struct_method): Use gdb::byte_vector.
7753         * valarith.c (value_concat): Use std::vector.
7754         * target.c (memory_xfer_partial): Use gdb::byte_vector.
7755         (simple_search_memory): Likewise.
7756         * printcmd.c (find_string_backward): Use gdb::byte_vector.
7757         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
7758         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
7759         * elfread.c (elf_rel_plt_read): Use std::string.
7760         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
7761         * cli/cli-dump.c (restore_section_callback): Use
7762         gdb::byte_vector.
7763
7764 2017-08-03  Tom Tromey  <tom@tromey.com>
7765
7766         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
7767
7768 2017-08-03  Tom Tromey  <tom@tromey.com>
7769
7770         * tui/tui-regs.c (tui_restore_gdbout): Remove.
7771         (tui_register_format): Use scoped_restore.
7772
7773 2017-08-03  Tom Tromey  <tom@tromey.com>
7774
7775         * reverse.c (exec_direction_default): Remove.
7776         (exec_reverse_once): Use scoped_restore.
7777         * remote.c (restore_remote_timeout): Remove.
7778         (remote_flash_erase, remote_flash_write, remote_flash_done)
7779         (readchar, remote_serial_write): Use scoped_restore.
7780         * cli/cli-script.c (struct source_cleanup_lines_args)
7781         (source_cleanup_lines): Remove.
7782         (script_from_file): Use scoped_restore.
7783         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
7784         (source_command): Use scoped_restore.
7785
7786 2017-08-03  Tom Tromey  <tom@tromey.com>
7787
7788         * utils.h (make_cleanup_free_so): Remove.
7789         * utils.c (do_free_so, make_cleanup_free_so): Remove.
7790         * solist.h (struct so_deleter): New.
7791         (so_list_up): New typedef.
7792         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
7793
7794 2017-08-03  Tom Tromey  <tom@tromey.com>
7795
7796         * utils.h (make_cleanup_restore_current_language): Remove.
7797         * utils.c (do_restore_current_language)
7798         (make_cleanup_restore_current_language): Remove.
7799         * parse.c (parse_exp_in_context_1)
7800         (parse_expression_with_language): Use
7801         scoped_restore_current_language.
7802         * mi/mi-main.c (mi_cmd_execute): Use
7803         scoped_restore_current_language.
7804         * language.h (scoped_restore_current_language): New class.
7805
7806 2017-08-03  Tom Tromey  <tom@tromey.com>
7807
7808         * compile/compile.c (cleanup_unlink_file): Remove.
7809         (compile_to_object): Use gdb::unlinker.
7810         (eval_compile_command): Likewise.
7811
7812 2017-08-03  Tom Tromey  <tom@tromey.com>
7813
7814         * utils.h (make_cleanup_fclose): Remove.
7815         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
7816
7817 2017-08-03  Tom Tromey  <tom@tromey.com>
7818
7819         * top.c (open_terminal_stream): Return gdb_file_up.
7820         (new_ui_command): Update.
7821
7822 2017-08-03  Tom Tromey  <tom@tromey.com>
7823
7824         * source.c (print_source_lines_base, forward_search_command)
7825         (reverse_search_command): Use gdb_file_up.
7826
7827 2017-08-03  Tom Tromey  <tom@tromey.com>
7828
7829         * fbsd-nat.c (fbsd_find_memory_regions): Update.
7830
7831 2017-08-03  Tom Tromey  <tom@tromey.com>
7832
7833         * cli/cli-cmds.c (find_and_open_script): Change return type.
7834         Remove "streamp" and "full_path" parameters.
7835         (source_script_with_search): Update.
7836         * auto-load.c (source_script_file): Update.
7837         * cli/cli-cmds.h (find_and_open_script): Change type.
7838         (open_script): New struct.
7839
7840 2017-08-03  Tom Tromey  <tom@tromey.com>
7841
7842         * xml-support.c (xml_fetch_content_from_file): Update.
7843         * ui-file.c (stdio_file::open): Update.
7844         * tracefile-tfile.c (tfile_start): Update.
7845         * remote.c (remote_file_put, remote_file_get): Update.
7846         * nat/linux-procfs.c (linux_proc_get_int)
7847         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
7848         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
7849         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
7850         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
7851         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
7852         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
7853         * linux-nat.c (linux_proc_pending_signals): Update.
7854         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
7855         (file_closer): Remove.
7856         * compile/compile.c (compile_to_object): Update.
7857         * common/filestuff.h (struct gdb_file_deleter): New.
7858         (gdb_file_up): New typedef.
7859         (gdb_fopen_cloexec): Change return type.
7860         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
7861         * cli/cli-dump.c (fopen_with_cleanup): Remove.
7862         (dump_binary_file, restore_binary_file): Update.
7863         * auto-load.c (auto_load_objfile_script_1): Update.
7864
7865 2017-08-03  Tom Tromey  <tom@tromey.com>
7866
7867         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
7868         (info_static_tracepoint_markers_command): Likewise.
7869         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
7870         * skip.c (skip_info): Use ui_out_emit_table.
7871         * progspace.c (print_program_space): Use ui_out_emit_table.
7872         * osdata.c (info_osdata): Use ui_out_emit_table.
7873         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
7874         ui_out_emit_table.
7875         * linux-thread-db.c (info_auto_load_libthread_db): Use
7876         ui_out_emit_table.
7877         * inferior.c (print_inferior): Use ui_out_emit_table.
7878         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
7879         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
7880         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
7881         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
7882         * ui-out.h (class ui_out_emit_table): New.
7883
7884 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
7885
7886         * mips-tdep.c (mips_fpu_type_str): New function.
7887         (mips_dump_tdep): Call it.
7888
7889 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
7890
7891         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
7892         `->mips_fpu_type'.
7893
7894 2017-07-31  Xavier Roirand  <roirand@adacore.com>
7895
7896         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
7897
7898 2017-07-27  Xavier Roirand  <roirand@adacore.com>
7899
7900         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
7901
7902 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7903
7904         * cli/cli-cmds.c (maintenancechecklist): New variable.
7905         * gdbcmd.h (maintenancechecklist): Declare it.
7906         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
7907         Call i386_linux_read_description with different masks.
7908         * maint.c (maintenance_check_command): New function.
7909         (_initialize_maint_cmds): Call add_prefix_cmd.
7910         * target-descriptions.c (tdesc_reg): override operator != and ==.
7911         (tdesc_type): Likewise.
7912         (tdesc_feature): Likewise.
7913         (target_desc): Likewise.
7914         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
7915         (maintenance_check_xml_descriptions): New function.
7916         (_initialize_target_descriptions) Add command "xml-descriptions".
7917         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
7918
7919 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7920
7921         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
7922         Include features/i386/32bit-*.c.
7923         (i386_linux_read_description): Generate target description if it
7924         doesn't exist.
7925         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
7926         functions.
7927         * features/i386/32bit-linux.c: Re-generated.
7928         * features/i386/32bit-sse.c: Likewise.
7929         * target-descriptions.c (print_c_feature::visit): Print code to
7930         set register number if needed.
7931         (print_c_feature) <m_next_regnum>: New field.
7932
7933 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7934
7935         * features/Makefile (CFILES): Rename with TDESC_CFILES.
7936         (FEATURE_XMLFILES): New.
7937         (FEATURE_CFILES): New.
7938         New rules.
7939         (clean-cfiles): Remove generated c files.
7940         * features/i386/32bit-avx.c: Generated.
7941         * features/i386/32bit-avx512.c: Generated.
7942         * features/i386/32bit-core.c: Generated.
7943         * features/i386/32bit-linux.c: Generated.
7944         * features/i386/32bit-mpx.c: Generated.
7945         * features/i386/32bit-pkeys.c: Generated.
7946         * features/i386/32bit-sse.c: Generated.
7947         * target-descriptions.c: Include algorithm.
7948         (tdesc_element_visitor): Add method visit_end.
7949         (print_c_tdesc): Implement visit_end.
7950         (print_c_tdesc:: m_filename_after_features): Move it to
7951         protected.
7952         (print_c_feature): New class.
7953         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
7954         name starts with "i386/32bit-".
7955
7956 2017-07-26  Yao Qi  <yao.qi@linaro.org>
7957
7958         * target-descriptions.c (tdesc_element_visitor): New class.
7959         (tdesc_element): New class.
7960         (tdesc_reg): Inherit from tdesc_element.
7961         (tdesc_reg::accept): New function.
7962         (tdesc_type): Inherit from tdesc_element.
7963         (tdesc_type::accept): New function.
7964         (tdesc_feature): Inherit from tdesc_element.
7965         (tdesc_feature::accept): New function.
7966         (target_desc): Inherit from tdesc_element.
7967         (target_desc::target_desc): New.
7968         (target_desc::~target_desc): New.
7969         (target_desc::accept): New.
7970         (allocate_target_description): Use new.
7971         (free_target_description): Use delete.
7972         (print_c_tdesc): New class.
7973         (maint_print_c_tdesc_cmd): Adjust.
7974
7975         * features/aarch64.c: Re-generated.
7976         * features/arc-arcompact.c: Re-generated.
7977         * features/arc-v2.c: Re-generated.
7978         * features/arm/arm-with-iwmmxt.c: Re-generated.
7979         * features/arm/arm-with-m.c: Re-generated.
7980         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
7981         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
7982         * features/arm/arm-with-neon.c: Re-generated.
7983         * features/arm/arm-with-vfpv2.c: Re-generated.
7984         * features/arm/arm-with-vfpv3.c: Re-generated.
7985         * features/i386/amd64-avx-avx512.c: Re-generated.
7986         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
7987         * features/i386/amd64-avx.c: Re-generated.
7988         * features/i386/amd64-avx-linux.c: Re-generated.
7989         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
7990         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
7991         * features/i386/amd64-avx-mpx.c: Re-generated.
7992         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
7993         * features/i386/amd64.c: Re-generated.
7994         * features/i386/amd64-linux.c: Re-generated.
7995         * features/i386/amd64-mpx.c: Re-generated.
7996         * features/i386/amd64-mpx-linux.c: Re-generated.
7997         * features/i386/i386-avx-avx512.c: Re-generated.
7998         * features/i386/i386-avx-avx512-linux.c: Re-generated.
7999         * features/i386/i386-avx.c: Re-generated.
8000         * features/i386/i386-avx-linux.c: Re-generated.
8001         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
8002         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
8003         * features/i386/i386-avx-mpx.c: Re-generated.
8004         * features/i386/i386-avx-mpx-linux.c: Re-generated.
8005         * features/i386/i386.c: Re-generated.
8006         * features/i386/i386-linux.c: Re-generated.
8007         * features/i386/i386-mmx.c: Re-generated.
8008         * features/i386/i386-mmx-linux.c: Re-generated.
8009         * features/i386/i386-mpx.c: Re-generated.
8010         * features/i386/i386-mpx-linux.c: Re-generated.
8011         * features/i386/x32-avx-avx512.c: Re-generated.
8012         * features/i386/x32-avx-avx512-linux.c: Re-generated.
8013         * features/i386/x32-avx.c: Re-generated.
8014         * features/i386/x32-avx-linux.c: Re-generated.
8015         * features/i386/x32.c: Re-generated.
8016         * features/i386/x32-linux.c: Re-generated.
8017         * features/microblaze.c: Re-generated.
8018         * features/microblaze-with-stack-protect.c: Re-generated.
8019         * features/mips64-dsp-linux.c: Re-generated.
8020         * features/mips64-linux.c: Re-generated.
8021         * features/mips-dsp-linux.c: Re-generated.
8022         * features/mips-linux.c: Re-generated.
8023         * features/nds32.c: Re-generated.
8024         * features/nios2.c: Re-generated.
8025         * features/nios2-linux.c: Re-generated.
8026         * features/rs6000/powerpc-32.c: Re-generated.
8027         * features/rs6000/powerpc-32l.c: Re-generated.
8028         * features/rs6000/powerpc-403.c: Re-generated.
8029         * features/rs6000/powerpc-403gc.c : Re-generated.
8030         * features/rs6000/powerpc-405.c: Re-generated.
8031         * features/rs6000/powerpc-505.c: Re-generated.
8032         * features/rs6000/powerpc-601.c: Re-generated.
8033         * features/rs6000/powerpc-602.c: Re-generated.
8034         * features/rs6000/powerpc-603.c: Re-generated.
8035         * features/rs6000/powerpc-604.c: Re-generated.
8036         * features/rs6000/powerpc-64.c: Re-generated.
8037         * features/rs6000/powerpc-64l.c: Re-generated.
8038         * features/rs6000/powerpc-7400.c: Re-generated.
8039         * features/rs6000/powerpc-750.c: Re-generated.
8040         * features/rs6000/powerpc-860.c: Re-generated.
8041         * features/rs6000/powerpc-altivec32.c: Re-generated.
8042         * features/rs6000/powerpc-altivec32l.c: Re-generated.
8043         * features/rs6000/powerpc-altivec64.c: Re-generated.
8044         * features/rs6000/powerpc-altivec64l.c: Re-generated.
8045         * features/rs6000/powerpc-cell32l.c: Re-generated.
8046         * features/rs6000/powerpc-cell64l.c: Re-generated.
8047         * features/rs6000/powerpc-e500.c: Re-generated.
8048         * features/rs6000/powerpc-e500l.c: Re-generated.
8049         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
8050         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
8051         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
8052         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
8053         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
8054         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
8055         * features/rs6000/powerpc-vsx32.c: Re-generated.
8056         * features/rs6000/powerpc-vsx32l.c: Re-generated.
8057         * features/rs6000/powerpc-vsx64.c: Re-generated.
8058         * features/rs6000/powerpc-vsx64l.c: Re-generated.
8059         * features/rs6000/rs6000.c: Re-generated.
8060         * features/s390-linux32.c: Re-generated.
8061         * features/s390-linux32v1.c: Re-generated.
8062         * features/s390-linux32v2.c: Re-generated.
8063         * features/s390-linux64.c: Re-generated.
8064         * features/s390-linux64v1.c: Re-generated.
8065         * features/s390-linux64v2.c: Re-generated.
8066         * features/s390-te-linux64.c: Re-generated.
8067         * features/s390-tevx-linux64.c: Re-generated.
8068         * features/s390-vx-linux64.c: Re-generated.
8069         * features/s390x-linux64.c: Re-generated.
8070         * features/s390x-linux64v1.c: Re-generated.
8071         * features/s390x-linux64v2.c: Re-generated.
8072         * features/s390x-te-linux64.c: Re-generated.
8073         * features/s390x-tevx-linux64.c: Re-generated.
8074         * features/s390x-vx-linux64.c: Re-generated.
8075         * features/sparc/sparc32-solaris.c: Re-generated.
8076         * features/sparc/sparc64-solaris.c: Re-generated.
8077         * features/tic6x-c62x.c: Re-generated.
8078         * features/tic6x-c62x-linux.c: Re-generated.
8079         * features/tic6x-c64x.c: Re-generated.
8080         * features/tic6x-c64x-linux.c: Re-generated.
8081         * features/tic6x-c64xp.c: Re-generated.
8082         * features/tic6x-c64xp-linux.c: Re-generated.
8083
8084 2017-07-26  Yao Qi  <yao.qi@linaro.org>
8085
8086         * i386-linux-tdep.c (i386_linux_read_description): New function.
8087         (i386_linux_core_read_description): Call
8088         i386_linux_read_description.
8089         * i386-linux-tdep.h (i386_linux_read_description): Declare.
8090         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
8091         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
8092         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
8093         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
8094         * x86-linux-nat.c (x86_linux_read_description): Call
8095         i386_linux_read_description.
8096
8097 2017-07-26  Yao Qi  <yao.qi@linaro.org>
8098
8099         * NEWS: Mention it.
8100         * features/Makefile (%.c: %.xml): Pass the xml file name to
8101         command "maint print c-tdesc".
8102         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
8103         name from 'arg'.
8104
8105 2017-07-26  Yao Qi  <yao.qi@linaro.org>
8106
8107         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
8108         in-class initialization.
8109         (tdesc_create_feature): Call new instead of XCNEW.
8110         (free_target_description): Ue delete.
8111
8112 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
8113
8114         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
8115
8116 2017-07-25  Yao Qi  <yao.qi@linaro.org>
8117
8118         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
8119         constant.
8120         (amd64_x32_init_abi): Likewise.
8121         * amd64-tdep.h (amd64_init_abi): Update declaration.
8122         (amd64_x32_init_abi): Likewise.
8123
8124 2017-07-25  Yao Qi  <yao.qi@linaro.org>
8125
8126         PR tdep/21717
8127         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
8128         condition for FPSCR.
8129         (arm_linux_store_inferior_registers): Likewise.
8130
8131 2017-07-22  Tom Tromey  <tom@tromey.com>
8132
8133         * break-catch-syscall.c (struct catch_syscall_inferior_data)
8134         <syscalls_counts>: Now a std::vector.
8135         (get_catch_syscall_inferior_data): Use "new".
8136         (catch_syscall_inferior_data_cleanup): Use "delete".
8137         (insert_catch_syscall, remove_catch_syscall)
8138         (clear_syscall_counts): Update.
8139
8140 2017-07-22  Tom Tromey  <tom@tromey.com>
8141
8142         * break-catch-syscall.c (syscall_catchpoint)
8143         <syscalls_to_be_caught>: Now a std::vector<int>
8144         (~syscall_catchpoint): Remove.
8145         (insert_catch_syscall, remove_catch_syscall)
8146         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
8147         (print_mention_catch_syscall, print_recreate_catch_syscall):
8148         Update.
8149         (create_syscall_event_catchpoint): Change type of "filter"
8150         parameter.
8151         (catch_syscall_split_args): Return a std::vector.
8152         (catch_syscall_command_1, catching_syscall_number_1): Update.
8153
8154 2017-07-22  Tom Tromey  <tom@tromey.com>
8155
8156         * break-catch-throw.c (struct exception_catchpoint)
8157         <exception_rx>: Now a std::string.
8158         (~exception_catchpoint): Remove.
8159         (print_one_detail_exception_catchpoint): Update.
8160         (handle_gnu_v3_exceptions): Change type of except_rx.
8161         (extract_exception_regexp): Return a std::string.
8162         (catch_exception_command_1): Update.
8163
8164 2017-07-22  Tom Tromey  <tom@tromey.com>
8165
8166         * break-catch-sig.c (gdb_signal_type): Remove typedef.
8167         (struct signal_catchpoint) <signals_to_be_caught>: Now a
8168         std::vector.
8169         <catch_all>: Now a bool.
8170         (~signal_catchpoint): Remove.
8171         (signal_catchpoint_insert_location)
8172         (signal_catchpoint_remove_location)
8173         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
8174         (signal_catchpoint_print_mention)
8175         (signal_catchpoint_print_recreate)
8176         (signal_catchpoint_explains_signal): Update.
8177         (create_signal_catchpoint): Change type of "filter" and
8178         "catch_all".
8179         (catch_signal_split_args): Return a std::vector.  Change type of
8180         "catch_all".
8181         (catch_signal_command): Update.
8182
8183 2017-07-20  Pedro Alves  <palves@redhat.com>
8184
8185         * ada-lang.c (ada_language_defn): Make extern.
8186         (_initialize_ada_language): Remove add_language call.
8187         * c-lang.c (c_language_defn, cplus_language_defn)
8188         (asm_language_defn, minimal_language_defn): Make extern.
8189         (_initialize_c_language): Delete.
8190         * completer.c (compare_cstrings): Delete, moved to utils.h.
8191         * d-lang.c (d_language_defn): Make extern.
8192         (_initialize_d_language): Remove add_language calls.
8193         * defs.h (enum language): Add comment.
8194         * f-lang.c (f_language_defn): Make extern.
8195         (_initialize_f_language): Remove add_language call.
8196         * go-lang.c (go_language_defn): Make extern.
8197         (_initialize_go_language): Remove add_language call.
8198         * language.c: Include <algorithm>.
8199         (languages): Redefine as const array.
8200         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
8201         (set_language_command): Handle "local".  Use for-range loop.
8202         (set_language): Remove loop.
8203         (language_enum): Rewrite.
8204         (language_def, language_str): Remove loops.
8205         (add_language): Delete.
8206         (add_set_language_command): New, based on add_languages.
8207         (skip_language_trampoline): Adjust.
8208         (local_language_defn): Delete.
8209         (language_gdbarch_post_init): Adjust.
8210         (_initialize_language): Remove add_language calls.  Call
8211         add_set_language_command.
8212         * language.h (add_language): Delete.
8213         (auto_language_defn)
8214         (unknown_language_defn, minimal_language_defn, ada_language_defn)
8215         (asm_language_defn, c_language_defn, cplus_language_defn)
8216         (d_language_defn, f_language_defn, go_language_defn)
8217         (m2_language_defn, objc_language_defn, opencl_language_defn)
8218         (pascal_language_defn, rust_language_defn): Declare.
8219         * m2-lang.c (m2_language_defn): Make extern.
8220         (_initialize_m2_language): Remove add_language call.
8221         * objc-lang.c (objc_language_defn): Make extern.
8222         (_initialize_objc_language): Remove add_language call.
8223         * opencl-lang.c (opencl_language_defn): Make extern.
8224         (_initialize_opencl_language): Remove add_language call.
8225         * p-lang.c (pascal_language_defn): Make extern.
8226         (_initialize_pascal_language): Delete.
8227         * rust-lang.c (rust_language_defn): Make extern.
8228         (_initialize_rust_language): Delete.
8229         * utils.h (compare_cstrings): New static inline function.
8230
8231 2017-07-20  Pedro Alves  <palves@redhat.com>
8232
8233         * ada-lang.c (ada_to_fixed_type_1): Adjust.
8234         (get_var_value): Constify parameters.
8235         (get_int_var_value): Change prototype.
8236         (to_fixed_range_type): Adjust.
8237         * ada-lang.h (get_int_var_value): Change prototype.
8238
8239 2017-07-20  Pedro Alves  <palves@redhat.com>
8240
8241         * dwarf2read.c (dw2_lookup_symbol): Use
8242         SYMBOL_MATCHES_SEARCH_NAME.
8243         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
8244
8245 2017-07-20  Pedro Alves  <palves@redhat.com>
8246
8247         * block.c (block_iter_name_step, block_iter_name_first)
8248         (block_iter_name_next): Delete.
8249         (block_lookup_symbol_primary): Adjust to use
8250         dict_iter_match_first/dict_iter_match_next.
8251         * block.h (block_iter_name_first, block_iter_name_next): Delete
8252         declarations.
8253         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
8254         dict_iter_match_first/dict_iter_match_next.
8255
8256 2017-07-20  Pedro Alves  <palves@redhat.com>
8257
8258         * cp-support.c (cp_find_first_component_aux): Add missing case for
8259         end of string.
8260
8261 2017-07-18  David Blaikie  <dblaikie@gmail.com>
8262
8263         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
8264         of dwo_cu's dwo_file.
8265
8266 2017-07-18  Yao Qi  <yao.qi@linaro.org>
8267
8268         * remote.c (store_registers_using_G): Remove one line comment.
8269
8270 2017-07-18  Yao Qi  <yao.qi@linaro.org>
8271
8272         * regcache.c (regcache_cpy): Simplify it.
8273         (regcache::cpy_no_passthrough): Remove it.
8274         * regcache.h (cpy_no_passthrough): Remove it.
8275         (regcache_dup, regcache_cpy): Update comments.
8276
8277 2017-07-18  Pedro Alves  <palves@redhat.com>
8278
8279         * remote-sim.c (sim_command_completer): Adjust to work with a
8280         completion_tracker instead of a VEC.
8281
8282 2017-07-17  Pedro Alves  <palves@redhat.com>
8283
8284         * completer.c (complete_source_filenames): New function.
8285         (complete_address_and_linespec_locations): New function.
8286         (location_completer): Use complete_address_and_linespec_locations.
8287         (completion_tracker::build_completion_result): Honor the tracker's
8288         request to suppress append.
8289         * completer.h (completion_tracker::suppress_append_ws)
8290         (completion_tracker::set_suppress_append_ws): New methods.
8291         (completion_tracker::m_suppress_append_ws): New field.
8292         (complete_source_filenames): New declaration.
8293         * linespec.c (linespec_complete_what): New.
8294         (struct ls_parser) <complete_what, completion_word,
8295         completion_quote_char, completion_quote_end, completion_tracker>:
8296         New fields.
8297         (string_find_incomplete_keyword_at_end): New.
8298         (linespec_lexer_lex_string): Record quote char.  If in completion
8299         mode, don't throw.
8300         (linespec_lexer_consume_token): Advance the completion word point.
8301         (linespec_lexer_peek_token): Save/restore completion info.
8302         (save_stream_and_consume_token): New.
8303         (set_completion_after_number): New.
8304         (linespec_parse_basic): Set what to complete next depending on
8305         token.  Handle function and label completions specially.
8306         (parse_linespec): Disable objc shortcut in completion mode.  Set
8307         what to complete next depending on token type.  Skip keyword if in
8308         completion mode.
8309         (complete_linespec_component, linespec_complete): New.
8310         * linespec.h (linespec_complete): Declare.
8311
8312 2017-07-17  Pedro Alves  <palves@redhat.com>
8313
8314         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
8315         Handle 'operator<' / 'operator<<'.
8316
8317 2017-07-17  Pedro Alves  <palves@redhat.com>
8318
8319         * completer.c (collect_explicit_location_matches): Handle
8320         MATCH_LABEL.
8321         (convert_explicit_location_to_linespec): New, factored out from
8322         ...
8323         (convert_explicit_location_to_sals): ... this.
8324         (complete_label): New.
8325         (linespec_complete_label, find_label_symbols_in_block): New.
8326         (find_label_symbols): Add completion_mode parameter and adjust to
8327         call find_label_symbols_in_block.
8328         * linespec.h (linespec_complete_label): Declare.
8329
8330 2017-07-17  Pedro Alves  <palves@redhat.com>
8331
8332         * ada-lang.c (ada_collect_symbol_completion_matches): Add
8333         complete_symbol_mode parameter.
8334         * cli/cli-cmds.c (complete_command): Get the completion result out
8335         of the handle_brkchars tracker if used a custom word point.
8336         * completer.c: Include "linespec.h".
8337         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
8338         (advance_to_expression_complete_word_point): New.
8339         (completion_tracker::completes_to_completion_word): New.
8340         (complete_files_symbols): Pass down
8341         complete_symbol_mode::EXPRESSION.
8342         (explicit_options, probe_options): New.
8343         (collect_explicit_location_matches): Complete on the
8344         explictit_loc->foo instead of word.  Use
8345         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
8346         keyword and options completions.
8347         (backup_text_ptr): Delete.
8348         (skip_keyword): New.
8349         (complete_explicit_location): Remove 'word' parameter.  Add
8350         language, quoted_arg_start and quoted_arg_end parameters.
8351         Rewrite, parsing left to right.
8352         (location_completer): Rewrite.
8353         (location_completer_handle_brkchars): New function.
8354         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
8355         (enum complete_line_internal_reason): Adjust comments.
8356         (completion_tracker::discard_completions): New.
8357         (completer_handle_brkchars_func_for_completer): Handle
8358         location_completer.
8359         (gdb_custom_word_point_brkchars)
8360         (gdb_org_rl_basic_quote_characters): New.
8361         (gdb_completion_word_break_characters_throw)
8362         (completion_find_completion_word): Handle trackers that use a
8363         custom word point.
8364         (completion_tracker::advance_custom_word_point_by): New.
8365         (completion_tracker::build_completion_result): Don't rely on
8366         readline appending the quote char.
8367         (gdb_rl_attempted_completion_function_throw): Handle trackers that
8368         use a custom word point.
8369         (gdb_rl_attempted_completion_function): Restore
8370         rl_basic_quote_characters.
8371         * completer.h (class completion_tracker): Extend intro comment.
8372         (completion_tracker::set_quote_char)
8373         (completion_tracker::quote_char)
8374         (completion_tracker::set_use_custom_word_point)
8375         (completion_tracker::use_custom_word_point)
8376         (completion_tracker::custom_word_point)
8377         (completion_tracker::set_custom_word_point)
8378         (completion_tracker::advance_custom_word_point_by)
8379         (completion_tracker::completes_to_completion_word)
8380         (completion_tracker::discard_completions): New methods.
8381         (completion_tracker::m_quote_char)
8382         (completion_tracker::m_use_custom_word_point)
8383         (completion_tracker::m_custom_word_point): New fields.
8384         (advance_to_expression_complete_word_point): Declare.
8385         * f-lang.c (f_collect_symbol_completion_matches): Add
8386         complete_symbol_mode parameter.
8387         * language.h (struct language_defn)
8388         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
8389         parameter.
8390         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
8391         (linespec_complete_function): New function.
8392         (linespec_lexer_lex_keyword): Adjust.
8393         * linespec.h (linespec_keywords, linespec_complete_function): New
8394         declarations.
8395         * location.c (find_end_quote): New function.
8396         (explicit_location_lex_one): Add explicit_completion_info
8397         parameter.  Save quoting info.  Don't throw if being called for
8398         completion.  Don't handle Ada operators here.
8399         (is_cp_operator, skip_op_false_positives, first_of)
8400         (explicit_location_lex_one_function): New function.
8401         (string_to_explicit_location): Replace 'dont_throw' parameter with
8402         an explicit_completion_info pointer parameter.  Handle it.  Don't
8403         use explicit_location_lex_one to lex function names.  Use
8404         explicit_location_lex_one_function instead.
8405         * location.h (struct explicit_completion_info): New.
8406         (string_to_explicit_location): Replace 'dont_throw' parameter with
8407         an explicit_completion_info pointer parameter.
8408         * symtab.c (default_collect_symbol_completion_matches_break_on):
8409         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
8410         (default_collect_symbol_completion_matches)
8411         (collect_symbol_completion_matches): Add complete_symbol_mode
8412         parameter.
8413         (collect_symbol_completion_matches_type): Pass down
8414         complete_symbol_mode::EXPRESSION.
8415         (collect_file_symbol_completion_matches): Add complete_symbol_mode
8416         parameter.  Handle LINESPEC mode.
8417         * symtab.h (complete_symbol_mode): New.
8418         (default_collect_symbol_completion_matches_break_on)
8419         (default_collect_symbol_completion_matches)
8420         (collect_symbol_completion_matches)
8421         (collect_file_symbol_completion_matches): Add complete_symbol_mode
8422         parameter.
8423
8424 2017-07-17  Pedro Alves  <palves@redhat.com>
8425
8426         * utils.c (enum class strncmp_iw_mode): New.
8427         (strcmp_iw): Rename to ...
8428         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
8429         parameters.  Handle them.
8430         (strncmp_iw): New.
8431         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
8432         * utils.h (strncmp_iw): Declare.
8433         (strcmp_iw): Move describing comments here.
8434
8435 2017-07-17  Pedro Alves  <palves@redhat.com>
8436
8437         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
8438         CP_OPERATOR_STR.
8439         * c-typeprint.c (is_type_conversion_operator): Use
8440         CP_OPERATOR_STR.
8441         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
8442         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
8443         CP_OPERATOR_LEN.
8444         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
8445         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
8446         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
8447         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
8448         CP_OPERATOR_STR.
8449         * location.c: Include "cp-support.h".
8450         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
8451         CP_OPERATOR_STR.
8452         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
8453         CP_OPERATOR_LEN.
8454
8455 2017-07-17  Pedro Alves  <palves@redhat.com>
8456
8457         * cli/cli-cmds.c (complete_command): Use a completion tracker
8458         along with completion_find_completion_word for handle_brkchars
8459         phase.
8460         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
8461         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
8462         (struct gdb_rl_completion_word_info): New.
8463         (gdb_rl_find_completion_word): New.
8464         (completion_find_completion_word): New.
8465         * completer.h (completion_find_completion_word): Declare.
8466
8467 2017-07-17  Pedro Alves  <palves@redhat.com>
8468
8469         * ada-lang.c (symbol_completion_match): Adjust comments.
8470         (symbol_completion_add): Replace vector parameter with
8471         completion_tracker parameter.  Use it.
8472         (ada_make_symbol_completion_list): Rename to...
8473         (ada_collect_symbol_completion_matches): ... this.  Add
8474         completion_tracker parameter and use it.
8475         (ada_language_defn): Adjust.
8476         * break-catch-syscall.c (catch_syscall_completer): Adjust
8477         prototype and work with completion_tracker instead of VEC.
8478         * breakpoint.c (condition_completer): Adjust prototype and work
8479         with completion_tracker instead of VEC.
8480         * c-lang.c (c_language_defn, cplus_language_defn)
8481         (asm_language_defn, minimal_language_defn): Adjust to renames.
8482         * cli/cli-cmds.c (complete_command): Rework using
8483         completion_tracker.  Catch exceptions when completing.
8484         * cli/cli-decode.c (integer_unlimited_completer)
8485         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
8486         with completion_tracker instead of VEC.
8487         * command.h (struct completion_tracker): Forward declare.
8488         (completer_ftype, completer_handle_brkchars_ftype): Change
8489         types.
8490         (complete_on_cmdlist, complete_on_enum): Adjust.
8491         * completer.c: Include <algorithm>.
8492         (struct gdb_completer_state): New.
8493         (current_completion): New global.
8494         (readline_line_completion_function): Delete.
8495         (noop_completer, filename_completer)
8496         (filename_completer_handle_brkchars, complete_files_symbols)
8497         (linespec_location_completer): Adjust to work with a
8498         completion_tracker instead of a VEC.
8499         (string_or_empty): New.
8500         (collect_explicit_location_matches): Adjust to work with a
8501         completion_tracker instead of a VEC.
8502         (explicit_location_completer): Rename to ...
8503         (complete_explicit_location): ... this and adjust to work with a
8504         completion_tracker instead of a VEC.
8505         (location_completer): Adjust to work with a completion_tracker
8506         instead of a VEC.
8507         (add_struct_fields): Adjust to work with a completion_list instead
8508         of VEC.
8509         (expression_completer): Rename to ...
8510         (complete_expression): ... this and adjust to work with a
8511         completion_tracker instead of a VEC.  Use complete_files_symbols.
8512         (expression_completer): Reimplement on top of complete_expression.
8513         (symbol_completer): Adjust to work with a completion_tracker
8514         instead of a VEC.
8515         (enum complete_line_internal_reason): Add describing comments.
8516         (complete_line_internal_normal_command): Adjust to work with a
8517         completion_tracker instead of a VEC.
8518         (complete_line_internal): Rename to ...
8519         (complete_line_internal_1): ... this and adjust to work with a
8520         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
8521         handle_brkchars phase.
8522         (new_completion_tracker): Delete.
8523         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
8524         complete_line_internal_1.
8525         (free_completion_tracker): Delete.
8526         (INITIAL_COMPLETION_HTAB_SIZE): New.
8527         (completion_tracker::completion_tracker)
8528         (completion_tracker::~completion_tracker): New.
8529         (maybe_add_completion): Delete.
8530         (completion_tracker::maybe_add_completion)
8531         (completion_tracker::add_completion)
8532         (completion_tracker::add_completions): New.
8533         (throw_max_completions_reached_error): Delete.
8534         (complete_line): Adjust to work with a completion_tracker instead
8535         of a VEC.  Don't create a completion_tracker_t or check for max
8536         completions here.
8537         (command_completer, command_completer_handle_brkchars)
8538         (signal_completer, reg_or_group_completer_1)
8539         (reg_or_group_completer, default_completer_handle_brkchars):
8540         Adjust to work with a completion_tracker.
8541         (gdb_completion_word_break_characters_throw): New.
8542         (gdb_completion_word_break_characters): Reimplement.
8543         (line_completion_function): Delete.
8544         (completion_tracker::recompute_lowest_common_denominator)
8545         (expand_preserving_ws)
8546         (completion_tracker::build_completion_result)
8547         (completion_result::completion_result)
8548         (completion_result::completion_result)
8549         (completion_result::~completion_result)
8550         (completion_result::completion_result)
8551         (completion_result::release_match_list, compare_cstrings)
8552         (completion_result::sort_match_list)
8553         (completion_result::reset_match_list)
8554         (gdb_rl_attempted_completion_function_throw)
8555         (gdb_rl_attempted_completion_function): New.
8556         * completer.h (completion_list, struct completion_result)
8557         (class completion_tracker): New.
8558         (complete_line): Add completion_tracker parameter.
8559         (readline_line_completion_function): Delete.
8560         (gdb_rl_attempted_completion_function): New.
8561         (noop_completer, filename_completer, expression_completer)
8562         (location_completer, symbol_completer, command_completer)
8563         (signal_completer, reg_or_group_completer): Update prototypes.
8564         (completion_tracker_t, new_completion_tracker)
8565         (make_cleanup_free_completion_tracker): Delete.
8566         (enum maybe_add_completion_enum): Delete.
8567         (maybe_add_completion): Delete.
8568         (throw_max_completions_reached_error): Delete.
8569         * corefile.c (complete_set_gnutarget): Adjust to work with a
8570         completion_tracker instead of a VEC.
8571         * cp-abi.c (cp_abi_completer): Adjust to work with a
8572         completion_tracker instead of a VEC.
8573         * d-lang.c (d_language_defn): Adjust.
8574         * disasm.c (disassembler_options_completer): Adjust to work with a
8575         completion_tracker instead of a VEC.
8576         * f-lang.c (f_make_symbol_completion_list): Rename to ...
8577         (f_collect_symbol_completion_matches): ... this.  Adjust to work
8578         with a completion_tracker instead of a VEC.
8579         (f_language_defn): Adjust.
8580         * go-lang.c (go_language_defn): Adjust.
8581         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
8582         Adjust to work with a completion_tracker instead of a VEC.
8583         * infrun.c (handle_completer): Likewise.
8584         * interps.c (interpreter_completer): Likewise.
8585         * interps.h (interpreter_completer): Likewise.
8586         * language.c (unknown_language_defn, auto_language_defn)
8587         (local_language_defn): Adjust.
8588         * language.h (language_defn::la_make_symbol_completion_list):
8589         Rename to ...
8590         (language_defn::la_collect_symbol_completion_matches): ... this
8591         and adjust to work with a completion_tracker instead of a VEC.
8592         * m2-lang.c (m2_language_defn): Adjust.
8593         * objc-lang.c (objc_language_defn): Adjust.
8594         * opencl-lang.c (opencl_language_defn): Adjust.
8595         * p-lang.c (pascal_language_defn): Adjust.
8596         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
8597         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
8598         with a completion_tracker.
8599         * rust-lang.c (rust_language_defn): Adjust.
8600         * symtab.c (free_completion_list, do_free_completion_list)
8601         (return_val, completion_tracker): Delete.
8602         (completion_list_add_name, completion_list_add_symbol)
8603         (completion_list_add_msymbol, completion_list_objc_symbol)
8604         (completion_list_add_fields, add_symtab_completions): Add
8605         completion_tracker parameter and use it.
8606         (default_make_symbol_completion_list_break_on_1): Rename to...
8607         (default_collect_symbol_completion_matches_break_on): ... this.
8608         Add completion_tracker parameter and use it instead of allocating
8609         a completion tracker here.
8610         (default_make_symbol_completion_list_break_on): Delete old
8611         implementation.
8612         (default_make_symbol_completion_list): Delete.
8613         (default_collect_symbol_completion_matches): New.
8614         (make_symbol_completion_list): Delete.
8615         (collect_symbol_completion_matches): New.
8616         (make_symbol_completion_type): Rename to ...
8617         (collect_symbol_completion_matches_type): ... this.  Add
8618         completion_tracker parameter and use it instead of VEC.
8619         (make_file_symbol_completion_list_1): Rename to...
8620         (collect_file_symbol_completion_matches): ... this.  Add
8621         completion_tracker parameter and use it instead of VEC.
8622         (make_file_symbol_completion_list): Delete.
8623         (add_filename_to_list): Use completion_list instead of a VEC.
8624         (add_partial_filename_data::list): Now a completion_list.
8625         (make_source_files_completion_list): Work with a completion_list
8626         instead of a VEC.
8627         * symtab.h: Include "completer.h".
8628         (default_make_symbol_completion_list_break_on)
8629         (default_make_symbol_completion_list, make_symbol_completion_list)
8630         (make_symbol_completion_type, make_file_symbol_completion_list)
8631         (make_source_files_completion_list): Delete.
8632         (default_collect_symbol_completion_matches_break_on)
8633         (default_collect_symbol_completion_matches)
8634         (collect_symbol_completion_matches)
8635         (collect_symbol_completion_matches_type)
8636         (collect_file_symbol_completion_matches)
8637         (make_source_files_completion_list): New.
8638         * top.c (init_main): Don't install a rl_completion_entry_function
8639         hook.  Install a rl_attempted_completion_function hook instead.
8640         * tui/tui-layout.c (layout_completer): Adjust to work with a
8641         completion_tracker.
8642         * tui/tui-regs.c (tui_reggroup_completer):
8643         * tui/tui-win.c (window_name_completer, focus_completer)
8644         (winheight_completer): Adjust to work with a completion_tracker.
8645         * value.c: Include "completer.h".
8646         (complete_internalvar): Adjust to work with a completion_tracker.
8647         * value.h (complete_internalvar): Likewise.
8648
8649 2017-07-17  Pedro Alves  <palves@redhat.com>
8650
8651         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
8652         renames.
8653         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
8654         comments to completer_ftype's declaration.
8655         <completer_handle_brkchars>: Change type to
8656         completer_handle_brkchars_ftype.
8657         * command.h (completer_ftype): Add describing comment and give
8658         names to parameters.
8659         (completer_ftype_void): Rename to ...
8660         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
8661         (set_cmd_completer_handle_brkchars): Adjust.
8662         * completer.c (filename_completer_handle_brkchars): New function.
8663         (complete_line_internal_normal_command): New function, factored
8664         out from ...
8665         (complete_line_internal): ... here.
8666         (command_completer_handle_brkchars)
8667         (default_completer_handle_brkchars)
8668         (completer_handle_brkchars_func_for_completer): New functions.
8669         * completer.h (set_gdb_completion_word_break_characters): Delete
8670         declaration.
8671         (completer_handle_brkchars_func_for_completer): New declaration.
8672         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
8673         completer_handle_brkchars_func_for_completer.
8674
8675 2017-07-17  Pedro Alves  <palves@redhat.com>
8676
8677         * completer.c (symbol_completer): New function, based on
8678         make_symbol_completion_list_fn.
8679         * completer.h (symbol_completer): New declaration.
8680         * guile/scm-cmd.c (cmdscm_completers): Adjust.
8681         * python/py-cmd.c (completers): Adjust.
8682         * symtab.c (make_symbol_completion_list_fn): Delete.
8683         * symtab.h (make_symbol_completion_list_fn): Delete.
8684         * cli/cli-decode.c (add_cmd): Adjust.
8685
8686 2017-07-17  Pedro Alves  <palves@redhat.com>
8687
8688         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
8689         * dwarf2read.c: Include "filename-seen-cache.h".
8690         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
8691         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
8692         * filename-seen-cache.c: New file.
8693         * filename-seen-cache.h: New file.
8694         * symtab.c: Include "filename-seen-cache.h".
8695         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
8696         (create_filename_seen_cache, clear_filename_seen_cache)
8697         (delete_filename_seen_cache, filename_seen): Delete, parts moved
8698         to filename-seen-cache.h/filename-seen-cache.c.
8699         (output_source_filename, sources_info)
8700         (maybe_add_partial_symtab_filename)
8701         (make_source_files_completion_list): Adjust to use
8702         filename_seen_cache.
8703
8704 2017-07-17  Pedro Alves  <palves@redhat.com>
8705
8706         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
8707         fields.
8708         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
8709         dwarf2_debug_sections*)): New.
8710         (dwarf2_per_objfile::dwarf2_per_objfile(const
8711         dwarf2_per_objfile&)): Declare as deleted.
8712         (dwarf2_per_objfile::operator=): Declare as deleted.
8713         (dwarf2_per_objfile::dwarf2_per_objfile)
8714         (dwarf2_per_objfile::~dwarf2_per_objfile)
8715         (dwarf2_per_objfile::free_cached_comp_units): New.
8716         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
8717         ctor.  Call dwarf2_per_objfile's ctor manually.
8718         (dwarf2_locate_sections): Deleted/refactored as ...
8719         (dwarf2_per_objfile::locate_sections): ... this new method.
8720         (free_cached_comp_units): Defer to
8721         dwarf2_per_objfile::free_cached_comp_units.
8722         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
8723
8724 2017-07-14  Tom Tromey  <tom@tromey.com>
8725
8726         PR rust/21764:
8727         * rust-exp.y (convert_ast_to_expression): Add "want_type"
8728         parameter.
8729         <UNOP_SIZEOF>: Split into separate case.
8730         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
8731
8732 2017-07-14  Tom Tromey  <tom@tromey.com>
8733
8734         PR rust/21763:
8735         * symtab.c (symbol_matches_domain): Add language_rust to special
8736         case.
8737         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
8738         treat LOC_TYPEDEF symbols as variables.
8739
8740 2017-07-14  Pedro Alves  <palves@redhat.com>
8741
8742         * symtab.c (make_file_symbol_completion_list_1): Iterate over
8743         symtabs matching all symtabs with SRCFILE as file name instead of
8744         only considering the first hit, with lookup_symtab.
8745
8746 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8747
8748         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
8749         operator_name parameters.
8750         (gen_expr): Update function call.
8751
8752 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8753
8754         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
8755         parameter.
8756         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
8757         Likewise.
8758         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
8759         parameter, use agent_expr::gdbarch instead, update function
8760         calls.
8761         (locexpr_tracepoint_var_ref): Likewise.
8762         (loclist_tracepoint_var_ref): Likewise.
8763         * ax-gdb.c (gen_trace_static_fields): Likewise.
8764         (gen_traced_pop): Likewise.
8765         (gen_frame_args_address): Likewise.
8766         (gen_frame_locals_address): Likewise.
8767         (gen_var_ref): Likewise.
8768         (gen_struct_ref_recursive): Likewise.
8769         (gen_static_field): Likewise.
8770         (gen_maybe_namespace_elt): Likewise.
8771         (gen_expr): Likewise.
8772         (gen_trace_for_var): Likewise.
8773         (gen_trace_for_expr): Likewise.
8774         (gen_trace_for_return_address): Likewise.
8775
8776 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8777
8778         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
8779         parameter.
8780         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
8781
8782 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
8783
8784         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
8785         from ax, update calls.
8786         (gen_usual_arithmetic): Likewise.
8787         (gen_integral_promotions): Likewise.
8788         (gen_bitfield_ref): Likewise.
8789         (gen_primitive_field): Likewise.
8790         (gen_struct_ref_recursive): Likewise.
8791         (gen_struct_ref): Likewise.
8792         (gen_maybe_namespace_elt): Likewise.
8793         (gen_struct_elt_for_reference): Likewise.
8794         (gen_namespace_elt): Likewise.
8795         (gen_aggregate_elt_ref): Likewise.
8796         (gen_expr): Get gdbarch from ax, update calls.
8797         (gen_expr_binop_rest): Likewise.
8798
8799 2017-07-13  Pedro Alves  <palves@redhat.com>
8800
8801         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
8802         as default tdesc.
8803         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
8804         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
8805         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
8806         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
8807         tdep.
8808         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
8809         Get final tdesc from the tdep.
8810         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
8811         default tdesc.
8812         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
8813         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
8814         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
8815         Use it as default tdesc.
8816         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
8817         down to amd_init_abi.  No longer handle fallback tdesc here.
8818         * amd64-tdep.h (tdesc_x32): Declare.
8819         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
8820         parameter.
8821         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
8822         as default tdesc.
8823
8824 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
8825
8826         * s390-linux-tdep.c (s390_process_record): Add support for
8827         instructions new in arch12.
8828
8829 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
8830
8831         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
8832         PT_GETFSBASE and PT_GETGSBASE.
8833         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
8834         PT_SETGSBASE.
8835
8836 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
8837
8838         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
8839         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
8840         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
8841         those rules.
8842         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
8843         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
8844         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
8845         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
8846         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
8847         * features/i386/amd64.xml: Add 64bit-segments.xml.
8848         * features/i386/amd64-avx-avx512.c: Regenerated.
8849         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
8850         * features/i386/amd64-avx-mpx.c: Regenerated.
8851         * features/i386/amd64-avx.c: Regenerated.
8852         * features/i386/amd64-mpx.c: Regenerated.
8853         * features/i386/amd64.c: Regenerated.
8854         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
8855         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
8856         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
8857         * regformats/i386/amd64-avx.dat: Regenerated.
8858         * regformats/i386/amd64-mpx.dat: Regenerated.
8859         * regformats/i386/amd64.dat: Regenerated.
8860
8861 2017-07-10  Yao Qi  <yao.qi@linaro.org>
8862
8863         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
8864         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
8865
8866 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
8867
8868         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
8869         unsetenv.
8870         * gnulib/aclocal.m4: Regenerate.
8871         * gnulib/config.in: Regenerate.
8872         * gnulib/configure: Regenerate.
8873         * gnulib/import/Makefile.am: Regenerate.
8874         * gnulib/import/Makefile.in: Regenerate.
8875         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
8876         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
8877         * gnulib/import/m4/environ.m4: New file.
8878         * gnulib/import/m4/setenv.m4: New file.
8879         * gnulib/import/setenv.c: New file.
8880         * gnulib/import/unsetenv.c: New file.
8881
8882 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
8883
8884         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
8885         address when op is DW_OP_addr.
8886
8887 2017-07-09  Tom Tromey  <tom@tromey.com>
8888
8889         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
8890         check and apply to outer type.
8891
8892 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8893
8894         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
8895         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
8896         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
8897         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
8898
8899 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8900
8901         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
8902
8903 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8904
8905         * corelow.c (get_core_siginfo): Remove.
8906         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
8907         instead of get_core_siginfo.
8908         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
8909         * gdbarch.h: Re-generate.
8910         * gdbarch.c: Re-generate.
8911         * linux-tdep.c (linux_core_xfer_siginfo): New.
8912         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
8913
8914 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8915
8916         * corelow.c (thread_section_name): Move to ...
8917         * gdbcore.h (thread_section_name): ... here.
8918
8919 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8920
8921         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
8922         (struct siginfo32): New.
8923         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
8924         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
8925         via ptrace(PT_LWPINFO).
8926
8927 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
8928
8929         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
8930         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
8931         (fbsd_get_siginfo_type): New.
8932         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
8933         (_initialize_fbsd_tdep): New.
8934
8935 2017-07-06  David Blaikie  <dblaikie@gmail.com>
8936
8937         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
8938         a singular dwo_unit*) to support multiple CUs in the same way that
8939         multiple TUs are supported.
8940         (create_cus_hash_table): Replace create_dwo_cu with a function for
8941         parsing multiple CUs from a DWO file.
8942         (open_and_init_dwo_file): Use create_cus_hash_table rather than
8943         create_dwo_cu.
8944         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
8945         htab_find, rather than comparing the signature to a singleton CU in
8946         the dwo_file.
8947
8948 2017-07-06  Pedro Alves  <palves@redhat.com>
8949
8950         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
8951
8952 2017-07-04  Pedro Alves  <palves@redhat.com>
8953
8954         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
8955         * gdbtypes.h (TYPE_STATIC): Delete.
8956         (struct fn_field) <is_public, is_abstract, is_static, is_final,
8957         is_synchronized, is_native>: Delete.
8958         <dummy>: Bump.
8959         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
8960         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
8961         (TYPE_FN_FIELD_ABSTRACT): Delete.
8962
8963 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
8964
8965         * buffer.h (buffer_finish): Fix spelling mistakes.
8966
8967 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
8968
8969         * .dir-locals.el: Automatically switch to C-style comments in
8970         versions of Emacs that support the feature.
8971
8972 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
8973             Pedro Alves  <palves@redhat.com>
8974
8975         PR cli/21688
8976         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
8977         (process_next_line): New variable 'inline_cmd'.
8978         Adjust 'if' clauses for "python", "compile" and "guile" to use
8979         'command_name_equals' and check for '!inline_cmd'.
8980
8981 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
8982
8983         PR cli/21688
8984         * cli/cli-script.c (command_name_equals_not_inline): New function.
8985         (process_next_line): Adjust 'if' clauses for "python", "compile"
8986         and "guile" to use command_name_equals_not_inline.
8987
8988 2017-06-29  Pedro Alves  <palves@redhat.com>
8989
8990         * completer.c (expression_completer): Call
8991         linespec_location_completer instead of location_completer.
8992
8993 2017-06-29  Pedro Alves  <palves@redhat.com>
8994
8995         * completer.c (expression_completer): Remove code that recomputes
8996         'text' from 'word'.
8997
8998 2017-06-29  Yao Qi  <yao.qi@linaro.org>
8999
9000         * regformats/regdat.sh: Generate code with
9001         "ifndef IN_PROCESS_AGENT".
9002
9003 2017-06-28  Pedro Alves  <palves@redhat.com>
9004
9005         * command.h: Include "common/scoped_restore.h".
9006
9007 2017-06-28  Yao Qi  <yao.qi@linaro.org>
9008
9009         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
9010         instead of obstack_grow.
9011
9012 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
9013
9014         PR gdb/21337
9015         * symfile.c (reread_symbols): Call objfiles_changed just before
9016         read_symbols.
9017
9018 2017-06-27  Pedro Alves  <palves@redhat.com>
9019
9020         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
9021         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
9022         (completion_list_add_symbol, completion_list_add_msymbol):
9023         ... these new functions.
9024         (add_symtab_completions)
9025         (default_make_symbol_completion_list_break_on_1): Adjust.
9026
9027 2017-06-27  Pedro Alves  <palves@redhat.com>
9028
9029         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
9030         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
9031         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
9032         dtor.
9033         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
9034         'storage_obstack' field an auto_obstack.  In-class initialize all
9035         non-bitfield fields.  Make minsyms_read bool.
9036         * symfile.c (read_symbols): Adjust.
9037
9038 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
9039
9040         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
9041         (gdbsim_store_register): Likewise.
9042
9043 2017-06-27  Pedro Alves  <palves@redhat.com>
9044
9045         * c-exp.y (name_obstack): Now an auto_obstack.
9046         (yylex): Use auto_obstack::clear.
9047         (c_parse): Use auto_obstack::clear instead of reinitializing and
9048         freeing the obstack.
9049         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
9050         * d-exp.y (name_obstack): Now an auto_obstack.
9051         (yylex): Use auto_obstack::clear.
9052         (d_parse): Use auto_obstack::clear instead of reinitializing and
9053         freeing the obstack.
9054         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
9055         auto_obstack.
9056         * dwarf2read.c (create_addrmap_from_index)
9057         (dwarf2_build_psymtabs_hard)
9058         (update_enumeration_type_from_children): Likewise.
9059         * gdb_obstack.h (auto_obstack): New type.
9060         * go-exp.y (name_obstack): Now an auto_obstack.
9061         (build_packaged_name): Use auto_obstack::clear.
9062         (go_parse): Use auto_obstack::clear instead of reinitializing and
9063         freeing the obstack.
9064         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
9065         auto_obstack.
9066         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
9067         * rust-exp.y (work_obstack): Now an auto_obstack.
9068         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
9069         reinitializing and freeing the obstack.
9070         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
9071         (host_char_to_target): Use auto_obstack.
9072         * utils.h (make_cleanup_obstack_free): Delete declaration.
9073         * valprint.c (generic_emit_char, generic_printstr): Use
9074         auto_obstack.
9075
9076 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
9077
9078         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
9079         thread.
9080         (darwin_init_thread_list): Don't update dummy thread.
9081         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
9082
9083 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
9084
9085         * record-full.c (netorder16): Remove.
9086
9087 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
9088
9089         * common/diagnostics.h: Define macros for GCC.
9090         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
9091         * common/vec.h: Include diagnostics.h.
9092         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
9093         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
9094         warning.
9095
9096 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
9097
9098         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
9099         New macro.
9100         * ada-lex.l: Ignore deprecated register warnings.
9101
9102 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
9103
9104         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
9105         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
9106
9107 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
9108
9109         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
9110         its own line.
9111
9112 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
9113
9114         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
9115
9116 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
9117
9118         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
9119         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
9120         (xtensa_register_read_masked): Likewise.
9121
9122 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
9123
9124         * common/environ.c (gdb_environ::unset): Update comment.
9125
9126 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
9127
9128         * python/py-unwind.c (pyuw_sniffer): Allocate space for
9129         registers.
9130
9131 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
9132
9133         * record-full.c (record_full_exec_insn): Use byte_vector.
9134
9135 2017-06-22  Yao Qi  <yao.qi@linaro.org>
9136
9137         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
9138         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
9139
9140 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
9141
9142         * remote.c (cached_reg): Move from here...
9143         * regcache.h (cached_reg): ...to here.
9144         * python/py-unwind.c (struct reg_info): Remove.
9145         (cached_frame_info): Use cached_reg_t.
9146         (pyuw_prev_register): Likewise.
9147         (pyuw_sniffer): Use cached_reg_t and allocate registers.
9148         (pyuw_dealloc_cache): Free all registers.
9149
9150 2017-06-22  Pedro Alves  <palves@redhat.com>
9151             Simon Marchi  <simon.marchi@ericsson.com>
9152
9153         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
9154         warning.
9155         * common/diagnostics.h: New file.
9156
9157 2017-06-22  Pedro Alves  <palves@redhat.com>
9158
9159         * common/agent.h: Add include guards.
9160
9161 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
9162
9163         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
9164         talk about addressable units instead of bytes.
9165
9166 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
9167
9168         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
9169         of '::const_iterator'.
9170
9171 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
9172
9173         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9174         'unittests/environ-selftests.c'.
9175         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
9176         * charset.c (find_charset_names): Declare object 'iconv_env'.
9177         Update code to use 'iconv_env' object.  Remove call to
9178         'free_environ'.
9179         * common/environ.c: Include <utility>.
9180         (make_environ): Delete function.
9181         (free_environ): Delete function.
9182         (gdb_environ::clear): New function.
9183         (gdb_environ::operator=): New function.
9184         (gdb_environ::get): Likewise.
9185         (environ_vector): Delete function.
9186         (set_in_environ): Delete function.
9187         (gdb_environ::set): New function.
9188         (unset_in_environ): Delete function.
9189         (gdb_environ::unset): New function.
9190         (gdb_environ::envp): Likewise.
9191         * common/environ.h: Include <vector>.
9192         (struct gdb_environ): Delete; transform into...
9193         (class gdb_environ): ... this class.
9194         (free_environ): Delete prototype.
9195         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
9196         environ_vector): Likewise.
9197         * infcmd.c (run_command_1): Update code to call
9198         'envp' from 'gdb_environ' class.
9199         (environment_info): Update code to call methods from 'gdb_environ'
9200         class.
9201         (unset_environment_command): Likewise.
9202         (path_info): Likewise.
9203         (path_command): Likewise.
9204         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
9205         (inferior::inferior): Initialize 'environment' using the host's
9206         information.
9207         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
9208         Include "environ.h".
9209         (class inferior) <environment>: Change type from 'struct
9210         gdb_environ' to 'gdb_environ'.
9211         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
9212         methods from 'gdb_environ' class.
9213         * solib.c (solib_find_1): Likewise
9214         * unittests/environ-selftests.c: New file.
9215
9216 2017-06-20  Yao Qi  <yao.qi@linaro.org>
9217
9218         * features/i386/i386-linux.xml: Exchange the order of including
9219         32bit-linux.xml and 32bit-sse.xml.
9220         * features/i386/i386-linux.c: Regenerated.
9221
9222 2017-06-20  Yao Qi  <yao.qi@linaro.org>
9223
9224         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
9225         Delete copy ctor and assignment operator.
9226         (tdesc_type): Likewise.
9227         (tdesc_feature): Likewise.
9228         (tdesc_free_reg): Remove.
9229         (tdesc_create_reg): Use new.
9230         (tdesc_free_type): Remove.
9231         (tdesc_create_vector): Use new.
9232         (tdesc_create_union): Likewise.
9233         (tdesc_create_flags): Likewise.
9234         (tdesc_create_enum): Likewise.
9235         (tdesc_free_feature): Delete.
9236         (free_target_description): Use delete.
9237
9238 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
9239
9240         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
9241         registers.
9242
9243 2017-06-19  Pedro Alves  <palves@redhat.com>
9244
9245         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
9246         after gdb::unlinker.
9247
9248 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
9249
9250         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
9251         gdb_environ to access an environment variable.
9252
9253 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
9254
9255         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
9256         gdb_byte*.
9257
9258 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9259
9260         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
9261
9262 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9263
9264         * configure: Re-generate.
9265         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
9266
9267 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9268
9269         * configure: Re-generate.
9270         * warning.m4: Pass -Werror to compiler when checking for
9271         supported warning flags.
9272
9273 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
9274
9275         * Makefile.in (COMPILE.pre): Add "-x c++".
9276
9277 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
9278             Pedro Alves  <palves@redhat.com>
9279             Yao Qi  <yao.qi@linaro.org>
9280
9281         * defs.h (RequireLongest): New.
9282         (extract_integer): Declare function template.
9283         (extract_signed_integer): Remove the declaration, but define it
9284         static inline.
9285         (extract_unsigned_integer): Likewise.
9286         (store_integer): Declare function template.
9287         (store_signed_integer): Remove the declaration, but define it
9288         static inline.
9289         (store_unsigned_integer): Likewise.
9290         * findvar.c (extract_integer): New function template.
9291         (extract_signed_integer): Remove.
9292         (extract_unsigned_integer): Remove.
9293         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
9294         instantiations.
9295         (store_integer): New function template.
9296         (store_signed_integer): Remove.
9297         (store_unsigned_integer): Remove.
9298         (store_integer): Explicit instantiations.
9299         * regcache.c (regcache_raw_read_signed): Update.
9300         (regcache::raw_read): New function.
9301         (regcache::raw_read_signed): Remove.
9302         (regcache::raw_read_unsigned): Remove.
9303         (regcache_raw_read_unsigned): Update.
9304         (regcache_raw_write_unsigned): Update.
9305         (regcache::raw_write_signed): Remove.
9306         (regcache::raw_write): New function.
9307         (regcache_cooked_read_signed): Update.
9308         (regcache::raw_write_unsigned): Remove.
9309         (regcache::cooked_read_signed): Remove.
9310         (regcache_cooked_read_unsigned): Update.
9311         (regcache::cooked_read_unsigned): Remove.
9312         (regcache_cooked_write_signed): Update.
9313         (regcache_cooked_write_unsigned): Update.
9314         * regcache.h (regcache) <raw_read_signed>: Remove.
9315         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
9316         <raw_read, raw_write>: New.
9317         <cooked_read_signed, cooked_write_signed>: Remove.
9318         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
9319         <cooked_read, cooked_write>: New.
9320         * sh64-tdep.c (sh64_pseudo_register_read): Update.
9321         (sh64_pseudo_register_write): Update.
9322
9323 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
9324
9325         * arc-tdep.c (arc_disassembler_options): New variable.
9326         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
9327         of default_print_insn.
9328         (arc_delayed_print_insn): Set info->section when needed,
9329         use default_print_insn to retrieve a disassembler.
9330
9331 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
9332
9333         PR gdb/21574
9334         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
9335         to mention $SHELL and startup-with-shell.
9336
9337 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
9338
9339         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
9340
9341 2017-06-14  Yao Qi  <yao.qi@linaro.org>
9342
9343         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
9344         default_print_insn instead of print_insn_aarch64.
9345         * arm-tdep.c (gdb_print_insn_arm): Call
9346         default_print_insn instead of print_insn_big_arm
9347         and print_insn_little_arm.
9348         * i386-tdep.c (i386_print_insn): Call default_print_insn
9349         instead of print_insn_i386.
9350         * ia64-tdep.c (ia64_print_insn): Call
9351         default_print_insn instead of print_insn_ia64.
9352         * mips-tdep.c (gdb_print_insn_mips): Call
9353         default_print_insn instead of print_insn_big_mips
9354         and print_insn_little_mips.
9355         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
9356         instead of print_insn_spu.
9357
9358 2017-06-14  Pedro Alves  <palves@redhat.com>
9359
9360         * ada-lang.c: Include "common/byte-vector.h".
9361         (ada_value_primitive_packed_val): Use gdb::byte_vector.
9362         * charset.c (wchar_iterator::iterate): Resize the vector instead
9363         of reserving it.
9364         * common/byte-vector.h: Include "common/def-vector.h".
9365         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
9366         * cli/cli-dump.c: Include "common/byte-vector.h".
9367         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
9368         * common/byte-vector.h: New file.
9369         * common/def-vector.h: New file.
9370         * common/default-init-alloc.h: New file.
9371         * dwarf2loc.c: Include "common/byte-vector.h".
9372         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
9373         instead of reserving it.
9374         * dwarf2read.c: Include "common/byte-vector.h".
9375         (data_buf::m_vec): Now a gdb::byte_vector.
9376         * gdb_regex.c: Include "common/def-vector.h".
9377         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
9378         * mi/mi-main.c: Include "common/byte-vector.h".
9379         (mi_cmd_data_read_memory): Use gdb::byte_vector.
9380         * printcmd.c: Include "common/byte-vector.h".
9381         (print_scalar_formatted): Use gdb::byte_vector.
9382         * valprint.c: Include "common/byte-vector.h".
9383         (maybe_negate_by_bytes, print_decimal_chars): Use
9384         gdb::byte_vector.
9385
9386 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
9387
9388         * darwin-nat.c: Include "nat/fork-inferior.h".
9389
9390 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
9391
9392         * configure.nat: Factor out Darwin bits that are not
9393         architecture-specific.  Add fork-inferior.o.
9394
9395 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
9396
9397         * configure.nat: Factor out AIX bits that are not
9398         architecture-specific.  Add fork-inferior.o.
9399
9400 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9401
9402         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
9403         (read_pieced_value, write_pieced_value): ...here.  Reduce to
9404         wrappers that just call rw_pieced_value.
9405
9406 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9407
9408         * dwarf2loc.c (write_pieced_value): When writing the data for a
9409         memory piece, use write_memory_with_notification instead of
9410         write_memory.
9411
9412 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9413
9414         * valops.c (read_value_memory): Change embedded_offset to
9415         represent a bit offset instead of a byte offset.
9416         * value.h (read_value_memory): Adjust comment.
9417
9418 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9419
9420         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
9421         dest_offset_bits and source_offset_bits.
9422         (write_pieced_value): Likewise.
9423
9424 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9425
9426         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
9427         given by DW_OP_bit_piece.
9428         (write_pieced_value): Likewise.
9429
9430 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9431
9432         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
9433         some other preparations to the places where sufficient information
9434         is available.
9435         (write_pieced_value): Likewise.
9436
9437 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9438
9439         * dwarf2loc.c (bits_to_bytes): New function.
9440         (read_pieced_value): Fix offset calculations for register pieces
9441         on big-endian targets.
9442         (write_pieced_value): Likewise.
9443
9444 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9445
9446         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
9447         (write_pieced_value): Likewise.
9448
9449 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9450
9451         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
9452         transfer the source value's least significant bits, instead of its
9453         lowest-addressed ones.  Rename type_len to max_offset.
9454         (read_pieced_value): Mirror above changes to write_pieced_value as
9455         applicable.
9456
9457 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9458
9459         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
9460         truncate full bytes from dest_offset_bits before using it as an
9461         offset into the buffer.
9462
9463 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9464
9465         * dwarf2loc.c (write_pieced_value): Include transfer size in
9466         byte-wise check.
9467
9468 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9469
9470         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
9471         calculation of this_size.
9472
9473 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9474
9475         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
9476         when targeting a bit-field.
9477         (write_pieced_value): Likewise.
9478
9479 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9480
9481         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
9482         (allocate_piece_closure): Drop addr_size parameter.
9483         (dwarf2_evaluate_loc_desc_full): Adjust call to
9484         allocate_piece_closure.
9485
9486 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9487
9488         PR gdb/21226
9489         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
9490         the LSB end, independent of endianness.
9491
9492 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
9493
9494         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
9495         size capping.
9496
9497 2017-06-13  Yao Qi  <yao.qi@linaro.org>
9498
9499         * mips-linux-nat.c: Move include features/mips*-linux.c to
9500         mips-linux-tdep.c.
9501         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
9502         to mips-linux-tdep.c.
9503         * mips-linux-tdep.c: Include features/mips*-linux.c
9504         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
9505         functions.
9506         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
9507         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
9508         (tdesc_mips64_dsp_linux): Declare.
9509
9510 2017-06-12  Tom Tromey  <tom@tromey.com>
9511
9512         * valprint.h (val_print_type_code_int): Remove.
9513         * valprint.c (generic_val_print_int): Always call
9514         val_print_scalar_formatted.
9515         (val_print_type_code_int): Remove.
9516         * printcmd.c (print_scalar_formatted): Handle options->format==0.
9517         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
9518         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
9519         * ada-valprint.c (ada_val_print_num): Use
9520         val_print_scalar_formatted.
9521
9522 2017-06-12  Tom Tromey  <tom@tromey.com>
9523
9524         * printcmd.c (print_scalar_formatted): Unify the two switches.
9525         Don't convert scalars to LONGEST.
9526
9527 2017-06-12  Tom Tromey  <tom@tromey.com>
9528
9529         PR exp/16225:
9530         * valprint.h (print_decimal_chars): Update.
9531         * valprint.c (maybe_negate_by_bytes): New function.
9532         (print_decimal_chars): Add "is_signed" argument.
9533         * printcmd.c (print_scalar_formatted): Update.
9534
9535 2017-06-12  Tom Tromey  <tom@tromey.com>
9536
9537         PR exp/16225:
9538         * valprint.h (print_binary_chars, print_hex_chars): Update.
9539         * valprint.c (val_print_type_code_int): Update.
9540         (print_binary_chars): Add "zero_pad" argument.
9541         (emit_octal_digit): New function.
9542         (print_octal_chars): Don't zero-pad.
9543         (print_decimal_chars): Likewise.
9544         (print_hex_chars): Add "zero_pad" argument.
9545         * sh64-tdep.c (sh64_do_fp_register): Update.
9546         * regcache.c (regcache::dump): Update.
9547         * printcmd.c (print_scalar_formatted): Update.
9548         * infcmd.c (default_print_one_register_info): Update.
9549
9550 2017-06-12  Pedro Alves  <palves@redhat.com>
9551             Alan Hayward  <alan.hayward@arm.com>
9552
9553         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
9554         (mips_eabi_push_dummy_call): Rename local 'regsize' to
9555         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
9556         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
9557         Assert that abi_regsize bytes fit in 'ref_valbuf'.
9558
9559 2017-06-12  Pedro Alves  <palves@redhat.com>
9560
9561         * dwarf2read.c (mapped_symtab::data): Now a vector of
9562         symtab_index_entry instead of vector of
9563         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
9564         whether an element's name is NULL instead of checking whether the
9565         element itself is NULL.
9566         (find_slot): Change return type.  Adjust.
9567         (hash_expand, , add_index_entry, uniquify_cu_indices)
9568         (write_hash_table): Adjust.
9569
9570 2017-06-12  Pedro Alves  <palves@redhat.com>
9571
9572         * dwarf2read.c (recursively_count_psymbols): New function.
9573         (write_psymtabs_to_index): Call it to compute number of psyms and
9574         pass estimate size of psyms_seen to unordered_set's ctor.
9575
9576 2017-06-12  Pedro Alves  <palves@redhat.com>
9577
9578         * dwarf2read.c (write_hash_table): Check if key already exists
9579         before emplacing.
9580
9581 2017-06-12  Pedro Alves  <palves@redhat.com>
9582
9583         * dwarf2read.c (data_buf::append_space): Rename to...
9584         (data_buf::grow): ... this, and make private.  Adjust all callers.
9585         (data_buf::append_uint): New method.
9586         (add_address_entry, write_one_signatured_type)
9587         (write_psymtabs_to_index): Use it.
9588
9589 2017-06-12  Pedro Alves  <palves@redhat.com>
9590
9591         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
9592         (file_write (FILE *, const std::vector<Elem>&)): Delete.
9593         (data_buf::file_write): Call ::fwrite directly.
9594
9595 2017-06-12  Pedro Alves  <palves@redhat.com>
9596
9597         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
9598         std::vector::erase.
9599
9600 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
9601
9602         Code cleanup: C++ify .gdb_index producer.
9603         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
9604         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
9605         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
9606         (create_strtab, add_string): Remove.
9607         (file_write, data_buf): New.
9608         (struct symtab_index_entry): Use std::vector for cu_indices.
9609         (struct mapped_symtab): Use std::vector for data.
9610         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
9611         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
9612         Remove.
9613         (find_slot): Change return type.  Update it to the new data structures.
9614         (hash_expand, add_index_entry): Update it to the new data structures.
9615         (offset_type_compare): Remove.
9616         (uniquify_cu_indices): Update it to the new data structures.
9617         (c_str_view, c_str_view_hasher, vector_hasher): New.
9618         (add_indices_to_cpool): Remove.
9619         (write_hash_table): Update it to the new data structures.
9620         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
9621         (eq_psymtab_cu_index): Remove.
9622         (psym_index_map): New typedef.
9623         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
9624         reference and std::unordered_map for cu_index_htab.
9625         (add_address_entry, add_address_entry_worker, write_address_map)
9626         (write_psymbols): Update it to the new data structures.
9627         (write_obstack): Remove.
9628         (struct signatured_type_index_data): Change types_list to a data_buf
9629         reference and psyms_seen to a std::unordered_set reference.
9630         (write_one_signatured_type, recursively_write_psymbols)
9631         (write_psymtabs_to_index): Update it to the new data structures.
9632
9633 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
9634
9635         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
9636         separate-debug-file commands.
9637         * symfile.h (separate_debug_file_debug): New global.
9638         * symfile.c (separate_debug_file_debug): New global.
9639         (separate_debug_file_exists, find_separate_debug_file): Add
9640         debug output.
9641         (_initialize_symfile): Add "set debug separate-debug-file"
9642         command.
9643         * build-id.c (build_id_to_debug_bfd,
9644         find_separate_debug_file_by_buildid): Add debug output.
9645
9646 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
9647
9648         * gdbarch.sh (displaced_step_free_closure): Remove.
9649         * gdbarch.h, gdbarch.c: Re-generate.
9650         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
9651         displaced_step_free_closure.
9652         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
9653         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
9654         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
9655         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
9656         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
9657         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
9658         * arch-utils.h (simple_displaced_step_free_closure): Remove.
9659         * arch-utils.c (simple_displaced_step_free_closure): Remove.
9660         * infrun.c (displaced_step_clear): Call xfree instead of
9661         gdbarch_displaced_step_free_closure.
9662
9663 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
9664
9665         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
9666         NULL".
9667
9668 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
9669
9670         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
9671         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
9672         (mn10300_push_dummy_call): Likewise.
9673
9674 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
9675
9676         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
9677
9678 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
9679
9680         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
9681
9682 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9683
9684         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
9685         able to start inferiors using a shell.
9686         (New remote packets): Announce new packet "QStartupWithShell".
9687         * remote.c: Add PACKET_QStartupWithShell.
9688         (extended_remote_create_inferior): Handle new
9689         PACKET_QStartupWithShell.
9690         (remote_protocol_features) <QStartupWithShell>: New entry for
9691         PACKET_QStartupWithShell.
9692         (_initialize_remote): Call "add_packet_config_cmd" for
9693         QStartupShell.
9694
9695 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9696             Pedro Alves  <palves@redhat.com>
9697
9698         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
9699         and "nat/fork-inferior.h".
9700         * common/common-inferior.h: New file, with contents from
9701         "gdb/inferior.h".
9702         * commom/common-utils.c: Include "common-utils.h".
9703         (stringify_argv): New function.
9704         * common/common-utils.h (stringify_argv): New prototype.
9705         * configure.nat: Add "fork-inferior.o" as a dependency for
9706         "*linux*", "fbsd*" and "nbsd*" hosts.
9707         * corefile.c (get_exec_file): Update comment.
9708         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
9709         instead of "startup_inferior".
9710         (darwin_create_inferior): Call "add_thread_silent" after
9711         "fork_inferior".
9712         * fork-child.c: Cleanup unnecessary includes.
9713         (SHELL_FILE): Move to "common/common-fork-child.c".
9714         (environ): Likewise.
9715         (exec_wrapper): Initialize.
9716         (get_exec_wrapper): New function.
9717         (breakup_args): Move to "common/common-fork-child.c"; rename to
9718         "breakup_args_for_exec".
9719         (escape_bang_in_quoted_argument): Move to
9720         "common/common-fork-child.c".
9721         (saved_ui): New variable.
9722         (prefork_hook): New function.
9723         (postfork_hook): Likewise.
9724         (postfork_child_hook): Likewise.
9725         (gdb_startup_inferior): Likewise.
9726         (fork_inferior): Move to "common/common-fork-child.c".  Update
9727         function to support gdbserver.
9728         (startup_inferior): Likewise.
9729         * gdbcore.h (get_exec_file): Remove declaration.
9730         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
9731         instead of "startup_inferior".  Call "add_thread_silent" after
9732         "fork_inferior".
9733         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
9734         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
9735         instead of "startup_inferior".  Call "add_thread_silent" after
9736         "fork_inferior".
9737         * inferior.h: Include "common-inferior.h".
9738         (trace_start_error): Move to "common/common-utils.h".
9739         (trace_start_error_with_name): Likewise.
9740         (fork_inferior): Move prototype to "nat/fork-inferior.h".
9741         (startup_inferior): Likewise.
9742         (gdb_startup_inferior): New prototype.
9743         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
9744         * nat/fork-inferior.h: New file.
9745         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
9746         instead of "startup_inferior".  Call "add_thread_silent" after
9747         "fork_inferior".
9748         * target.h (target_terminal_init): Move prototype to
9749         "target/target.h".
9750         (target_terminal_inferior): Likewise.
9751         (target_terminal_ours): Likewise.
9752         * target/target.h (target_terminal_init): New prototype, moved
9753         from "target.h".
9754         (target_terminal_inferior): Likewise.
9755         (target_terminal_ours): Likewise.
9756         * utils.c (gdb_flush_out_err): New function.
9757
9758 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9759
9760         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
9761         * common/common-gdbthread.h: New file, with parts from
9762         "gdb/gdbthread.h".
9763         * gdbthread.h: Include "common-gdbthread.h".
9764         (switch_to_thread): Moved to "common/common-gdbthread.h".
9765
9766 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
9767
9768         * Makefile.in (SFILES): Add "common/job-control.c".
9769         (HFILES_NO_SRCDIR): Add "common/job-control.h".
9770         (COMMON_OBS): Add "job-control.o".
9771         * common/job-control.c: New file, with contents from
9772         "gdb/inflow.c".
9773         * common/job-control.h: New file, with contents from "terminal.h".
9774         * fork-child.c: Include "job-control.h".
9775         * inflow.c: Include "job-control.h".
9776         (gdb_setpgid): Move to "common/common-inflow.c".
9777         (_initialize_inflow): Move setting of "job_control" to
9778         "handle_job_control".
9779         * terminal.h (job_control): Moved to "common/common-terminal.h".
9780         (gdb_setpgid): Likewise.
9781         * top.c: Include "job_control.h".
9782         * utils.c: Likewise.
9783         (job_control): Moved to "job-control.c".
9784
9785 2017-06-07  Pedro Alves  <palves@redhat.com>
9786
9787         * Makefile.in (SFILES): Add gdb_regex.c.
9788         (COMMON_OBS): Add gdb_regex.o.
9789         * ada-lang.c (ada_add_standard_exceptions)
9790         (ada_add_exceptions_from_frame, name_matches_regex)
9791         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
9792         parameter type to compiled_regex.  Adjust.
9793         (ada_exceptions_list): Use compiled_regex.
9794         * break-catch-throw.c (exception_catchpoint::pattern): Now a
9795         std::unique_ptr<compiled_regex>.
9796         (exception_catchpoint::~exception_catchpoint): Remove regfree
9797         call.
9798         (check_status_exception_catchpoint): Adjust to use compiled_regex.
9799         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
9800         * breakpoint.c (solib_catchpoint::compiled): Now a
9801         std::unique_ptr<compiled_regex>.
9802         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
9803         (check_status_catch_solib): Adjust to use compiled_regex.
9804         (add_solib_catchpoint): Adjust to use compiled_regex.
9805         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
9806         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
9807         compiled_regex reference.  Adjust to use it.
9808         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
9809         declaration.  Include "gdb_regex.h".
9810         (apropos_cmd): Change regex parameter to compiled_regex reference.
9811         * gdb_regex.c: New file.
9812         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
9813         declarations.
9814         (class compiled_regex): New.
9815         * linux-tdep.c: Include "common/gdb_optional.h".
9816         (struct mapping_regexes): New, factored out from
9817         mapping_is_anonymous_p, and adjusted to use compiled_regex.
9818         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
9819         gdb::optional and remove cleanups.  Adjust to compiled_regex.
9820         * probe.c: Include "common/gdb_optional.h".
9821         (collect_probes): Use compiled_regex and gdb::optional and remove
9822         cleanups.
9823         * skip.c: Include "common/gdb_optional.h".
9824         (skiplist_entry::compiled_function_regexp): Now a
9825         gdb::optional<compiled_regex>.
9826         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
9827         (free_skiplist_entry): Remove regfree call.
9828         (compile_skip_regexp, skip_rfunction_p): Adjust to use
9829         compiled_regex and gdb::optional.
9830         * symtab.c: Include "common/gdb_optional.h".
9831         (search_symbols): Use compiled_regex and gdb::optional.
9832         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
9833         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
9834         to gdb_regex.c.
9835
9836 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
9837
9838         * regcache.c (regcache::save): Avoid buffer use.
9839         (regcache::dump): Likewise.
9840
9841 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
9842
9843         * sh-tdep.c (sh_pseudo_register_read): Remove
9844         MAX_REGISTER_SIZE.
9845         (sh_pseudo_register_write): Likewise.
9846         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
9847         (sh64_pseudo_register_write): Likewise
9848
9849 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
9850
9851         * aarch64-tdep.c (aarch64_store_return_value): Use
9852         V_REGISTER_SIZE.
9853         (aarch64_pseudo_read_value): Likewise.
9854         (aarch64_pseudo_write): Likewise.
9855
9856 2017-06-06  Yao Qi  <yao.qi@linaro.org>
9857
9858         * regformats/regdef.h (set_register_cache): Remove the
9859         declaration.
9860
9861 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
9862
9863         * frame.c (frame_unwind_register_signed): Use
9864         frame_unwind_register_value.
9865
9866 2017-06-06  Pedro Alves  <palves@redhat.com>
9867
9868         PR breakpoints/21553
9869         * breakpoint.c (create_breakpoints_sal_default)
9870         (init_breakpoint_sal, create_breakpoint_sal): Use
9871         gdb::unique_xmalloc_ptr for string parameters.
9872         (create_breakpoint): Constify 'extra_string' and 'cond_string'
9873         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
9874         (base_breakpoint_create_breakpoints_sal)
9875         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
9876         (strace_marker_create_breakpoints_sal)
9877         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
9878         string parameters.
9879         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
9880         gdb::unique_xmalloc_ptr for string parameters.
9881         (create_breakpoint): Constify 'extra_string' and 'cond_string'
9882         parameters.
9883
9884 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
9885
9886         * alpha-tdep.c (alpha_register_to_value): Use
9887         get_frame_register_value.
9888         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
9889
9890 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
9891
9892         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
9893         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
9894         (ia64_value_to_register): Likewise.
9895         (ia64_extract_return_value): Likewise.
9896         (ia64_store_return_value): Likewise.
9897         (ia64_push_dummy_call): Likewise.
9898
9899 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
9900
9901         GDB 8.0 released.
9902
9903 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
9904
9905         * x86-linux-nat.c (struct arch_lwp_info): Remove.
9906
9907 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
9908
9909         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
9910         parameter.
9911         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
9912
9913 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
9914
9915         * event-loop.c (poll_timers): Unallocate timer using delete
9916         instead of xfree.
9917
9918 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
9919
9920         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
9921         (struct breakpoint) <~breakpoint>: New.
9922         (struct watchpoint): Inherit from breakpoint.
9923         <~watchpoint>: New.
9924         <base>: Remove.
9925         (struct tracepoint): Inherit from breakpoint.
9926         <base>: Remove.
9927         * breakpoint.c (longjmp_breakpoint_ops): Remove.
9928         (struct longjmp_breakpoint): Inherit from breakpoint.
9929         <~longjmp_breakpoint>: New.
9930         <base>: Remove.
9931         (new_breakpoint_from_type): Remove casts.
9932         (watchpoint_in_thread_scope): Remove reference to base field.
9933         (watchpoint_del_at_next_stop): Likewise.
9934         (update_watchpoint): Likewise.
9935         (watchpoint_check): Likewise.
9936         (bpstat_check_watchpoint): Likewise.
9937         (set_longjmp_breakpoint): Likewise.
9938         (struct fork_catchpoint): Inherit from breakpoint.
9939         <base>: Remove.
9940         (struct solib_catchpoint): Inherit from breakpoint.
9941         <~solib_catchpoint>: New.
9942         <base>: Remove.
9943         (dtor_catch_solib): Change to ...
9944         (solib_catchpoint::~solib_catchpoint): ... this.
9945         (breakpoint_hit_catch_solib): Remove reference to base field.
9946         (add_solib_catchpoint): Likewise.
9947         (create_fork_vfork_event_catchpoint): Likewise.
9948         (struct exec_catchpoint): Inherit from breakpoint.
9949         <~exec_catchpoint>: New.
9950         <base>: Remove.
9951         (dtor_catch_exec): Change to ...
9952         (exec_catchpoint::~exec_catchpoint): ... this.
9953         (dtor_watchpoint): Change to ...
9954         (watchpoint::~watchpoint): ... this.
9955         (watch_command_1): Remove reference to base field.
9956         (catch_exec_command_1): Likewise.
9957         (base_breakpoint_dtor): Change to ...
9958         (breakpoint::~breakpoint): ... this.
9959         (base_breakpoint_ops): Remove dtor field value.
9960         (longjmp_bkpt_dtor): Change to ...
9961         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
9962         (strace_marker_create_breakpoints_sal): Remove reference to base
9963         field.
9964         (delete_breakpoint): Don't manually call breakpoint destructor.
9965         (create_tracepoint_from_upload): Remove reference to base field.
9966         (trace_pass_set_count): Likewise.
9967         (initialize_breakpoint_ops): Don't initialize
9968         momentary_breakpoint_ops, don't set dtors.
9969         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
9970         <~ada_catchpoint>: New.
9971         <base>: Remove.
9972         (create_excep_cond_exprs): Remove reference to base field.
9973         (dtor_exception): Change to ...
9974         (ada_catchpoint::~ada_catchpoint): ... this.
9975         (dtor_catch_exception): Remove.
9976         (dtor_catch_exception_unhandled): Remove.
9977         (dtor_catch_assert): Remove.
9978         (create_ada_exception_catchpoint): Remove reference to base
9979         field.
9980         (initialize_ada_catchpoint_ops): Don't set dtors.
9981         * break-catch-sig.c (struct signal_catchpoint): Inherit from
9982         breakpoint.
9983         <~signal_catchpoint>: New.
9984         <base>: Remove.
9985         (signal_catchpoint_dtor): Change to ...
9986         (signal_catchpoint::~signal_catchpoint): ... this.
9987         (create_signal_catchpoint): Remove reference to base field.
9988         (initialize_signal_catchpoint_ops): Don't set dtor.
9989         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
9990         from breakpoint.
9991         <~syscall_catchpoint>: New.
9992         <base>: Remove.
9993         (dtor_catch_syscall): Change to ...
9994         (syscall_catchpoint::~syscall_catchpoint): ... this.
9995         (create_syscall_event_catchpoint): Remove reference to base
9996         field.
9997         (initialize_syscall_catchpoint_ops): Don't set dtor.
9998         * break-catch-throw.c (struct exception_catchpoint): Inherit
9999         from breakpoint.
10000         <~exception_catchpoint>: New.
10001         <base>: Remove.
10002         (dtor_exception_catchpoint): Change to ...
10003         (exception_catchpoint::~exception_catchpoint): ... this.
10004         (handle_gnu_v3_exceptions): Remove reference to base field.
10005         (initialize_throw_catchpoint_ops): Don't set dtor.
10006         * ctf.c (ctf_get_traceframe_address): Remove reference to base
10007         field.
10008         * remote.c (remote_get_tracepoint_status): Likewise.
10009         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
10010         * tracefile.c (tracefile_fetch_registers): Likewise.
10011         * tracepoint.c (actions_command): Likewise.
10012         (validate_actionline): Likewise.
10013         (tfind_1): Likewise.
10014         (get_traceframe_location): Likewise.
10015         (find_matching_tracepoint_location): Likewise.
10016         (parse_tracepoint_status): Likewise.
10017         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
10018
10019 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
10020
10021         * breakpoint.c (struct longjmp_breakpoint): New struct.
10022         (is_tracepoint_type): Change return type to bool.
10023         (is_longjmp_type): New function.
10024         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
10025         (set_raw_breakpoint_without_location): Use
10026         new_breakpoint_from_type.
10027         (set_raw_breakpoint): Likewise.
10028
10029 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
10030
10031         * breakpoint.c (new_breakpoint_from_type): New function.
10032         (create_breakpoint_sal): Use new_breakpoint_from_type and
10033         unique_ptr.
10034         (create_breakpoint): Likewise.
10035
10036 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
10037
10038         * memattr.c (mem_info_command): Rename to ...
10039         (info_mem_command): ... this.
10040         (mem_enable_command): Rename to ...
10041         (enable_mem_command): ... this.
10042         (mem_disable_command): Rename to ...
10043         (disable_mem_command): ... this.
10044         (mem_delete_command): Rename to ...
10045         (delete_mem_command): ... this.
10046         (_initialize_mem): Adjust function names.
10047
10048 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
10049
10050         * btrace.c (handle_pt_insn_events): New.
10051         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
10052         STATUS.  Split into this and ...
10053         (handle_pt_insn_event_flags): ... this.
10054
10055 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
10056
10057         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
10058         and struct pt_insn.resynced.
10059         * configure: Regenerated.
10060         * config.in: Regenerated.
10061
10062 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10063
10064         * btrace.c (ftrace_find_call_by_number): New function.
10065         (ftrace_new_function): Store objects, not pointers.
10066         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
10067         ftrace_new_gap, ftrace_update_function,
10068         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
10069         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
10070         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
10071         btrace_ends_with_single_insn, btrace_call_get): Account for
10072         btrace_thread_info::functions now storing objects.
10073         * btrace.h (struct btrace_thread_info): Add constructor.
10074         (struct btrace_thread_info) <functions>: Make std::vector.
10075         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
10076         Initialize with default values.
10077         * record-btrace.c (record_btrace_frame_sniffer): Account for
10078         btrace_thread_info::functions now storing objects.
10079
10080 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10081
10082         * btrace.c: Remove typedef bfun_s.
10083         (ftrace_new_gap): Directly add gaps to the list of gaps.
10084         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
10085         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
10086         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
10087         instead of gdb VEC.
10088
10089 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10090
10091         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
10092         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
10093         with btrace_thread_info::next_segment and
10094         btrace_thread_info::prev_segment.
10095         * btrace.h: Remove struct btrace_func_link.
10096         (struct btrace_function): Replace pair of function segment pointers
10097         with pair of indices.
10098         * python/py-record-btrace.c (btpy_call_prev_sibling,
10099         btpy_call_next_sibling): Replace references to
10100         btrace_thread_info::segment with btrace_thread_info::next_segment and
10101         btrace_thread_info::prev_segment.
10102         * record-btrace.c (record_btrace_frame_this_id): Use
10103         btrace_find_call_by_number.
10104
10105 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10106
10107         * btrace.c (ftrace_new_function, ftrace_fixup_level,
10108         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
10109         btrace_insn_next, btrace_insn_prev): Remove references to
10110         btrace_thread_info::flow.
10111         * btrace.h (struct btrace_function): Remove FLOW.
10112
10113 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10114
10115         * btrace.c (ftrace_find_call_by_number): New function.
10116         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
10117         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
10118         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
10119         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
10120         index.
10121         * btrace.h (struct btrace_function): Turn UP into an index.
10122         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
10123         as an index.
10124         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
10125         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
10126         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
10127
10128 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10129
10130         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
10131         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
10132         ftrace_update_function, ftrace_compute_global_level_offset,
10133         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
10134         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
10135         btrace_insn_end, btrace_is_empty): Remove references to
10136         btrace_thread_info::begin and btrace_thread_info::end.
10137         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
10138         (struct btrace_thread_info) <functions>: Adjust comment.
10139         * record-btrace.c (record_btrace_start_replaying): Remove reference to
10140         btrace_thread_info::begin.
10141
10142 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10143
10144         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
10145         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
10146         ftrace_update_function): Remove arguments that implicitly were always
10147         BTINFO->END.
10148         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
10149         Don't pass BTINFO->END.
10150
10151 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10152
10153         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
10154         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
10155         btrace_find_insn_by_number): Replace function segment pointer with
10156         index.
10157         (btrace_insn_cmp): Simplify.
10158         * btrace.h: (struct btrace_insn_iterator) Rename index to
10159         insn_index.  Replace function segment pointer with index into function
10160         segment vector.
10161         * record-btrace.c (record_btrace_call_history): Replace function
10162         segment pointer use with index.
10163         (record_btrace_frame_sniffer): Retrieve function call segment through
10164         vector.
10165         (record_btrace_set_replay): Remove defunc't safety check.
10166
10167 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10168
10169         * btrace.c (btrace_ends_with_single_insn): New function.
10170         (btrace_call_get, btrace_call_number, btrace_call_begin,
10171         btrace_call_end, btrace_call_next, btrace_call_prev,
10172         btrace_find_call_by_number): Use index into call segment vector
10173         instead of pointer.
10174         (btrace_call_cmp): Simplify.
10175         * btrace.h (struct btrace_call_iterator): Replace function call segment
10176         pointer with index into vector.
10177         * record-btrace.c (record_btrace_call_history): Use index instead of
10178         pointer.
10179
10180 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10181
10182         * btrace.c (btrace_insn_begin, btrace_insn_end,
10183         btrace_find_insn_by_number): Add btinfo to iterator.
10184         * btrace.h (struct btrace_insn_iterator): Add btinfo.
10185
10186 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10187
10188         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
10189         and save pointers directly.
10190         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
10191         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
10192         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
10193         changed signature of functions.
10194         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
10195         (btrace_fetch): Remove code that adds btrace_function pointers to
10196         vector of btrace_functions.
10197         (btrace_clear): Simplify freeing vector of btrace_functions.
10198
10199 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
10200
10201         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
10202         Replace VEC_* with std::vector functions.
10203         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
10204         (struct btrace_thread_info)<functions>: Change type to std::vector.
10205
10206 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
10207
10208         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
10209         "Removed targets and native configurations" up.  Merge duplicate
10210         "New commands" sub-sections.  Add "New options" sub-sections.
10211
10212 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
10213
10214         * defs.h (copy_integer_to_size): New declaration.
10215         * findvar.c (copy_integer_to_size): New function.
10216         (do_cint_test): New selftest function.
10217         (copy_integer_to_size_test): Likewise.
10218         (_initialize_findvar): Likewise.
10219         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
10220         (mips_fbsd_collect_reg): Use raw_collect_integer.
10221         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
10222         (mips64_fill_gregset): Use raw_collect_integer
10223         (mips64_fill_fpregset): Use raw_supply_integer.
10224         * regcache.c (regcache::raw_supply_integer): New function.
10225         (regcache::raw_collect_integer): Likewise.
10226         * regcache.h: (regcache::raw_supply_integer): New declaration.
10227         (regcache::raw_collect_integer): Likewise.
10228
10229 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10230
10231         * Makefile.in (SFILES): Add gdbarch-selftests.c.
10232         (COMMON_OBS): Add gdbarch-selftests.o.
10233         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
10234         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
10235         * gdbarch-selftests.c: New file.
10236         * regcache.h (regcache) <~regcache>: Mark it virtual if
10237         GDB_SELF_TEST.
10238         <raw_write>: Likewise.
10239
10240 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10241
10242         * regcache.c (current_regcache): Change it to
10243         regcache::current_regcache.
10244         (regcache_observer_target_changed): Update.
10245         (regcache_thread_ptid_changed): Make it a regcache static
10246         method.
10247         (regcache_thread_ptid_changed): Update.
10248         (class regcache_access): New.
10249         (current_regcache_test): Update.
10250         (_initialize_regcache): Update.
10251         * regcache.h: Include forward_list.
10252         (regcache): Declare regcache_thread_ptid_changed and declare
10253         registers_changed_ptid as friend.
10254
10255 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10256
10257         * i387-tdep.c (i387_register_to_value): Use register_size
10258         instead of TYPE_LENGTH.
10259         * m68k-tdep.c (m68k_register_to_value): Likewise.
10260
10261 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10262
10263         * i387-tdep.c (i387_convert_register_p): Return false if type
10264         code isn't TYPE_CODE_FLT.
10265
10266 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10267
10268         * alpha-tdep.c (alpha_convert_register_p): Return true if type
10269         length is 4.
10270         (alpha_register_to_value): Remove type length check.
10271         (alpha_value_to_register): Likewise.
10272
10273 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10274
10275         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
10276         TYPE_CODE_FLT.
10277
10278 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10279
10280         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
10281         TYPE_CODE_FLT or not.
10282
10283 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10284
10285         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
10286         * avr-tdep.c (avr_gdbarch_init): Likewise.
10287         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10288         * cris-tdep.c (cris_gdbarch_init): Likewise.
10289         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10290         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10291         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10292         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
10293         * mep-tdep.c (mep_gdbarch_init): Likewise.
10294         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10295         * mips-tdep.c (mips_gdbarch_init): Likewise.
10296         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10297         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10298         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10299         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10300         * v850-tdep.c (v850_gdbarch_init): Likewise.
10301
10302 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10303
10304         * selftest-arch.c (tests_with_arch): Call registers_changed
10305         and reinit_frame_cache.
10306         * selftest.c (run_self_tests): Likewise.
10307
10308 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10309
10310         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
10311         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
10312
10313 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10314
10315         * rl78-tdep.c (rl78_gdbarch_init): Don't call
10316         set_gdbarch_print_insn.
10317
10318 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10319
10320         * h8300-tdep.c (h8300_gdbarch_init): Don't call
10321         set_gdbarch_print_insn.
10322
10323 2017-05-24  Yao Qi  <yao.qi@linaro.org>
10324
10325         * alpha-tdep.c (alpha_gdbarch_init): Don't call
10326         set_gdbarch_print_insn.
10327         * arc-tdep.c (arc_gdbarch_init): Likewise.
10328         * arch-utils.c: include dis-asm.h.
10329         (default_print_insn): New function.
10330         * arch-utils.h (default_print_insn): Declare.
10331         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
10332         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
10333         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
10334         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
10335         * frv-tdep.c (frv_gdbarch_init): Likewise.
10336         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
10337         * gdbarch.sh (print_insn): Use default_print_insn.
10338         * gdbarch.c: Regenerated.
10339         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
10340         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
10341         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
10342         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
10343         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
10344         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
10345         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
10346         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
10347         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
10348         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
10349         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
10350         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
10351         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
10352         * mt-tdep.c (mt_gdbarch_init): Likewise.
10353         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
10354         * nios2-tdep.c (nios2_print_insn): Remove.
10355         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
10356         * rx-tdep.c (rx_gdbarch_init): Likewise.
10357         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
10358         * score-tdep.c (score_print_insn): Remove.
10359         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
10360         * sh-tdep.c (sh_gdbarch_init): Likewise.
10361         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
10362         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
10363         * tic6x-tdep.c (tic6x_print_insn): Remove.
10364         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
10365         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
10366         * v850-tdep.c (v850_gdbarch_init): Likewise.
10367         * vax-tdep.c (vax_gdbarch_init): Likewise.
10368         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
10369         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
10370
10371 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
10372
10373         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
10374         (MIPS_FP0_REGNUM): Remove.
10375         (MIPS_FSR_REGNUM): Remove.
10376         (mips_fbsd_supply_fpregs): Use mips_regnum.
10377         (mips_fbsd_supply_gregs): Likewise.
10378         (mips_fbsd_collect_fpregs): Likewise.
10379         (mips_fbsd_collect_gregs): Likewise.
10380
10381 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
10382
10383         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
10384         (getpfpregs_supplies): New function.
10385         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
10386         getfpregs_supplies.
10387         (mips_fbsd_store_inferior_registers): Likewise.
10388
10389 2017-05-22  Pedro Alves <palves@redhat.com>
10390
10391         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
10392         maintainer.
10393
10394 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
10395
10396         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
10397         (store_register): Likewise.
10398         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
10399         (get_decimal_float_return_value): Likewise.
10400         (do_ppc_sysv_return_value): Likewise.
10401         (ppc64_sysv_abi_push_integer): Likewise.
10402         (ppc64_sysv_abi_push_freg): Likewise.
10403         (ppc64_sysv_abi_return_value_base): Likewise.
10404         (ppc64_sysv_abi_return_value): Likewise.
10405         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
10406         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
10407         * rs6000-nat.c: Likewise.
10408         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
10409         (rs6000_value_to_register): Likewise.
10410         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
10411
10412 2017-05-21  Tom Tromey  <tom@tromey.com>
10413
10414         PR rust/21466:
10415         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
10416         arrays as "[T]", not "[T; ]".
10417
10418 2017-05-19  Tom Tromey  <tom@tromey.com>
10419
10420         PR rust/21484:
10421         * rust-lang.c (exp_descriptor_rust): New function.
10422         (rust_language_defn): Use it.
10423         * p-lang.c (pascal_language_defn): Update.
10424         * opencl-lang.c (opencl_language_defn): Update.
10425         * objc-lang.c (objc_language_defn): Update.
10426         * m2-lang.c (m2_language_defn): Update.
10427         * language.h (struct language_defn)
10428         <la_watch_location_expression>: New member.
10429         * language.c (unknown_language_defn, auto_language_defn)
10430         (local_language_defn): Update.
10431         * go-lang.c (go_language_defn): Update.
10432         * f-lang.c (f_language_defn): Update.
10433         * d-lang.c (d_language_defn): Update.
10434         * c-lang.h (c_watch_location_expression): Declare.
10435         * c-lang.c (c_watch_location_expression): New function.
10436         (c_language_defn, cplus_language_defn, asm_language_defn)
10437         (minimal_language_defn): Use it.
10438         * breakpoint.c (watch_command_1): Call
10439         la_watch_location_expression.
10440         * ada-lang.c (ada_language_defn): Update.
10441
10442 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10443
10444         PR tui/21482
10445         * gdb_curses.h (NOMACROS): Define.
10446         (NCURSES_NOMACROS): Define.
10447
10448 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10449
10450         PR tui/21482
10451         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
10452         arg to char *.
10453         * tui/tui-wingeneral.c (box_win): Likewise.
10454         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
10455         (tui_show_source_line): Likewise.
10456         (tui_show_exec_info_content): Likewise.
10457
10458 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
10459
10460         * sparc-tdep.c (sparc_structure_return_p)
10461         (sparc_arg_on_registers_p): New functions.
10462         (sparc32_store_arguments): Use them.
10463         * sparc64-tdep.c (sparc64_16_byte_align_p)
10464         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
10465         Handle TYPE_CODE_ARRAY.
10466
10467 2017-05-17  Yao Qi  <yao.qi@linaro.org>
10468
10469         * cli/cli-decode.c (add_alias_cmd): New function.
10470         * command.h (add_alias_cmd): Declare.
10471         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
10472         instead call add_alias_cmd.
10473
10474 2017-05-17  Pedro Alves  <palves@redhat.com>
10475
10476         * Makefile.in (nat_extra_makefile_frag): Rename to ...
10477         (nat_makefile_frag): ... this.  All references updated.
10478         * configure.ac: Likewise.
10479         * configure.nat: Likewise.  Enhance comments.
10480         * configure: Regenerate.
10481
10482 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
10483
10484         * procfs.c (procfs_create_inferior): Change prototype to match
10485         definition.
10486
10487 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
10488
10489         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
10490         C++ compiler warning.
10491
10492 2017-05-12  Tom Tromey  <tom@tromey.com>
10493
10494         PR rust/21483:
10495         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
10496         recurse, just call value_struct_elt directly.
10497
10498 2017-05-12  Tom Tromey  <tom@tromey.com>
10499
10500         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
10501         OP_RUST_ARRAY>: Fix.
10502
10503 2017-05-12  Tom Tromey  <tom@tromey.com>
10504
10505         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
10506
10507 2017-05-09  Yao Qi  <yao.qi@linaro.org>
10508
10509         * regcache.c: Include <forward_list>.
10510         (struct regcache_list): Remove.
10511         (current_regcache): Update.
10512         (get_thread_arch_aspace_regcache): Update for std::forward_list.
10513         (regcache_thread_ptid_changed): Likewise.
10514         (registers_changed_ptid): Likewise.
10515         (current_regcache_size): Likewise.
10516
10517 2017-05-09  Yao Qi  <yao.qi@linaro.org>
10518
10519         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
10520         (current_regcache_size): New function.
10521         (current_regcache_test): New function.
10522         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
10523
10524 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
10525
10526         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
10527         (print_gp_register_row): Use get_frame_register_value.
10528
10529 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
10530
10531         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
10532         (mips_supply_fpregset): Likewise.
10533         (mips64_supply_gregset): Likewise.
10534
10535 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
10536
10537         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
10538         regcache->raw_supply_zeroed.
10539
10540 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
10541
10542         * configure.nat: Rearrange 'case' statements to match
10543         host before cpu.
10544
10545 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
10546
10547         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
10548         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
10549         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
10550         "@nat_extra_makefile_frag@".
10551         (Makefile): Remove dependency on "@frags@".
10552         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
10553         (data-directory/Makefile): Likewise.
10554         * config/aarch64/linux.mh: Deleted; moved contents to
10555         "gdb/configure.nat".
10556         * config/alpha/alpha-linux.mh: Likewise.
10557         * config/alpha/nbsd.mh: Likewise.
10558         * config/arm/linux.mh: Likewise.
10559         * config/arm/nbsdelf.mh: Likewise.
10560         * config/i386/cygwin.mh: Likewise.
10561         * config/i386/cygwin64.mh: Likewise.
10562         * config/i386/darwin.mh: Likewise.
10563         * config/i386/fbsd.mh: Likewise.
10564         * config/i386/fbsd64.mh: Likewise.
10565         * config/i386/go32.mh: Likewise.
10566         * config/i386/i386gnu.mh: Likewise.
10567         * config/i386/i386sol2.mh: Likewise.
10568         * config/i386/linux.mh: Likewise.
10569         * config/i386/linux64.mh: Likewise.
10570         * config/i386/mingw.mh: Likewise.
10571         * config/i386/mingw64.mh: Likewise.
10572         * config/i386/nbsd64.mh: Likewise.
10573         * config/i386/nbsdelf.mh: Likewise.
10574         * config/i386/nto.mh: Likewise.
10575         * config/i386/obsd.mh: Likewise.
10576         * config/i386/obsd64.mh: Likewise.
10577         * config/i386/sol2-64.mh: Likewise.
10578         * config/ia64/linux.mh: Likewise.
10579         * config/m32r/linux.mh: Likewise.
10580         * config/m68k/linux.mh: Likewise.
10581         * config/m68k/nbsdelf.mh: Likewise.
10582         * config/m68k/obsd.mh: Likewise.
10583         * config/m88k/obsd.mh: Likewise.
10584         * config/mips/fbsd.mh: Likewise.
10585         * config/mips/linux.mh: Likewise.
10586         * config/mips/nbsd.mh: Likewise.
10587         * config/mips/obsd64.mh: Likewise.
10588         * config/pa/linux.mh: Likewise.
10589         * config/pa/nbsd.mh: Likewise.
10590         * config/pa/obsd.mh: Likewise.
10591         * config/powerpc/aix.mh: Likewise.
10592         * config/powerpc/fbsd.mh: Likewise.
10593         * config/powerpc/linux.mh: Likewise.
10594         * config/powerpc/nbsd.mh: Likewise.
10595         * config/powerpc/obsd.mh: Likewise.
10596         * config/powerpc/ppc64-linux.mh: Likewise.
10597         * config/powerpc/spu-linux.mh: Likewise.
10598         * config/s390/linux.mh: Likewise.
10599         * config/sh/nbsd.mh: Likewise.
10600         * config/sparc/fbsd.mh: Likewise.
10601         * config/sparc/linux.mh: Likewise.
10602         * config/sparc/linux64.mh: Likewise.
10603         * config/sparc/nbsd64.mh: Likewise.
10604         * config/sparc/nbsdelf.mh: Likewise.
10605         * config/sparc/obsd64.mh: Likewise.
10606         * config/sparc/sol2.mh: Likewise.
10607         * config/tilegx/linux.mh: Likewise.
10608         * config/vax/nbsdelf.mh: Likewise.
10609         * config/vax/obsd.mh: Likewise.
10610         * config/xtensa/linux.mh: Likewise.
10611         * config/i386/i386gnu.mn: New file, with excerpts from
10612         "config/i386/i386gnu.mh".
10613         * configure: Regenerate.
10614         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
10615         *.mh files under "gdb/config".
10616         * configure.nat: New file, with contents from the
10617         "gdb/config/*/*.mh" files.
10618
10619 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
10620
10621         * btrace.c (btrace_clear): Free insn vector.
10622
10623 2017-05-05  Pedro Alves  <palves@redhat.com>
10624
10625         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
10626         * configure: Regenerate.
10627
10628 2017-05-04  Pedro Alves  <palves@redhat.com>
10629
10630         * Makefile.in (SFILES): Add progspace-and-thread.c.
10631         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
10632         (COMMON_OBS): Add progspace-and-thread.o.
10633         * breakpoint.c: Include "progspace-and-thread.h".
10634         (update_inserted_breakpoint_locations)
10635         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
10636         Use scoped_restore_current_pspace_and_thread.
10637         (create_std_terminate_master_breakpoint): Use
10638         scoped_restore_current_program_space.
10639         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
10640         (print_breakpoint_location): Use
10641         scoped_restore_current_program_space.
10642         (bp_loc_is_permanent): Use
10643         scoped_restore_current_pspace_and_thread.
10644         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
10645         (download_tracepoint_locations): Use
10646         scoped_restore_current_pspace_and_thread.
10647         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
10648         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
10649         (enum step_over_calls_kind): Moved from inferior.h.
10650         (class scoped_restore_current_thread): New class.
10651         * gdbthread.h (make_cleanup_restore_current_thread): Delete
10652         declaration.
10653         (scoped_restore_current_thread): New class.
10654         * infcmd.c: Include "common/gdb_optional.h".
10655         (continue_1, proceed_after_attach): Use
10656         scoped_restore_current_thread.
10657         (notice_new_inferior): Use scoped_restore_current_thread.
10658         * inferior.c: Include "progspace-and-thread.h".
10659         (restore_inferior, save_current_inferior): Delete.
10660         (add_inferior_command, clone_inferior_command): Use
10661         scoped_restore_current_pspace_and_thread.
10662         * inferior.h (scoped_restore_current_inferior): New class.
10663         * infrun.c: Include "progspace-and-thread.h" and
10664         "common/gdb_optional.h".
10665         (follow_fork_inferior): Use
10666         scoped_restore_current_pspace_and_thread.
10667         (scoped_restore_exited_inferior): New class.
10668         (handle_vfork_child_exec_or_exit): Use
10669         scoped_restore_exited_inferior,
10670         scoped_restore_current_pspace_and_thread,
10671         scoped_restore_current_thread and scoped_restore.
10672         (fetch_inferior_event): Use scoped_restore_current_thread.
10673         * linespec.c (decode_line_full, decode_line_1): Use
10674         scoped_restore_current_program_space.
10675         * mi/mi-main.c: Include "progspace-and-thread.h".
10676         (exec_continue): Use scoped_restore_current_thread.
10677         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
10678         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
10679         * proc-service.c (ps_pglobal_lookup): Use
10680         scoped_restore_current_program_space.
10681         * progspace-and-thread.c: New file.
10682         * progspace-and-thread.h: New file.
10683         * progspace.c (release_program_space, clone_program_space): Use
10684         scoped_restore_current_program_space.
10685         (restore_program_space, save_current_program_space)
10686         (save_current_space_and_thread): Delete.
10687         (switch_to_program_space_and_thread): Moved to
10688         progspace-and-thread.c.
10689         * progspace.h (save_current_program_space)
10690         (save_current_space_and_thread): Delete declarations.
10691         (scoped_restore_current_program_space): New class.
10692         * remote.c (remote_btrace_maybe_reopen): Use
10693         scoped_restore_current_thread.
10694         * symtab.c: Include "progspace-and-thread.h".
10695         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
10696         * thread.c (print_thread_info_1): Use
10697         scoped_restore_current_thread.
10698         (struct current_thread_cleanup): Delete.
10699         (do_restore_current_thread_cleanup)
10700         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
10701         (scoped_restore_current_thread::~scoped_restore_current_thread):
10702         ... this new dtor.
10703         (make_cleanup_restore_current_thread): Rename/convert to ...
10704         (scoped_restore_current_thread::scoped_restore_current_thread):
10705         ... this new ctor.
10706         (thread_apply_all_command): Use scoped_restore_current_thread.
10707         (thread_apply_command): Use scoped_restore_current_thread.
10708         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
10709         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
10710
10711 2017-05-04  Pedro Alves  <palves@redhat.com>
10712
10713         * thread.c (make_cleanup_restore_current_thread): Move
10714         find_thread_ptid call before the is_stopped call.  Assert that the
10715         thread is found.  Replace is_stopped call by checking the thread's
10716         state directly.  Remove unnecessary NULL-thread check.
10717
10718 2017-05-04  Pedro Alves  <palves@redhat.com>
10719
10720         * corelow.c (thread_section_name): New class.
10721         (get_core_register_section, get_core_siginfo): Use it.
10722
10723 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
10724
10725         * corelow.c (sniff_core_bfd): Remove extra semicolon.
10726         (get_core_register_section): Remove xfree of NULL pointer.
10727
10728 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
10729
10730         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
10731         * regcache.c (regcache::raw_supply_zeroed): New function.
10732         * regcache.h (regcache::raw_supply_zeroed): New declaration.
10733
10734 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
10735
10736         * gdbarch.sh: Remove commented out definition of
10737         TARGET_CHAR_BIT.
10738         * gdbarch.h: Re-generate.
10739
10740 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
10741
10742         * configure: Regenerate.
10743
10744 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
10745
10746         * solib-target.c (solib_target_relocate_section_addresses):
10747         Remove num_section_bases, num_bases, segment_bases variables.
10748
10749 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10750
10751         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
10752
10753 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10754
10755         * solib-target.c: Include <vector>
10756         (struct lm_info_target) <~lm_info_target>: Remove.
10757         <segment_bases, section_bases>: Change type to
10758         std::vector<CORE_ADDR>.
10759         (library_list_start_segment, library_list_start_section,
10760         library_list_end_library,
10761         solib_target_relocate_section_addresses): Adjust.
10762
10763 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10764
10765         * gdbarch.sh (software_single_step): Change return type to
10766         std::vector<CORE_ADDR>.
10767         * gdbarch.c, gdbarch.h: Re-generate.
10768         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
10769         Adjust.
10770         (arm_deal_with_atomic_sequence_raw): Adjust.
10771         (thumb_get_next_pcs_raw): Adjust.
10772         (arm_get_next_pcs_raw): Adjust.
10773         (arm_get_next_pcs): Adjust.
10774         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
10775         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
10776         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
10777         (alpha_software_single_step): Adjust.
10778         * alpha-tdep.h (alpha_software_single_step): Adjust.
10779         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
10780         * arm-tdep.c (arm_software_single_step): Adjust.
10781         (arm_breakpoint_kind_from_current_state): Adjust.
10782         * arm-tdep.h (arm_software_single_step): Adjust.
10783         * breakpoint.c (insert_single_step_breakpoint): Adjust.
10784         * cris-tdep.c (cris_software_single_step): Adjust.
10785         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
10786         (micromips_deal_with_atomic_sequence): Adjust.
10787         (deal_with_atomic_sequence): Adjust.
10788         (mips_software_single_step): Adjust.
10789         * mips-tdep.h (mips_software_single_step): Adjust.
10790         * moxie-tdep.c (moxie_software_single_step): Adjust.
10791         * nios2-tdep.c (nios2_software_single_step): Adjust.
10792         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
10793         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
10794         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
10795         * s390-linux-tdep.c (s390_software_single_step): Adjust.
10796         * sparc-tdep.c (sparc_software_single_step): Adjust.
10797         * spu-tdep.c (spu_software_single_step): Adjust.
10798         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
10799
10800 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
10801
10802         * gdbarch.sh: Use semi-colon as field separator instead of colon.
10803         * gdbarch.h: Re-generate.
10804
10805 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10806
10807         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
10808         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
10809         * python/py-instruction.c, python/py-instruction.h: New file.
10810         * python/py-record.c: Add py-instruction.h include.
10811         (gdbpy_initialize_record): Make gdb.Instruction a super class of
10812         gdb.RecordInstruction.
10813         * python/python-internal.h: Add gdbpy_initialize_instruction
10814         declaration.
10815         * python/python.c (do_start_initialization): Add
10816         gdbpy_initialize_instruction.
10817
10818 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10819
10820         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
10821         Remove.
10822         (btrace_func_from_recpy_func): New function.
10823         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
10824         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
10825         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
10826         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
10827         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
10828         Also, use new helper functions.
10829         (btpy_list_item): Use new helper functions.
10830         (recpy_bt_function_call_history): Use new type name.
10831         (btpy_call_getset): Remove.
10832         (gdbpy_initialize_btrace): Remove code to initialize
10833         gdb.BtraceFunctionCall.
10834         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
10835         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
10836         recpy_bt_func_prev, recpy_bt_func_next): New export.
10837         * python/py-record.c (recpy_func_type): New static object.
10838         (recpy_func_new, recpy_func_level, recpy_func_symbol,
10839         recpy_func_instructions, recpy_func_up, recpy_func_prev,
10840         recpy_func_next): New function.
10841         (recpy_element_hash, recpy_element_richcompare): Updated comment.
10842         (recpy_func_getset): New static object.
10843         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
10844         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
10845
10846 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10847
10848         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
10849         (btpy_object, btpy_insn_type, btpy_new): Remove.
10850         (btpy_list_object): Use gdb.RecordInstruction type instead of
10851         gdb.BtraceInstruction type.
10852         (btrace_insn_from_recpy_insn): New function.
10853         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
10854         btpy_new.
10855         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
10856         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
10857         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
10858         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
10859         instead of btpy_object.
10860         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
10861         btpy_insn_data, btpy_insn_decode): Rename to ...
10862         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
10863         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
10864         recpy_bt_insn_decode): This.  Also, use new helper functions.
10865         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
10866         recpy_insn_type.
10867         (btpy_insn_getset): Remove.
10868         (gdbpy_initialize_btrace): Remove code to initialize
10869         gdb.BtraceInstruction.  Use recpy_element_object.
10870         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
10871         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
10872         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
10873         * python/py-record.c (recpy_insn_type): New static object.
10874         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
10875         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
10876         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
10877         New function.
10878         (recpy_insn_getset): New static object.
10879         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
10880         * python/py-record.h (recpy_element_object): New typedef.
10881         (recpy_insn_type, recpy_insn_new): New export.
10882
10883 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10884
10885         * py-record-btrace.c (btpy_insn_new): Removed.
10886         (btpy_insn_or_gap_new): New function.
10887         (btpy_insn_error): Removed.
10888         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
10889         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
10890         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
10891         btpy_insn_or_gap_new instead of btpy_insn_new.
10892         (btpy_insn_getset): Remove btpy_insn_error.
10893         * py-record.c (recpy_gap_type): New static object.
10894         (recpy_gap_object): New typedef.
10895         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
10896         recpy_gap_reason_string): New function.
10897         (recpy_gap_getset): New static object.
10898         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
10899         * py-record.h (recpy_gap_new): New export.
10900
10901 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10902
10903         * python/py-record.c (recpy_ptid): Remove.
10904         (recpy_record_getset): Remove recpy_ptid.
10905
10906 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10907
10908         * btrace.c (btrace_fetch): Set inferior_ptid.
10909         * python/py-record-btrace.c: Add "py-record.h" include.
10910         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
10911         recpy_bt_end, recpy_bt_instruction_history,
10912         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
10913         in gdb.Record object instead of current ptid.
10914         * python/py-record.c: Include new "py-record.h" file.
10915         (recpy_record_object): Moved to py-record.h.
10916         * python/py-record.h: New file.
10917
10918 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
10919
10920         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
10921         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
10922         indentation.
10923
10924 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
10925
10926         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
10927         the past maintainers section.
10928
10929 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10930
10931         * infcmd.c (get_return_value): Use regcache ctor, and remove
10932         cleanup.
10933
10934 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10935             Pedro Alves  <palves@redhat.com>
10936
10937         * regcache.c (regcache::regcache): New tag dispatch ctor.
10938         (do_cooked_read): Moved above.
10939         (regcache_dup): Use the tag dispatch ctor..
10940         * regcache.h (regcache): Declare ctor, delete copy ctor and
10941         assignment operator, remove friend regcache_dup.
10942
10943 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10944
10945         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
10946         call method save instead of regcache_cpy.
10947         * regcache.h (struct regcache): Make regcache_dup a friend.
10948
10949 2017-04-28  Yao Qi  <yao.qi@linaro.org>
10950
10951         * regcache.c (struct regcache): Move to regcache.h
10952         (regcache::arch): New method.
10953         (regcache_get_ptid): Update.
10954         (get_regcache_arch): Call arch method.
10955         (get_regcache_aspace): Call method aspace.
10956         (register_buffer): Change it to method.
10957         (regcache_save): Change it to regcache::save.
10958         (regcache_restore): Likewise.
10959         (regcache_cpy_no_passthrough): Remove the declaration.
10960         (regcache_cpy): Call methods restore and cpy_no_passthrough.
10961         (regcache_cpy_no_passthrough): Change it to method
10962         cpy_no_passthrough.
10963         (regcache_register_status): Change it to method
10964         get_register_status.
10965         (regcache_invalidate): Change it to method invalidate.
10966         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
10967         (regcache_raw_update): Change it to method raw_update.
10968         (regcache_raw_read): Likewise.
10969         (regcache_raw_read_signed): Likewise.
10970         (regcache_raw_read_unsigned): Likewise.
10971         (regcache_raw_write_signed): Likewise.
10972         (regcache_raw_write_unsigned): Likewise.
10973         (regcache_cooked_read): Likewise.
10974         (regcache_cooked_read_value): Likewise.
10975         (regcache_cooked_read_signed): Likewise.
10976         (regcache_cooked_read_unsigned): Likewise.
10977         (regcache_cooked_write_signed): Likewise.
10978         (regcache_cooked_write_unsigned): Likewise.
10979         (regcache_raw_set_cached_value): Likewise.
10980         (regcache_raw_write): Likewise.
10981         (regcache_cooked_write): Likewise.
10982         (regcache_xfer_part): Likewise.
10983         (regcache_raw_read_part): Likewise.
10984         (regcache_raw_write_part): Likewise.
10985         (regcache_cooked_read_part): Likewise.
10986         (regcache_cooked_write_part): Likewise.
10987         (regcache_raw_supply): Likewise.
10988         (regcache_raw_collect): Likewise.
10989         (regcache_transfer_regset): Likewise.
10990         (regcache_supply_regset): Likewise.
10991         (regcache_collect_regset): Likewise.
10992         (regcache_debug_print_register): Likewise.
10993         (enum regcache_dump_what): Move it to regcache.h.
10994         (regcache_dump): Change it to method dump.
10995         * regcache.h (enum regcache_dump_what): New.
10996         (class regcache): New.
10997         * target.c (target_fetch_registers): Call method
10998         debug_print_register.
10999         (target_store_registers): Likewise.
11000
11001 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11002
11003         * windows-nat.c (struct lm_info_windows): Initialize field.
11004         (windows_make_so): Allocate lm_info_windows with new.
11005         (windows_free_so): Free lm_info_windows with delete.
11006
11007 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11008
11009         * solib-darwin.c (struct lm_info_darwin): Initialize field.
11010         (darwin_current_sos): Allocate lm_info_darwin with new, remove
11011         cleanup.
11012         (darwin_free_so): Free lm_info_darwin with delete.
11013
11014 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11015
11016         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
11017         <l_addr_p>: Change type to bool.
11018         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
11019         (svr4_free_so): Free lm_info_svr4 with delete.
11020         (svr4_copy_library_list): Replace memcpy with call to copy
11021         constructor.
11022         (library_list_start_library, svr4_default_sos): Allocate
11023         lm_info_svr4 with new.
11024
11025 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11026
11027         * solib-target.c (struct lm_info_target): Add destructor,
11028         initialize fields.
11029         <name>: Change type to std::string.
11030         (library_list_start_library): Allocate lm_info_target with new.
11031         (solib_target_free_library_list): Free lm_info_target with
11032         delete.
11033         (solib_target_current_sos): Adapt to std::string.
11034         (solib_target_free_so): Free lm_info_target with delete.
11035
11036 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11037
11038         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
11039         fields.
11040         (frv_current_sos): Allocate lm_info_frv with new.
11041         (frv_relocate_main_executable): Free lm_info_frv with delete,
11042         allocate with new.
11043         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
11044
11045 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11046
11047         * solib-frv.c (struct lm_info_frv): Fix indentation.
11048
11049 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11050
11051         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
11052         map field.
11053         (dsbt_current_sos): Allocate lm_info_dsbt with new.
11054         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
11055         and allocate with new.
11056         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
11057
11058 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11059
11060         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
11061         <filename, member_name>: Change type to std::string.
11062         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
11063         (library_list_start_library): Allocate lm_info_aix with new.
11064         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
11065         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
11066         with copy constructor.
11067
11068 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11069
11070         * solist.h (struct lm_info): Remove.
11071         (struct lm_info_base): New class.
11072         (struct so_list) <lm_info>: Change type to lm_info_base *.
11073         * nto-tdep.c (struct lm_info): Remove.
11074         (lm_addr): Adjust.
11075         * solib-aix.c (struct lm_info): Rename to ...
11076         (struct lm_info_aix): ... this.  Extend lm_info_base.
11077         (lm_info_p): Rename to ...
11078         (lm_info_aix_p): ... this, and adjust.
11079         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
11080         solib_aix_parse_libraries, library_list_start_library,
11081         solib_aix_free_library_list, solib_aix_parse_libraries,
11082         solib_aix_get_library_list,
11083         solib_aix_relocate_section_addresses, solib_aix_free_so,
11084         solib_aix_get_section_offsets,
11085         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
11086         Adjust.
11087         (struct solib_aix_inferior_data) <library_list>: Adjust.
11088         * solib-darwin.c (struct lm_info): Rename to ...
11089         (struct lm_info_darwin): ... this.  Extend lm_info_base.
11090         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
11091         * solib-dsbt.c (struct lm_info): Rename to ...
11092         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
11093         (struct dsbt_info) <main_executable_lm_info): Adjust.
11094         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
11095         dsbt_relocate_section_addresses): Adjust.
11096         * solib-frv.c (struct lm_info): Rename to ...
11097         (struct lm_info_frv): ... this.  Extend lm_info_base.
11098         (main_executable_lm_info): Adjust.
11099         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
11100         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
11101         find_canonical_descriptor_in_load_object,
11102         frv_fdpic_find_canonical_descriptor): Adjust.
11103         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
11104         to lm_info_svr4.
11105         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
11106         svr4_clear_so, svr4_copy_library_list,
11107         library_list_start_library, svr4_default_sos, svr4_read_so_list,
11108         svr4_current_sos, svr4_fetch_objfile_link_map,
11109         solist_update_incremental): Adjust.
11110         * solib-svr4.h (struct lm_info_svr4): Move here from
11111         solib-svr4.c.
11112         * solib-target.c (struct lm_info): Rename to ...
11113         (struct lm_info_target): ... this.  Extend lm_info_base.
11114         (lm_info_p): Rename to ...
11115         (lm_info_target_p): ... this.
11116         (solib_target_parse_libraries, library_list_start_segment,
11117         library_list_start_section, library_list_start_library,
11118         library_list_end_library, solib_target_free_library_list,
11119         solib_target_current_sos, solib_target_free_so,
11120         solib_target_relocate_section_addresses): Adjust.
11121         * windows-nat.c (struct lm_info): Rename to ...
11122         (struct lm_info_windows): ... this.  Extend lm_info_base.
11123         (windows_make_so, handle_load_dll, handle_unload_dll,
11124         windows_xfer_shared_libraries): Adjust.
11125
11126 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
11127
11128         * solib-darwin.c (struct darwin_so_list): Remove.
11129         (darwin_current_sos): Allocate an so_list object instead of a
11130         darwin_so_list, separately allocate an lm_info object.
11131         (darwin_free_so): Free lm_info.
11132
11133 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
11134
11135         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
11136         with fprintf_filtered.
11137
11138 2017-04-28  Yao Qi  <yao.qi@linaro.org>
11139
11140         * regcache.c (regcache::regcache): New function.
11141         (regcache::~regcache): New function.
11142         (regcache_xmalloc_1): Remove.
11143         (regcache_xmalloc): Call new regcache.
11144         (regcache_xfree): Call delete regcache.
11145         (get_thread_arch_aspace_regcache): Call new regcache.
11146
11147 2017-04-28  Yao Qi  <yao.qi@linaro.org>
11148
11149         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
11150         lwp instead of ptid_get_lwp.
11151
11152 2017-04-28  Yao Qi  <yao.qi@linaro.org>
11153
11154         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
11155         lwp_info instead of getting from inferior_ptid.
11156
11157 2017-04-27  Keith Seitz  <keiths@redhat.com>
11158
11159         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
11160         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
11161         (CV_CONVERSION_BADNESS): Define.
11162         (rank_one_type): Remove overly restrictive rvalue reference
11163         rank checks.
11164         Add cv-qualifier checks and subranks for type equality.
11165         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
11166         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
11167         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
11168
11169 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
11170
11171         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
11172         count when creating the object.
11173
11174 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
11175             Ulrich Weigand  <uweigand@de.ibm.com>
11176
11177         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
11178         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
11179         is used in AIX.
11180         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
11181         (process_xcoff_symbol): Likewise.
11182         (scan_xcoff_symtab): Likewise.
11183
11184 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
11185
11186         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
11187         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
11188         (ia64_access_reg): Use get_frame_register_unsigned.
11189         (ia64_access_rse_reg): Likewise.
11190         (ia64_libunwind_frame_prev_register): Likewise.
11191
11192 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
11193
11194         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
11195         * gdbarch.c: Regenerated.
11196         * gdbarch.h: Regenerated.
11197         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
11198         visibility external.
11199         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
11200         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
11201         (enum cfa_how_kind): Move to ...
11202         (struct dwarf2_frame_state_reg_info): Likewise.
11203         (struct dwarf2_frame_state): Likewise.
11204         * dwarf2-frame.h: ... here.
11205         (dwarf2_frame_state_alloc_regs): New declaration.
11206         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
11207         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
11208
11209 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
11210
11211         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
11212         regcache_raw_read_unsigned.
11213         (xtensa_pseudo_register_write): Likewise.
11214
11215 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
11216
11217         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
11218         (nds32_pseudo_register_write): Likewise.
11219
11220 2017-04-25  Yao Qi  <yao.qi@linaro.org>
11221
11222         * regcache.c (struct regcache) <readonly_p>: Change its type
11223         to bool.
11224         (regcache_xmalloc_1): Update parameter type and callers update.
11225
11226 2017-04-25  Yao Qi  <yao.qi@linaro.org>
11227
11228         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
11229         set_gdbarch_wchar_bit.
11230         * arm-tdep.c (arm_gdbarch_init): Likewise.
11231
11232 2017-04-25  Pedro Alves  <palves@redhat.com>
11233
11234         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
11235         (BothAreRelocatable, memcopy, memmove): Don't define.
11236         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
11237         macros.
11238
11239 2017-04-25  Pedro Alves  <palves@redhat.com>
11240
11241         * common/common-defs.h: Include "common/poison.h".
11242         * common/function-view.h: (Not, Or, Requires): Move to traits.h
11243         and adjust.
11244         * common/poison.h: New file.
11245         * common/traits.h: Include <type_traits>.
11246         (Not, Or, Requires): New, moved from common/function-view.h.
11247
11248 2017-04-25  Pedro Alves  <palves@redhat.com>
11249
11250         * breakpoint.h (struct breakpoint): In-class initialize all
11251         fields.  Make boolean fields "bool".
11252         * breakpoint.c (init_raw_breakpoint_without_location): Remove
11253         memset call and initializations no longer necessary.
11254
11255 2017-04-25  Pedro Alves  <palves@redhat.com>
11256
11257         * btrace.c (pt_btrace_insn_flags): Change parameter type to
11258         reference.
11259         (pt_btrace_insn): New function.
11260         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
11261
11262 2017-04-25  Pedro Alves  <palves@redhat.com>
11263
11264         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
11265         "base" field and inherit from "bp_location" instead.  Add
11266         non-default ctor.
11267         (allocate_location_exception): Use new non-default ctor.
11268         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
11269         (init_bp_location): Convert to ...
11270         (bp_location::bp_location): ... this new ctor, and remove memset
11271         call.
11272         (base_breakpoint_allocate_location): Use the new non-default ctor.
11273         * breakpoint.h (bp_location): Now a class.  Declare default and
11274         non-default ctors.  In-class initialize all members.
11275         (init_bp_location): Remove declaration.
11276
11277 2017-04-25  Pedro Alves  <palves@redhat.com>
11278
11279         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
11280         assignment operator.
11281
11282 2017-04-24  Yao Qi  <yao.qi@linaro.org>
11283
11284         * doublest.c (convert_doublest_to_floatformat): Call
11285         floatformat_totalsize_bytes.
11286
11287 2017-04-22  Tom Tromey  <tom@tromey.com>
11288
11289         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
11290         ui_out_emit_list.
11291         * stack.c (print_frame): Use ui_out_emit_list.
11292         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11293         ui_out_emit_list.
11294         * mi/mi-main.c (print_one_inferior)
11295         (mi_cmd_data_list_register_names)
11296         (mi_cmd_data_list_register_values, mi_cmd_list_features)
11297         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
11298         ui_out_emit_list.
11299         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
11300         (mi_output_solib_attribs): Use ui_out_emit_list,
11301         ui_out_emit_tuple.
11302         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
11303         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
11304         (mi_cmd_stack_list_args, list_args_or_locals): Use
11305         ui_out_emit_list.
11306         * disasm.c (do_assembly_only): Use ui_out_emit_list.
11307         * breakpoint.c (print_solib_event, output_thread_groups): Use
11308         ui_out_emit_list.
11309
11310 2017-04-22  Tom Tromey  <tom@tromey.com>
11311
11312         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
11313         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
11314         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
11315
11316 2017-04-22  Tom Tromey  <tom@tromey.com>
11317
11318         * tracepoint.c (tvariables_info_1)
11319         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
11320
11321 2017-04-22  Tom Tromey  <tom@tromey.com>
11322
11323         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
11324         annotate_arg_emitter.
11325         * breakpoint.c (print_mention_watchpoint)
11326         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
11327         * annotate.h (struct annotate_arg_emitter): New.
11328
11329 2017-04-22  Tom Tromey  <tom@tromey.com>
11330
11331         * record-btrace.c (record_btrace_insn_history)
11332         (record_btrace_insn_history_range, record_btrace_call_history)
11333         (record_btrace_call_history_range): Use ui_out_emit_tuple.
11334         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
11335         ui_out_emit_tuple.
11336         * stack.c (print_frame_info): Use ui_out_emit_tuple.
11337         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
11338         * skip.c (skip_info): Use ui_out_emit_tuple.
11339         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
11340         * progspace.c (print_program_space): Use ui_out_emit_tuple.
11341         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
11342         * osdata.c (info_osdata): Use ui_out_emit_tuple.
11343         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
11344         ui_out_emit_tuple.
11345         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
11346         (output_register, mi_cmd_data_read_memory)
11347         (mi_cmd_data_read_memory_bytes, mi_load_progress)
11348         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
11349         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
11350         Use ui_out_emit_tuple.
11351         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
11352         ui_out_emit_tuple.
11353         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
11354         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
11355         * linux-thread-db.c (info_auto_load_libthread_db): Use
11356         ui_out_emit_tuple.
11357         * inferior.c (print_inferior): Use ui_out_emit_tuple.
11358         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
11359         * disasm.c (do_mixed_source_and_assembly_deprecated)
11360         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
11361         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
11362         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
11363         * breakpoint.c (print_one_breakpoint_location)
11364         (print_one_breakpoint): Use ui_out_emit_tuple.
11365         * auto-load.c (print_script, info_auto_load_cmd): Use
11366         ui_out_emit_tuple.
11367         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
11368
11369 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
11370
11371         * thread.c (print_thread_info_1): Remove dead code.
11372
11373 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
11374
11375         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
11376         GDB_SELF_TEST.
11377         * arm-tdep.c (selftests::arm_record_test): Likewise.
11378
11379 2017-04-21  Yao Qi  <yao.qi@linaro.org>
11380
11381         * regcache.c (regcache_restore): Remove argument 2.  Replace
11382         argument 3 with regcache.  Get register status from
11383         src->register_status and get register contents from
11384         register_buffer (src, regnum).
11385         (regcache_cpy): Update.
11386
11387 2017-04-19  Pedro Alves  <palves@redhat.com>
11388
11389         * gdbthread.h (thread): Add missing closing parenthesis in
11390         comment.
11391
11392 2017-04-19  Pedro Alves  <palves@redhat.com>
11393
11394         * common/refcounted-object.h: New file.
11395         * gdbthread.h: Include "common/refcounted-object.h".
11396         (thread_info): Inherit from refcounted_object and add comments.
11397         (thread_info::incref, thread_info::decref)
11398         (thread_info::m_refcount): Delete.
11399         (thread_info::deletable): Use the refcounted_object::refcount()
11400         method.
11401         * inferior.c (current_inferior_): Add comment.
11402         (set_current_inferior): Increment/decrement refcounts.
11403         (prune_inferiors, remove_inferior_command): Skip inferiors marked
11404         not-deletable instead of comparing with the current inferior.
11405         (initialize_inferiors): Increment the initial inferior's refcount.
11406         * inferior.h (struct inferior): Forward declare.
11407         Include "common/refcounted-object.h".
11408         (current_inferior, set_current_inferior): Move declaration to
11409         before struct inferior's definition, and fix comment.
11410         (inferior): Inherit from refcounted_object.  Add comments.
11411         * thread.c (switch_to_thread_no_regs): Reference the thread's
11412         inferior pointer directly instead of doing a ptid lookup.
11413         (switch_to_no_thread): New function.
11414         (switch_to_thread(thread_info *)): New function, factored out
11415         from ...
11416         (switch_to_thread(ptid_t)): ... this.
11417         (restore_current_thread): Delete.
11418         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
11419         fields, and add 'inf' field.
11420         (do_restore_current_thread_cleanup): Check whether old->inf is
11421         alive instead of looking up an inferior by ptid.  Use
11422         switch_to_thread and switch_to_no_thread.
11423         (restore_current_thread_cleanup_dtor): Use old->inf directly
11424         instead of lookup up an inferior by id.  Decref the inferior.
11425         Don't restore 'removable'.
11426         (make_cleanup_restore_current_thread): Same the inferior pointer
11427         in old, instead of the inferior number.  Incref the inferior.
11428         Don't save/clear 'removable'.
11429
11430 2017-04-19  Pedro Alves  <palves@redhat.com>
11431
11432         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11433         unittests/scoped_restore-selftests.c.
11434         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
11435         * common/scoped_restore.h (scoped_restore_base): Make "class".
11436         (scoped_restore_base::release): New public method.
11437         (scoped_restore_base::scoped_restore_base): New protected ctor.
11438         (scoped_restore_base::m_saved_var): New protected field.
11439         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
11440         scoped_restore_base base class instead of m_saved_var directly.
11441         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
11442         (scoped_restore_tmpl::scoped_restore_tmpl(const
11443         scoped_restore_tmpl<T>&)): Likewise.
11444         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
11445         method.
11446         (scoped_restore_tmpl::saved_var): New method.
11447         (scoped_restore_tmpl::m_saved_var): Delete.
11448         * inferior.h (inferior::detaching): Now a bool.
11449         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
11450         cleanup.
11451         * unittests/scoped_restore-selftests.c: New file.
11452
11453 2017-04-19  Pedro Alves  <palves@redhat.com>
11454
11455         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
11456         Re-sort in alphabetic order.
11457
11458 2017-04-18  Pedro Alves  <palves@redhat.com>
11459
11460         * xml-support.c (obstack_xml_printf): Delete.
11461         * xml-support.h (obstack_xml_printf): Delete.
11462
11463 2017-04-18  Pedro Alves  <palves@redhat.com>
11464
11465         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
11466         vdebug, verror, body_text, start_element, end_element, name,
11467         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
11468         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
11469         is_xinclude>: Make private and add m_ prefix.
11470         (gdb_xml_parser::body_text): New method, based on ...
11471         (gdb_xml_body_text): ... this.  Adjust.
11472         (gdb_xml_parser::vdebug): New method, based on ...
11473         (gdb_xml_debug): ... this.  Adjust.
11474         (gdb_xml_parser::verror): New method, based on ...
11475         (gdb_xml_error): ... this.  Adjust.
11476         (gdb_xml_parser::start_element): New method, based on ...
11477         (gdb_xml_start_element): ... this.  Adjust.
11478         (gdb_xml_start_element_wrapper): Defer to
11479         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
11480         (gdb_xml_parser::end_element): New method, based on ...
11481         (gdb_xml_end_element_wrapper): ... this.  Adjust.
11482         (gdb_xml_parser::~gdb_xml_parser): Adjust.
11483         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
11484         (gdb_xml_parser::use_dtd): New method, based on ...
11485         (gdb_xml_use_dtd): ... this.  Adjust.
11486         (gdb_xml_parser::parse): New method, based on ...
11487         (gdb_xml_parse): ... this.  Adjust.
11488         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
11489         (xinclude_start_include): Adjust to call the parser's name method.
11490         (xml_xinclude_default, xml_xinclude_start_doctype)
11491         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
11492         method.
11493         (xml_process_xincludes): Adjust to call parser methods.
11494         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
11495         declarations.
11496
11497 2017-04-18  Pedro Alves  <palves@redhat.com>
11498
11499         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
11500         gdb::optional<std::string>.
11501         * xml-support.c: Include <string>.
11502         (scope_level::scope_level(scope_level &&))
11503         (scope_level::~scope_level): Delete.
11504         (scope_level::body): Now a std::string.
11505         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
11506         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
11507         parameter.
11508         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
11509         (xinclude_parsing_data::output): Now a std::string reference.
11510         (xinclude_start_include): Adjust.
11511         (xml_xinclude_default): Adjust.
11512         (xml_process_xincludes): Add 'output' parameter, and return bool.
11513         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
11514         and return bool.
11515         * xml-tdesc.c: Include <unordered_map> and <string>.
11516         (tdesc_xml_cache): Delete.
11517         (tdesc_xml_cache_s): Delete.
11518         (xml_cache): Now an std::unordered_map.
11519         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
11520         (target_fetch_description_xml): Change return type to
11521         gdb::optional<std::string>, and adjust.
11522         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
11523         (target_fetch_description_xml): Change return type to
11524         gdb::optional<std::string>.
11525
11526 2017-04-18  Pedro Alves  <palves@redhat.com>
11527
11528         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11529         unittests/optional-selftests.c.
11530         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
11531         * unittests/optional-selftests.c: New file.
11532         * unittests/optional/assignment/1.cc: New file.
11533         * unittests/optional/assignment/2.cc: New file.
11534         * unittests/optional/assignment/3.cc: New file.
11535         * unittests/optional/assignment/4.cc: New file.
11536         * unittests/optional/assignment/5.cc: New file.
11537         * unittests/optional/assignment/6.cc: New file.
11538         * unittests/optional/assignment/7.cc: New file.
11539         * unittests/optional/cons/copy.cc: New file.
11540         * unittests/optional/cons/default.cc: New file.
11541         * unittests/optional/cons/move.cc: New file.
11542         * unittests/optional/cons/value.cc: New file.
11543         * unittests/optional/in_place.cc: New file.
11544         * unittests/optional/observers/1.cc: New file.
11545         * unittests/optional/observers/2.cc: New file.
11546
11547 2017-04-18  Pedro Alves  <palves@redhat.com>
11548
11549         * common/gdb_optional.h: Include common/traits.h.
11550         (in_place_t): New type.
11551         (in_place): New constexpr variable.
11552         (optional::optional): Remove member initialization of
11553         m_instantiated.
11554         (optional::optional(in_place_t...)): New constructor.
11555         (optional::~optional): Use reset.
11556         (optional::optional(const optional&)): New.
11557         (optional::optional(const optional&&)): New.
11558         (optional::optional(T &)): New.
11559         (optional::optional(T &&)): New.
11560         (operator::operator=(const optional &)): New.
11561         (operator::operator=(optional &&)): New.
11562         (operator::operator= (const T &))
11563         (operator::operator= (T &&))
11564         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
11565         (operator::reset): New.
11566         (operator::m_instantiated):: Add in-class initializer.
11567         * common/traits.h: Include <type_traits>.
11568         (struct And): New types.
11569
11570 2017-04-18  Pedro Alves  <palves@redhat.com>
11571
11572         * xml-support.c: Include <vector>.
11573         (scope_level::scope_level(const gdb_xml_element *))
11574         (scope_level::scope_level(scope_level&&)): New.
11575         (scope_level::~scope_level): New.
11576         (scope_level_s): Delete.
11577         (gdb_xml_parser::scopes): Now a std::vector.
11578         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
11579         Use std::vector.
11580         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
11581         scope cleanup code.
11582         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
11583         of the scopes member.  Use std::vector::emplace_back.
11584
11585 2017-04-18  Pedro Alves  <palves@redhat.com>
11586
11587         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
11588         a bool.
11589         (gdb_xml_end_element): Change type of first parameter.
11590         (gdb_xml_cleanup): Rename to ...
11591         (gdb_xml_parser::~gdb_xml_parser): ... this.
11592         (gdb_xml_create_parser_and_cleanup): Delete with ...
11593         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
11594         to this new ctor.
11595         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
11596         using gdb_xml_create_parser_and_cleanup.
11597         (xinclude_parsing_data): Add ctor/dtor.
11598         (xml_xinclude_cleanup): Delete.
11599         (xml_process_xincludes): Create a local xinclude_parsing_data
11600         instead of heap-allocating one.  Create a local gdb_xml_parser
11601         instead of heap-allocating one with
11602         gdb_xml_create_parser_and_cleanup.
11603
11604 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
11605
11606         PR threads/20743
11607         * fbsd-nat.c (resume_one_thread_cb): Remove.
11608         (resume_all_threads_cb): Remove.
11609         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
11610         iterate_over_threads.
11611
11612 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
11613
11614         * NEWS: Create a new section for the next release branch.
11615         Rename the section of the current branch, now that it has
11616         been cut.
11617
11618 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
11619
11620         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
11621         * version.in: Bump version to 8.0.50.DATE-git.
11622
11623 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
11624
11625         PR gdb/21385
11626         * windows-nat.c (windows_create_inferior): Declare 'allargs'
11627         independently of the host, and fix build breakage on Cygwin.
11628
11629 2017-04-13  Pedro Alves  <palves@redhat.com>
11630
11631         * inferior.c (free_inferior): Convert to ...
11632         (inferior::~inferior): ... this dtor.
11633         (inferior::inferior): New ctor, factored out from ...
11634         (add_inferior_silent): ... here.  Allocate the inferior with a new
11635         expression.
11636         (delete_inferior): Call delete instead of free_inferior.
11637         * inferior.h (gdb_environ, continuation): Forward declare.
11638         (inferior): Now a class.  Add in-class initialization to all
11639         members.  Make boolean fields bool, except 'detaching'.
11640         (inferior::inferior): New explicit ctor.
11641         (inferior::~inferior): New.
11642
11643 2017-04-13  Pedro Alves  <palves@redhat.com>
11644
11645         * inferior.c (init_inferior_list): Delete.
11646         * inferior.h (init_inferior_list): Delete.
11647
11648 2017-04-13  Pedro Alves  <palves@redhat.com>
11649
11650         PR threads/13217
11651         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
11652         (top level): Call it twice, with different thread sets.
11653
11654 2017-04-13  Pedro Alves  <palves@redhat.com>
11655
11656         * thread.c: Include <algorithm>.
11657         (thread_array_cleanup): Delete.
11658         (scoped_inc_dec_ref): New class.
11659         (live_threads_count): New function.
11660         (set_thread_refcount): Delete.
11661         (tp_array_compar_ascending): Now a bool.
11662         (tp_array_compar): Convert to a std::sort comparison function.
11663         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
11664         and live_threads_count.
11665
11666 2017-04-13  Pedro Alves  <palves@redhat.com>
11667
11668         * infrun.c (follow_fork_inferior): Also switch the current
11669         inferior.
11670
11671 2017-04-13  Pedro Alves  <palves@redhat.com>
11672
11673         * breakpoint.c (watch_command_1): Save watchpoint-frame info
11674         before calling create_internal_breakpoint.
11675
11676 2017-04-13  Pedro Alves  <palves@redhat.com>
11677
11678         * fork-child.c (execv_argv): New class.
11679         (breakup_args): Refactored as ...
11680         (execv_argv::init_for_no_shell): .. this method of execv_argv.
11681         Copy arguments to storage and replace separators with NULL
11682         terminators in place.
11683         (escape_bang_in_quoted_argument): Adjust to return bool.
11684         (execv_argv::execv_argv): New ctor.
11685         (execv_argv::init_for_shell): New method, factored out from
11686         fork_inferior.  Don't strdup strings into the vector.
11687         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
11688         Remove free_vector_argv call.
11689
11690 2017-04-13  Yao Qi  <yao.qi@linaro.org>
11691
11692         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
11693         tdep->rx_psw_type.
11694
11695 2017-04-13  Yao Qi  <yao.qi@linaro.org>
11696
11697         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
11698         * rx-tdep.c (rx_gdbarch_init): Likewise.
11699
11700 2017-04-13  Pedro Alves  <palves@redhat.com>
11701
11702         * breakpoint.h (struct breakpoint): Reindent.
11703
11704 2017-04-13  Pedro Alves  <palves@redhat.com>
11705
11706         * breakpoint.c (bp_location): Rename to ...
11707         (bp_locations): ... this.  All references updated.
11708         (bp_location_count): Rename to ...
11709         (bp_locations_count): ... this.  All references updated.
11710         (bp_location_placed_address_before_address_max): Rename to ...
11711         (bp_locations_placed_address_before_address_max): ... this.  All
11712         references updated.
11713         (bp_location_shadow_len_after_address_max): Rename to ...
11714         (bp_locations_shadow_len_after_address_max): ... this.  All
11715         references updated.
11716         (bp_location_compare_addrs): Rename to ...
11717         (bp_locations_compare_addrs): ... this.  All references updated.
11718         (bp_location_compare):Rename to ...
11719         (bp_locations_compare): ... this.  All references updated.
11720         (bp_location_target_extensions_update): Rename to ...
11721         (bp_locations_target_extensions_update): ... this.  All references
11722         updated.
11723
11724 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
11725
11726         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
11727         * common/common.m4: Check headers 'termios.h', 'termio.h' and
11728         'sgtty.h'.
11729         * common/gdb_termios.h: New file, with parts of "terminal.h".
11730         * inflow.c: Include "gdb_termios.h".
11731         * ser-unix.c: Include "gdb_termios.h".
11732         * terminal.h: Move terminal-related defines to
11733         "common/gdb_termios.h".
11734
11735 2017-04-12  Tom Tromey  <tom@tromey.com>
11736
11737         * probe.c (parse_probes): Update.
11738         * location.h (delete_event_location): Don't declare.
11739         (event_location_deleter::operator()): Update.
11740         * location.c (event_location_deleter::operator()): Rename from
11741         delete_event_location.
11742         * linespec.h (linespec_result) <location>: Change type to
11743         event_location_up.
11744         * linespec.c (canonicalize_linespec, event_location_to_sals)
11745         (decode_objc): Update.
11746         (linespec_result): Don't call delete_event_location.
11747         * breakpoint.c (create_breakpoints_sal)
11748         (bkpt_probe_create_sals_from_location)
11749         (strace_marker_create_sals_from_location): Update.
11750
11751 2017-04-12  Tom Tromey  <tom@tromey.com>
11752
11753         * linespec.h (struct linespec_result): Add constructor and
11754         destructor.
11755         (init_linespec_result, destroy_linespec_result)
11756         (make_cleanup_destroy_linespec_result): Don't declare.
11757         * linespec.c (init_linespec_result): Remove.
11758         (linespec_result::~linespec_result): Rename from
11759         destroy_linespec_result.  Update.
11760         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
11761         Remove.
11762         * breakpoint.c (create_breakpoint, break_range_command)
11763         (decode_location_default): Update.
11764         * ax-gdb.c (agent_command_1): Update.
11765
11766 2017-04-12  Tom Tromey  <tom@tromey.com>
11767
11768         * remote.c (remote_download_tracepoint): Update.
11769         * python/py-breakpoint.c (bppy_get_location): Update.
11770         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
11771         (gdbscm_breakpoint_location): Update.
11772         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
11773         * breakpoint.h (struct breakpoint) <location, location_range_end>:
11774         Change type to event_location_up.
11775         * breakpoint.c (create_overlay_event_breakpoint)
11776         (create_longjmp_master_breakpoint)
11777         (create_std_terminate_master_breakpoint)
11778         (create_exception_master_breakpoint)
11779         (breakpoint_event_location_empty_p, print_breakpoint_location)
11780         (print_one_breakpoint_location, create_thread_event_breakpoint)
11781         (init_breakpoint_sal, create_breakpoint)
11782         (print_recreate_ranged_breakpoint, break_range_command)
11783         (init_ada_exception_breakpoint, say_where): Update.
11784         (base_breakpoint_dtor): Don't call delete_event_location.
11785         (bkpt_print_recreate, tracepoint_print_recreate)
11786         (dprintf_print_recreate, update_static_tracepoint)
11787         (breakpoint_re_set_default): Update.
11788
11789 2017-04-12  Tom Tromey  <tom@tromey.com>
11790
11791         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
11792         type of "to_do".  Update.
11793         (compute_stack_depth): Use std::vector.
11794
11795 2017-04-12  Tom Tromey  <tom@tromey.com>
11796
11797         * printcmd.c (find_instruction_backward): Use std::vector.
11798
11799 2017-04-12  Tom Tromey  <tom@tromey.com>
11800
11801         * symfile.c (objfilep): Remove typedef.
11802         (reread_symbols): Use a std::vector.
11803
11804 2017-04-12  Tom Tromey  <tom@tromey.com>
11805
11806         * mi/mi-main.c (exec_direction_forward): Remove.
11807         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
11808         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
11809         scoped_restore.
11810         * guile/guile.c (guile_repl_command, guile_command)
11811         (gdbscm_execute_gdb_command): Use scoped_restore.
11812         * go-exp.y (go_parse): Use scoped_restore.
11813         * d-exp.y (d_parse): Use scoped_restore.
11814         * cli/cli-decode.c (cmd_func): Use scoped_restore.
11815         * c-exp.y (c_parse): Use scoped_restore.
11816
11817 2017-04-12  Tom Tromey  <tom@tromey.com>
11818
11819         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
11820         (mi_parse): Update return type.
11821         (mi_parse_free): Remove.
11822         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
11823         (mi_parse::~mi_parse): Rename from mi_parse_free.
11824         (mi_parse_cleanup): Remove.
11825         (mi_parse): Return a unique_ptr.  Use new.
11826         * mi/mi-main.c (mi_execute_command): Update.
11827
11828 2017-04-12  Tom Tromey  <tom@tromey.com>
11829
11830         * location.c (explicit_location_lex_one): Return a
11831         unique_xmalloc_ptr.
11832         (string_to_explicit_location): Update.  Remove cleanups.
11833
11834 2017-04-12  Tom Tromey  <tom@tromey.com>
11835
11836         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
11837         (compare_value_and_voffset): Change type.  Update.
11838         (compute_vtable_size): Change type of "offset_vec".
11839         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
11840         (gnuv3_get_typeid): Remove extraneous declaration.
11841
11842 2017-04-12  Tom Tromey  <tom@tromey.com>
11843
11844         * charset.h (wchar_iterator): Fix comment.
11845
11846 2017-04-12  Tom Tromey  <tom@tromey.com>
11847
11848         * charset.c (iconv_wrapper): New class.
11849         (cleanup_iconv): Remove.
11850         (convert_between_encodings): Use it.
11851
11852 2017-04-12  Tom Tromey  <tom@tromey.com>
11853
11854         * symfile.h (increment_reading_symtab): Update type.
11855         * symfile.c (decrement_reading_symtab): Remove.
11856         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
11857         * psymtab.c (psymtab_to_symtab): Update.
11858         * dwarf2read.c (dw2_instantiate_symtab): Update.
11859
11860 2017-04-12  Tom Tromey  <tom@tromey.com>
11861
11862         * jit.c (struct jit_reader): Declare separately.  Add constructor
11863         and destructor.  Change type of "handle".
11864         (loaded_jit_reader): Define separately.
11865         (jit_reader_load): Update.  New "new".
11866         (jit_reader_unload_command): Use "delete".
11867         * gdb-dlfcn.h (struct dlclose_deleter): New.
11868         (gdb_dlhandle_up): New typedef.
11869         (gdb_dlopen, gdb_dlsym): Update types.
11870         (gdb_dlclose): Remove.
11871         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
11872         (gdb_dlsym): Change type of "handle".
11873         (make_cleanup_dlclose): Remove.
11874         (dlclose_deleter::operator()): Rename from gdb_dlclose.
11875         * compile/compile-c-support.c (load_libcc): Update.
11876
11877 2017-04-12  Tom Tromey  <tom@tromey.com>
11878
11879         * symtab.h (find_pcs_for_symtab_line): Change return type.
11880         * symtab.c (find_pcs_for_symtab_line): Change return type.
11881         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
11882         type of "vec".  Update.
11883         (ltpy_get_pcs_for_line): Update.
11884         * linespec.c (decode_digits_ordinary): Update.
11885
11886 2017-04-12  Tom Tromey  <tom@tromey.com>
11887
11888         * tracepoint.c (actions_command): Update.
11889         * python/python.c (python_command, python_interactive_command):
11890         Update.
11891         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
11892         * guile/guile.c (guile_command): Update.
11893         * defs.h (read_command_lines, read_command_lines_1): Return
11894         command_line_up.
11895         (command_lines_deleter): New struct.
11896         (command_line_up): New typedef.
11897         * compile/compile.c (compile_code_command)
11898         (compile_print_command): Update.
11899         * cli/cli-script.h (get_command_line, copy_command_lines): Return
11900         command_line_up.
11901         (make_cleanup_free_command_lines): Remove.
11902         * cli/cli-script.c (get_command_line, read_command_lines_1)
11903         (copy_command_lines): Return command_line_up.
11904         (while_command, if_command, read_command_lines, define_command)
11905         (document_command): Update.
11906         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
11907         Remove.
11908         * breakpoint.h (breakpoint_set_commands): Change type of
11909         "commands".
11910         * breakpoint.c (breakpoint_set_commands): Change type of
11911         "commands".  Update.
11912         (do_map_commands_command, update_dprintf_command_list)
11913         (create_tracepoint_from_upload): Update.
11914
11915 2017-04-12  Tom Tromey  <tom@tromey.com>
11916
11917         * tracepoint.c (scope_info): Update.
11918         * spu-tdep.c (spu_catch_start): Update.
11919         * python/python.c (gdbpy_decode_line): Update.
11920         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
11921         * python/py-breakpoint.c (bppy_init): Update.
11922         * probe.c (parse_probes): Update.
11923         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
11924         * location.h (event_location_deleter): New struct.
11925         (event_location_up): New typedef.
11926         (new_linespec_location, new_address_location, new_probe_location)
11927         (new_explicit_location, copy_event_location)
11928         (string_to_event_location, string_to_event_location_basic)
11929         (string_to_explicit_location): Update return type.
11930         (make_cleanup_delete_event_location): Remove.
11931         * location.c (new_linespec_location, new_address_location)
11932         (new_probe_location, new_explicit_location, copy_event_location):
11933         Return event_location_up.
11934         (delete_event_location_cleanup)
11935         (make_cleanup_delete_event_location): Remove.
11936         (string_to_explicit_location, string_to_event_location_basic)
11937         (string_to_event_location): Return event_location_up.
11938         * linespec.c (canonicalize_linespec, event_location_to_sals)
11939         (decode_line_with_current_source)
11940         (decode_line_with_last_displayed, decode_objc): Update.
11941         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
11942         * completer.c (location_completer): Update.
11943         * cli/cli-cmds.c (edit_command, list_command): Update.
11944         * breakpoint.c (create_overlay_event_breakpoint)
11945         (create_longjmp_master_breakpoint)
11946         (create_std_terminate_master_breakpoint)
11947         (create_exception_master_breakpoint)
11948         (create_thread_event_breakpoint): Update.
11949         (init_breakpoint_sal): Update.  Remove some dead code.
11950         (create_breakpoint_sal): Change type of "location".  Update.
11951         (create_breakpoints_sal, create_breakpoint, break_command_1)
11952         (dprintf_command, break_range_command, until_break_command)
11953         (init_ada_exception_breakpoint)
11954         (strace_marker_create_sals_from_location)
11955         (update_static_tracepoint, trace_command, ftrace_command)
11956         (strace_command, create_tracepoint_from_upload): Update.
11957         * break-catch-throw.c (re_set_exception_catchpoint): Update.
11958         * ax-gdb.c (agent_command_1): Update.
11959
11960 2017-04-12  Pedro Alves  <palves@redhat.com>
11961
11962         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
11963         * configure.tgt: Handle i[34567]86-*-go32* and
11964         i[34567]86-*-msdosdjgpp*.
11965         * i386-tdep.c (i386_svr4_reg_to_regnum):
11966         Make extern.
11967         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
11968         i386-go32-tdep.c.
11969         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
11970         * i386-go32-tdep.c: New file.
11971         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
11972         declarations.
11973
11974 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
11975
11976         * aix-thread.c (pd_status2str): Change return type to const char *.
11977
11978 2017-04-12  Pedro Alves  <palves@redhat.com>
11979
11980         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
11981         calls to set_gdbarch_gnu_triplet_regexp.
11982
11983 2017-04-12  Pedro Alves  <palves@redhat.com>
11984
11985         PR gdb/21323
11986         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
11987         New enum value.
11988         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
11989         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
11990         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
11991         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
11992         * gdbarch.h, gdbarch.c: Regenerate.
11993         * aarch64-tdep.c (aarch64_gdbarch_init): Override
11994         gdbarch_wchar_bit and gdbarch_wchar_signed.
11995         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
11996         * arm-tdep.c (arm_gdbarch_init): Likewise.
11997         * avr-tdep.c (avr_gdbarch_init): Likewise.
11998         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
11999         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
12000         * i386-tdep.c (i386_go32_init_abi): Likewise.
12001         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
12002         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
12003         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
12004         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
12005         * sh-tdep.c (sh_gdbarch_init): Likewise.
12006         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
12007         * sparc64-tdep.c (sparc64_init_abi): Likewise.
12008         * windows-tdep.c (windows_init_abi): Likewise.
12009         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
12010
12011 2017-04-12  Pedro Alves  <palves@redhat.com>
12012
12013         PR c++/21323
12014         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
12015         cplus_primitive_type_char32_t>: New enum values.
12016         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
12017         and cplus_primitive_type_char32_t.
12018         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
12019         32, use the archtecture's built-in type for char16_t and char32_t,
12020         respectively.  Otherwise, fallback to init_integer_type as before,
12021         but make the type unsigned, and issue a complaint.
12022         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
12023
12024 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
12025
12026         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
12027         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
12028
12029 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
12030
12031         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
12032         'const char *'.
12033
12034 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
12035
12036         * common/common-utils.c (free_vector_argv): New function.
12037         * common/common-utils.h: Include <vector>.
12038         (free_vector_argv): New prototype.
12039         * darwin-nat.c (darwin_create_inferior): Rewrite function
12040         prototype in order to constify "exec_file" and accept a
12041         "std::string" for "allargs".
12042         * fork-child.c: Include <vector>.
12043         (breakup_args): Rewrite function, using C++.
12044         (fork_inferior): Rewrite function header, constify "exec_file_arg"
12045         and accept "std::string" for "allargs".  Update the code to
12046         calculate "argv" based on "allargs".  Update calls to "exec_fun"
12047         and "execvp".
12048         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
12049         order to constify "exec_file" and accept a "std::string" for
12050         "allargs".
12051         * go32-nat.c (go32_create_inferior): Likewise.
12052         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
12053         * infcmd.c (run_command_1): Constify "exec_file".  Use
12054         "std::string" for inferior arguments.
12055         * inferior.h (fork_inferior): Update prototype.
12056         * linux-nat.c (linux_nat_create_inferior): Rewrite function
12057         prototype in order to constify "exec_file" and accept a
12058         "std::string" for "allargs".
12059         * nto-procfs.c (procfs_create_inferior): Likewise.
12060         * procfs.c (procfs_create_inferior): Likewise.
12061         * remote-sim.c (gdbsim_create_inferior): Likewise.
12062         * remote.c (extended_remote_run): Update code to accept
12063         "std::string" as argument.
12064         (extended_remote_create_inferior): Rewrite function prototype in
12065         order to constify "exec_file" and accept a "std::string" for
12066         "allargs".
12067         * rs6000-nat.c (super_create_inferior): Likewise.
12068         (rs6000_create_inferior): Likewise.
12069         * target.h (struct target_ops) <to_create_inferior>: Likewise.
12070         * windows-nat.c (windows_create_inferior): Likewise.
12071
12072 2017-04-11  Pedro Alves  <palves@redhat.com>
12073
12074         * thread.c: Fix whitespace throughout.
12075
12076 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
12077
12078         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
12079
12080 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
12081
12082         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
12083
12084 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
12085
12086         PR gdb/21364
12087         * osdata.c (info_osdata): Check if 'type' is an empty string
12088         instead of NULL.
12089
12090 2017-04-10  Pedro Alves  <palves@redhat.com>
12091
12092         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
12093         (ptid_to_global_thread_id, in_thread_list)
12094         (do_captured_list_thread_ids, set_resumed, set_running)
12095         (set_executing, set_stop_requested, finish_thread_state)
12096         (validate_registers_access, can_access_registers_ptid)
12097         (print_thread_info_1, switch_to_thread)
12098         (do_restore_current_thread_cleanup)
12099         (make_cleanup_restore_current_thread, thread_command)
12100         (thread_name_command): Use operator== instead of ptid_equal.
12101
12102 2017-04-10  Pedro Alves  <palves@redhat.com>
12103
12104         * thread.c (struct current_thread_cleanup) <next>: Delete field.
12105         (current_thread_cleanup_chain): Delete.
12106         (restore_current_thread_cleanup_dtor)
12107         (make_cleanup_restore_current_thread): Remove references to
12108         current_thread_cleanup_chain.
12109
12110 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
12111
12112         * msp430-tdep.c (msp430_pseudo_register_read): Never return
12113         REG_UNKNOWN.
12114
12115 2017-04-10  Yao Qi  <yao.qi@linaro.org>
12116
12117         PR gdb/19942
12118         * gdbthread.h (thread_info::deletable): New method.
12119         (thread_info::incref): New method.
12120         (thread_info::decref): New method.
12121         (thread_info::refcount): Move it to private.
12122         * infrun.c (save_stop_context): Call inc_refcount.
12123         (release_stop_context_cleanup): Likewise.
12124         * thread.c (set_thread_exited): New function.
12125         (init_thread_list): Delete "tp" only it is deletable, otherwise
12126         call set_thread_exited.
12127         (delete_thread_1): Call set_thread_exited.
12128         (current_thread_cleanup) <inferior_pid>: Remove.
12129         <thread>: New field.
12130         (restore_current_thread_ptid_changed): Removed.
12131         (do_restore_current_thread_cleanup): Adjust.
12132         (restore_current_thread_cleanup_dtor): Don't call
12133         find_thread_ptid.
12134         (set_thread_refcount): Use dec_refcount.
12135         (make_cleanup_restore_current_thread): Adjust.
12136         (thread_apply_all_command): Call inc_refcount.
12137         (_initialize_thread): Don't call
12138         observer_attach_thread_ptid_changed.
12139
12140 2017-04-10  Yao Qi  <yao.qi@linaro.org>
12141
12142         * thread.c (delete_thread_1): Hoist code on marking thread as
12143         exited.
12144
12145 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
12146
12147         * windows-nat.c (windows_detach): Initialize ptid with
12148         minus_one_ptid.
12149
12150 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
12151
12152         * unittests/ptid-selftests.c: Fix erroneous assert messages.
12153
12154 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
12155
12156         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
12157         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
12158         (bfin_pseudo_register_write): Likewise
12159
12160 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
12161
12162         * common/ptid.h (struct ptid): Change to...
12163         (class ptid_t): ... this.
12164         <ptid_t>: New constructors.
12165         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
12166         matches>: New methods.
12167         <make_null, make_minus_one>: New static methods.
12168         <pid>: Rename to...
12169         <m_pid>: ...this.
12170         <lwp>: Rename to...
12171         <m_lwp>: ...this.
12172         <tid>: Rename to...
12173         <m_tid>: ...this.
12174         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
12175         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
12176         as references, move comment to class ptid_t.
12177         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
12178         ptid_t static methods.
12179         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
12180         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
12181         Take ptid arguments as references, implement using ptid_t methods.
12182         * unittests/ptid-selftests.c: New file.
12183         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12184         unittests/ptid-selftests.c.
12185         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
12186
12187 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
12188
12189         * python/python.c (python_run_simple_file): Cast mode literal to
12190         non-const char pointer as expected by PyFile_FromString.
12191
12192 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
12193
12194         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
12195         minus_one_ptid and null_ptid.
12196
12197 2017-04-05  Pedro Alves  <palves@redhat.com>
12198
12199         * warning.m4 (build_warnings): Remove -Wno-write-strings.
12200         * configure: Regenerate.
12201
12202 2017-04-05  Pedro Alves  <palves@redhat.com>
12203
12204         * ada-exp.y (yyerror): Constify.
12205         * ada-lang.c (bound_name, get_selections)
12206         (ada_variant_discrim_type)
12207         (ada_variant_discrim_name, ada_value_struct_elt)
12208         (ada_lookup_struct_elt_type, is_unchecked_variant)
12209         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
12210         (catch_ada_exception_command_split)
12211         (catch_ada_assert_command_split, catch_assert_command)
12212         (ada_op_name): Constify.
12213         * ada-lang.h (ada_yyerror, get_selections)
12214         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
12215         * arc-tdep.c (arc_print_frame_cache): Constify.
12216         * arm-tdep.c (arm_skip_stub): Constify.
12217         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
12218         (gen_aggregate_elt_ref): Constify.
12219         * bcache.c (print_bcache_statistics): Constify.
12220         * bcache.h (print_bcache_statistics): Constify.
12221         * break-catch-throw.c (catch_exception_command_1):
12222         * breakpoint.c (struct ep_type_description::description):
12223         Constify.
12224         (add_solib_catchpoint): Constify.
12225         (catch_fork_command_1): Add cast.
12226         (add_catch_command): Constify.
12227         * breakpoint.h (add_catch_command, add_solib_catchpoint):
12228         Constify.
12229         * bsd-uthread.c (bsd_uthread_state): Constify.
12230         * buildsym.c (patch_subfile_names): Constify.
12231         * buildsym.h (next_symbol_text_func, patch_subfile_names):
12232         Constify.
12233         * c-exp.y (yyerror): Constify.
12234         (token::oper): Constify.
12235         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
12236         * c-varobj.c (cplus_describe_child): Constify.
12237         * charset.c (find_charset_names): Add cast.
12238         (find_charset_names): Constify array and add const_cast.
12239         * cli/cli-cmds.c (complete_command, cd_command): Constify.
12240         (edit_command): Constify.
12241         * cli/cli-decode.c (lookup_cmd): Constify.
12242         * cli/cli-dump.c (dump_memory_command, dump_value_command):
12243         Constify.
12244         (struct dump_context): Constify.
12245         (add_dump_command, restore_command): Constify.
12246         * cli/cli-script.c (get_command_line): Constify.
12247         * cli/cli-script.h (get_command_line): Constify.
12248         * cli/cli-utils.c (check_for_argument): Constify.
12249         * cli/cli-utils.h (check_for_argument): Constify.
12250         * coff-pe-read.c (struct read_pe_section_data): Constify.
12251         * command.h (lookup_cmd): Constify.
12252         * common/print-utils.c (decimal2str): Constify.
12253         * completer.c (gdb_print_filename): Constify.
12254         * corefile.c (set_gnutarget): Constify.
12255         * cp-name-parser.y (yyerror): Constify.
12256         * cp-valprint.c (cp_print_class_member): Constify.
12257         * cris-tdep.c (cris_register_name, crisv32_register_name):
12258         Constify.
12259         * d-exp.y (yyerror): Constify.
12260         (struct token::oper): Constify.
12261         * d-lang.h (d_yyerror): Constify.
12262         * dbxread.c (struct header_file_location::name): Constify.
12263         (add_old_header_file, add_new_header_file, last_function_name)
12264         (dbx_next_symbol_text, add_bincl_to_list)
12265         (find_corresponding_bincl_psymtab, set_namestring)
12266         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
12267         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
12268         * defs.h (command_line_input, print_address_symbolic)
12269         (deprecated_readline_begin_hook): Constify.
12270         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
12271         Constify.
12272         * event-top.c (handle_line_of_input): Constify and add cast.
12273         * exceptions.c (catch_errors): Constify.
12274         * exceptions.h (catch_errors): Constify.
12275         * expprint.c (print_subexp_standard, op_string, op_name)
12276         (op_name_standard, dump_raw_expression, dump_raw_expression):
12277         * expression.h (op_name, op_string, dump_raw_expression):
12278         Constify.
12279         * f-exp.y (yyerror): Constify.
12280         (struct token::oper): Constify.
12281         (struct f77_boolean_val::name): Constify.
12282         * f-lang.c (f_word_break_characters): Constify.
12283         * f-lang.h (f_yyerror): Constify.
12284         * fork-child.c (fork_inferior): Add cast.
12285         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
12286         (new_variant): Constify.
12287         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
12288         * gdbarch.c: Regenerate.
12289         * gdbcore.h (set_gnutarget): Constify.
12290         * go-exp.y (yyerror): Constify.
12291         (token::oper): Constify.
12292         * go-lang.h (go_yyerror): Constify.
12293         * go32-nat.c (go32_sysinfo): Constify.
12294         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
12295         * guile/scm-cmd.c (cmdscm_function): Constify.
12296         * guile/scm-param.c (pascm_param_value): Constify.
12297         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
12298         (h8300sx_register_name): Constify.
12299         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
12300         Constify.
12301         * ia64-tdep.c (ia64_register_names): Constify.
12302         * infcmd.c (construct_inferior_arguments): Constify.
12303         (path_command, attach_post_wait): Constify.
12304         * language.c (show_range_command, show_case_command)
12305         (unk_lang_error): Constify.
12306         * language.h (language_defn::la_error)
12307         (language_defn::la_name_of_this): Constify.
12308         * linespec.c (decode_line_2): Constify.
12309         * linux-thread-db.c (thread_db_err_str): Constify.
12310         * lm32-tdep.c (lm32_register_name): Constify.
12311         * m2-exp.y (yyerror): Constify.
12312         * m2-lang.h (m2_yyerror): Constify.
12313         * m32r-tdep.c (m32r_register_names): Constify and make static.
12314         * m68hc11-tdep.c (m68hc11_register_names): Constify.
12315         * m88k-tdep.c (m88k_register_name): Constify.
12316         * macroexp.c (appendmem): Constify.
12317         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
12318         (upgrade_type, parse_external, parse_partial_symbols)
12319         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
12320         (new_symbol): Constify.
12321         * memattr.c (mem_info_command): Constify.
12322         * mep-tdep.c (register_name_from_keyword): Constify.
12323         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
12324         Constify.
12325         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
12326         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
12327         * mi/mi-main.c (captured_mi_execute_command): Constify and add
12328         cast.
12329         (mi_execute_async_cli_command): Constify.
12330         * mips-tdep.c (mips_register_name): Constify.
12331         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
12332         (am33_register_name, am33_2_register_name)
12333         * moxie-tdep.c (moxie_register_names): Constify.
12334         * nat/linux-osdata.c (osdata_type): Constify fields.
12335         * nto-tdep.c (nto_parse_redirection): Constify.
12336         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
12337         (lookup_child_selector): Constify.
12338         (objc_methcall::name): Constify.
12339         * objc-lang.h (lookup_objc_class, lookup_child_selector)
12340         (lookup_struct_typedef): Constify.
12341         * objfiles.c (pc_in_section): Constify.
12342         * objfiles.h (pc_in_section): Constify.
12343         * p-exp.y (struct token::oper): Constify.
12344         (yyerror): Constify.
12345         * p-lang.h (pascal_yyerror): Constify.
12346         * parser-defs.h (op_name_standard): Constify.
12347         (op_print::string): Constify.
12348         (exp_descriptor::op_name): Constify.
12349         * printcmd.c (print_address_symbolic): Constify.
12350         * psymtab.c (print_partial_symbols): Constify.
12351         * python/py-breakpoint.c (stop_func): Constify.
12352         (bppy_get_expression): Constify.
12353         * python/py-cmd.c (cmdpy_completer::name): Constify.
12354         (cmdpy_function): Constify.
12355         * python/py-event.c (evpy_add_attribute)
12356         (gdbpy_initialize_event_generic): Constify.
12357         * python/py-event.h (evpy_add_attribute)
12358         (gdbpy_initialize_event_generic): Constify.
12359         * python/py-evts.c (add_new_registry): Constify.
12360         * python/py-finishbreakpoint.c (outofscope_func): Constify.
12361         * python/py-framefilter.c (get_py_iter_from_func): Constify.
12362         * python/py-inferior.c (get_buffer): Add cast.
12363         * python/py-param.c (parm_constant::name): Constify.
12364         * python/py-unwind.c (fprint_frame_id): Constify.
12365         * python/python.c (gdbpy_parameter_value): Constify.
12366         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
12367         * remote.c (memory_packet_config::name): Constify.
12368         (show_packet_config_cmd, remote_write_bytes)
12369         (remote_buffer_add_string):
12370         * reverse.c (exec_reverse_once): Constify.
12371         * rs6000-tdep.c (variant::name, variant::description): Constify.
12372         * rust-exp.y (rustyyerror): Constify.
12373         * rust-lang.c (rust_op_name): Constify.
12374         * rust-lang.h (rustyyerror): Constify.
12375         * serial.h (serial_ops::name): Constify.
12376         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
12377         (sh_sh3e_register_name, sh_sh2e_register_name)
12378         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
12379         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
12380         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
12381         (sh_sh4al_dsp_register_name): Constify.
12382         * sh64-tdep.c (sh64_register_name): Constify.
12383         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
12384         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
12385         * stabsread.c (patch_block_stabs, read_type_number)
12386         (ref_map::stabs, ref_add, process_reference)
12387         (symbol_reference_defined, define_symbol, define_symbol)
12388         (error_type, read_type, read_member_functions, read_cpp_abbrev)
12389         (read_one_struct_field, read_struct_fields, read_baseclasses)
12390         (read_tilde_fields, read_struct_type, read_array_type)
12391         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
12392         (read_huge_number, read_range_type, read_args, common_block_start)
12393         (find_name_end): Constify.
12394         * stabsread.h (common_block_start, define_symbol)
12395         (process_one_symbol, symbol_reference_defined, ref_add):
12396         * symfile.c (get_section_index, add_symbol_file_command):
12397         * symfile.h (get_section_index): Constify.
12398         * target-descriptions.c (tdesc_type::name): Constify.
12399         (tdesc_free_type): Add cast.
12400         * target.c (find_default_run_target):
12401         (add_deprecated_target_alias, find_default_run_target)
12402         (target_announce_detach): Constify.
12403         (do_option): Constify.
12404         * target.h (add_deprecated_target_alias): Constify.
12405         * thread.c (print_thread_info_1): Constify.
12406         * top.c (deprecated_readline_begin_hook, command_line_input):
12407         Constify.
12408         (init_main): Add casts.
12409         * top.h (handle_line_of_input): Constify.
12410         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
12411         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
12412         (tfind_command): Rename to ...
12413         (tfind_command_1): ... this and constify.
12414         (tfind_command): New function.
12415         (tfind_end_command, tfind_start_command): Adjust.
12416         (encode_source_string): Constify.
12417         * tracepoint.h (encode_source_string): Constify.
12418         * tui/tui-data.c (tui_partial_win_by_name): Constify.
12419         * tui/tui-data.h (tui_partial_win_by_name): Constify.
12420         * tui/tui-source.c (tui_set_source_content_nil): Constify.
12421         * tui/tui-source.h (tui_set_source_content_nil): Constify.
12422         * tui/tui-win.c (parse_scrolling_args): Constify.
12423         * tui/tui-windata.c (tui_erase_data_content): Constify.
12424         * tui/tui-windata.h (tui_erase_data_content): Constify.
12425         * tui/tui-winsource.c (tui_erase_source_content): Constify.
12426         * tui/tui.c (tui_enable): Add cast.
12427         * utils.c (defaulted_query): Constify.
12428         (init_page_info): Add cast.
12429         (puts_debug, subset_compare): Constify.
12430         * utils.h (subset_compare): Constify.
12431         * varobj.c (varobj_format_string): Constify.
12432         * varobj.h (varobj_format_string): Constify.
12433         * vax-tdep.c (vax_register_name): Constify.
12434         * windows-nat.c (windows_detach): Constify.
12435         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
12436         * xml-support.c (gdb_xml_end_element): Constify.
12437         * xml-tdesc.c (tdesc_start_reg): Constify.
12438         * xstormy16-tdep.c (xstormy16_register_name): Constify.
12439         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
12440         * xtensa-tdep.h (xtensa_register_t::name): Constify.
12441
12442 2017-04-05  Pedro Alves  <palves@redhat.com>
12443
12444         * proc-api.c (struct trans): Constify.
12445         (procfs_note): Constify.
12446         * proc-events.c (struct trans, syscall_table):
12447         * proc-flags.c (struct trans): Constify.
12448         * proc-utils.h (procfs_note): Constify.
12449         * proc-why.c (struct trans): Constify.
12450         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
12451         (procfs_detach): Constify.
12452         * sol-thread.c (struct string_map): Constify.
12453         (td_err_string, td_state_string): Constify.
12454
12455 2017-04-05  Pedro Alves  <palves@redhat.com>
12456
12457         * proc-api.c (procfs_filename): Don't initialize
12458         procfs_filename.
12459         (prepare_to_trace): Assume procfs_filename is non-NULL.
12460         (_initialize_proc_api): Give procfs_filename a default value here.
12461
12462 2017-04-05  Pedro Alves  <palves@redhat.com>
12463
12464         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
12465         'cond_string' parameter.
12466         (extract_exception_regexp): Constify 'string' parameter.
12467         (catch_exception_command_1): Constify.
12468         * breakpoint.c (init_catchpoint)
12469         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
12470         parameter.
12471         (ep_parse_optional_if_clause, catch_fork_command_1)
12472         (catch_exec_command_1): Constify.
12473         * breakpoint.h (init_catchpoint): Constify 'cond_string'
12474         parameter.
12475         (ep_parse_optional_if_clause): Constify.
12476         * cli/cli-utils.c (remove_trailing_whitespace)
12477         (check_for_argument): Constify.
12478         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
12479         non-const overload.
12480         (check_for_argument): Likewise.
12481
12482 2017-04-05  Pedro Alves  <palves@redhat.com>
12483
12484         * event-top.c (command_line_handler): Add cast to execute_command
12485         call.
12486         * record-btrace.c (cmd_record_btrace_bts_start)
12487         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
12488         (cmd_record_btrace_start): Add cast to execute_command call.
12489         * record-full.c (record_full_goto_insn):
12490         * record.c (record_start, record_stop): Add cast to
12491         execute_command_to_string calls.
12492         (cmd_record_start): Add cast to execute_command calls.
12493
12494 2017-04-05  Pedro Alves  <palves@redhat.com>
12495
12496         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
12497         static inline function.
12498         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
12499         array and use gdb_PyArg_ParseTupleAndKeywords.
12500         * python/py-cmd.c (cmdpy_init): Likewise.
12501         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
12502         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
12503         (infpy_search_memory): Likewise.
12504         * python/py-objfile.c (objfpy_add_separate_debug_file)
12505         (gdbpy_lookup_objfile): Likewise.
12506         * python/py-symbol.c (gdbpy_lookup_symbol)
12507         (gdbpy_lookup_global_symbol): Likewise.
12508         * python/py-type.c (gdbpy_lookup_type): Likewise.
12509         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
12510         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
12511         Likewise.
12512
12513 2017-04-05  Pedro Alves  <palves@redhat.com>
12514
12515         * python/python-internal.h (gdb_PyGetSetDef): New type.
12516         * python/py-block.c (block_object_getset)
12517         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
12518         * python/py-event.c (event_object_getset)
12519         (finish_breakpoint_object_getset): Likewise.
12520         * python/py-inferior.c (inferior_object_getset): Likewise.
12521         * python/py-infthread.c (thread_object_getset): Likewise.
12522         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
12523         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
12524         * python/py-objfile.c (objfile_getset): Likewise.
12525         * python/py-progspace.c (pspace_getset): Likewise.
12526         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
12527         Likewise.
12528         * python/py-record.c (recpy_record_getset): Likewise.
12529         * python/py-symbol.c (symbol_object_getset): Likewise.
12530         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
12531         Likewise.
12532         * python/py-type.c (type_object_getset, field_object_getset):
12533         Likewise.
12534         * python/py-value.c (value_object_getset): Likewise.
12535
12536 2017-04-05  Pedro Alves  <palves@redhat.com>
12537
12538         * python/python-internal.h (gdb_PyObject_CallMethod)
12539         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
12540         New functions.
12541         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
12542         (PySys_GetObject, PySys_SetPath): New macros.
12543
12544 2017-04-05  Pedro Alves  <palves@redhat.com>
12545
12546         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
12547         info_osdata_command.
12548         * osdata.c (info_osdata_command): Rename to ...
12549         (info_osdata): ... this.  Constify 'type' parameter, and remove
12550         the 'from_tty' parameter.  Accept NULL TYPE.
12551         (info_osdata_command): New function.
12552         * osdata.h (info_osdata_command): Remove declaration.
12553         (info_osdata): New declaration.
12554
12555 2017-04-05  Pedro Alves  <palves@redhat.com>
12556
12557         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
12558         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
12559         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
12560         parameter.
12561         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
12562         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
12563         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
12564         parameter.
12565         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
12566         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
12567         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
12568         (mi_cmd_file_list_exec_source_files)
12569         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
12570         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
12571         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
12572         parameter.
12573         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
12574         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
12575         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
12576         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
12577         (mi_cmd_stack_info_frame): Constify 'command' parameter.
12578         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
12579         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
12580         'command' parameter.
12581         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
12582         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
12583         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
12584         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
12585         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
12586         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
12587         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
12588         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
12589         (mi_cmd_var_set_update_range): Constify 'command' parameter.
12590         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
12591         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
12592         parameter.
12593         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
12594         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
12595         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
12596         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
12597         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
12598         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
12599         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
12600         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
12601         (mi_cmd_data_list_changed_registers)
12602         (mi_cmd_data_write_register_values)
12603         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
12604         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
12605         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
12606         (mi_cmd_list_features, mi_cmd_list_target_features)
12607         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
12608         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
12609         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
12610         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
12611         (mi_cmd_trace_frame_collected): Constify 'command'
12612         parameter.
12613         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
12614         'command' parameter.
12615
12616 2017-04-05  Pedro Alves  <palves@redhat.com>
12617
12618         * ada-lang.c (ada_completer_word_break_characters): Now a const
12619         array.
12620         (ada_get_gdb_completer_word_break_characters): Constify.
12621         * completer.c (gdb_completer_command_word_break_characters)
12622         (gdb_completer_file_name_break_characters)
12623         (gdb_completer_quote_characters): Now const arrays.
12624         (get_gdb_completer_quote_characters): Constify.
12625         (set_rl_completer_word_break_characters): New function.
12626         (set_gdb_completion_word_break_characters)
12627         (complete_line_internal): Use it.
12628         * completer.h (get_gdb_completer_quote_characters): Constify.
12629         (set_rl_completer_word_break_characters): Declare.
12630         * f-lang.c (f_word_break_characters): Constify.
12631         * language.c (default_word_break_characters): Constify.
12632         * language.h (language_defn::la_word_break_characters): Constify.
12633         (default_word_break_characters): Constify.
12634         * top.c (init_main): Use set_rl_completer_word_break_characters.
12635
12636 2017-04-05  Pedro Alves  <palves@redhat.com>
12637
12638         * aix-thread.c (aix_thread_pid_to_str)
12639         (aix_thread_extra_thread_info): Constify.
12640         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
12641         * bsd-uthread.c (bsd_uthread_extra_thread_info)
12642         (bsd_uthread_pid_to_str): Constify.
12643         * corelow.c (core_pid_to_str): Constify.
12644         * darwin-nat.c (darwin_pid_to_str): Constify.
12645         * fbsd-nat.c (fbsd_pid_to_str): Constify.
12646         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
12647         Constify.
12648         * gnu-nat.c (gnu_pid_to_str): Constify.
12649         * go32-nat.c (go32_pid_to_str): Constify.
12650         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
12651         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
12652         * inferior.c (inferior_pid_to_str): Constify.
12653         * linux-nat.c (linux_nat_pid_to_str): Constify.
12654         * linux-tdep.c (linux_core_pid_to_str): Constify.
12655         * linux-thread-db.c (thread_db_pid_to_str)
12656         (thread_db_extra_thread_info): Constify.
12657         * nto-tdep.c (nto_extra_thread_info): Constify.
12658         * nto-tdep.h (nto_extra_thread_info): Constify.
12659         * obsd-nat.c (obsd_pid_to_str): Constify.
12660         * procfs.c (procfs_pid_to_str): Constify.
12661         * ravenscar-thread.c (ravenscar_extra_thread_info)
12662         (ravenscar_pid_to_str): Constify.
12663         * remote-sim.c (gdbsim_pid_to_str): Constify.
12664         * remote.c (remote_threads_extra_info, remote_pid_to_str):
12665         Constify.
12666         * sol-thread.c (solaris_pid_to_str): Constify.
12667         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
12668         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
12669         * target.c (default_pid_to_str, target_pid_to_str)
12670         (normal_pid_to_str, default_pid_to_str): Constify.
12671         * target.h (target_ops::to_pid_to_str)
12672         (target_ops::to_extra_thread_info): Constify.
12673         (target_pid_to_str, normal_pid_to_str): Constify.
12674         * windows-nat.c (windows_pid_to_str): Constify.
12675         * gdbarch.sh (core_pid_to_str): Constify.
12676         * target-delegates.c: Regenerate.
12677         * gdbarch.h, gdbarch.c: Regenerate.
12678
12679 2017-04-05  Pedro Alves  <palves@redhat.com>
12680
12681         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
12682         the memory of the temporary warning_pre_print override.
12683         * utils.c (warning_pre_print): Constify.
12684         * utils.h (warning_pre_print): Constify.
12685
12686 2017-04-05  Pedro Alves  <palves@redhat.com>
12687
12688         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
12689         (shell_command): New function.
12690         (make_command): Use std::string.
12691         (init_cli_cmds): Register shell_command instead of shell_escape.
12692
12693 2017-04-05  Pedro Alves  <palves@redhat.com>
12694
12695         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
12696         * tracepoint.c (default_collect): Don't initialize.
12697
12698 2017-04-05  Pedro Alves  <palves@redhat.com>
12699
12700         * macroexp.c (macro_buffer::shared): Now a bool.
12701         (init_buffer): Update.
12702         (init_shared_buffer): Constify 'addr' parameter.
12703         (substitute_args, expand, macro_expand, macro_expand_next): Remove
12704         casts.
12705
12706 2017-04-05  Pedro Alves  <palves@redhat.com>
12707
12708         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
12709         * disasm.c (set_disassembler_options): Constify local.
12710         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
12711
12712 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
12713
12714         PR gdb/21352
12715         * tracefile.c (tsave_command): Fix argument parsing for '-r'
12716         option.
12717
12718 2017-04-05  Yao Qi  <yao.qi@linaro.org>
12719
12720         * frame.c (frame_unwind_register_unsigned): Call
12721         frame_unwind_register_value.
12722
12723 2017-04-05  Yao Qi  <yao.qi@linaro.org>
12724
12725         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
12726         Use gdb_test_multiple, and don't match anchor.
12727
12728 2017-04-05  Pedro Alves  <palves@redhat.com>
12729
12730         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
12731         (Write After Approval): Remove Simon Marchi.
12732
12733 2017-04-05  Pedro Alves  <palves@redhat.com>
12734
12735         * common/gdb_optional.h (optional::optional): Make constexpr and
12736         initialize m_dummy.
12737
12738 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
12739
12740         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
12741         (amd64fbsd_jmp_buf_reg_offset): Remove.
12742         (amd64fbsd_supply_uthread): Remove function.
12743         (amd64fbsd_collect_uthread): Remove function.
12744         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
12745         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
12746         (x86_64-*-freebsd*): Remove bsd-uthread.o.
12747         (fbsd-nat.c): Update comment.
12748         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
12749         (i386fbsd_jmp_buf_reg_offset): Remove.
12750         (i386fbsd_supply_uthread): Remove function.
12751         (i386fbsd_collect_uthread): Remove function.
12752         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
12753
12754 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
12755
12756         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
12757         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
12758         * NEWS: Mention that support for FreeBSD/alpha was removed.
12759         * alpha-fbsd-tdep.c: Delete file.
12760         * config/alpha/fbsd.mh: Delete file.
12761         * configure.host: Delete alpha*-*-freebsd* and
12762         alpha*-*-kfreebsd*-gnu.
12763         * configure.tgt: Delete alpha*-*-freebsd* and
12764         alpha*-*-kfreebsd*-gnu.
12765
12766 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
12767
12768         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
12769         amd64bsd_store_inferior_registers): Use ptid from regcache.
12770
12771 2017-04-04  Pedro Alves  <palves@redhat.com>
12772
12773         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
12774         data fields, make them private and add "m_" prefixes.
12775         (lnp_state_machine::lnp_state_machine): New ctor.
12776         (record_line, check_line_address, handle_set_discriminator)
12777         (handle_set_address, handle_advance_pc, handle_special_opcode)
12778         (handle_advance_line, handle_set_file, handle_negate_stmt)
12779         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
12780         (end_sequence, advance_line): New methods.
12781         (m_gdbarch, m_record_lines_p): New fields.
12782         (lnp_reader_state): Delete.
12783         (dwarf_record_line): Rename to ...
12784         (lnp_state_machine::record_line): ... adjust.
12785         (init_lnp_state_machine): Delete.
12786         (lnp_state_machine::lnp_state_machine): New.
12787         (check_line_address): Rename to ...
12788         (lnp_state_machine::check_line_address): This.
12789         (dwarf_decode_lines_1): Remove reference to "reader_state".
12790         Adjust lnp_state_machine having a non-default ctor.  Use bool.
12791         State machine internal state manipulation moved to
12792         lnp_state_machine methods.
12793
12794 2017-04-04  Pedro Alves  <palves@redhat.com>
12795
12796         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
12797         unittests/offset-type-selftests.c.
12798         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
12799         * common/offset-type.h: New file.
12800         * common/preprocessor.h: New file.
12801         * common/traits.h: New file.
12802         * common/valid-expr.h: New file.
12803         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
12804         sect_offset and cu_offset strong typedefs throughout.
12805         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
12806         typedefs throughout.
12807         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
12808         sect_offset and cu_offset strong typedefs throughout.
12809         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
12810         typedefs throughout.
12811         * gdbtypes.h: Include "common/offset-type.h".
12812         (cu_offset): Now an offset type (strong typedef) instead of a
12813         struct.
12814         (sect_offset): Likewise.
12815         (union call_site_parameter_u): Rename "param_offset" field to
12816         "param_cu_off".
12817         * unittests/offset-type-selftests.c: New file.
12818
12819 2017-04-04  Pedro Alves  <palves@redhat.com>
12820
12821         * common/underlying.h: New file.
12822         * dwarf2read.c: Include "common/gdb_optional.h" and
12823         "common/underlying.h".
12824         (dir_index, file_name_index): New types.
12825         (file_entry): Use them.
12826         (file_entry::include): Use to_underlying.
12827         (line_header::add_file_name): Use dir_index.
12828         (read_formatted_entries): Use gdb::optional.  Read form before
12829         writting to file_entry.
12830         (dwarf_decode_line_header): Use dir_index.
12831         (lnp_state_machine::current_file): Use to_underlying.
12832         (lnp_state_machine::file): Change type to file_name_index.
12833         (dwarf_record_line): Use to_underlying.
12834         (init_lnp_state_machine): Use file_name_index.
12835         (dwarf_decode_lines_1): Use dir_index and file_name_index.
12836
12837 2017-04-04  Pedro Alves  <palves@redhat.com>
12838
12839         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
12840         operator bool, has_value and get methods.
12841
12842 2017-04-04  Pedro Alves  <palves@redhat.com>
12843
12844         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
12845         fields.
12846         (line_header): Initialize all data fields.  Change type of
12847         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
12848         Change type of include_dirs to std::vector<const char *>.  Remove
12849         num_include_dirs, include_dirs_size.  Change type of file_names to
12850         std::vector<file_entry>.  Remove num_file_names, file_names_size.
12851         (line_header::line_header): New.
12852         (line_header::add_include_dir, line_header::add_file_name): New
12853         methods.
12854         (line_header::include_dir_at): Remove NULL check.
12855         (line_header::file_name_at): Add const overload.
12856         (line_header_up): New unique_ptr typedef.
12857         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
12858         std::vector.  Remove free_line_header call.
12859         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
12860         free_line_header call.
12861         (free_cu_line_header): Delete.
12862         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
12863         (setup_type_unit_groups): Use line_header_up instead of cleanups.
12864         Adjust to use std::vector.
12865         (free_line_header): Delete.
12866         (free_line_header_voidp): Use delete.
12867         (add_include_dir): Replace with ...
12868         (line_header::add_include_dir): ... this method.  Use std::vector.
12869         (add_file_name): Replace with ...
12870         (line_header::add_file_name): ... this method.  Use std::vector.
12871         (add_include_dir_stub): Delete.
12872         (read_formatted_entries): Remove memset.
12873         (dwarf_decode_line_header): Return a line_header_up instead of a
12874         raw pointer.  Remove cleanup handling.  Pass lambdas to
12875         read_formatted_entries.  Adjust to use line_header methods.
12876         (dwarf_decode_lines_1): Adjust to use line_header methods.
12877         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
12878         use std::vector.
12879
12880 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
12881
12882         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
12883         instead of struct ptid.
12884
12885 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
12886
12887         * frame.c (get_frame_register_bytes): Unwind using value.
12888         (put_frame_register_bytes): Likewise.
12889
12890 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
12891
12892         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
12893         aggregate-like.
12894
12895 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
12896
12897         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
12898
12899 2017-03-29  Yao Qi  <yao.qi@linaro.org>
12900
12901         * gdbthread.h (struct thread_info): Declare constructor and
12902         destructor.  Add some in-class member initializers.
12903         * thread.c (free_thread): Remove.
12904         (init_thread_list): Call delete instead of free_thread.
12905         (new_thread): Call thread_info constructor.
12906         (thread_info::thread_info): New function.
12907         (thread_info::~thread_info): New function.
12908         (delete_thread_1): Call delete instead of free_thread.
12909         (make_cleanup_restore_current_thread): Move tp and frame to
12910         inner block.
12911
12912 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12913
12914         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
12915         (arc_skip_prologue): Likewise.
12916         (arc_make_frame_cache): Likewise.
12917         (arc_pv_get_operand): New function.
12918         (arc_is_in_prologue): Likewise.
12919         (arc_analyze_prologue): Likewise.
12920         (arc_print_frame_cache): Likewise.
12921         (MAX_PROLOGUE_LENGTH): New constant.
12922
12923 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12924
12925         * configure.tgt: Add arc-insn.o.
12926         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
12927         (dump_arc_instruction_command): New function.
12928         (arc_fprintf_disasm): Likewise.
12929         (arc_disassemble_info): Likewise.
12930         (arc_insn_get_operand_value): Likewise.
12931         (arc_insn_get_operand_value_signed): Likewise.
12932         (arc_insn_get_memory_base_reg): Likewise.
12933         (arc_insn_get_memory_offset): Likewise.
12934         (arc_insn_get_branch_target): Likewise.
12935         (arc_insn_dump): Likewise.
12936         (arc_insn_get_linear_next_pc): Likewise.
12937         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
12938         (arc_disassemble_info): Likewise.
12939         (arc_insn_get_branch_target): Likewise.
12940         (arc_insn_get_linear_next_pc): Likewise.
12941         * NEWS: Mention new "maint print arc arc-instruction".
12942
12943 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12944
12945         * arc-tdep (maintenance_print_arc_list): New variable.
12946         (maintenance_print_arc_command): New function.
12947
12948 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
12949
12950         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
12951         Add "limm" and "reserved".
12952         (arc_cannot_fetch_register, arc_cannot_store_register): Add
12953         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
12954         * arc-tdep.h (arc_regnum): Likewise.
12955
12956 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12957
12958         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
12959         for THREADPTR register.
12960         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
12961         register.
12962         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
12963         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
12964         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
12965
12966 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12967
12968         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
12969         registers above gdbarch_num_regs (gdbarch) as privileged in
12970         call0 ABI.
12971
12972 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12973
12974         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
12975         for a single specified register or for all registers in
12976         a0_base..a0_base + C0_NREGS range.
12977         (supply_gregset_reg): Call regcache_raw_supply for a single
12978         specified register or for all registers in a0_base..a0_base +
12979         C0_NREGS range.
12980
12981 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12982
12983         * arch/xtensa.h (C0_NREGS): Add definition.
12984         * xtensa-tdep.c (C0_NREGS): Remove definition.
12985
12986 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
12987
12988         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
12989         Drop xtensa_default_isa initialization.
12990         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
12991
12992 2017-03-27  Pedro Alves  <palves@redhat.com>
12993
12994         * dwarf2read.c (file_entry) <dir_index>: Add comment.
12995         (file_entry::include_dir): New method.
12996         (line_header::include_dir_at, line_header::file_name_at): New
12997         methods.
12998         (setup_type_unit_groups, setup_type_unit_groups)
12999         (psymtab_include_file_name): Simplify using the new methods.
13000         (lnp_state_machine) <the_line_header>: New field.
13001         <file>: Add comment.
13002         (lnp_state_machine::current_file): New method.
13003         (dwarf_record_line): Simplify using the new methods.
13004         (init_lnp_state_machine): Initialize the "the_line_header" field.
13005         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
13006         Simplify using the new methods.
13007
13008 2017-03-27  Pedro Alves  <palves@redhat.com>
13009
13010         * cp-name-parser.y (make_empty): Delete.
13011         (demangler_special, nested_name, ptr_operator, array_indicator)
13012         (direct_declarator, declarator_1): Use fill_comp instead of
13013         make_empty.
13014
13015 2017-03-27  Pedro Alves  <palves@redhat.com>
13016
13017         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
13018         to ATTRIBUTE_PRINTF.
13019         * solib-target.c (library_list_start_list): Print "string" not
13020         "version".
13021         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
13022         gdb_xml_error call.
13023
13024 2017-03-27  Pedro Alves  <palves@redhat.com>
13025
13026         * dwarf2read.c (struct file_and_directory): New.
13027         (dwarf2_get_dwz_file): Adjust to use std::string.
13028         (dw2_get_file_names_reader): Adjust to use file_and_directory.
13029         (find_file_and_directory): Adjust to return a file_and_directory
13030         object.
13031         (read_file_scope): Adjust to use file_and_directory.  Remove
13032         make_cleanup/do_cleanups calls.
13033         (open_and_init_dwp_file): Adjust to use std::string.  Remove
13034         make_cleanup/do_cleanups calls.
13035         * python/python.c (do_start_initialization): Adjust to ldirname
13036         returning a std::string.
13037         * utils.c (ldirname): Now returns a std::string.
13038         * utils.h (ldirname): Change return type to std::string.
13039         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
13040         returning a std::string.
13041         * xml-tdesc.c (file_read_description_xml): Likewise.
13042
13043 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
13044
13045         * regcache.c (regcache_debug_print_register): New function.
13046         * regcache.h (regcache_debug_print_register): New declaration.
13047         * target.c (debug_print_register): Remove.
13048         (target_fetch_registers): Call regcache_debug_print_register.
13049         (target_store_registers): Likewise.
13050
13051 2017-03-24  Pádraig Brady  <pbrady@fb.com>
13052
13053         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
13054         reference beyond the 'lh->include_dirs' array before accessing to
13055         it.
13056         (psymtab_include_file_name): Likewise.
13057         (dwarf_decode_lines_1): Likewise.
13058         (dwarf_decode_lines): Likewise.
13059         (file_file_name): Likewise.
13060
13061 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
13062
13063         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
13064         inferior_ptid.
13065         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
13066         ps_lsetfpregs): Likewise.
13067         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
13068         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
13069         ps_lsetfpregs): Likewise.
13070         * target.c (target_fetch_registers, target_store_registers):
13071         Remove asserts.
13072
13073 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
13074
13075         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
13076
13077 2017-03-23  Yao Qi  <yao.qi@linaro.org>
13078
13079         * aarch64-tdep.c (aarch64_process_record_test): Declare.
13080         (_initialize_aarch64_tdep): Register it.
13081         (aarch64_record_load_store): Handle PRFM instruction.
13082         (aarch64_process_record_test): New function.
13083
13084 2017-03-23  Yao Qi  <yao.qi@linaro.org>
13085
13086         * aarch64-tdep.c (aarch64_record_load_store): Fix code
13087         indentation.
13088
13089 2017-03-23  Yao Qi  <yao.qi@linaro.org>
13090
13091         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
13092
13093 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
13094
13095         python/python.c (do_start_initialization): Fix memory leak.
13096
13097 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
13098
13099         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
13100         using get_ptrace_pid.
13101         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
13102         inferior_ptid.
13103         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
13104         inferior_ptid instead of pid.
13105
13106 2017-03-22  Yao Qi  <yao.qi@linaro.org>
13107
13108         * aarch64-tdep.c: Wrap locally used classes in anonymous
13109         namespace.
13110         * arm-tdep.c: Likewise.
13111         * linespec.c: Likewise.
13112         * ui-out.c: Likewise.
13113
13114 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
13115
13116         PR gdb/19637
13117         * python/lib/gdb/printer/bound_registers.py: Import sys.
13118
13119 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
13120
13121         * windows-nat.c (do_windows_fetch_inferior_registers): Add
13122         windows_thread_info parameter and use it instead of
13123         current_thread.
13124         (windows_fetch_inferior_registers): Don't set current_thread,
13125         pass the thread to do_windows_fetch_inferior_registers.  Use
13126         ptid from regcache instead of inferior_ptid.
13127         (do_windows_store_inferior_registers): Add windows_thread_info
13128         parameter and use it instead of current_thread.
13129         (windows_store_inferior_registers): Don't set current_thread,
13130         pass the thread to do_windows_store_inferior_registers.  Use
13131         ptid from regcache instead of inferior_ptid.
13132
13133 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
13134
13135         * ser-mingw.c (ser_windows_raw): Remove reference to
13136         struct serial::current_timeout.
13137
13138 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
13139
13140         PR tdep/20928
13141         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
13142         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
13143         (sparc64_fsr_type): Fix %fsr decoding.
13144
13145 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
13146
13147         * python/py-record-btrace.c (btpy_insn_data): Change return type
13148         for Python 2.
13149
13150 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
13151
13152         * spu-linux-nat.c (spu_fetch_inferior_registers,
13153         spu_store_inferior_registers): Use ptid from regcache, set and
13154         restore inferior_ptid.
13155         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
13156         Likewise.
13157
13158 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
13159
13160         * i386-linux-nat.c (fetch_register, store_register,
13161         i386_linux_fetch_inferior_registers,
13162         i386_linux_store_inferior_registers): Use ptid from regcache.
13163         * ia64-linux-nat.c (ia64_linux_fetch_register,
13164         ia64_linux_store_register): Likewise.
13165         * inf-ptrace.c (inf_ptrace_fetch_register,
13166         inf_ptrace_store_register): Likewise.
13167         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
13168         m32r_linux_store_inferior_registers): Likewise.
13169         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
13170         m68kbsd_store_inferior_registers): Likewise.
13171         * m68k-linux-nat.c (fetch_register, store_register,
13172         m68k_linux_fetch_inferior_registers,
13173         m68k_linux_store_inferior_registers): Likewise.
13174         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
13175         m88kbsd_store_inferior_registers): Likewise.
13176         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
13177         mips_fbsd_store_inferior_registers): Likewise.
13178         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
13179         mips64_linux_regsets_store_registers): Likewise.
13180         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
13181         mipsnbsd_store_inferior_registers): Likewise.
13182         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
13183         mips64obsd_store_inferior_registers): Likewise.
13184         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
13185         Likewise.
13186         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
13187         ppcfbsd_store_inferior_registers): Likewise.
13188         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
13189         ppc_linux_store_inferior_registers): Likewise.
13190         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
13191         ppcnbsd_store_inferior_registers): Likewise.
13192         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
13193         ppcobsd_store_registers): Likewise.
13194         * procfs.c (procfs_fetch_registers, procfs_store_registers):
13195         Likewise.
13196         * ravenscar-thread.c (ravenscar_fetch_registers,
13197         ravenscar_store_registers, ravenscar_prepare_to_store):
13198         Likewise.
13199         * record-btrace.c (record_btrace_fetch_registers,
13200         record_btrace_store_registers, record_btrace_prepare_to_store):
13201         Likewise.
13202         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
13203         Lookup inferior using ptid from regcache, instead of
13204         current_inferior.
13205         * remote.c (remote_fetch_registers, remote_store_registers): Use
13206         ptid from regcache.
13207         * rs6000-nat.c (fetch_register, store_register): Likewise.
13208         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
13209         s390_linux_store_inferior_registers): Likewise.
13210         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
13211         shnbsd_store_inferior_registers): Likewise.
13212         * sol-thread.c (sol_thread_fetch_registers,
13213         sol_thread_store_registers): Likewise.
13214         * sparc-nat.c (sparc_fetch_inferior_registers,
13215         sparc_store_inferior_registers): Likewise.
13216         * tilegx-linux-nat.c (fetch_inferior_registers,
13217         store_inferior_registers): Likewise.
13218         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
13219         vaxbsd_store_inferior_registers): Likewise.
13220         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
13221         store_xtregs): Likewise.
13222
13223 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13224
13225         PR gdb/14441
13226         * NEWS: Mention support for rvalue references in GDB and python.
13227         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
13228         supports both lvalue and rvalue references.
13229
13230 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13231
13232         PR gdb/14441
13233         * gdbtypes.c (rank_one_type): Implement overloading
13234         resolution rules regarding rvalue references.
13235
13236 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13237
13238         PR gdb/14441
13239         * aarch64-tdep.c (aarch64_type_align)
13240         (aarch64_extract_return_value, aarch64_store_return_value): Change
13241         lvalue reference type checks to general reference type checks.
13242         * amd64-tdep.c (amd64_classify): Likewise.
13243         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
13244         Likewise.
13245         * arm-tdep.c (arm_type_align, arm_extract_return_value)
13246         (arm_store_return_value): Likewise.
13247         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
13248         * c-typeprint.c (c_print_type): Likewise.
13249         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
13250         (cplus_number_of_children, cplus_describe_child): Likewise.
13251         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
13252         * completer.c (expression_completer): Likewise.
13253         * cp-support.c (make_symbol_overload_list_adl_namespace):
13254         Likewise.
13255         * darwin-nat-info.c (info_mach_region_command): Likewise.
13256         * dwarf2loc.c (entry_data_value_coerce_ref)
13257         (value_of_dwarf_reg_entry): Likewise.
13258         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
13259         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
13260         Likewise.
13261         * findvar.c (extract_typed_address, store_typed_address):
13262         Likewise.
13263         * gdbtypes.c (rank_one_type): Likewise.
13264         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
13265         * infcall.c (value_arg_coerce): Likewise.
13266         * language.c (pointer_type): Likewise.
13267         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
13268         Likewise.
13269         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
13270         * mn10300-tdep.c (mn10300_type_align): Likewise.
13271         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
13272         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
13273         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
13274         Likewise.
13275         * printcmd.c (print_formatted, x_command): Likewise.
13276         * python/py-type.c (typy_get_composite, typy_template_argument):
13277         Likewise.
13278         * python/py-value.c (valpy_referenced_value)
13279         (valpy_get_dynamic_type, value_has_field): Likewise.
13280         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
13281         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
13282         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
13283         * spu-tdep.c (spu_scalar_value_p): Likewise.
13284         * symtab.c (lookup_symbol_aux): Likewise.
13285         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
13286         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
13287         Likewise.
13288         * valops.c (value_cast_pointers, value_cast)
13289         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
13290         (value_struct_elt, value_struct_elt_bitpos)
13291         (value_find_oload_method_list, find_overload_match)
13292         (value_rtti_indirect_type): Likewise.
13293         * valprint.c (val_print_scalar_type_p, generic_val_print):
13294         Likewise.
13295         * value.c (value_actual_type, value_as_address, unpack_long)
13296         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
13297         (coerce_ref): Likewise.
13298         * varobj.c (varobj_get_value_type): Likewise.
13299
13300 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13301
13302         PR gdb/14441
13303         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
13304         table of constants.
13305         * python/lib/gdb/command/explore.py: Support exploring values
13306         of rvalue reference types.
13307         * python/lib/gdb/types.py: Implement get_basic_type() for
13308         rvalue reference types.
13309         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
13310         constant.
13311         * python/py-value.c (valpy_getitem): Add an rvalue reference
13312         check.
13313         (valpy_reference_value): Add new parameter "refcode".
13314         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
13315         New wrappers for valpy_reference_value().
13316         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13317         (gdbpy_invoke_xmethod): Likewise.
13318
13319 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13320
13321         PR gdb/14441
13322         * dwarf2read.c (process_die, read_type_die_1): Handle the
13323         DW_TAG_rvalue_reference_type DIE.
13324         (read_tag_reference_type): Add new parameter "refcode".
13325
13326 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13327
13328         PR gdb/14441
13329         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
13330         (c_type_print_modifier, c_type_print_varspec_suffix)
13331         (c_type_print_base): Support printing rvalue reference types.
13332         * c-valprint.c (c_val_print, c_value_print): Support printing
13333         rvalue reference values.
13334
13335 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13336
13337         PR gdb/14441
13338         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
13339         typename.
13340         * cp-support.c (replace_typedefs): Handle
13341         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
13342         * python/py-type.c (typy_lookup_type): Likewise.
13343
13344 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13345
13346         PR gdb/14441
13347         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
13348         * parse.c (insert_type): Change assert statement.
13349         (follow_types): Handle rvalue reference types.
13350         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
13351         constant.
13352
13353 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13354
13355         PR gdb/14441
13356         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
13357         value_ref() interface.
13358         * c-valprint.c (c_value_print): Likewise.
13359         * infcall.c (value_arg_coerce): Likewise.
13360         * python/py-value.c (valpy_reference_value): Likewise.
13361         * valops.c (value_cast, value_reinterpret_cast)
13362         (value_dynamic_cast, typecmp): Likewise.
13363         (value_ref): Parameterize by kind of return value reference type.
13364         * value.h (value_ref): Add new parameter "refcode".
13365
13366 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13367
13368         PR gdb/14441
13369         * dwarf2read.c (read_tag_reference_type): Use
13370         lookup_lvalue_reference_type() instead of lookup_reference_type().
13371         * eval.c (evaluate_subexp_standard): Likewise.
13372         * f-exp.y: Likewise.
13373         * gdbtypes.c (make_reference_type, lookup_reference_type):
13374         Generalize with rvalue reference types.
13375         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
13376         convenience wrappers for lookup_reference_type().
13377         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
13378         reference kind parameter.
13379         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
13380         wrappers for lookup_reference_type().
13381         * guile/scm-type.c (gdbscm_type_reference): Use
13382         lookup_lvalue_reference_type() instead of lookup_reference_type().
13383         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
13384         * parse.c (follow_types): Likewise.
13385         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
13386         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
13387         Likewise.
13388         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
13389         (gdbpy_invoke_xmethod): Likewise.
13390         * stabsread.c: Provide extra argument to make_reference_type()
13391         call.
13392         * valops.c (value_ref, value_rtti_indirect_type): Use
13393         lookup_lvalue_reference_type() instead of lookup_reference_type().
13394
13395 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
13396
13397         PR gdb/14441
13398         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
13399         (TYPE_IS_REFERENCE): New macro.
13400         (struct type): Add rvalue_reference_type field.
13401         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
13402
13403 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
13404
13405         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
13406         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
13407         New function definition.
13408         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
13409         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
13410         New function declaration.
13411         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
13412         * mi/mi-interp.h: New file.
13413         * solib.c (info_sharedlibrary_command): Replace for loop with
13414         ALL_SO_LIBS macro
13415         * solib.h (update_solib_list): New function declaration.
13416         (so_list_head): Move macro.
13417         * solist.h (ALL_SO_LIBS): New macro.
13418
13419 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
13420
13421         * infcmd.c (post_create_inferior): Remove unused argument in
13422         call to solib_add.
13423         * remote.c (remote_start_remote): Likewise.
13424         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
13425         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
13426         (enable_break): Likewise.
13427         * solib.c (update_solib_list): Remove unused target argument
13428         and its documentation.
13429         (solib_add): Remove unused target argument.  Remove unused
13430         argument in call to update_solib_list.
13431         (info_sharedlibrary_command): Remove unused argument in call
13432         to update_solib_list.
13433         (sharedlibrary_command): Remove unused argument in call to
13434         solib_add.
13435         (handle_solib_event): Likewise.
13436         (reload_shared_libraries): Likewise.
13437         * solib.h (solib_add): Remove unused target argument.
13438
13439 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13440
13441         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
13442         (s390_displaced_step_fixup): Cover relative branches with the
13443         default fixup handling.  This fixes lack of support for some
13444         relative branch instructions.
13445
13446 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13447
13448         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
13449         ptid from regcache.
13450
13451 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13452
13453         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
13454         i386_darwin_store_inferior_registers): Use ptid from regcache.
13455
13456 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13457
13458         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
13459         i386bsd_store_inferior_registers): Use ptid from regcache.
13460
13461 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13462
13463         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
13464         hppaobsd_store_registers): Use ptid from regcache.
13465
13466 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13467
13468         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
13469         hppanbsd_store_registers): Use ptid from regcache.
13470
13471 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13472
13473         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
13474         from regcache.  Use get_ptrace_pid.
13475
13476 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13477
13478         * corelow.c (get_core_register_section): Use ptid from regcache,
13479         update doc.
13480
13481 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13482
13483         * bsd-uthread.c (bsd_uthread_fetch_registers,
13484         bsd_uthread_store_registers): Use ptid from regcache, set and
13485         restore inferior_ptid.
13486
13487 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13488
13489         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
13490         fetch_fp_regs, store_register, store_regs, store_fp_register,
13491         store_fp_regs): Use ptid from regcache.
13492
13493 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
13494
13495         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
13496         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
13497         store_vfp_regs): Use ptid from regcache.
13498
13499 2017-03-17  Pedro Alves  <palves@redhat.com>
13500
13501         PR remote/21188
13502         * ser-base.c (ser_base_wait_for): Add comment.
13503         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
13504         version.
13505         * ser-unix.c (hardwire_raw): Remove reference to
13506         scb->current_timeout.
13507         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
13508         (hardwire_ops): Install ser_base_readchar instead of
13509         hardwire_readchar.
13510         * serial.h (struct serial) <current_timeout, timeout_remaining>:
13511         Remove fields.
13512
13513 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
13514
13515         PR gdb/19637
13516         * python/lib/gdb/printer/bound_registers.py: Add support for
13517         Python 3.
13518
13519 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13520
13521         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
13522         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
13523         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
13524         byte_offset to subobj_byte_offset.  Fix the handling of
13525         DWARF_VALUE_STACK on big-endian targets when coming via an
13526         implicit pointer.
13527         (dwarf2_evaluate_loc_desc): Adjust call to
13528         dwarf2_evaluate_loc_desc_full.
13529         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
13530         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
13531
13532 2017-03-16  Yao Qi  <yao.qi@linaro.org>
13533
13534         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
13535         and REVSH instructions.
13536
13537 2017-03-16  Yao Qi  <yao.qi@linaro.org>
13538
13539         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
13540         (arm_record_test): Declare.
13541         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
13542         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
13543         align with the manual.
13544         (thumb_record_misc): Adjust the code order to align with the
13545         manual.
13546         (thumb2_record_decode_insn_handler): Fix instruction matching.
13547         (instruction_reader_thumb): New class.
13548         (arm_record_test): New function.
13549
13550 2017-03-16  Yao Qi  <yao.qi@linaro.org>
13551
13552         * arm-tdep.c (abstract_memory_reader): New class.
13553         (instruction_reader): New class.
13554         (extract_arm_insn): Add argument 'reader'.  Callers updated.
13555         (decode_insn): Likewise.
13556
13557 2017-03-16  Doug Evans  <dje@google.com>
13558
13559         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
13560         member.  Change type of TYPE member to SCM.  All uses updated.
13561         (lsscm_make_lazy_string_smob): Add assert.
13562         (lsscm_make_lazy_string): Flag bad length values.
13563         (lsscm_elt_type): New function.
13564         (gdbscm_lazy_string_to_value): Rewrite to use
13565         lsscm_safe_lazy_string_to_value.
13566         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
13567         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
13568         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
13569         in incoming type.
13570         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
13571         * guile/scm-type.c (tyscm_scm_to_type): New function.
13572
13573 2017-03-15  Doug Evans  <dje@google.com>
13574
13575         PR python/17728, python/18439, python/18779
13576         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
13577         member.  Change type of TYPE member to PyObject *.  All uses updated.
13578         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
13579         (gdbpy_create_lazy_string_object): Flag bad length values.
13580         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
13581         Handle typedefs in incoming type.
13582         (stpy_lazy_string_elt_type): New function.
13583         (gdbpy_extract_lazy_string): Call it.
13584         * python/py-value.c (valpy_lazy_string): Flag bad length values.
13585         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
13586         typedefs in incoming type.
13587
13588 2017-03-16  Doug Evans  <dje@google.com>
13589
13590         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
13591         * guile/scm-type.c (tyscm_scm_to_type): New function.
13592
13593 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
13594
13595         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
13596         "ULONGEST" for "skip".
13597
13598 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13599
13600         PR gdb/21220
13601         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
13602         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
13603         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
13604         over ptrace peek/poke until end of buffer or error.
13605
13606 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
13607
13608         * parse.c (length_of_subexp): Make static.
13609         * parser-defs.h (length_of_subexp): Remove.
13610
13611 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13612
13613         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
13614         as well.
13615
13616 2017-03-14  Pedro Alves  <palves@redhat.com>
13617
13618         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
13619         (main): Use std::unique_ptr.  Remove calls to
13620         cp_demangled_name_parse_free.
13621
13622 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13623
13624         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
13625         alphabsd_store_inferior_registers): Use regcache->ptid instead
13626         of inferior_ptid.
13627
13628 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13629
13630         * aix-thread.c (aix_thread_fetch_registers,
13631         aix_thread_store_registers): Use regcache->ptid instead of
13632         inferior_ptid.
13633
13634 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13635
13636         * aarch64-linux-nat.c (fetch_gregs_from_thread,
13637         store_gregs_to_thread, fetch_fpregs_from_thread,
13638         store_fpregs_to_thread): Use regcache->ptid instead of
13639         inferior_ptid.
13640
13641 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13642
13643         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
13644         amd64_linux_fetch_inferior_registers): Use regcache->ptid
13645         instead of inferior_ptid.
13646
13647 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13648
13649         * target.c (target_fetch_registers, target_store_registers): Add
13650         assert.
13651
13652 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
13653
13654         * regcache.h (regcache_get_ptid): New function.
13655         * regcache.c (regcache_get_ptid): New function.
13656
13657 2017-03-13  Mark Wielaard  <mark@klomp.org>
13658
13659         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
13660
13661 2017-03-10  Keith Seitz  <keiths@redhat.com>
13662
13663         PR c++/8218
13664         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
13665
13666 2017-03-08  Pedro Alves  <palves@redhat.com>
13667
13668         PR gdb/18360
13669         * infrun.c (start_step_over, do_target_resume, resume)
13670         (restart_threads): Assert we're not resuming a thread that is
13671         meant to be stopped.
13672         (infrun_thread_stop_requested_callback): Delete.
13673         (infrun_thread_stop_requested): If the thread is internally
13674         stopped, queue a pending stop event and clear the thread's
13675         inline-frame state.
13676         (handle_stop_requested): New function.
13677         (handle_syscall_event, handle_inferior_event_1): Use
13678         handle_stop_requested.
13679         (handle_stop_requested): New function.
13680         (handle_signal_stop): Set the thread's stop_signal here instead of
13681         at caller.
13682         (finish_step_over): Clear step over info unconditionally.
13683         (handle_signal_stop): If the user had interrupted the event
13684         thread, consider the stop a random signal.
13685         (handle_signal_stop) <signal arrived while stepping over
13686         breakpoint>: Don't restart threads here.
13687         (stop_waiting): Don't clear step-over info here.
13688
13689 2017-03-08  Pedro Alves  <palves@redhat.com>
13690
13691         PR 21206
13692         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
13693         goes to argument 2, not 1.
13694
13695 2017-03-08  Pedro Alves  <palves@redhat.com>
13696
13697         PR cli/21218
13698         * top.c (gdb_readline_wrapper): Avoid passing NULL to
13699         display_gdb_prompt.
13700         (command_line_input): Add comment.
13701
13702 2017-03-08  Pedro Alves  <palves@redhat.com>
13703
13704         PR tui/21216
13705         * tui/tui-file.c (tui_file::write): New.
13706         * tui/tui-file.h (tui_file): Override "write".
13707         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
13708         factored out from ...
13709         (tui_puts): ... here.
13710         (tui_putc): Use them.
13711         (tui_write): New function.
13712         * tui/tui-io.h (tui_write): Declare.
13713
13714 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
13715
13716         * Makefile.in (SFILES): Replace "environ.c" with
13717         "common/environ.c".
13718         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
13719         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
13720         to...
13721         * common/environ.c: ... here.
13722         * environ.h: Moved to...
13723         * common/environ.h: ... here.
13724
13725 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
13726
13727         * gdbarch.sh (pstring_ptr): New static function.
13728         (gdbarch_disassembler_options): Use it.
13729         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
13730         not valid_disassembler_option->name.
13731         * gdbarch.c: Regenerate.
13732
13733 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
13734
13735         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
13736
13737 2017-03-07  Pedro Alves  <palves@redhat.com>
13738
13739         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
13740
13741 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
13742
13743         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
13744         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
13745         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
13746         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
13747
13748 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
13749
13750         * xtensa-linux-nat.c (fetch_gregs): Remove const.
13751
13752 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
13753
13754         * remote.c (remote_add_target_side_commands): Use range-based
13755         for loop.
13756
13757 2017-03-03  Yao Qi  <yao.qi@linaro.org>
13758
13759         PR gdb/21165
13760         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
13761         value is lazy.
13762         * valprint.c (common_val_print): Likewise.
13763
13764 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
13765
13766         * NEWS: Mention new set/show disassembler-options commands.
13767         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
13768         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
13769         (prospective_options): New static variable.
13770         (gdb_disassembler::gdb_disassembler): Initialize
13771         m_di.disassembler_options.
13772         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
13773         (get_disassembler_options): New function.
13774         (set_disassembler_options): Likewise.
13775         (set_disassembler_options_sfunc): Likewise.
13776         (show_disassembler_options_sfunc): Likewise.
13777         (disassembler_options_completer): Likewise.
13778         (_initialize_disasm): Likewise.
13779         * disasm.h (get_disassembler_options): New prototype.
13780         (set_disassembler_options): Likewise.
13781         * gdbarch.sh (gdbarch_disassembler_options): New variable.
13782         (gdbarch_verify_disassembler_options): Likewise.
13783         * gdbarch.c: Regenerate.
13784         * gdbarch.h: Likewise.
13785         * arm-tdep.c (num_disassembly_options): Delete.
13786         (set_disassembly_style): Likewise.
13787         (arm_disassembler_options): New static variable.
13788         (set_disassembly_style_sfunc): Convert short style name into long
13789         option name.  Call set_disassembler_options.
13790         (show_disassembly_style_sfunc): New function.
13791         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
13792         set_gdbarch_verify_disassembler_options.
13793         (_initialize_arm_tdep): Delete regnames variable and update callers.
13794         (arm_disassembler_options): Initialize.
13795         (disasm_options): New variable.
13796         (num_disassembly_options): Rename from this...
13797         (num_disassembly_styles): ...to this.  Compute by scanning through
13798         disasm_options.
13799         (valid_disassembly_styles): Initialize using disasm_options.
13800         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
13801         set_arm_regname_option.
13802         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
13803         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
13804         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
13805         set_gdbarch_verify_disassembler_options.
13806         * s390-tdep.c (s390_disassembler_options): New static variable.
13807         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
13808         set_gdbarch_verify_disassembler_options.
13809
13810 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
13811
13812         * remote.c (remote_add_target_side_condition): Remove "struct"
13813         keyword from range-based for loop.
13814
13815 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
13816
13817         * remote.c (remote_add_target_side_condition): Use range-based
13818         for loop.  Update comment.
13819
13820 2017-02-27  Yao Qi  <yao.qi@linaro.org>
13821
13822         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
13823
13824 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
13825
13826         * regcache.c (regcache_raw_update): New function.
13827         (regcache_raw_read): Move code to regcache_raw_update.
13828         * regcache.h (regcache_raw_update): New declaration.
13829         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
13830
13831 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
13832
13833         * dwarf2read.c (create_debug_type_hash_table): Initialize
13834         header.signature and header.type_offset_in_tu.
13835
13836 2017-02-24  Pedro Alves  <palves@redhat.com>
13837
13838         * symtab.c (make_file_symbol_completion_list_1): Use
13839         add_symtab_completions.
13840
13841 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
13842
13843         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
13844
13845 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
13846
13847         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
13848         I386_MAX_REGISTER_SIZE.
13849         (i386_pseudo_register_write): Likewise.
13850         (i386_process_record): Likewise.
13851         * i387-tdep.c (i387_supply_xsave): Likewise.
13852         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
13853         (store_register): Likewise.
13854
13855 2017-02-23  Pedro Alves  <palves@redhat.com>
13856
13857         * ada-lang.c: Include "common/function-view.h".
13858         (ada_iterate_over_symbols): Adjust to use function_view as
13859         callback type.
13860         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
13861         (ada_make_symbol_completion_list): Use a lambda.
13862         (ada_exc_search_name_matches): Delete.
13863         (name_matches_regex): New.
13864         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
13865         * compile/compile-c-support.c: Include "common/function-view.h".
13866         (print_one_macro): Change prototype to accept a ui_file pointer.
13867         (write_macro_definitions): Use a lambda.
13868         * dwarf2read.c: Include "common/function-view.h".
13869         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
13870         (dw2_expand_symtabs_matching): Adjust to use function_view as
13871         callback type.
13872         * language.h: Include "common/function-view.h".
13873         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
13874         function_view as callback type.
13875         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
13876         * linespec.c: Include "common/function-view.h".
13877         (collect_info::add_symbol): New method.
13878         (struct symbol_and_data_callback, iterate_inline_only, struct
13879         symbol_matcher_data, iterate_name_matcher): Delete.
13880         (iterate_over_all_matching_symtabs): Adjust to use function_view
13881         as callback type and lambdas.
13882         (iterate_over_file_blocks): Adjust to use function_view as
13883         callback type.
13884         (decode_compound_collector): Now a class with private fields.
13885         (decode_compound_collector::release_symbols): New method.
13886         (collect_one_symbol): Rename to...
13887         (decode_compound_collector::operator()): ... this and adjust.
13888         (lookup_prefix_sym): decode_compound_collector construction bits
13889         move to decode_compound_collector ctor.  Pass the
13890         decode_compound_collector object directly as callback.  Remove
13891         cleanups and use decode_compound_collector::release_symbols
13892         instead.
13893         (symtab_collector): Now a class with private fields.
13894         (symtab_collector::release_symtabs): New method.
13895         (add_symtabs_to_list): Rename to...
13896         (symtab_collector::operator()): ... this and adjust.
13897         (collect_symtabs_from_filename): symtab_collector construction
13898         bits move to symtab_collector ctor.  Pass the symtab_collector
13899         object directly as callback.  Remove cleanups and use
13900         symtab_collector::release_symtabs instead.
13901         (collect_symbols): Delete.
13902         (add_matching_symbols_to_info): Use lambdas.
13903         * macrocmd.c (print_macro_callback): Delete.
13904         (info_macro_command): Use a lambda.
13905         (info_macros_command): Pass print_macro_definition as callable
13906         directly.
13907         (print_one_macro): Remove 'ignore' parameter.
13908         (macro_list_command): Adjust.
13909         * macrotab.c (macro_for_each_data::fn): Now a function_view.
13910         (macro_for_each_data::user_data): Delete field.
13911         (foreach_macro): Adjust to call the function_view.
13912         (macro_for_each): Adjust to use function_view as callback type.
13913         (foreach_macro_in_scope): Adjust to call the function_view.
13914         (macro_for_each_in_scope): Adjust to use function_view as callback
13915         type.
13916         * macrotab.h: Include "common/function-view.h".
13917         (macro_callback_fn): Declare a prototype instead of a pointer.
13918         Remove "user_data" parameter.
13919         (macro_for_each, macro_for_each_in_scope): Adjust to use
13920         function_view as callback type.
13921         * psymtab.c (partial_map_expand_apply)
13922         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
13923         Adjust to use function_view as callback type and to return bool.
13924         (psym_expand_symtabs_matching): Adjust to use function_view as
13925         callback types.
13926         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
13927         to use function_view as callback type and to return bool.
13928         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
13929         callback types.
13930         * symfile.c (expand_symtabs_matching): Adjust to use function_view
13931         as callback types.
13932         * symfile.h: Include "common/function-view.h".
13933         (expand_symtabs_file_matcher_ftype)
13934         (expand_symtabs_symbol_matcher_ftype)
13935         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
13936         return bool.
13937         (quick_symbol_functions::map_symtabs_matching_filename)
13938         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
13939         function_view as callback type and return bool.
13940         (expand_symtabs_matching): Adjust to use function_view as callback
13941         type.
13942         (maintenance_expand_name_matcher)
13943         (maintenance_expand_file_matcher): Delete.
13944         (maintenance_expand_symtabs): Use lambdas.
13945         * symtab.c (iterate_over_some_symtabs): Adjust to use
13946         function_view as callback types and return bool.
13947         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
13948         of a cleanup.
13949         (lookup_symtab_callback): Delete.
13950         (lookup_symtab): Use a lambda.
13951         (iterate_over_symbols): Adjust to use function_view as callback
13952         type.
13953         (struct search_symbols_data, search_symbols_file_matches)
13954         (search_symbols_name_matches): Delete.
13955         (search_symbols): Use a pair of lambdas.
13956         (struct add_name_data, add_macro_name, symbol_completion_matcher)
13957         (symtab_expansion_callback): Delete.
13958         (default_make_symbol_completion_list_break_on_1): Use lambdas.
13959         * symtab.h: Include "common/function-view.h".
13960         (iterate_over_some_symtabs): Adjust to use function_view as
13961         callback type and return bool.
13962         (iterate_over_symtabs): Adjust to use function_view as callback
13963         type.
13964         (symbol_found_callback_ftype): Remove 'data' parameter and return
13965         bool.
13966         (iterate_over_symbols): Adjust to use function_view as callback
13967         type.
13968
13969 2017-02-23  Pedro Alves  <palves@redhat.com>
13970
13971         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
13972         (%.o) <unittests/%.c>: New pattern.
13973         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
13974         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
13975         * common/function-view.h: New file.
13976         * unittests/function-view-selftests.c: New file.
13977         * configure: Regenerate.
13978
13979 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
13980
13981         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
13982         inferior_ptid.
13983         * go32-nat.c (go32_thread_alive): Likewise.
13984
13985 2017-02-23  Yao Qi  <yao.qi@linaro.org>
13986
13987         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
13988         delete.
13989
13990 2017-02-23  Yao Qi  <yao.qi@linaro.org>
13991
13992         * varobj.c (varobj_clear_saved_item): Use delete instead of
13993         xfree.
13994         (update_dynamic_varobj_children): Likewise.
13995
13996 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
13997
13998         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
13999
14000 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
14001
14002         * common/enum-flags.h (enum_flags::enum_flags): Initialize
14003         m_enum_value to 0 in default constructor.
14004
14005 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
14006
14007         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
14008         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
14009         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
14010         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
14011         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
14012         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
14013         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
14014         IS_STORE_CONDITIONAL_INSN.
14015
14016 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
14017
14018         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
14019
14020 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14021
14022         * NEWS (Changes since GDB 7.12): Add DWARF-5.
14023
14024 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14025
14026         * dwarf2read.c (skip_one_die, read_attribute_value)
14027         (dwarf2_const_value_attr, dump_die_shallow)
14028         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
14029         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
14030
14031 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14032
14033         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
14034         (dwarf_parse_macro_header): Accept DWARF version 5.
14035         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
14036
14037 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14038
14039         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
14040         DW_AT_GNU_*.
14041         * common/common-exceptions.h (enum errors): Likewise.
14042         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
14043         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
14044         (dwarf_expr_context::execute_stack_op): Likewise.
14045         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
14046         Likewise.
14047         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
14048         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
14049         (show_entry_values_debug, call_site_to_target_addr)
14050         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
14051         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
14052         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
14053         (value_of_dwarf_block_entry, indirect_pieced_value)
14054         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
14055         (disassemble_dwarf_expression): Likewise.
14056         * dwarf2read.c (process_die, inherit_abstract_dies)
14057         (read_call_site_scope): Likewise.
14058         * gdbtypes.h (struct func_type, struct call_site_parameter)
14059         (struct call_site): Likewise.
14060         * stack.c (read_frame_arg): Likewise.
14061         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
14062
14063 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14064
14065         * defs.h (read_unsigned_leb128): New declaration.
14066         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
14067         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
14068         (dwarf2_find_location_expression): Call also
14069         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
14070         * dwarf2loc.h (dwarf2_version): New declaration.
14071         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
14072         rnglists.
14073         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
14074         .debug_rnglists.
14075         (struct dwop_section_names): Add loclists_dwo.
14076         (dwop_section_names): Add .debug_loclists.dwo.
14077         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
14078         (struct dwarf2_per_cu_data): Add dwarf_version.
14079         (struct dwo_sections): Add loclists.
14080         (struct attr_abbrev): Add implicit_const.
14081         (read_indirect_line_string): New declaration.
14082         (read_unsigned_leb128): Delete declaration.
14083         (rcuh_kind): New definition.
14084         (read_and_check_comp_unit_head): Change parameter
14085         is_debug_types_section to section_kind.
14086         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
14087         (read_comp_unit_head): Change parameter abfd to section, add parameter
14088         section_kind.  Handle DWARF-5.
14089         (error_check_comp_unit_head): Accept also DWARF version 5.
14090         (read_and_check_comp_unit_head): Change parameter
14091         is_debug_types_section to section_kind.
14092         (read_and_check_type_unit_head): Delete function.
14093         (read_abbrev_offset): Handle DWARF-5.
14094         (create_debug_type_hash_table): Add parameter section_kind.  Process
14095         only DW_UT_type.  Use signature and type_offset_in_tu from struct
14096         comp_unit_head.
14097         (create_debug_types_hash_table): Update create_debug_type_hash_table
14098         caller.
14099         (create_all_type_units): Call create_debug_type_hash_table.
14100         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
14101         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
14102         caller.
14103         (skip_one_die): Handle DW_FORM_implicit_const.
14104         (dwarf2_rnglists_process): New function.
14105         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
14106         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
14107         (read_attribute_value): Handle DW_FORM_implicit_const,
14108         DW_FORM_line_strp.
14109         (read_attribute): Handle DW_FORM_implicit_const.
14110         (read_indirect_string_at_offset_from): New function from
14111         read_indirect_string_at_offset.
14112         (read_indirect_string_at_offset): Call
14113         read_indirect_string_at_offset_from.
14114         (read_indirect_line_string_at_offset): New function.
14115         (read_indirect_string): New function comment.
14116         (read_indirect_line_string): New function.
14117         (read_unsigned_leb128): Make it global.
14118         (dwarf2_string_attr): Handle DWARF-5.
14119         (add_include_dir_stub, read_formatted_entries): New functions.
14120         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
14121         Handle DWARF-5.
14122         (per_cu_header_read_in): Update read_comp_unit_head caller.
14123         (dwarf2_version): New function.
14124         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
14125         rnglists.
14126         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
14127         fields.
14128
14129 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14130
14131         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
14132
14133 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14134
14135         * dwarf2read.c (dwarf2_ranges_process): New function from
14136         dwarf2_ranges_read.
14137         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
14138         dwarf2_ranges_process.
14139
14140 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
14141
14142         * dwarf2read.c (create_debug_type_hash_table): New function from
14143         create_debug_types_hash_table.
14144         (create_debug_types_hash_table): Call create_debug_type_hash_table.
14145         (create_all_type_units, open_and_init_dwo_file): Update
14146         create_debug_types_hash_table callers.
14147
14148 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
14149
14150         PR gdb/16188
14151         * fork-child.c (trace_start_error): Fix thinko.  va_end should
14152         refer to 'ap', not 'args'.
14153
14154 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
14155             Pedro Alves  <palves@redhat.com>
14156
14157         PR gdb/16188
14158         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
14159         calls succeeded.
14160         * fork-child.c (trace_start_error): New function.
14161         (trace_start_error_with_name): Likewise.
14162         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
14163         * inf-ptrace.c (inf_ptrace_me): Likewise.
14164         * inferior.h (trace_start_error): New prototype.
14165         (trace_start_error_with_name): Likewise.
14166
14167 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
14168
14169         PR gdb/21164
14170         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
14171         NULL before using it.
14172         * symmisc.c (maintenance_print_symbols): Likewise.
14173         (maintenance_print_msymbols): Likewise.
14174
14175 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14176
14177         * NEWS: Add record Python bindings entry.
14178
14179 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14180
14181         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
14182         py-record-full.o.
14183         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
14184         * python/py-record-btrace.c, python/py-record-btrace.h,
14185         python/py-record-full.c, python/py-record-full.h: New file.
14186         * python/py-record.c: Add include for py-record-btrace.h and
14187         py-record-full.h.
14188         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
14189         recpy_instruction_history, recpy_function_call_history, recpy_begin,
14190         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
14191         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
14192         New definition.
14193         (gdbpy_initialize_btrace): New export.
14194         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
14195
14196 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14197
14198         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
14199         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
14200         * python/py-record.c: New file.
14201         * python/python-internal.h (gdbpy_start_recording,
14202         gdbpy_current_recording, gdpy_stop_recording,
14203         gdbpy_initialize_record): New export.
14204         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
14205         (python_GdbMethods): Add gdbpy_start_recording,
14206         gdbpy_current_recording and gdbpy_stop_recording.
14207
14208 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14209
14210         * record-btrace.c (record_btrace_record_method): New function.
14211         (init_record_btrace_ops): Initialize to_record_method.
14212         * record-full.c (record_full_record_method): New function.
14213         (init_record_full_ops, init_record_full_core_ops): Add
14214         record_full_record_method.
14215         * record.h (enum record_method): New enum.
14216         * target-debug.h (target_debug_print_enum_record_method: New define.
14217         * target-delegates.c: Regenerate.
14218         * target.c (target_record_method): New function.
14219         * target.h: Include record.h.
14220         (struct target_ops) <to_record_method>: New field.
14221         (target_record_method): New export.
14222
14223 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14224
14225         * record.h (record_start, record_stop): New export.
14226         * record.c (record_start, record_stop): New function.
14227
14228 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14229
14230         * btrace.c (btrace_fetch): Copy function call segments pointer
14231         into a vector.
14232         (btrace_clear): Clear the vector.
14233         (btrace_find_insn_by_number): Use binary search to find the correct
14234         function call segment.
14235         * btrace.h (brace_fun_p): New typedef.
14236         (struct btrace_thread_info) <functions>: New field.
14237
14238 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14239
14240         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
14241         * btrace.c (btrace_decode_error): ... here.  New function.
14242         * btrace.h (btrace_decode_error): New export.
14243
14244 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
14245
14246         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
14247         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
14248         btrace_find_insn_by_number): Remove special case for gaps.
14249         * btrace.h (btrace_insn_get_error): New export.
14250         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
14251         * record-btrace.c (btrace_insn_history): Print number for gaps.
14252         (record_btrace_info, record_btrace_goto): Handle gaps.
14253
14254 2017-02-14  Tom Tromey  <tom@tromey.com>
14255
14256         PR python/13598:
14257         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
14258         event.
14259         * python/py-evts.c (gdbpy_initialize_py_events): Add
14260         before_prompt registry.
14261         * python/py-events.h (events_object) <before_prompt>: New field.
14262
14263 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
14264
14265         * btrace.c (ftrace_new_switch): Preserve up link and flags.
14266
14267 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
14268
14269         * symfile (_initialize_symfile): Add usage text to the load command's
14270         help text.
14271
14272 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
14273
14274         * utils.c (defaulted_query): Don't query on secondary UIs.
14275
14276 2017-02-10  Tom Tromey  <tom@tromey.com>
14277
14278         * rust-lang.c (rust_get_disr_info): Remove unused variable.
14279
14280 2017-02-10  Tom Tromey  <tom@tromey.com>
14281
14282         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
14283         "cleanup" local.
14284         * python/py-type.c (typy_legacy_template_argument): Remove
14285         unnecessary "cleanup" local.
14286
14287 2017-02-10  Tom Tromey  <tom@tromey.com>
14288
14289         * python/python.c (do_start_initialization): New function, from
14290         _initialize_python.
14291         (_initialize_python): Call do_start_initialization.
14292         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
14293         goto.
14294
14295 2017-02-10  Tom Tromey  <tom@tromey.com>
14296
14297         * python/py-prettyprint.c (pretty_print_one_value): Use
14298         gdbpy_ref.
14299
14300 2017-02-10  Tom Tromey  <tom@tromey.com>
14301
14302         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
14303         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
14304         gdbpy_ref.
14305         * python/py-type.c (field_new): Use gdbpy_ref.
14306         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
14307         gdbpy_ref.
14308         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
14309         (py_free_pspace): Likewise.
14310         (pspace_to_pspace_object): Likewise.
14311         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
14312         (py_free_objfile): Likewise.
14313         (objfile_to_objfile_object): Likewise.
14314         * python/py-inferior.c (delete_thread_object): Use
14315         gdbpy_ref.
14316         (infpy_read_memory): Likewise.
14317         (py_free_inferior): Likewise.
14318         * python/py-evtregistry.c (create_eventregistry_object): Use
14319         gdbpy_ref.
14320         * python/py-event.c (create_event_object): Use gdbpy_ref.
14321
14322 2017-02-10  Tom Tromey  <tom@tromey.com>
14323
14324         * python/py-ref.h (gdbpy_ref_policy): Now a template.
14325         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
14326         used.
14327         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
14328         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
14329         python/py-exitedevent.c, python/py-finishbreakpoint.c,
14330         python/py-framefilter.c, python/py-function.c,
14331         python/py-inferior.c, python/py-infevents.c,
14332         python/py-linetable.c, python/py-newobjfileevent.c,
14333         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
14334         python/py-signalevent.c, python/py-stopevent.c,
14335         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
14336         python/py-unwind.c, python/py-utils.c, python/py-value.c,
14337         python/py-varobj.c, python/py-xmethods.c, python/python.c,
14338         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
14339
14340 2017-02-10  Tom Tromey  <tom@tromey.com>
14341
14342         * ui-out.h (ui_out_emit_type): New class.
14343         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
14344         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
14345         and ui_out_emit_tuple.
14346         (enumerate_locals): Likewise.
14347         (py_mi_print_variables, py_print_locals, py_print_args): Use
14348         ui_out_emit_list.
14349         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
14350         ui_out_emit_list.
14351         * common/gdb_optional.h: New file.
14352
14353 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
14354
14355         * MAINTAINERS (Write After Approval): Update my e-mail address.
14356
14357 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
14358
14359         PR gdb/21122
14360         * breakpoint.c (_initialize_breakpoint): Update the help description
14361         of the 'commands' command to indicate that it takes a list argument.
14362
14363 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
14364
14365         * interps.c (current_interp_set_logging): Remove "return".
14366
14367 2017-02-09  Gary Benson  <gbenson@redhat.com>
14368
14369         * symtab.c (add_symtab_completions): Prevent NULL pointer
14370         dereference.
14371
14372 2017-02-08  Pedro Alves  <palves@redhat.com>
14373
14374         * interps.c (interp::interp): Remove reference to quiet_p.
14375         (interp_set): Make static.  Remove dead "Switching to" output
14376         code.
14377         (interp_quiet_p, interp_set_quiet): Delete.
14378         (interpreter_exec_cmd): Don't set the interpreter quiet.
14379         * interps.h (interp_quiet_p): Make static.
14380         (class interp) <quiet_p>: Remove field
14381
14382 2017-02-08  Jerome Guitton  <guitton@adacore.com>
14383
14384         * cli/cli-decode.c (find_command_name_length): Make it extern.
14385         * cli/cli-decode.h (find_command_name_length): Declare.
14386         * cli/cli-script.c (command_name_equals, line_first_arg):
14387         New functions.
14388         (process_next_line): Use cli-decode to parse command names.
14389         (build_command_line): Make args a constant pointer.
14390
14391 2017-02-08  Jerome Guitton  <guitton@adacore.com>
14392
14393         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
14394         Remove case-insensitive search.
14395
14396 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
14397
14398         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
14399         at the end of the line.  Avoids an ARI warning.
14400
14401 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
14402
14403         * NEWS: Mention support for record/replay of Intel 64 rdrand and
14404         rdseed instructions.
14405         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
14406
14407 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
14408
14409         PR tdep/20936
14410         Provide and use sparc32 and sparc64 target description XML files.
14411         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
14412         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
14413         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
14414         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
14415         * features/sparc/sparc32-solaris.xml: New file.
14416         * features/sparc/sparc64-solaris.xml: New file.
14417         * features/sparc/sparc32-solaris.c: Generated.
14418         * features/sparc/sparc64-solaris.c: Generated.
14419         * sparc-tdep.h: Account for differences in target descriptions.
14420         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
14421         (sparc32_register_type): Use target provided registers.
14422         (validate_tdesc_registers): New function.
14423         (sparc32_gdbarch_init): Use tdesc_has_registers.
14424         Set pseudoregister functions.
14425         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
14426         (sparc64_register_type): Use target provided registers.
14427         (sparc64_init_abi): Set pseudoregister functions.
14428
14429 2017-02-03  Tom Tromey  <tom@tromey.com>
14430
14431         PR rust/21097:
14432         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
14433         with a single member.
14434
14435 2017-02-03  Pedro Alves  <palves@redhat.com>
14436
14437         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
14438         (cli_interp_base::~cli_interp_base): New.
14439         (cli_interp): New struct.
14440         (as_cli_interp): Cast the interp itself to cli_interp.
14441         (cli_interpreter_pre_command_loop): Rename to ...
14442         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
14443         parameter.
14444         (cli_interpreter_init): Rename to ...
14445         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
14446         boolean.  Make extern.
14447         (cli_interpreter_resume): Rename to ...
14448         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
14449         extern.
14450         (cli_interpreter_suspend): Rename to ...
14451         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
14452         extern.
14453         (cli_interpreter_exec): Rename to ...
14454         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
14455         extern.
14456         (cli_interpreter_supports_command_editing): Rename to ...
14457         (cli_interp_base::supports_command_editing): ... this.  Remove
14458         'interp' parameter.  Make extern.
14459         (cli_ui_out): Rename to ...
14460         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
14461         Make extern.
14462         (cli_set_logging): Rename to ...
14463         (cli_interp_base::set_logging): ... this.  Remove 'interp'
14464         parameter.  Make extern.
14465         (cli_interp_procs): Delete.
14466         (cli_interp_factory): Adjust to use "new".
14467         * cli/cli-interp.h: Include "interps.h".
14468         (struct cli_interp_base): New struct.
14469         * interps.c (struct interp): Delete.  Fields moved to interps.h.
14470         (interp_new): Delete.
14471         (interp::interp, interp::~interp): New.
14472         (interp_set): Use bool, and return void.  Assume the interpreter
14473         has suspend, init and resume methods, and that the all return
14474         void.
14475         (set_top_level_interpreter): interp_set returns void.
14476         (interp_ui_out): Adapt.
14477         (current_interp_set_logging): Adapt.
14478         (interp_data): Delete.
14479         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
14480         (interp_exec): Adapt.
14481         (top_level_interpreter_data): Delete.
14482         * interps.h (interp_init_ftype, interp_resume_ftype)
14483         (interp_suspend_ftype, interp_exec_ftype)
14484         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
14485         (class interp): New.
14486         (interp_new): Delete.
14487         (interp_set): Now returns void.  Use bool.
14488         (interp_data, top_level_interpreter_data): Delete.
14489         * mi/mi-common.h: Include interps.h.
14490         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
14491         init, resume, suspect, exec, interp_ui_out, set_logging and
14492         pre_command_loop methods.
14493         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
14494         (mi_interpreter_init): Rename to ...
14495         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
14496         bool, return void and make extern.  Adjust.
14497         (mi_interpreter_resume): ... Rename to ...
14498         (mi_interp::resume): ... this.  Remove the 'data' parameter,
14499         return void and make extern.  Adjust.
14500         (mi_interpreter_suspend): ... Rename to ...
14501         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
14502         return void and make extern.  Adjust.
14503         (mi_interpreter_exec): ... Rename to ...
14504         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
14505         extern.  Adjust.
14506         (mi_interpreter_pre_command_loop): ... Rename to ...
14507         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
14508         parameter and make extern.
14509         (mi_on_normal_stop_1): Adjust.
14510         (mi_ui_out): Rename to ...
14511         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
14512         parameter and make extern.  Adjust.
14513         (mi_set_logging): Rename to ...
14514         (mi_interp::set_logging): ... this.  Remove the 'interp'
14515         parameter and make extern.  Adjust.
14516         (mi_interp_procs): Delete.
14517         (mi_interp_factory): Adjust to use 'new'.
14518         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
14519         (mi_print_exception, mi_execute_command, mi_load_progress):
14520         Adjust.
14521         * tui/tui-interp.c (tui_interp): New class.
14522         (as_tui_interp): Return a tui_interp pointer.
14523         (tui_on_normal_stop, tui_on_signal_received)
14524         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
14525         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
14526         to use interp::interp_ui_out.
14527         (tui_init): Rename to ...
14528         (tui_interp::init): ... this.  Remove the 'self' parameter, use
14529         bool, return void and make extern.  Adjust.
14530         (tui_resume): Rename to ...
14531         (tui_interp::resume): ... this.  Remove the 'data' parameter,
14532         return void and make extern.  Adjust.
14533         (tui_suspend): Rename to ...
14534         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
14535         return void and make extern.  Adjust.
14536         (tui_ui_out): Rename to ...
14537         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
14538         parameter, and make extern.  Adjust.
14539         (tui_exec): Rename to ...
14540         (tui_interp::exec): ... this.  Remove the 'data' parameter and
14541         make extern.
14542         (tui_interp_procs): Delete.
14543         (tui_interp_factory): Use "new".
14544
14545 2017-02-02  Tom Tromey  <tom@tromey.com>
14546
14547         * rust-exp.y (ends_raw_string, space_then_number)
14548         (rust_identifier_start_p): Return bool.
14549         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
14550         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
14551         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
14552         (rust_chartype_p): Return bool.
14553         (val_print_struct, rust_print_struct_def, rust_print_type):
14554         Update.
14555         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
14556         Return bool.
14557
14558 2017-02-02  Tom Tromey  <tom@tromey.com>
14559
14560         * rust-lang.c: Reindent.
14561
14562 2017-02-02  Tom Tromey  <tom@tromey.com>
14563
14564         * rust-lang.h (rust_crate_for_block): Update.
14565         * rust-lang.c (rust_crate_for_block): Return std::string.
14566         (rust_get_disr_info): Use std:;string, not
14567         gdb::unique_xmalloc_ptr.
14568         * rust-exp.y (crate_name): Update.
14569
14570 2017-02-02  Pedro Alves  <palves@redhat.com>
14571
14572         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
14573         field out of gdb_disassembler_test and make it static.
14574
14575 2017-02-02  Pedro Alves  <palves@redhat.com>
14576
14577         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
14578         mi1_interp and mi_interp fields.
14579
14580 2017-02-02  Pedro Alves  <palves@redhat.com>
14581
14582         * cli/cli-interp.c (struct saved_output_files, saved_output):
14583         Moved from cli/cli-logging.c.
14584         (cli_set_logging): New function.
14585         (cli_interp_procs): Install cli_set_logging.
14586         * cli/cli-interp.h (make_logging_output, cli_set_logging):
14587         Declare.
14588         * cli/cli-logging.c (struct saved_output_files, saved_output):
14589         Moved to cli/cli-interp.c.
14590         (pop_output_files): Don't save outputs here.
14591         (make_logging_output): New function.
14592         (handle_redirections): Don't build tee nor save previous outputs
14593         here.
14594         * interps.c (current_interp_set_logging): Change prototype.
14595         Assume there's always a set_logging_proc method installed.
14596         * interps.h (interp_set_logging_ftype): Change prototype.
14597         (current_interp_set_logging): Change prototype and adjust comment.
14598         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
14599         use make_logging_output.
14600         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
14601 2017-02-02  Pedro Alves  <palves@redhat.com>
14602
14603         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
14604         from ...
14605         (set_logging_overwrite): ... here.
14606         (logging_no_redirect_file): Delete.
14607         (set_logging_redirect): Don't handle redirection on the fly.
14608         Instead warn that "logging off" / "logging on" is necessary.
14609         (pop_output_files): Delete references to logging_no_redirect_file.
14610         (show_logging_command): Always speak in terms of what will happen
14611         once logging is reenabled.
14612
14613 2017-02-02  Pedro Alves  <palves@redhat.com>
14614
14615         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
14616
14617 2017-02-02  Pedro Alves  <palves@redhat.com>
14618
14619         * disasm.c (gdb_pretty_print_insn): Rename to ...
14620         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
14621         Remove gdbarch parameter.  Adapt to clear the object's buffers
14622         instead of allocating new buffers, and to print using the object's
14623         gdb_disassembler instead of calling gdb_print_insn.
14624         (dump_insns): Use gdb_pretty_print_disassembler.
14625         * disasm.h (gdb_pretty_print_insn): Delete declaration.
14626         (gdb_pretty_print_disassembler): New class.
14627         * record-btrace.c (btrace_insn_history): Use
14628         gdb_pretty_print_disassembler.
14629
14630 2017-02-02  Pedro Alves  <palves@redhat.com>
14631
14632         * ada-lang.c (type_as_string): Use string_file.
14633         * ada-valprint.c (ada_print_floating): Use string_file.
14634         * ada-varobj.c (ada_varobj_scalar_image)
14635         (ada_varobj_get_value_image): Use string_file.
14636         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
14637         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
14638         * breakpoint.c (update_inserted_breakpoint_locations)
14639         (insert_breakpoint_locations, reattach_breakpoints)
14640         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
14641         (print_it_watchpoint): Use string_file.
14642         (save_breakpoints): Use stdio_file.
14643         * c-exp.y (oper): Use string_file.
14644         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
14645         tee_file.
14646         (pop_output_files): Use delete.
14647         (handle_redirections): Use stdio_file and tee_file.
14648         * cli/cli-setshow.c (do_show_command): Use string_file.
14649         * compile/compile-c-support.c (c_compute_program): Use
14650         string_file.
14651         * compile/compile-c-symbols.c (generate_vla_size): Take a
14652         'string_file &' instead of a 'ui_file *'.
14653         (generate_c_for_for_one_variable): Take a 'string_file &' instead
14654         of a 'ui_file *'.  Use string_file.
14655         (generate_c_for_variable_locations): Take a 'string_file &'
14656         instead of a 'ui_file *'.
14657         * compile/compile-internal.h (generate_c_for_for_one_variable):
14658         Take a 'string_file &' instead of a 'ui_file *'.
14659         * compile/compile-loc2c.c (push, pushf, unary, binary)
14660         (print_label, pushf_register_address, pushf_register)
14661         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
14662         'ui_file *'.  Adjust.
14663         * compile/compile.c (compile_to_object): Use string_file.
14664         * compile/compile.h (compile_dwarf_expr_to_c)
14665         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
14666         'ui_file *'.
14667         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
14668         (replace_typedefs_qualified_name): Use string_file and
14669         obstack_copy0.
14670         * disasm.c (gdb_pretty_print_insn): Use string_file.
14671         (gdb_disassembly): Adjust reference the null_stream global.
14672         (do_ui_file_delete): Delete.
14673         (gdb_insn_length): Use null_stream.
14674         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
14675         * dwarf2loc.c (dwarf2_compile_property_to_c)
14676         (locexpr_generate_c_location, loclist_generate_c_location): Take a
14677         'string_file &' instead of a 'ui_file *'.
14678         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
14679         * dwarf2read.c (do_ui_file_peek_last): Delete.
14680         (dwarf2_compute_name): Use string_file.
14681         * event-top.c (gdb_setup_readline): Use stdio_file.
14682         * gdbarch.sh (verify_gdbarch): Use string_file.
14683         * gdbtypes.c (safe_parse_type): Use null_stream.
14684         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
14685         string_file.
14686         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
14687         'string_file *' instead of a 'ui_file *'.
14688         (gdbscm_arch_disassemble): Use string_file.
14689         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
14690         * guile/scm-ports.c (class ioscm_file_port): Now a class that
14691         inherits from ui_file.
14692         (ioscm_file_port_delete, ioscm_file_port_rewind)
14693         (ioscm_file_port_put): Delete.
14694         (ioscm_file_port_write): Rename to ...
14695         (ioscm_file_port::write): ... this.  Remove file_port_magic
14696         checks.
14697         (ioscm_file_port_new): Delete.
14698         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
14699         ui_file_up.
14700         * guile/scm-type.c (tyscm_type_name): Use string_file.
14701         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
14702         Use string_file.
14703         * infcmd.c (print_return_value_1): Use string_file.
14704         * infrun.c (print_target_wait_results): Use string_file.
14705         * language.c (add_language): Use string_file.
14706         * location.c (explicit_to_string_internal): Use string_file.
14707         * main.c (captured_main_1): Use null_file.
14708         * maint.c (maintenance_print_architecture): Use stdio_file.
14709         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
14710         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
14711         event_channel>: Change type to mi_console_file pointer.
14712         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
14713         (mi_console_file_delete): Delete.
14714         (struct mi_console_file): Delete.
14715         (mi_console_file_magic): Delete.
14716         (mi_console_file_new): Delete.
14717         (mi_console_file::mi_console_file): New.
14718         (mi_console_file_delete): Delete.
14719         (mi_console_file_fputs): Delete.
14720         (mi_console_file::write): New.
14721         (mi_console_raw_packet): Delete.
14722         (mi_console_file::flush): New.
14723         (mi_console_file_flush): Delete.
14724         (mi_console_set_raw): Rename to ...
14725         (mi_console_file::set_raw): ... this.
14726         * mi/mi-console.h (class mi_console_file): New class.
14727         (mi_console_file_new, mi_console_set_raw): Delete.
14728         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
14729         (mi_set_logging): Use delete and tee_file.  Adjust.
14730         * mi/mi-main.c (output_register): Use string_file.
14731         (mi_cmd_data_evaluate_expression): Use string_file.
14732         (mi_cmd_data_read_memory): Use string_file.
14733         (mi_cmd_execute, print_variable_or_computed): Use string_file.
14734         * mi/mi-out.c (mi_ui_out::main_stream): New.
14735         (mi_ui_out::rewind): Use main_stream and
14736         string_file.
14737         (mi_ui_out::put): Use main_stream and string_file.
14738         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
14739         Allocate a 'string_file' instead.
14740         (mi_out_new): Don't allocate a mem_fileopen stream here.
14741         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
14742         (mi_ui_out::main_stream): Declare method.
14743         * printcmd.c (eval_command): Use string_file.
14744         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
14745         * python/py-arch.c (archpy_disassemble): Use string_file.
14746         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
14747         * python/py-frame.c (frapy_str): Use string_file.
14748         * python/py-framefilter.c (py_print_type, py_print_single_arg):
14749         Use string_file.
14750         * python/py-type.c (typy_str): Use string_file.
14751         * python/py-unwind.c (unwind_infopy_str): Use string_file.
14752         * python/py-value.c (valpy_str): Use string_file.
14753         * record-btrace.c (btrace_insn_history): Use string_file.
14754         * regcache.c (regcache_print): Use stdio_file.
14755         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
14756         * remote.c (escape_buffer): Use string_file.
14757         * rust-lang.c (rust_get_disr_info): Use string_file.
14758         * serial.c (serial_open_ops_1): Use stdio_file.
14759         (do_serial_close): Use delete.
14760         * stack.c (print_frame_arg): Use string_file.
14761         (print_frame_args): Remove local mem_fileopen stream, not used.
14762         (print_frame): Use string_file.
14763         * symmisc.c (maintenance_print_symbols): Use stdio_file.
14764         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
14765         Take a 'string_file *' instead of a 'ui_file *'.
14766         * top.c (new_ui): Use stdio_file and stderr_file.
14767         (free_ui): Use delete.
14768         (execute_command_to_string): Use string_file.
14769         (quit_confirm): Use string_file.
14770         * tracepoint.c (collection_list::append_exp): Use string_file.
14771         * tui/tui-disasm.c (tui_disassemble): Use string_file.
14772         * tui/tui-file.c: Don't include "ui-file.h".
14773         (enum streamtype, struct tui_stream): Delete.
14774         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
14775         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
14776         (tui_file::tui_file): New method.
14777         (tui_file_fputs): Delete.
14778         (tui_file_get_strbuf): Delete.
14779         (tui_file::puts): New method.
14780         (tui_file_adjust_strbuf): Delete.
14781         (tui_file_flush): Delete.
14782         (tui_file::flush): New method.
14783         * tui/tui-file.h: Tweak intro comment.
14784         Include ui-file.h.
14785         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
14786         (tui_file_adjust_strbuf): Delete declarations.
14787         (class tui_file): New class.
14788         * tui/tui-io.c (tui_initialize_io): Use tui_file.
14789         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
14790         (tui_register_format): Use string_stream.
14791         * tui/tui-stack.c (tui_make_status_line): Use string_file.
14792         (tui_get_function_from_frame): Use string_file.
14793         * typeprint.c (type_to_string): Use string_file.
14794         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
14795         (null_stream): New global.
14796         (ui_file_delete): Delete.
14797         (ui_file::ui_file): New.
14798         (null_file_isatty): Delete.
14799         (ui_file::~ui_file): New.
14800         (null_file_rewind): Delete.
14801         (ui_file::printf): New.
14802         (null_file_put): Delete.
14803         (null_file_flush): Delete.
14804         (ui_file::putstr): New.
14805         (null_file_write): Delete.
14806         (ui_file::putstrn): New.
14807         (null_file_read): Delete.
14808         (ui_file::putc): New.
14809         (null_file_fputs): Delete.
14810         (null_file_write_async_safe): Delete.
14811         (ui_file::vprintf): New.
14812         (null_file_delete): Delete.
14813         (null_file::write): New.
14814         (null_file_fseek): Delete.
14815         (null_file::puts): New.
14816         (ui_file_data): Delete.
14817         (null_file::write_async_safe): New.
14818         (gdb_flush, ui_file_isatty): Adjust.
14819         (ui_file_put, ui_file_rewind): Delete.
14820         (ui_file_write): Adjust.
14821         (ui_file_write_for_put): Delete.
14822         (ui_file_write_async_safe, ui_file_read): Adjust.
14823         (ui_file_fseek): Delete.
14824         (fputs_unfiltered): Adjust.
14825         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
14826         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
14827         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
14828         (set_ui_file_data): Delete.
14829         (string_file::~string_file, string_file::write)
14830         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
14831         (do_ui_file_as_string, ui_file_as_string): Delete.
14832         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
14833         (struct mem_file): Delete.
14834         (mem_file_new): Delete.
14835         (stdio_file::stdio_file): New.
14836         (mem_file_delete): Delete.
14837         (stdio_file::stdio_file): New.
14838         (mem_fileopen): Delete.
14839         (stdio_file::~stdio_file): New.
14840         (mem_file_rewind): Delete.
14841         (stdio_file::set_stream): New.
14842         (mem_file_put): Delete.
14843         (stdio_file::open): New.
14844         (mem_file_write): Delete.
14845         (stdio_file_magic, struct stdio_file): Delete.
14846         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
14847         (stdio_file::flush): New.
14848         (stdio_file_read): Rename to ...
14849         (stdio_file::read): ... this.  Adjust.
14850         (stdio_file_write): Rename to ...
14851         (stdio_file::write): ... this.  Adjust.
14852         (stdio_file_write_async_safe): Rename to ...
14853         (stdio_file::write_async_safe) ... this.  Adjust.
14854         (stdio_file_fputs): Rename to ...
14855         (stdio_file::puts) ... this.  Adjust.
14856         (stdio_file_isatty): Delete.
14857         (stdio_file_fseek): Delete.
14858         (stdio_file::isatty): New.
14859         (stderr_file_write): Rename to ...
14860         (stderr_file::write) ... this.  Adjust.
14861         (stderr_file_fputs): Rename to ...
14862         (stderr_file::puts) ... this.  Adjust.
14863         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
14864         (stderr_file::stderr_file): New.
14865         (tee_file_magic): Delete.
14866         (struct tee_file): Delete.
14867         (tee_file::tee_file): New.
14868         (tee_file_new): Delete.
14869         (tee_file::~tee_file): New.
14870         (tee_file_delete): Delete.
14871         (tee_file_flush): Rename to ...
14872         (tee_file::flush): ... this.  Adjust.
14873         (tee_file_write): Rename to ...
14874         (tee_file::write): ... this.  Adjust.
14875         (tee_file::write_async_safe): New.
14876         (tee_file_fputs): Rename to ...
14877         (tee_file::puts): ... this.  Adjust.
14878         (tee_file_isatty): Rename to ...
14879         (tee_file::isatty): ... this.  Adjust.
14880         * ui-file.h (struct obstack, struct ui_file): Don't
14881         forward-declare.
14882         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
14883         (ui_file_write_ftype)
14884         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
14885         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
14886         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
14887         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
14888         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
14889         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
14890         (set_ui_file_fseek): Delete.
14891         (ui_file_data, ui_file_delete, ui_file_rewind)
14892         (struct ui_file): New.
14893         (ui_file_up): New.
14894         (class null_file): New.
14895         (null_stream): Declare.
14896         (ui_file_write_for_put, ui_file_put): Delete.
14897         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
14898         Delete.
14899         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
14900         (gdb_fopen, tee_file_new): Delete.
14901         (struct string_file): New.
14902         (struct stdio_file): New.
14903         (stdio_file_up): New.
14904         (struct stderr_file): New.
14905         (class tee_file): New.
14906         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
14907         of a 'ui_file *'.  Adjust.
14908         * ui-out.h (class ui_out) <field_stream>: Likewise.
14909         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
14910         (null_stream): Delete.
14911         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
14912         Adjust.
14913         * utils.h (struct ui_file): Delete forward declaration..
14914         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
14915         (error_stream): Take a 'string_file &' instead of a
14916         'ui_file *'.
14917         * varobj.c (varobj_value_get_print_value): Use string_file.
14918         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
14919         * gdbarch.c: Regenerate.
14920
14921 2017-02-02  Pedro Alves  <palves@redhat.com>
14922
14923         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
14924         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
14925         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
14926         Adjust to call gdb_print_insn instead of
14927         gdb_disassembler::print_insn.
14928         (dump_insns, do_mixed_source_and_assembly_deprecated)
14929         (do_mixed_source_and_assembly, do_assembly_only): Add back a
14930         'gdbarch' parameter.  Remove gdb_disassembler parameter.
14931         (gdb_disassembly): Don't allocate a gdb_disassembler here.
14932         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
14933         declaration.
14934         (gdb_pretty_print_insn): Re-add declaration.
14935         * record-btrace.c (btrace_insn_history): Don't allocate a
14936         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
14937
14938 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
14939
14940         * disasm.h (gdb_disassembly): Remove file_string parameter.
14941         * disasm.c (gdb_disassembly): Likewise.
14942         * cli/cli-cmds.c (print_disassembly): Adapt.
14943         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
14944         * stack.c (do_gdb_disassembly): Likewise.
14945
14946 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
14947
14948         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
14949         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
14950         targets.  And if the implicit value is longer than needed, extract
14951         the first bytes instead of the "least significant" ones.
14952
14953 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
14954
14955         * btrace.c (btrace_enable): Do not call btrace_add_pc for
14956         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
14957         (btrace_fetch): Assert can_access_registers_ptid.
14958         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
14959         validate_registers_access.
14960
14961 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
14962
14963         * gdbthread.h (can_access_registers_ptid): New.
14964         * thread.c (can_access_registers_ptid): New.
14965
14966 2017-02-01  Pedro Alves  <palves@redhat.com>
14967
14968         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
14969
14970 2017-01-31  Pedro Alves  <palves@redhat.com>
14971
14972         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
14973         Fix typos.
14974
14975 2017-01-31  Pedro Alves  <palves@redhat.com>
14976
14977         * stack.c (print_frame_args): Remove local mem_fileopen stream,
14978         not used.
14979
14980 2017-01-31  Pedro Alves  <palves@redhat.com>
14981
14982         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
14983
14984 2017-01-31  Pedro Alves  <palves@redhat.com>
14985
14986         * common/scoped_restore.h
14987         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
14988         change the value's parameter type to T2.
14989         (make_scoped_restore): Likewise.
14990
14991 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
14992             Richard Henderson  <rth@redhat.com>
14993
14994         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
14995         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
14996         GS_BASE for older kernels.
14997         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
14998         GS_BASE for older kernels.
14999         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
15000         and GS_BASE to the offset table.
15001         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
15002         system register group.
15003         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
15004         for older kernels.
15005         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
15006         amd64 ABI.
15007         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
15008         AMD64_GSBASE_REGNUM.
15009         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
15010         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
15011         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
15012         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
15013         i386/64bit-segments.xml in those rules.
15014         * features/i386/64bit-segments.xml: New file.
15015         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
15016         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
15017         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
15018         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
15019         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
15020         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
15021         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
15022         * features/i386/amd64-avx-linux.c: Regenerated.
15023         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
15024         * features/i386/amd64-avx-mpx.c: Regenerated.
15025         * features/i386/amd64-avx512-linux.c: Regenerated.
15026         * features/i386/amd64-linux.c: Regenerated.
15027         * features/i386/amd64-mpx-linux.c: Regenerated.
15028         * features/i386/i386-avx-mpx-linux.c: Regenerated.
15029         * features/i386/i386-avx-mpx.c: Regenerated.
15030         * features/i386/x32-avx-linux.c: Regenerated.
15031         * features/i386/x32-avx512-linux.c: Regenerated.
15032         * regformats/i386/amd64-avx-linux.dat: Regenerated.
15033         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
15034         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
15035         * regformats/i386/amd64-linux.dat: Regenerated.
15036         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
15037         * regformats/i386/x32-avx-linux.dat: Regenerated.
15038         * regformats/i386/x32-avx512-linux.dat: Regenerated.
15039         * regformats/i386/x32-linux.dat: Regenerated.
15040
15041 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
15042
15043         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
15044         Set to AMD64_NUM_REGS.
15045
15046 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
15047
15048         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
15049         that checks validity of a register number.
15050
15051 2017-01-27  Kees Cook  <keescook@google.com>
15052
15053         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
15054         fetch_fpregs if target has fpa registers.
15055         (arm_linux_store_inferior_registers): Call store_fpregs if target
15056         has fpa registers.
15057
15058 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
15059
15060         * cris-tdep.c (cris_gdbarch_init): Remove check for
15061         info.byte_order and force it to BFD_ENDIAN_LITTLE.
15062
15063 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
15064
15065         * corelow.c (get_core_register_section): Check for regset
15066         existence before checking for REGSET_VARIABLE_SIZE.
15067
15068 2017-01-26  Yao Qi  <yao.qi@linaro.org>
15069             Pedro Alves  <palves@redhat.com>
15070
15071         PR gdb/20939
15072         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
15073         call memory_error, save memaddr instead.
15074         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
15075         negative, cal memory_error.
15076         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
15077
15078 2017-01-26  Yao Qi  <yao.qi@linaro.org>
15079
15080         * disasm-selftests.c (memory_error_test): New function.
15081         (_initialize_disasm_selftests): Register memory_error_test.
15082
15083 2017-01-26  Yao Qi  <yao.qi@linaro.org>
15084
15085         * Makefile.in (SFILES): Add disasm-selftests.c and
15086         selftest-arch.c.
15087         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
15088         * disasm-selftests.c: New file.
15089         * selftest-arch.c: New file.
15090         * selftest-arch.h: New file.
15091
15092 2017-01-26  Yao Qi  <yao.qi@linaro.org>
15093
15094         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
15095         to bfd_arch_mep.  Don't return 0 if section is not
15096         found.  Call print_insn_mep.
15097
15098 2017-01-26  Pedro Alves  <palves@redhat.com>
15099             Yao Qi  <yao.qi@linaro.org>
15100
15101         * arm-tdep.c: Include "disasm.h".
15102         (gdb_print_insn_arm): Update code to get gdbarch.
15103         * disasm.c (dis_asm_read_memory): Change it to
15104         gdb_disassembler::dis_asm_read_memory.
15105         (dis_asm_memory_error): Likewise.
15106         (dis_asm_print_address): Likewise.
15107         (gdb_pretty_print_insn): Change it to
15108         gdb_disassembler::pretty_print_insn.
15109         (dump_insns): Add one argument gdb_disassemlber.  All
15110         callers updated.
15111         (do_mixed_source_and_assembly_deprecated): Likewise.
15112         (do_mixed_source_and_assembly): Likewise.
15113         (do_assembly_only): Likewise.
15114         (gdb_disassembler::gdb_disassembler): New.
15115         (gdb_disassembler::print_insn): New.
15116         * disasm.h (class gdb_disassembler): New.
15117         (gdb_pretty_print_insn): Remove declaration.
15118         (gdb_disassemble_info): Likewise.
15119         * guile/scm-disasm.c (class gdbscm_disassembler): New.
15120         (gdbscm_disasm_read_memory_worker): Update.
15121         (gdbscm_disasm_read_memory): Update.
15122         (gdbscm_disasm_memory_error): Remove.
15123         (gdbscm_disasm_print_address): Remove.
15124         (gdbscm_disassembler::gdbscm_disassembler): New.
15125         (gdbscm_print_insn_from_port): Update.
15126         * mips-tdep.c: Include disasm.h.
15127         (gdb_print_insn_mips): Update code to get gdbarch.
15128         * record-btrace.c (btrace_insn_history): Update.
15129         * spu-tdep.c: Include disasm.h.
15130         (struct spu_dis_asm_data): Remove.
15131         (struct spu_dis_asm_info): New.
15132         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
15133         SPU id.
15134         (gdb_print_insn_spu): Cast disassemble_info to
15135         spu_dis_asm_info.
15136
15137 2017-01-26  Yao Qi  <yao.qi@linaro.org>
15138
15139         * disasm.c (do_ui_file_delete): Delete.
15140         (gdb_insn_length): Move code creating stream to ...
15141         * utils.c (null_stream): ... here.  New function.
15142         * utils.h (null_stream): Declare.
15143
15144 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
15145
15146         * python/py-inferior.c (find_thread_object): Return directly
15147         from the loop.  Remove "found" variable.
15148
15149 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
15150
15151         GDB 7.12.1 released.
15152
15153 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
15154
15155         * python/py-function.c (fnpy_call): Reorder declarations to have
15156         the gdbpy_enter object declared first.
15157         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
15158
15159 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
15160
15161         PR python/21068
15162         * python/python-internal.h (PyMem_RawMalloc): Define for
15163         Python < 3.4.
15164         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
15165         PyMem_RawMalloc instead of PyMem_Malloc.
15166
15167 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
15168             Luis Machado  <lgustavo@codesourcery.com>
15169
15170         * NEWS (New commands): Mention flash-erase.
15171         (New MI commands): Mention target-flash-erase.
15172         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
15173         command.
15174         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
15175         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
15176         * target.c (flash_erase_command): New function.
15177         (initialize_targets): Add new flash-erase command.
15178         * target.h (flash_erase_command): New declaration.
15179
15180 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
15181
15182         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
15183         HAVE_SYS_PROCFS_H is defined.
15184
15185 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
15186
15187         * remote.c (struct cached_reg): Change data into a pointer.
15188         * (stop_reply_dtr): Free data pointers before deleting vector.
15189         (process_stop_reply): Likewise.
15190         (remote_parse_stop_reply): Allocate space for data
15191
15192 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
15193
15194         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
15195         MAX_REGISTER_SIZE.
15196         (amd64_pseudo_register_read_value): Likewise.
15197         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
15198         (store_register_using_P): Likewise.
15199         * regcache.c (regcache_xfer_part): Likewise.
15200
15201 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
15202
15203         Split real and pseudo registers.
15204         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
15205         (sparc32_pseudo_regnum): New enum.
15206         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
15207         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
15208         (SPARC32_CP0_REGISTERS): New macro.
15209         (sparc32_pseudo_register_name): New function.
15210         (sparc32_register_name): Use sparc32_pseudo_register_name.
15211         (sparc32_pseudo_register_type): New function.
15212         (sparc32_register_type): Use sparc32_pseudo_register_type.
15213         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
15214         pseudo register numbers.
15215         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
15216         (SPARC64_CP0_REGISTERS): New macro.
15217         (sparc64_pseudo_register_name): New function.
15218         (sparc64_register_name): Use sparc64_pseudo_register_name.
15219         (sparc64_pseudo_register_type): New function.
15220         (sparc64_register_type): Use sparc64_pseudo_register_type.
15221         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
15222         pseudo register numbers.
15223         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
15224         sparc64_store_arguments): Handle pseudo register numbers.
15225
15226 2017-01-13  Yao Qi  <yao.qi@linaro.org>
15227
15228         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
15229         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
15230         output.
15231         (getpkt_or_notif_sane_1): Likewise.
15232
15233 2017-01-13  Yao Qi  <yao.qi@linaro.org>
15234
15235         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
15236         of CC.  Pass "-x c++-header" instead of "-x c".
15237
15238 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
15239
15240         * remote.c (remote_can_async_p): Update comment.
15241
15242 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
15243
15244         * linux-nat.c (linux_nat_can_async_p): Update comment.
15245
15246 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
15247
15248         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
15249
15250 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
15251
15252         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
15253
15254 2017-01-10  Tom Tromey  <tom@tromey.com>
15255
15256         * python/py-type.c (typy_legacy_template_argument): Update.
15257         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
15258         ~demangle_parse_info): Declare new members.
15259         (cp_demangled_name_to_comp): Return unique_ptr.
15260         (cp_demangled_name_parse_free)
15261         (make_cleanup_cp_demangled_name_parse_free)
15262         (cp_new_demangle_parse_info): Remove.
15263         * cp-support.c (do_demangled_name_parse_free_cleanup)
15264         (make_cleanup_cp_demangled_name_parse_free): Remove.
15265         (inspect_type, cp_canonicalize_string_full)
15266         (cp_canonicalize_string): Update.
15267         (mangled_name_to_comp): Change return type.
15268         (cp_class_name_from_physname, method_name_from_physname)
15269         (cp_func_name, cp_remove_params): Update.
15270         * cp-name-parser.y (demangle_parse_info): New constructor, from
15271         cp_new_demangle_parse_info.
15272         (~demangle_parse_info): New destructor, from
15273         cp_demangled_name_parse_free.
15274         (cp_merge_demangle_parse_infos): Update.
15275         (cp_demangled_name_to_comp): Change return type.
15276
15277 2017-01-10  Tom Tromey  <tom@tromey.com>
15278
15279         * top.c (prevent_dont_repeat): Change return type.
15280         * python/python.c (execute_gdb_command): Use std::string.
15281         Update.
15282         * guile/guile.c (gdbscm_execute_gdb_command): Update.
15283         * command.h (prevent_dont_repeat): Change return type.
15284         * breakpoint.c (bpstat_do_actions_1): Update.
15285
15286 2017-01-10  Tom Tromey  <tom@tromey.com>
15287
15288         * value.h (scoped_value_mark::~scoped_value_mark): Call
15289         free_to_mark.
15290         (scoped_value_mark::free_to_mark): New method.
15291         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
15292         scoped_value_mark.
15293
15294 2017-01-10  Tom Tromey  <tom@tromey.com>
15295
15296         * python/py-value.c (valpy_dereference, valpy_referenced_value)
15297         (valpy_reference_value, valpy_const_value, valpy_get_address)
15298         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
15299         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
15300         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
15301         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
15302         scoped_value_mark.
15303         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
15304         * value.h (scoped_value_mark): New class.
15305
15306 2017-01-10  Tom Tromey  <tom@tromey.com>
15307
15308         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
15309         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
15310         * psymtab.c (discard_psymtabs_upto): Remove.
15311         (make_cleanup_discard_psymtabs): Remove.
15312         (struct psymtab_state): Remove.
15313
15314 2017-01-10  Tom Tromey  <tom@tromey.com>
15315
15316         * record-full.c (record_full_save_cleanups): Remove.
15317         (record_full_save): Use gdb::unlinker.
15318         * gcore.c (do_bfd_delete_cleanup): Remove.
15319         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
15320         cleanups.
15321         * dwarf2read.c (unlink_if_set): Remove.
15322         (write_psymtabs_to_index): Use gdb::unlinker.
15323         * common/gdb_unlinker.h: New file.
15324
15325 2017-01-10  Tom Tromey  <tom@tromey.com>
15326
15327         * windows-tdep.c (windows_xfer_shared_library): Update.
15328         * windows-nat.c (windows_make_so): Update.
15329         * utils.h (make_cleanup_bfd_unref): Remove.
15330         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
15331         * symfile.h (symfile_bfd_open)
15332         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
15333         * symfile.c (read_symbols, symbol_file_add)
15334         (separate_debug_file_exists): Update.
15335         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
15336         (generic_load, reread_symbols): Update.
15337         * symfile-mem.c (symbol_file_add_from_memory): Update.
15338         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
15339         (spu_symbol_file_add_from_memory): Update.
15340         * solist.h (struct target_so_ops) <bfd_open>: Return
15341         gdb_bfd_ref_ptr.
15342         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
15343         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
15344         gdb_bfd_ref_ptr.
15345         (solib_map_sections, reload_shared_libraries_1): Update.
15346         * solib-svr4.c (enable_break): Update.
15347         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
15348         * solib-frv.c (enable_break2): Update.
15349         * solib-dsbt.c (enable_break): Update.
15350         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
15351         gdb_bfd_ref_ptr.
15352         (darwin_solib_get_all_image_info_addr_at_init): Update.
15353         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
15354         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
15355         * record-full.c (record_full_save): Update.
15356         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
15357         * procfs.c (insert_dbx_link_bpt_in_file): Update.
15358         * minidebug.c (find_separate_debug_file_in_section): Return
15359         gdb_bfd_ref_ptr.
15360         * machoread.c (macho_add_oso_symfile): Change abfd to
15361         gdb_bfd_ref_ptr.
15362         (macho_symfile_read_all_oso): Update.
15363         (macho_check_dsym): Return gdb_bfd_ref_ptr.
15364         (macho_symfile_read): Update.
15365         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
15366         (jit_bfd_try_read_symtab): Update.
15367         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15368         (gdb_bfd_openw, gdb_bfd_openr_iovec)
15369         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15370         gdb_bfd_ref_ptr.
15371         (gdb_bfd_ref_policy): New struct.
15372         (gdb_bfd_ref_ptr): New typedef.
15373         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
15374         (gdb_bfd_openw, gdb_bfd_openr_iovec)
15375         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
15376         gdb_bfd_ref_ptr.
15377         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15378         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
15379         (gcore_command): Update.
15380         * exec.c (exec_file_attach): Update.
15381         * elfread.c (elf_symfile_read): Update.
15382         * dwarf2read.c (dwarf2_get_dwz_file): Update.
15383         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
15384         (open_and_init_dwo_file): Update.
15385         (open_dwp_file): Return gdb_bfd_ref_ptr.
15386         (open_and_init_dwp_file): Update.
15387         * corelow.c (core_open): Update.
15388         * compile/compile-object-load.c (compile_object_load): Update.
15389         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
15390         * coffread.c (coff_symfile_read): Update.
15391         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
15392         gdb_bfd_ref_ptr.  Rename.
15393         (dump_bfd_file, restore_command): Update.
15394         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15395         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
15396         (find_separate_debug_file_by_buildid): Update.
15397
15398 2017-01-10  Tom Tromey  <tom@tromey.com>
15399
15400         * common/gdb_ref_ptr.h: New file.
15401         * python/py-ref.h (struct gdbpy_ref_policy): New.
15402         (gdbpy_ref): Now a typedef.
15403
15404 2017-01-10  Tom Tromey  <tom@tromey.com>
15405
15406         * utils.h (make_cleanup_htab_delete): Don't declare.
15407         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
15408         Remove.
15409         * linespec.c (decode_compound_collector): Add constructor,
15410         destructor.
15411         (lookup_prefix_sym): Remove cleanup.
15412         (symtab_collector): Add constructor, destructor.
15413         (collect_symtabs_from_filename): Remove cleanup.
15414         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
15415         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
15416         Use htab_up.
15417         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
15418         * dwarf2read.c (dw2_expand_symtabs_matching)
15419         (dw2_map_symbol_filenames, dwarf_decode_macros)
15420         (write_psymtabs_to_index): Use htab_up.
15421         * dwarf2loc.c (func_verify_no_selftailcall)
15422         (call_site_find_chain_1, func_verify_no_selftailcall)
15423         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
15424         std::vector, gdb::unique_xmalloc_ptr.
15425         (call_sitep): Remove typedef.
15426         (dwarf2_locexpr_baton_eval): Remove unused variable.
15427
15428 2017-01-10  Tom Tromey  <tom@tromey.com>
15429
15430         * python/python-internal.h (make_cleanup_py_decref)
15431         (make_cleanup_py_xdecref): Don't declare.
15432         * python/py-utils.c (py_decref, make_cleanup_py_decref)
15433         (py_xdecref, make_cleanup_py_xdecref): Remove.
15434
15435 2017-01-10  Tom Tromey  <tom@tromey.com>
15436
15437         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
15438         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
15439
15440 2017-01-10  Tom Tromey  <tom@tromey.com>
15441
15442         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
15443
15444 2017-01-10  Tom Tromey  <tom@tromey.com>
15445
15446         * python/py-utils.c (unicode_to_encoded_string)
15447         (python_string_to_target_string)
15448         (python_string_to_target_python_string)
15449         (python_string_to_host_string, gdbpy_obj_to_string)
15450         (get_addr_from_python): Use gdbpy_ref.
15451
15452 2017-01-10  Tom Tromey  <tom@tromey.com>
15453
15454         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
15455         gdbpy_ref.
15456
15457 2017-01-10  Tom Tromey  <tom@tromey.com>
15458
15459         * python/python.c (eval_python_command, gdbpy_decode_line)
15460         (gdbpy_run_events, gdbpy_start_type_printers)
15461         (gdbpy_apply_type_printers): Use gdbpy_ref.
15462
15463 2017-01-10  Tom Tromey  <tom@tromey.com>
15464
15465         * python/py-param.c (get_doc_string, compute_enum_values): Use
15466         gdbpy_ref.
15467
15468 2017-01-10  Tom Tromey  <tom@tromey.com>
15469
15470         * python/py-inferior.c (find_thread_object, build_inferior_list):
15471         Use gdbpy_ref.
15472
15473 2017-01-10  Tom Tromey  <tom@tromey.com>
15474
15475         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
15476
15477 2017-01-10  Tom Tromey  <tom@tromey.com>
15478
15479         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
15480         gdbpy_ref.
15481
15482 2017-01-10  Tom Tromey  <tom@tromey.com>
15483
15484         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
15485         extra incref.
15486         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
15487         Use gdbpy_ref.
15488
15489 2017-01-10  Tom Tromey  <tom@tromey.com>
15490
15491         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15492         gdbpy_ref.
15493
15494 2017-01-10  Tom Tromey  <tom@tromey.com>
15495
15496         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
15497         decref results of PyArg_ParseTupleAndKeywords.
15498
15499 2017-01-10  Tom Tromey  <tom@tromey.com>
15500
15501         * python/python.c (python_run_simple_file): Use
15502         unique_xmalloc_ptr, gdbpy_ref.
15503
15504 2017-01-10  Tom Tromey  <tom@tromey.com>
15505
15506         * python/py-prettyprint.c (print_stack_unless_memory_error)
15507         (print_string_repr, print_children): Use gdbpy_ref.
15508         (dummy_python_frame): New class.
15509         (dummy_python_frame::dummy_python_frame): Rename from
15510         push_dummy_python_frame.
15511         (py_restore_tstate): Remove.
15512
15513 2017-01-10  Tom Tromey  <tom@tromey.com>
15514
15515         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
15516
15517 2017-01-10  Tom Tromey  <tom@tromey.com>
15518
15519         * python/python.c (ensure_python_env, restore_python_env):
15520         Remove.
15521         * python/python-internal.h (ensure_python_env): Don't declare.
15522         * varobj.h (varobj_ensure_python_env): Don't declare.
15523         * varobj.c (varobj_ensure_python_env): Remove.
15524
15525 2017-01-10  Tom Tromey  <tom@tromey.com>
15526
15527         * varobj.c (varobj_value_get_print_value): Use
15528         gdbpy_enter_varobj.
15529
15530 2017-01-10  Tom Tromey  <tom@tromey.com>
15531
15532         * python/py-prettyprint.c (print_string_repr, print_children):
15533         Update.
15534         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
15535         of "encoding".
15536         * varobj.c (varobj_value_get_print_value): Update.
15537         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
15538
15539 2017-01-10  Tom Tromey  <tom@tromey.com>
15540
15541         * varobj.c (varobj_get_display_hint)
15542         (dynamic_varobj_has_child_method, install_new_value_visualizer)
15543         (varobj_set_visualizer, free_variable): Use
15544         gdbpy_enter_varobj.
15545
15546 2017-01-10  Tom Tromey  <tom@tromey.com>
15547
15548         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
15549         (do_finish_initialization): New function.  Use gdbpy_ref.
15550         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
15551         do_finish_initialization.
15552
15553 2017-01-10  Tom Tromey  <tom@tromey.com>
15554
15555         * python/py-param.c (get_set_value, get_show_value): Use
15556         gdbpy_enter, gdbpy_ref.
15557
15558 2017-01-10  Tom Tromey  <tom@tromey.com>
15559
15560         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
15561
15562 2017-01-10  Tom Tromey  <tom@tromey.com>
15563
15564         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
15565
15566 2017-01-10  Tom Tromey  <tom@tromey.com>
15567
15568         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
15569         Use gdbpy_enter_varobj.
15570
15571 2017-01-10  Tom Tromey  <tom@tromey.com>
15572
15573         * varobj.c (gdbpy_enter_varobj): New constructor.
15574         * python/python-internal.h (gdbpy_enter_varobj): New class.
15575         * python/py-varobj.c (py_varobj_get_iterator): Use
15576         gdbpy_enter_varobj.
15577
15578 2017-01-10  Tom Tromey  <tom@tromey.com>
15579
15580         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
15581         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
15582         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
15583         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
15584         unique_xmalloc_ptr.
15585         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
15586
15587 2017-01-10  Tom Tromey  <tom@tromey.com>
15588
15589         * python/py-xmethods.c (invoke_match_method): Use
15590         gdbpy_ref.
15591
15592 2017-01-10  Tom Tromey  <tom@tromey.com>
15593
15594         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
15595         gdbpy_enter, gdbpy_ref.
15596
15597 2017-01-10  Tom Tromey  <tom@tromey.com>
15598
15599         * python/python.c (python_interactive_command): Use gdbpy_enter.
15600
15601 2017-01-10  Tom Tromey  <tom@tromey.com>
15602
15603         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
15604         gdbpy_ref.
15605
15606 2017-01-10  Tom Tromey  <tom@tromey.com>
15607
15608         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
15609         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
15610
15611 2017-01-10  Tom Tromey  <tom@tromey.com>
15612
15613         * utils.h (htab_deleter): New struct.
15614         (htab_up): New typedef.
15615         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
15616         gdbpy_enter, gdbpy_ref, htab_up.
15617
15618 2017-01-10  Tom Tromey  <tom@tromey.com>
15619
15620         * python/py-unwind.c (pending_frame_invalidate): Remove.
15621         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
15622
15623 2017-01-10  Tom Tromey  <tom@tromey.com>
15624
15625         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
15626         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
15627
15628 2017-01-10  Tom Tromey  <tom@tromey.com>
15629
15630         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
15631
15632 2017-01-10  Tom Tromey  <tom@tromey.com>
15633
15634         * python/python.c (gdbpy_eval_from_control_command)
15635         (gdbpy_source_script, gdbpy_run_events)
15636         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
15637         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
15638         gdbpy_enter.
15639
15640 2017-01-10  Tom Tromey  <tom@tromey.com>
15641
15642         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
15643
15644 2017-01-10  Tom Tromey  <tom@tromey.com>
15645
15646         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
15647
15648 2017-01-10  Tom Tromey  <tom@tromey.com>
15649
15650         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
15651         (python_on_inferior_call_pre, python_on_inferior_call_post)
15652         (python_on_memory_change, python_on_register_change)
15653         (python_inferior_exit, python_new_objfile, add_thread_object)
15654         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
15655
15656 2017-01-10  Tom Tromey  <tom@tromey.com>
15657
15658         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
15659         (bpfinishpy_handle_exit): Use gdbpy_enter.
15660
15661 2017-01-10  Tom Tromey  <tom@tromey.com>
15662
15663         * python/py-cmd.c (cmdpy_destroyer)
15664         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
15665         gdbpy_enter.
15666
15667 2017-01-10  Tom Tromey  <tom@tromey.com>
15668
15669         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
15670         gdbpy_enter.
15671         (gdbpy_breakpoint_has_cond): Likewise.
15672
15673 2017-01-10  Tom Tromey  <tom@tromey.com>
15674
15675         * python/python.c (gdbpy_enter): New constructor.
15676         (~gdbpy_enter): New destructor.
15677         (restore_python_env, ensure_python_env): Rewrite.
15678         * python/python-internal.h (gdbpy_enter): New class.
15679
15680 2017-01-10  Tom Tromey  <tom@tromey.com>
15681
15682         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
15683
15684 2017-01-10  Tom Tromey  <tom@tromey.com>
15685
15686         * python/py-value.c (value_has_field, get_field_flag)
15687         (get_field_type, valpy_getitem, convert_value_from_python): Use
15688         gdbpy_ref.
15689
15690 2017-01-10  Tom Tromey  <tom@tromey.com>
15691
15692         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
15693         gdbpy_ref.
15694
15695 2017-01-10  Tom Tromey  <tom@tromey.com>
15696
15697         * python/py-prettyprint.c (search_pp_list)
15698         (find_pretty_printer_from_objfiles)
15699         (find_pretty_printer_from_progspace)
15700         (find_pretty_printer_from_gdb, find_pretty_printer)
15701         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
15702         gdbpy_ref.
15703
15704 2017-01-10  Tom Tromey  <tom@tromey.com>
15705
15706         * python/py-param.c (call_doc_function): Use gdbpy_ref.
15707
15708 2017-01-10  Tom Tromey  <tom@tromey.com>
15709
15710         * python/py-linetable.c (build_line_table_tuple_from_pcs)
15711         (ltpy_get_all_source_lines): Use gdbpy_ref.
15712
15713 2017-01-10  Tom Tromey  <tom@tromey.com>
15714
15715         * python/py-framefilter.c (extract_sym, extract_value)
15716         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
15717         gdbpy_ref.
15718
15719 2017-01-10  Tom Tromey  <tom@tromey.com>
15720
15721         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
15722
15723 2017-01-10  Tom Tromey  <tom@tromey.com>
15724
15725         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
15726
15727 2017-01-10  Tom Tromey  <tom@tromey.com>
15728
15729         * python/py-function.c (convert_values_to_python, fnpy_init): Use
15730         gdbpy_ref.
15731
15732 2017-01-10  Tom Tromey  <tom@tromey.com>
15733
15734         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
15735
15736 2017-01-10  Tom Tromey  <tom@tromey.com>
15737
15738         * python/py-type.c (convert_field, make_fielditem, typy_fields)
15739         (typy_range): Use gdbpy_ref.
15740
15741 2017-01-10  Tom Tromey  <tom@tromey.com>
15742
15743         * python/py-threadevent.c (create_thread_event_object): Use
15744         gdbpy_ref.
15745         * python/py-stopevent.c (create_stop_event_object): Simplify.
15746         (emit_stop_event): Use gdbpy_ref.
15747         * python/py-signalevent.c (create_signal_event_object): Use
15748         gdbpy_ref.
15749         * python/py-newobjfileevent.c (create_new_objfile_event_object)
15750         (emit_new_objfile_event, create_clear_objfiles_event_object)
15751         (emit_clear_objfiles_event): Use gdbpy_ref.
15752         * python/py-infevents.c (create_inferior_call_event_object)
15753         (create_register_changed_event_object)
15754         (create_memory_changed_event_object, emit_inferior_call_event)
15755         (emit_memory_changed_event, emit_register_changed_event): Use
15756         gdbpy_ref.
15757         * python/py-exitedevent.c (create_exited_event_object)
15758         (emit_exited_event): Use gdbpy_ref.
15759         * python/py-event.h (evpy_emit_event): Remove
15760         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
15761         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
15762         * python/py-continueevent.c (emit_continue_event): Use
15763         gdbpy_ref.
15764         * python/py-breakpoint.c (gdbpy_breakpoint_created)
15765         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
15766         gdbpy_ref.
15767         * python/py-bpevent.c (create_breakpoint_event_object): Use
15768         gdbpy_ref.
15769
15770 2017-01-10  Tom Tromey  <tom@tromey.com>
15771
15772         * python/py-ref.h: New file.
15773
15774 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
15775
15776         * cli-out.c (cli_ui_out::do_redirect): Change return type to
15777         void.
15778         * cli-out.h (cli_ui_out::do_redirect): Likewise.
15779         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
15780         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
15781         * ui-out.c (ui_out::redirect): Likewise.
15782         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
15783         * cli/cli-logging.c (set_logging_redirect): Update call site of
15784         ui_out::redirect.
15785         (handle_redirections): Likewise.
15786         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
15787         * top.c (execute_command_to_string): Likewise.
15788         * utils.c (do_ui_out_redirect_pop): Likewise.
15789
15790 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
15791
15792         * stack.c (_initialize_stack): Update "frame" command help message.
15793
15794 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
15795
15796         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
15797
15798 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15799
15800         * x86-linux-nat.h: Include gdb_proc_service.h.
15801
15802 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15803
15804         * ser-base.h: Include serial.h.
15805
15806 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15807
15808         * ppc-linux-tdep.h: Include ppc-tdep.h.
15809
15810 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15811
15812         * nat/amd64-linux-siginfo.h: Include signal.h.
15813
15814 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15815
15816         * nat/aarch64-linux-hw-point.h: Include break-common.h.
15817
15818 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15819
15820         * mi/mi-parse.h: Include mi-cmds.h.
15821
15822 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15823
15824         * inf-loop.c: Don't include "target.h".
15825         * inf-loop.h: Include it here.
15826
15827 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15828
15829         * dfp.h: Include "dboulest.h" and "expression.h".
15830
15831 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15832
15833         * ax-gdb.h: Include "ax.h".
15834
15835 2017-01-06  Yao Qi  <yao.qi@linaro.org>
15836
15837         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
15838         with nat/gdb_ptrace.h.
15839
15840 2017-01-05  Yao Qi  <yao.qi@linaro.org>
15841
15842         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
15843         new line.
15844         (mips64_fbsd_sigframe_init): Likewise.
15845
15846 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
15847
15848         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
15849         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
15850
15851 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
15852
15853         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
15854         * NEWS: Mention new FreeBSD/mips native configuration.
15855         * config/mips/fbsd.mh: New file.
15856         * configure.host: Add mips*-*-freebsd*.
15857         * mips-fbsd-nat.c: New file.
15858
15859 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
15860
15861         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
15862         (ALLDEPFILES): Add mips-fbsd-tdep.c.
15863         * NEWS: Mention new FreeBSD/mips target.
15864         * configure.tgt: Add mips*-*-freebsd*.
15865         * mips-fbsd-tdep.c: New file.
15866         * mips-fbsd-tdep.h: New file.
15867
15868 2017-01-04  Yao Qi  <yao.qi@linaro.org>
15869
15870         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
15871         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
15872
15873 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
15874
15875         Update copyright year range in all GDB files.
15876
15877 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
15878
15879         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
15880
15881 For older changes see ChangeLog-2016.
15882 \f
15883 Local Variables:
15884 mode: change-log
15885 left-margin: 8
15886 fill-column: 74
15887 version-control: never
15888 coding: utf-8
15889 End: