reggroups: Convert reggroups from post_init to pre_init
[external/binutils.git] / gdb / ChangeLog
1 2017-12-27  Stafford Horne  <shorne@gmail.com>
2
3         * reggroups.c (reggroups_init): Change to depend only on
4         obstack rather than gdbarch.
5         (reggroup_add): Remove logic for forcing premature init.
6         (_initialize_reggroup): Set `reggroups_data` with
7         gdbarch_data_register_pre_init() rather than
8         gdbarch_data_register_post_init().
9
10 2017-12-27  Stafford Horne  <shorne@gmail.com>
11
12         * infcmd.c (_initialize_infcmd): Add help for info reg $reggroup
13         and info all-registers $reggroup feature.
14
15 2017-12-23  Simon Marchi  <simon.marchi@polymtl.ca>
16
17         * target-descriptions.c (print_c_tdesc)
18         <printf_field_type_assignment>: Add ATTRIBUTE_PRINTF.
19
20 2017-12-21  Simon Marchi  <simon.marchi@ericsson.com>
21             Sergio Durigan Junior  <sergiodj@redhat.com>
22
23         * target-descriptions.c (print_c_tdesc) <visit>: Don't output
24         field_type declaration, use printf_field_type_assignment
25         instead.
26         <printf_field_type_assignment>: New method.
27         * features/aarch64-core.c, features/aarch64-fpu.c
28         features/arc-arcompact.c, features/arc-v2.c,
29         features/arm/arm-with-iwmmxt.c, features/i386/32bit-core.c,
30         features/i386/32bit-mpx.c, features/i386/32bit-sse.c,
31         features/i386/64bit-avx512.c, features/i386/64bit-core.c,
32         features/i386/64bit-mpx.c, features/i386/64bit-sse.c,
33         features/i386/x32-core.c, features/or1k.c,
34         features/rs6000/powerpc-7400.c,
35         features/rs6000/powerpc-altivec32.c,
36         features/rs6000/powerpc-altivec32l.c,
37         features/rs6000/powerpc-altivec64.c,
38         features/rs6000/powerpc-altivec64l.c,
39         features/rs6000/powerpc-cell32l.c,
40         features/rs6000/powerpc-cell64l.c,
41         features/rs6000/powerpc-isa205-altivec32l.c,
42         features/rs6000/powerpc-isa205-altivec64l.c,
43         features/rs6000/powerpc-isa205-vsx32l.c,
44         features/rs6000/powerpc-isa205-vsx64l.c,
45         features/rs6000/powerpc-vsx32.c,
46         features/rs6000/powerpc-vsx32l.c,
47         features/rs6000/powerpc-vsx64.c,
48         features/rs6000/powerpc-vsx64l.c, features/s390-gs-linux64.c,
49         features/s390-tevx-linux64.c, features/s390-vx-linux64.c,
50         features/s390x-gs-linux64.c, features/s390x-tevx-linux64.c,
51         features/s390x-vx-linux64.c: Re-generate.
52
53 2017-12-20  Uros Bizjak  <ubizjak@gmail.com>
54
55         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Remove
56         write-only assignment to "insn" variable.
57
58 2017-12-20  Ulrich Weigand  <uweigand@de.ibm.com>
59
60         * spu-tdep.c (spu_gdbarch_init): Set set_gdbarch_significant_addr_bit
61         to 64 bits.
62         (ppc_linux_init_abi): Likewise, if Cell/B.E. is supported.
63
64 2017-12-18  Joel Brobecker  <brobecker@adacore.com>
65
66         * ada-lang.c (ada_to_fixed_type_1): Rethrow errors with
67         a more detailed exception message when getting an exception
68         while trying to read the value of an XVZ variable.
69         * ada-valprint.c (ada_val_print): Only catch RETURN_MASK_ERROR
70         exceptions.  Print an error message when an exception is caught.
71
72 2017-12-18  Joel Brobecker  <brobecker@adacore.com>
73
74         * ada-lang.c (assign_component): Strip any TYPE_CODE_TYPEDEF
75         layer from lhs' type.
76         (assign_aggregate): Likewise.
77
78 2017-12-18  Xavier Roirand  <roirand@adacore.com>
79
80         * ada-lang.c (ada_convert_actual): Change the way actual value
81         are passed to the inferior when the inferior expects a pointer type.
82
83 2017-12-17  Stafford Horne  <shorne@gmail.com>
84
85         * gdb/or1k-tdep.c (show_or1k_debug): Fix function parameter alignment.
86         (or1k_analyse_inst): Likewise.
87         (or1k_single_step_through_delay): Likewise.
88         (or1k_frame_cache): Fix parameter alignment and use paddress()
89         instead of %x.
90
91 2017-12-17  Stafford Horne  <shorne@gmail.com>
92
93         * NEWS (Changes since GDB 8.0): Mention new or1k target and new
94         commands to set/show or1k debug.
95
96 2017-12-15  Sergio Durigan Junior  <sergiodj@redhat.com>
97
98         * typeprint.c (whatis_exp): Fix ARI warning and reindent "if"
99         condition.
100
101 2017-12-15  Sergio Durigan Junior  <sergiodj@redhat.com>
102             Pedro Alves  <palves@redhat.com>
103
104         PR cli/16224
105         * NEWS (Changes since GDB 8.0): Mention new '/o' flag.
106         * c-typeprint.c (OFFSET_SPC_LEN): New define.
107         (c_type_print_varspec_prefix): New argument 'struct
108         print_offset_data *'.
109         (c_type_print_base_1): New function and prototype.
110         (c_print_type_1): New function, with code from 'c_print_type'.
111         (c_print_type): Use 'c_print_type_1'.
112         (c_type_print_varspec_prefix): New argument 'struct
113         print_offset_data *'.  Use it.  Call 'c_type_print_base_1'
114         instead of 'c_print_type_base'.
115         (print_spaces_filtered_with_print_options): New function.
116         (output_access_specifier): Take new argument FLAGS.  Modify
117         function to call 'print_spaces_filtered_with_print_options'.
118         (c_print_type_vtable_offset_marker): New function.
119         (c_print_type_union_field_offset): New function.
120         (c_print_type_struct_field_offset): New function.
121         (c_print_type_no_offsets): New function.
122         (c_type_print_base_struct_union): New argument 'struct
123         print_offset_data *'.  Print offsets and sizes for
124         struct/union/class fields.
125         * typeprint.c (const struct type_print_options
126         type_print_raw_options): Initialize 'print_offsets'.
127         (static struct type_print_options default_ptype_flags):
128         Likewise.
129         (struct print_offset_data print_offset_default_data): New
130         variable.
131         (whatis_exp): Handle '/o' option.
132         (_initialize_typeprint): Add '/o' flag to ptype's help.
133         * typeprint.h (struct print_offset_data): New struct.
134         (struct type_print_options) <print_offsets>: New field.
135
136 2017-12-15  Sergio Durigan Junior  <sergiodj@redhat.com>
137
138         * c-typeprint.c (need_access_label_p): New function.
139         (c_type_print_base_struct_union): New function.
140         (c_type_print_base): Move code to handle
141         TYPE_CODE_{STRUCT,UNION} to the functions mentioned above.
142
143 2017-12-15  Richard Henderson  <rth@redhat.com>
144             Uros Bizjak  <ubizjak@gmail.com>
145
146         PR gdb/19061
147         * alpha-tdep.c (alpha_software_single_step): Call
148         alpha_deal_with_atomic_sequence here.
149         (set_gdbarch_software_single_step): Set to
150         alpha_software_single_step.
151         * nat/linux-ptrace.h [__alpha__]: Define GDB_ARCH_IS_TRAP_BRKPT
152         and GDB_ARCH_IS_TRAP_HWBKPT.
153
154 2017-12-15  Yao Qi  <yao.qi@linaro.org>
155
156         * unittests/memory-map-selftests.c: Wrap test with HAVE_LIBEXPAT.
157
158 2017-12-15  Xavier Roirand  <roirand@adacore.com>
159
160         * ada-lang.c (ada_value_primitive_field): Handle field search
161         in case of homonyms.
162         (find_struct_field): Ditto.
163         (ada_search_struct_field): Ditto.
164         (ada_value_struct_elt): Ditto.
165         (ada_lookup_struct_elt_type): Ditto.
166
167 2017-12-14  Simon Marchi  <simon.marchi@ericsson.com>
168
169         * python/py-breakpoint.c (bppy_init): Use 'O' format specifier
170         for "qualified" and use PyObject_IsTrue.
171
172 2017-12-14  Jan Kratochvil  <jan.kratochvil@redhat.com>
173
174         * dwarf2read.c (dw2_debug_names_iterator::next): Support
175         DW_IDX_type_unit.
176         (debug_names::dwarf5_offset_size, unit_kind): New.
177         (debug_names::insert): Add parameter kind.
178         (debug_names::build): Support DW_IDX_type_unit.
179         (debug_names::recursively_write_psymbols): Update
180         (debug_names::write_psymbols caller.
181         (debug_names::write_one_signatured_type_data)
182         (debug_names::write_one_signatured_type): New.
183         (debug_names::index_key, debug_names::symbol_value)
184         (debug_names::write_psymbols): Add kind.
185         (debug_names::write_one_signatured_type): New.
186         (write_debug_names): Move dwarf5_offset_size to debug_names.
187         Use debug_names::write_one_signatured_type for type units.
188
189 2017-12-14  Joel Brobecker  <brobecker@adacore.com>
190
191         * ada-lang.c (ada_value_equal): Add handling of typedef types
192         when comparing array objects.
193
194 2017-12-14  Joel Brobecker  <brobecker@adacore.com>
195
196         * ada-tasks.c (read_atcb): Properly set task_info->ptid
197         when !target_has_execution as well.
198         (task_command): Remove error when !target_has_execution.
199
200 2017-12-13  Simon Marchi  <simon.marchi@ericsson.com>
201
202         * location.h (string_to_event_location): Add match_type
203         parameter.
204         * location.c (string_to_event_location): Likewise.
205         * python/py-breakpoint.c (bppy_init): Handle qualified
206         parameter.
207
208 2017-12-13  Pedro Alves  <palves@redhat.com>
209
210         * completer.c (completion_tracker::maybe_add_completion): New
211         'text' and 'word' parameters.  Use make_completion_match_str.
212         (completion_tracker::add_completion): New 'text' and 'word'
213         parameters.  Pass down.
214         (completion_tracker::recompute_lowest_common_denominator): Change
215         parameter type to gdb::unique_xmalloc_ptr rval ref.  Adjust.
216         * completer.h (completion_tracker::add_completion): New 'text' and
217         'word' parameters.
218         (completion_tracker::recompute_lowest_common_denominator): Change
219         parameter type to gdb::unique_xmalloc_ptr rval ref.
220         (completion_tracker::recompute_lowest_common_denominator): Change
221         parameter type to gdb::unique_xmalloc_ptr rval ref.
222         * symtab.c (completion_list_add_name): Pass down 'text' and 'word'
223         as well.
224
225 2017-12-13  Pedro Alves  <palves@redhat.com>
226
227         * cli/cli-decode.c (complete_on_cmdlist, complete_on_enum): Use
228         make_completion_match_str.
229         * completer.c: Use gdb::unique_xmalloc_ptr and
230         make_completion_match_str.
231         (make_completion_match_str_1): New.
232         (make_completion_match_str(const char *, const char *,
233         const char *)): New.
234         (make_completion_match_str(gdb::unique_xmalloc_ptr<char> &&,
235         const char *, const char *)): New.
236         * completer.h (make_completion_match_str(const char *,
237         const char *, const char *)): New.
238         (make_completion_match_str(gdb::unique_xmalloc_ptr<char> &&,
239         const char *, const char *)): New.
240         * interps.c (interpreter_completer): Use make_completion_match_str.
241         * symtab.c (completion_list_add_name, add_filename_to_list): Use
242         make_completion_match_str.
243
244 2017-12-13  Stafford Horne  <shorne@gmail.com>
245
246         * or1k-tdep.c (or1k_analyse_inst): Use _() wrapper for message
247         strings.
248         (or1k_unwind_pc): Use paddress() instead of %p.
249         (or1k_unwind_sp): Likewise.
250         (or1k_frame_cache): Use host_address_to_string()/paddress()
251         instead of %p and use _() wrapper for message strings.
252
253 2017-12-13  Simon Marchi  <simon.marchi@ericsson.com>
254
255         * contrib/ari/gdb_ari.sh: Fix typo in help.
256
257 2017-12-13  Joel Brobecker  <brobecker@adacore.com>
258
259         * event-top.c (handle_line_of_input): Set server_command.
260
261 2017-12-12  Stafford Horne  <shorne@gmail.com>
262             Stefan Wallentowitz  <stefan@wallentowitz.de>
263             Stefan Kristiansson  <stefan.kristiansson@saunalahti.fi>
264             Franck Jullien  <franck.jullien@gmail.com>
265             Jeremy Bennett  <jeremy.bennett@embecosm.com>
266
267         * configure.tgt: Add targets for or1k and or1knd.
268         * or1k-tdep.c: New file.
269         * or1k-tdep.h: New file.
270         * features/Makefile: Add or1k.xml to build.
271         * features/or1k.xml: New file.
272         * features/or1k-core.xml: New file.
273         * features/or1k.c: Generated.
274
275 2017-12-12  Alan Modra  <amodra@gmail.com>
276
277         PR tdep/22576
278         * ppc64-tdep.c (ppc64_plt_entry_point): Rewrite to take TOC-relative
279         PLT offset, and retrieve r2 from stack when executing in reverse.
280         (ppc64_standard_linkage1_target): Drop pc param.  Calculate offset
281         rather than PLT address.
282         (ppc64_standard_linkage2_target): Likewise.
283         (ppc64_standard_linkage3_target): Likewise.
284         (ppc64_standard_linkage4_target): Likewise.
285         (ppc64_skip_trampoline_code_1): Adjust to suit.
286
287 2017-12-11  Simon Marchi  <simon.marchi@ericsson.com>
288
289         PR gdb/22556
290         * remote.c (remote_thread_name): Return NULL if name is empty.
291         (remote_threads_extra_info): Return NULL if extra info is empty.
292
293 2017-12-11  Pedro Alves  <palves@redhat.com>
294
295         * defs.h (elf_sym_fns_lazy_psyms, elf_sym_fns_gdb_index)
296         (elf_sym_fns_debug_names): Move to elfread.c.
297         * dwarf2read.c (dwarf2_initialize_objfile): Return a boolean
298         instead of a sym_fns and add 'index_kind' output parameter.  Fill
299         the latter in with the index variant kind if using an index.
300         (enum dw_index_kind): Moved to symfile.h.
301         * elfread.c (elf_sym_fns_gdb_index, elf_sym_fns_debug_names)
302         (elf_sym_fns_lazy_psyms): Move from defs.h.
303         (elf_symfile_read): Adjust to new dwarf2_initialize_objfile
304         interface.
305         * symfile.h (enum class dw_index_kind): New, moved from
306         dwarf2read.c.
307         (dwarf2_initialize_objfile): Change prototype.
308
309 2017-12-11  Ulrich Weigand  <uweigand@de.ibm.com>
310
311         * target-float.c (mpfr_float_ops::from_target): Use mpfr_set_ui
312         instead of mpfr_set_si to convert mantissa bits.
313
314 2017-12-11  Xavier Roirand <roirand@adacore.com>
315             Joel Brobecker  <brobecker@adacore.com>
316
317         * ada-lang.c (ada_tag_value_at_base_address): Change the way
318         tagged type base address is computed.
319         (enum ada_primitive_types) <ada_primitive_type_storage_offset>:
320         New enumerate.
321         (ada_language_arch_info): Set the ada_primitive_type_storage_offset
322         element of lai->primitive_type_vector.
323
324 2017-12-08  Pedro Alves  <palves@redhat.com>
325
326         * dwarf2read.c (mock_mapped_index): Reimplement as an extension of
327         mapped_index_base.
328         (check_match): Adjust to use mock_index directly.
329         (check_find_bounds_finds)
330         (test_mapped_index_find_name_component_bounds): Adjust to work
331         with a mapped_index_base.
332
333 2017-12-08  Pedro Alves  <palves@redhat.com>
334
335         * dwarf2read.c (struct mapped_index_base): New, partially factored
336         out from ...
337         (struct mapped_index): ... this.  Inherit mapped_index_base.
338         (mapped_index::symbol_name_slot_invalid):
339         (mapped_index::symbol_name_at): Add override marker.
340         (mapped_index::symbol_name_count): New.
341         (struct mapped_debug_names): Inherit mapped_index_base.
342         (mapped_debug_names::symbol_name_at): New.
343         (mapped_debug_names::symbol_name_count): New.
344         (mapped_index::find_name_components_bounds): Rename to ...
345         (mapped_index_base::find_name_components_bounds): ... this.
346         (mapped_index::build_name_components): Rename to ...
347         (mapped_index_base::build_name_components): ... this.  Adjust to
348         use mapped_index_base::symbol_name_count and
349         mapped_index_base::symbol_name_slot_invalid.
350         (dw2_expand_symtabs_matching_symbol): Take a mapped_index_base
351         instead of a mapped_index.  Use
352         dw2_expand_symtabs_matching_symbol.
353
354 2017-12-08  Pedro Alves  <palves@redhat.com>
355
356         * dwarf2read.c (mapped_index::symbol_table_slot): New.
357         (mapped_index::address_table): Now a gdb::array_view of const
358         gdb_byte.
359         (mapped_index::symbol_table): Now a gdb::array_view of
360         symbol_table_slot.
361         (mapped_index::address_table_size)
362         (mapped_index::symbol_table_slots): Delete.
363         (create_addrmap_from_index): Adjust.
364         (find_slot_in_mapped_hash): Adjust.
365         (read_index_from_section): Adjust.
366         (dwarf2_read_index): Adjust.
367
368 2017-12-08  Jan Kratochvil  <jan.kratochvil@redhat.com>
369             Pedro Alves  <palves@redhat.com>
370
371         * defs.h (elf_sym_fns_debug_names): New declaration.
372         * dwarf2read.c: Include "hash_enum.h".
373         (mapped_debug_names): New.
374         (struct dwarf2_per_objfile): Add debug_names, debug_aranges and
375         debug_names_table.
376         (dwarf2_elf_names): Add ".debug_names" and ".debug_aranges".
377         (struct dwz_file): Add debug_names.
378         (dwarf2_per_objfile::locate_sections): Handle debug_names and
379         debug_aranges.
380         (locate_dwz_sections): Handle debug_names.
381         (create_signatured_type_table_from_debug_names)
382         (create_addrmap_from_aranges): New.
383         (dwarf2_read_index): Update function comment.
384         (dwarf5_augmentation): Moved up.
385         (read_debug_names_from_section, create_cus_from_debug_names_list)
386         (create_cus_from_debug_names, dwarf2_read_debug_names): New.
387         (dwarf5_djb_hash): Moved up.
388         (dw2_debug_names_iterator): New.
389         (read_indirect_string_at_offset): New declaration.
390         (mapped_debug_names::namei_to_name)
391         (dw2_debug_names_iterator::find_vec_in_debug_names)
392         (dw2_debug_names_iterator::next, dw2_debug_names_lookup_symbol)
393         (dw2_debug_names_dump, dw2_debug_names_expand_symtabs_for_function)
394         (dw2_debug_names_expand_symtabs_matching, dwarf2_debug_names_functions):
395         New.
396         (dwarf2_initialize_objfile): Return also elf_sym_fns_debug_names.
397         (debug_names::djb_hash): Rename it to dwarf5_djb_hash.
398         (debug_names::build): Update djb_hash caller.
399         (write_debug_names): Move out and rename augmentation to
400         dwarf5_augmentation.
401         * elfread.c (elf_sym_fns_debug_names): New.
402         * psymtab.h (dwarf2_debug_names_functions): New declaration.
403         * symfile.h (struct dwarf2_debug_sections): Add debug_names and
404         debug_aranges.
405         * xcoffread.c (dwarf2_xcoff_names): Add debug_names and debug_aranges.
406
407 2017-12-08  Pedro Alves  <palves@redhat.com>
408
409         * common/hash_enum.h: New file.
410
411 2017-12-08  Jan Kratochvil  <jan.kratochvil@redhat.com>
412
413         * dwarf2read.c (create_cu_from_index_list): New from ...
414         (create_cus_from_index_list): ... this function, use it.
415         (dw_expand_symtabs_matching_file_matcher)
416         (dw2_expand_symtabs_matching_one): New from ...
417         (dw2_expand_symtabs_matching): ... this function, use them.
418
419 2017-12-08  Jan Kratochvil  <jan.kratochvil@redhat.com>
420
421         * defs.h (elf_sym_fns_lazy_psyms, elf_sym_fns_gdb_index): Move here
422         declarations from elfread.c.
423         (dwarf2_initialize_objfile): Change return value.
424         * elfread.c (elf_sym_fns_lazy_psyms, elf_sym_fns_gdb_index): Move these
425         declarations to defs.h.
426         (elf_symfile_read): Adjust dwarf2_initialize_objfile caller.
427         * symfile.h (dwarf2_initialize_objfile): Change return type.
428
429 2017-12-08  Jan Kratochvil  <jan.kratochvil@redhat.com>
430             Pedro Alves  <palves@redhat.com>
431
432         * contrib/gdb-add-index.sh (index): Rename to ...
433         (index4): ... here.
434         (index5, debugstr, debugstrmerge, debugstrerr): New variables.
435         Support also .debug_names and .debug_str.
436         * dwarf2read.c: Include cmath, set, list.
437         (INDEX_SUFFIX): Rename to ...
438         (INDEX4_SUFFIX): ... here.
439         (INDEX5_SUFFIX, DEBUG_STR_SUFFIX): New.
440         (file_write(FILE *, const void *, size_t)): New.
441         (file_write(FILE *, const std::vector<Elem, Alloc> &)): New.
442         (data_buf::append_unsigned_leb128, data_buf::empty): New.
443         (data_buf::file_write): Use ::file_write.
444         (data_buf::c_str, dwarf5_djb_hash, debug_names)
445         (check_dwarf64_offsets): New.
446         (psyms_seen_size, write_gdbindex): New from
447         write_psymtabs_to_index code.
448         (dwarf5_gdb_augmentation, write_debug_names, assert_file_size)
449         (enum dw_index_kind): New.
450         (write_psymtabs_to_index): New parameter index_kind.  Support
451         filename_str and out_file_str.  Move code to write_gdbindex,
452         possibly call write_debug_names.
453         (save_gdb_index_command): New parameter -dwarf-5.
454         (_initialize_dwarf2_read): Document the new parameter -dwarf-5.
455
456 2017-12-08  Jan Kratochvil  <jan.kratochvil@redhat.com>
457             Pedro Alves  <palves@redhat.com>
458
459         * contrib/cc-with-tweaks.sh: Change interpreter to bash, incl. initial
460         comment.
461         (GDB_ADD_INDEX): New variable.
462         <$want_index>: Call $GDB_ADD_INDEX.
463
464 2017-12-08  Sergio Durigan Junior  <sergiodj@redhat.com>
465
466         * dtrace-probe.c (dtrace_process_dof_probe): Do not declare a new
467         "expression_up" inside the TRY block.
468
469 2017-12-08  Yao Qi  <yao.qi@linaro.org>
470
471         * breakpoint.c (update_watchpoint): Call
472         address_significant.
473
474 2017-12-08  Yao Qi  <yao.qi@linaro.org>
475
476         * breakpoint.c (adjust_breakpoint_address): Call
477         address_significant.
478
479 2017-12-08  Yao Qi  <yao.qi@linaro.org>
480
481         * aarch64-tdep.c (aarch64_gdbarch_init): Install gdbarch
482         significant_addr_bit.
483         * gdbarch.sh (significant_addr_bit): New.
484         * gdbarch.c, gdbarch.h: Re-generated.
485         * target.c (memory_xfer_partial): Call address_significant.
486         * utils.c (address_significant): New function.
487         * utils.h (address_significant): Declare.
488
489 2017-12-08  Tom Tromey  <tom@tromey.com>
490
491         * printcmd.c (ui_printf): Update.  Use std::vector.
492         * common/format.h (struct format_piece): Add constructor.
493         <string>: Now const.
494         (class format_pieces): New class.
495         (parse_format_string, free_format_pieces)
496         (free_format_pieces_cleanup): Remove.
497         * common/format.c (format_pieces::format_pieces): Rename from
498         parse_format_string.  Update.
499         (free_format_pieces, free_format_pieces_cleanup): Remove.
500         * breakpoint.c (parse_cmd_to_aexpr): Update.  Use std::vector.
501         * ax-gdb.h (gen_printf): Remove argument.
502         * ax-gdb.c (gen_printf): Remove "frags" argument.
503         (maint_agent_printf_command): Update.  Use std::vector.
504
505 2017-12-08  Yao Qi  <yao.qi@linaro.org>
506
507         PR breakpionts/22567
508         * linespec.c (minsym_found): Set sal.section.
509
510 2017-12-08  Andreas Arnez  <arnez@linux.vnet.ibm.com>
511
512         * configure.tgt (s390*-*-linux*): Add symfile-mem.o.
513
514 2017-12-07  Keith Seitz  <keiths@redhat.com>
515
516         PR breakpoints/22569
517         * location.c (string_to_explicit_location): When terminating
518         parsing early, break out of enclosing loop instead of returning.
519
520 2017-12-07  Keith Seitz  <keiths@redhat.com>
521
522         * NEWS (New commands): Mention set/show print type nested-type-limit.
523         * c-typeprint.c (c_type_print_base): Print out nested types.
524         * dwarf2read.c (struct typedef_field_list): Rename to ...
525         (struct decl_field_list): ... this.  Change all uses.
526         (struct field_info) <nested_types_list, nested_types_list_count>:
527         New fields.
528         (add_partial_symbol): Look for nested type definitions in C++, too.
529         (dwarf2_add_typedef): Rename to ...
530         (dwarf2_add_type_defn): ... this.
531         (type_can_define_types): New function.
532         Update assertion to use type_can_define_types.
533         Permit NULL for a field's name.
534         (process_structure_scope): Handle child DIEs of types that can
535         define types.
536         Copy the list of nested types into the type struct.
537         * gdbtypes.h (struct typedef_field): Rename to ...
538         (struct decl_field): ... this.  Change all uses.
539         [is_protected, is_private]: New fields.
540         (struct cplus_struct_type) <nested_types, nested_types_count>: New
541         fields.
542         (TYPE_NESTED_TYPES_ARRAY, TYPE_NESTED_TYPES_FIELD)
543         (TYPE_NESTED_TYPES_FIELD_NAME, TYPE_NESTED_TYPES_FIELD_TYPE)
544         (TYPE_NESTED_TYPES_COUNT, TYPE_NESTED_TYPES_FIELD_PROTECTED)
545         (TYPE_NESTED_TYPES_FIELD_PRIVATE): New macros.
546         * typeprint.c (type_print_raw_options, default_ptype_flags): Add
547         default value for print_nested_type_limit.
548         (print_nested_type_limit): New static variable.
549         (set_print_type_nested_types, show_print_type_nested_types): New
550         functions.
551         (_initialize_typeprint): Register new commands for set/show
552         `print-nested-type-limit'.
553         * typeprint.h (struct type_print_options) [print_nested_type_limit]:
554         New field.
555
556 2017-12-07  Tom Tromey  <tom@tromey.com>
557
558         PR breakpoints/22511:
559         * breakpoint.c (commands_command_1): Don't throw an exception when
560         no commands have been read.
561
562 2017-12-07  Adam Stylinski  <adam.stylinski@etegent.com>
563
564         PR c++/21222
565         * target-descriptions.c (print_c_tdesc::visit_pre): Change type of
566         range-for variable.
567
568 2017-12-07  Simon Marchi  <simon.marchi@ericsson.com>
569
570         * common/selftest.h (struct selftest): Add virtual destructor.
571
572 2017-12-07  Phil Muldoon  <pmuldoon@redhat.com>
573
574         * python/py-breakpoint.c (bppy_init): Use string_to_event_location
575         over basic location code. Implement explicit location keywords.
576         (bppy_init_validate_args): New function.
577         * NEWS: Document Python explicit breakpoint locations.
578
579 2017-12-07  Joel Brobecker  <brobecker@adacore.com>
580
581         * MAINTAINERS: Restore target entries for m68hc11-elf,
582         score-elf and xstormy16-elf, incorrectly removed in a previous
583         patch meant to only update the list of active maintainers.
584
585 2017-12-06  Pedro Alves  <palves@redhat.com>
586
587         * break-catch-syscall.c (insert_catch_syscall)
588         (remove_catch_syscall): Adjust to pass reference to
589         inf_data->syscalls_counts directly via gdb::array_view.
590         * fbsd-nat.c (fbsd_set_syscall_catchpoint): Adjust to use bool
591         and gdb::array_view.
592         * linux-nat.c (linux_child_set_syscall_catchpoint): Likewise.
593         * remote.c (remote_set_syscall_catchpoint): Likewise.
594         * target-debug.h (target_debug_print_bool): New.
595         (define target_debug_print_gdb_array_view_const_int): New.
596         * target-delegates.c: Regenerate.
597         * target.h (target_ops) <to_set_syscall_catchpoint>: Use
598         gdb::array_view and bool.
599         (target_set_syscall_catchpoint): Likewise.
600
601 2017-12-06  Simon Marchi  <simon.marchi@ericsson.com>
602
603         * break-catch-syscall.c (catch_syscall_completer): Get pointers
604         to syscall group strings after building the string vector.
605
606 2017-12-06  Pedro Alves  <palves@redhat.com>
607
608         * remote.c (remote_query_supported): Don't send "xmlRegisters=" if
609         "qXfer:features:read"" is disabled.
610         (remote_write_qxfer, remote_read_qxfer, remote_search_memory):
611         Check packet_config_support instead of packet->support directly.
612
613 2017-12-05  Simon Marchi  <simon.marchi@ericsson.com>
614
615         * target-descriptions.c (struct tdesc_feature) <registers>: Use
616         tdesc_reg_up typedef.
617         (struct target_desc) <features>: Use tdesc_feature_up typedef.
618
619 2017-12-05  Simon Marchi  <simon.marchi@polymtl.ca>
620
621         * target-descriptions.c (struct tdesc_type): Use default
622         destructor.
623         <u>: Remove.
624         <accept>: Remove.
625         (struct tdesc_type_builtin): New.
626         (struct tdesc_type_vector): New.
627         (struct tdesc_type_with_fields): New.
628         (tdesc_predefined_types): Change type to tdesc_type_builtin[].
629         (tdesc_gdb_type): Remove.
630         (tdesc_register_type): Adjust.
631         (tdesc_create_vector): Create tdesc_type_vector.
632         (tdesc_create_struct): Create tdesc_type_with_fields.
633         (tdesc_set_struct_size): Change parameter type.
634         (tdesc_create_union): Create tdesc_type_with_fields.
635         (tdesc_create_flags): Likewise.
636         (tdesc_create_enum): Likewise.
637         (tdesc_add_field): Change parameter type.
638         (tdesc_add_typed_bitfield): Likewise.
639         (tdesc_add_bitfield): Likewise.
640         (tdesc_add_flag): Likewise.
641         (tdesc_add_enum_value): Likewise.
642         (print_c_tdesc) <visit>: Remove overload with tdesc_type
643         parameter, add overloads for tdesc_type_builtin,
644         tdesc_type_with_fields and tdesc_type_vector.
645         <m_printed_type>: Remove.
646         <m_printed_element_type, m_printed_type_with_fields>: Add.
647         * target-descriptions.h (tdesc_create_enum): Change return type.
648         (tdesc_add_typed_bitfield): Change parameter type.
649         (tdesc_add_enum_value): Change parameter type.
650         * xml-tdesc.c (struct tdesc_parsing_data) <current_type>: Change
651         type to tdesc_type_with_fields.
652         (tdesc_start_struct): Adjust.
653         (tdesc_start_flags): Adjust.
654         (tdesc_start_enum): Adjust.
655         (tdesc_start_field): Adjust.
656         * arch/tdesc.h (struct tdesc_type_builtin): Forward-declare.
657         (struct tdesc_type_vector): Forward-declare.
658         (struct tdesc_type_with_fields): Forward-declare.
659         (tdesc_create_struct): Change return type.
660         (tdesc_create_union): Likewise.
661         (tdesc_create_flags): Likewise.
662         (tdesc_add_field): Change parameter type.
663         (tdesc_set_struct_size): Likewise.
664         (tdesc_add_bitfield): Likewise.
665         (tdesc_add_flag): Likewise.
666         * features: Re-generate C files.
667
668 2017-12-05  Simon Marchi  <simon.marchi@polymtl.ca>
669
670         * target-descriptions.c (tdesc_arch_reg): Remove typedef.
671         (struct tdesc_arch_reg): Add constructor.
672         (DEF_VEC_O (tdesc_arch_reg)): Remove.
673         (struct tdesc_arch_data): Initialize fields.
674         <arch_regs>: Change type to std::vector.
675         (target_find_description): Adjust.
676         (tdesc_find_type): Adjust.
677         (tdesc_data_init): Call tdesc_arch_data constructor.
678         (tdesc_data_alloc): Allocate tdesc_arch_data with new.
679         (tdesc_data_cleanup): Free data with delete.
680         (tdesc_numbered_register): Adjust.
681         (tdesc_find_arch_register): Adjust.
682         (tdesc_use_registers): Adjust.
683
684 2017-12-05  Simon Marchi  <simon.marchi@polymtl.ca>
685
686         * target-descriptions.c (tdesc_type_field): Remove typedef.
687         (DEF_VEC_O (tdesc_type_field)): Remove.
688         (struct tdesc_type_field): Add constructor.
689         <name>: Change type to std::string.
690         (struct tdesc_type) <tdesc_type>: Instantiate vector if the type
691         kind uses it.
692         <~tdesc_type>: Destroy vector if the type kind uses it.
693         <u::u::fields>: Change type to std::vector.
694         (tdesc_gdb_type): Adjust.
695         (tdesc_add_field): Adjust.
696         (tdesc_add_typed_bitfield): Adjust.
697         (tdesc_add_field): Adjust.
698         (tdesc_add_enum_value): Adjust.
699         (class print_c_tdesc) <visit>: Adjust.
700
701 2017-12-05  Simon Marchi  <simon.marchi@polymtl.ca>
702
703         * target-descriptions.c (struct tdesc_type) <name>: Change type
704         to std::string.
705         <~tdesc_type>: Don't manually free name.
706         <operator==>: Adjust.
707         (tdesc_named_type): Adjust.
708         (tdesc_find_type): Adjust.
709         (tdesc_gdb_type): Adjust.
710         (class print_c_tdesc) <visit>: Adjust.
711
712 2017-12-05  Simon Marchi  <simon.marchi@polymtl.ca>
713
714         * target-descriptions.c (tdesc_type_p): Remove typedef.
715         (DEF_VEC_P (tdesc_type_p)): Remove.
716         (struct tdesc_feature) <types>: Change type to std::vector.
717         <~tdesc_feature>: Replace with default implementation.
718         <accept>: Adjust.
719         (tdesc_named_type): Adjust.
720         (tdesc_create_vector): Adjust.
721         (tdesc_create_struct): Adjust.
722         (tdesc_create_union): Adjust.
723         (tdesc_create_flags): Adjust.
724         (tdesc_create_enum): Adjust.
725
726 2017-12-05  Simon Marchi  <simon.marchi@ericsson.com>
727
728         * target-descriptions.c (struct tdesc_reg) <tdesc_reg>: Change
729         type of name_ parameter, adjust to std::string change.
730         <name, group, type>: Change type to std::string.
731         <~tdesc_reg>: Replace with default implementation.
732         <operator==>: Adjust.
733         (tdesc_find_register_early): Adjust.
734         (tdesc_register_name): Adjust.
735         (tdesc_register_type): Adjust.
736         (tdesc_register_in_reggroup_p): Adjust.
737         (class print_c_tdesc) <visit>: Adjust.
738         (class print_c_feature) <visit>: Adjust.
739         * features/arc-arcompact.c: Re-generate.
740         * features/arc-v2.c: Re-generate.
741
742 2017-12-05  Simon Marchi  <simon.marchi@ericsson.com>
743
744         * target-descriptions.c (tdesc_reg_p): Remove typedef.
745         (DEF_VEC_P (tdesc_reg_p)): Remove.
746         (struct tdesc_feature) <registers>: Change type to std::vector.
747         <~tdesc_feature>: Don't manually free registers.
748         <accept>: Adjust.
749         <operator==>: Adjust.
750         (tdesc_has_registers): Adjust.
751         (tdesc_find_register_early): Adjust.
752         (tdesc_use_registers): Adjust.
753         (tdesc_create_reg): Adjust.
754
755 2017-12-05  Simon Marchi  <simon.marchi@polymtl.ca>
756
757         * target-descriptions.c (tdesc_feature) <name>: Change type to
758         std::string.
759         <~tdesc_feature>: Don't manually free name.
760         <operator==>: Adjust.
761         (tdesc_find_feature): Adjust.
762         (tdesc_feature_name): Adjust.
763         (class print_c_tdesc) <visit_pre>: Adjust.
764         (class print_c_feature) <visit_pre>: Adjust.
765
766 2017-12-05  Simon Marchi  <simon.marchi@polymtl.ca>
767
768         * target-descriptions.c (tdesc_feature_p): Remove typedef.
769         (DEF_VEC_P (tdesc_feature_p)): Remove.
770         (struct target_desc) <features>: Change type to std::vector.
771         <~target_desc>: Replace with default implementation.
772         <accept>: Adjust.
773         <operator==>: Adjust.
774         (tdesc_has_registers): Adjust.
775         (tdesc_find_feature): Adjust.
776         (tdesc_use_registers): Adjust.
777         (tdesc_create_feature): Adjust.
778
779 2017-12-05  Simon Marchi  <simon.marchi@polymtl.ca>
780
781         * target-descriptions.c (arch_p): Remove typedef.
782         (DEF_VEC_P (arch_p)): Remove.
783         (struct target_desc) <compatible>: Change type to std::vector.
784         <~target_desc>: Don't manually free compatible.
785         (tdesc_compatible_p): Adjust.
786         (tdesc_add_compatible): Adjust.
787         (class print_c_tdesc) <visit_pre>: Adjust.
788
789 2017-12-05  Simon Marchi  <simon.marchi@polymtl.ca>
790
791         * target-descriptions.c (property_s): Remove typedef.
792         (DEF_VEC_O (property_s)): Remove.
793         (struct target_desc) <properties>: Make an std::vector.
794         <~target_desc>: Don't manually free properties.
795         (tdesc_property): Adjust.
796         (set_tdesc_property): Adjust.
797         (class print_c_tdesc) <visit_pre>: Adjust.
798
799 2017-12-05  Simon Marchi  <simon.marchi@ericsson.com>
800
801         * common/gdb_assert.h (gdb_static_assert): Redefine using
802         static_assert.
803
804 2017-12-05  Simon Marchi  <simon.marchi@ericsson.com>
805
806         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
807         unused variables.
808         (ada_is_redundant_range_encoding): Likewise.
809         * ada-varobj.c (ada_varobj_get_value_of_array_variable):
810         Likewise.
811         * alpha-tdep.c (alpha_software_single_step): Likewise.
812         * arm-tdep.c (_initialize_arm_tdep): Likewise.
813         * auto-load.c (info_auto_load_cmd): Likewise.
814         * break-catch-syscall.c (insert_catch_syscall): Likewise.
815         (remove_catch_syscall): Likewise.
816         * breakpoint.c (condition_completer): Likewise.
817         (clear_command): Likewise.
818         (update_breakpoint_locations): Likewise.
819         * btrace.c (btrace_disable): Likewise.
820         (btrace_teardown): Likewise.
821         (btrace_maint_update_pt_packets): Likewise.
822         (maint_btrace_clear_cmd): Likewise.
823         * cli/cli-decode.c (lookup_cmd_1): Likewise.
824         (lookup_cmd_composition): Likewise.
825         * cli/cli-dump.c (scan_filename): Likewise.
826         (restore_command): Likewise.
827         * compile/compile-loc2c.c (compute_stack_depth): Likewise.
828         * compile/compile-object-load.c (compile_object_load): Likewise.
829         * compile/compile-object-run.c (compile_object_run): Likewise.
830         * compile/compile.c (compile_to_object): Likewise.
831         * completer.c (filename_completer): Likewise.
832         (complete_files_symbols): Likewise.
833         (complete_expression): Likewise.
834         * corelow.c (core_open): Likewise.
835         * ctf.c (ctf_start): Likewise.
836         (ctf_write_status): Likewise.
837         (ctf_write_uploaded_tsv): Likewise.
838         (ctf_write_definition_end): Likewise.
839         (ctf_open_dir): Likewise.
840         (ctf_xfer_partial): Likewise.
841         (ctf_trace_find): Likewise.
842         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
843         Likewise.
844         * dwarf2loc.c (allocate_piece_closure): Likewise.
845         (indirect_pieced_value): Likewise.
846         (dwarf2_evaluate_loc_desc_full): Likewise.
847         * dwarf2read.c (dw2_expand_marked_cus): Likewise.
848         (dw2_expand_symtabs_matching): Likewise.
849         (dw2_map_symbol_filenames): Likewise.
850         (read_and_check_comp_unit_head): Likewise.
851         (read_cutu_die_from_dwo): Likewise.
852         (lookup_dwo_unit): Likewise.
853         (read_comp_units_from_section): Likewise.
854         (dwarf2_compute_name): Likewise.
855         (handle_DW_AT_stmt_list): Likewise.
856         (create_cus_hash_table): Likewise.
857         (create_dwp_v2_section): Likewise.
858         (dwarf2_rnglists_process): Likewise.
859         (dwarf2_ranges_process): Likewise.
860         (dwarf2_record_block_ranges): Likewise.
861         (is_vtable_name): Likewise.
862         (read_formatted_entries): Likewise.
863         (skip_form_bytes): Likewise.
864         * elfread.c (elf_symtab_read): Likewise.
865         * exec.c (exec_file_command): Likewise.
866         * f-valprint.c (f_val_print): Likewise.
867         (info_common_command_for_block): Likewise.
868         * guile/guile.c (initialize_scheme_side): Likewise.
869         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Likewise.
870         * guile/scm-cmd.c (cmdscm_completer): Likewise.
871         (gdbscm_register_command_x): Likewise.
872         * guile/scm-frame.c (gdbscm_frame_read_var): Likewise.
873         * guile/scm-param.c (gdbscm_parameter_value): Likewise.
874         * guile/scm-ports.c (file_port_magic): Likewise.
875         * guile/scm-pretty-print.c (ppscm_search_pp_list): Likewise.
876         (ppscm_pretty_print_one_value): Likewise.
877         (ppscm_print_children): Likewise.
878         * guile/scm-string.c (gdbscm_string_to_argv): Likewise.
879         * guile/scm-symtab.c (gdbscm_sal_symtab): Likewise.
880         * guile/scm-type.c (gdbscm_type_next_field_x): Likewise.
881         * guile/scm-utils.c (gdbscm_parse_function_args): Likewise.
882         * i386-tdep.c (i386_register_reggroup_p): Likewise.
883         * infcmd.c (run_command_1): Likewise.
884         (until_next_fsm_clean_up): Likewise.
885         * linespec.c (linespec_complete): Likewise.
886         (find_label_symbols): Likewise.
887         * m2-valprint.c (m2_val_print): Likewise.
888         * memattr.c (require_user_regions): Likewise.
889         (lookup_mem_region): Likewise.
890         (disable_mem_command): Likewise.
891         (mem_delete): Likewise.
892         * mep-tdep.c (mep_register_name): Likewise.
893         (mep_analyze_prologue): Likewise.
894         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Likewise.
895         * mi/mi-interp.c (mi_on_sync_execution_done): Likewise.
896         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
897         * microblaze-linux-tdep.c (microblaze_linux_init_abi): Likewise.
898         * minidebug.c (lzma_open): Likewise.
899         * minsyms.c (lookup_minimal_symbol): Likewise.
900         * mips-linux-tdep.c (mips64_fill_fpregset): Likewise.
901         * mips-tdep.c (mips_stub_frame_sniffer): Likewise.
902         (mips_o64_return_value): Likewise.
903         (mips_single_step_through_delay): Likewise.
904         (_initialize_mips_tdep): Likewise.
905         * nios2-tdep.c (nios2_push_dummy_call): Likewise.
906         (nios2_software_single_step): Likewise.
907         * parse.c (find_minsym_type_and_address): Likewise.
908         * psymtab.c (psym_relocate): Likewise.
909         * python/py-breakpoint.c (bppy_get_commands): Likewise.
910         (gdbpy_breakpoint_modified): Likewise.
911         * python/py-infevents.c (create_inferior_call_event_object):
912         Likewise.
913         * python/py-record-btrace.c (btpy_list_item): Likewise.
914         * python/py-type.c (typy_str): Likewise.
915         * python/py-value.c (valpy_call): Likewise.
916         * python/python.c (do_start_initialization): Likewise.
917         * record-btrace.c (record_btrace_insn_history_range): Likewise.
918         (record_btrace_call_history_range): Likewise.
919         (record_btrace_record_method): Likewise.
920         (record_btrace_xfer_partial): Likewise.
921         (btrace_get_frame_function): Likewise.
922         * record-full.c (record_full_open): Likewise.
923         * record.c (get_context_size): Likewise.
924         * registry.h (DEFINE_REGISTRY): Likewise.
925         * remote-fileio.c (remote_fileio_request): Likewise.
926         * remote.c (remote_update_thread_list): Likewise.
927         (remote_check_symbols): Likewise.
928         (remote_commit_resume): Likewise.
929         (remote_interrupt): Likewise.
930         (remote_insert_breakpoint): Likewise.
931         (compare_sections_command): Likewise.
932         * rust-exp.y (super_name): Likewise.
933         (lex_string): Likewise.
934         (convert_ast_to_type): Likewise.
935         (convert_ast_to_expression): Likewise.
936         * rust-lang.c (rust_print_struct_def): Likewise.
937         (rust_print_type): Likewise.
938         (rust_evaluate_subexp): Likewise.
939         * rx-tdep.c (rx_register_type): Likewise.
940         * ser-event.c (serial_event_clear): Likewise.
941         * serial.c (serial_open): Likewise.
942         * spu-tdep.c (spu_overlay_new_objfile): Likewise.
943         * symfile.c (section_is_overlay): Likewise.
944         (overlay_unmapped_address): Likewise.
945         (overlay_mapped_address): Likewise.
946         (simple_overlay_update_1): Likewise.
947         (simple_overlay_update): Likewise.
948         * symtab.c (symbol_find_demangled_name): Likewise.
949         (search_symbols): Likewise.
950         * target-descriptions.c (tdesc_predefined_type): Likewise.
951         * target.c (target_commit_resume): Likewise.
952         * thread.c (print_selected_thread_frame): Likewise.
953         * top.c (new_ui_command): Likewise.
954         (gdb_readline_no_editing): Likewise.
955         * tracefile-tfile.c (tfile_open): Likewise.
956         * tracepoint.c (create_tsv_from_upload): Likewise.
957         * utils.c (quit): Likewise.
958         (defaulted_query): Likewise.
959         * valarith.c (value_concat): Likewise.
960         * xml-syscall.c (xml_list_syscalls_by_group): Likewise.
961         * xml-tdesc.c (target_fetch_description_xml): Likewise.
962         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
963         (xtensa_pseudo_register_write): Likewise.
964
965 2017-12-04  Tom Tromey  <tom@tromey.com>
966
967         * NEWS: Mention Rust trait object inspection.
968
969 2017-12-04  Pedro Alves  <palves@redhat.com>
970
971         PR gdb/22499
972         * amd64-tdep.c (amd64_insn::rex_offset): Rename to...
973         (amd64_insn::enc_prefix_offset): ... this, and tweak comment.
974         (vex2_prefix_p, vex3_prefix_p): New functions.
975         (amd64_get_insn_details): Adjust to rename.  Also skip VEX2 and
976         VEX3 prefixes.
977         (fixup_riprel): Set VEX3.!B.
978
979 2017-12-03  Simon Marchi  <simon.marchi@ericsson.com>
980
981         * target.h (mem_region_vector): Remove.
982         (struct target_ops) <to_memory_map>: Change return type to
983         std::vector<mem_region>.
984         * target-debug.h (target_debug_print_mem_region_vector): Rename
985         to ...
986         (target_debug_print_std_vector_mem_region): ... this.
987         * target-delegates.c: Re-generate.
988
989 2017-12-03  Pedro Alves  <palves@redhat.com>
990
991         * make-target-delegates (munge_type): Also munge '<', '>', and
992         ':'.  Avoid double underscores in identifiers, and trailing
993         underscores.
994         * target-debug.h
995         (target_debug_print_VEC_static_tracepoint_marker_p__p): Rename to
996         ...
997         (target_debug_print_VEC_static_tracepoint_marker_p_p): ... this.
998         * target-delegates.c: Regenerate.
999
1000 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
1001
1002         * common/poison.h (XDELETE): Fix typo.
1003
1004 2017-12-01  Andrew Cagney  <cagney@redhat.com>
1005             Joel Brobecker  <brobecker@adacore.com>
1006             Sergio Durigan Junior  <sergiodj@redhat.com>
1007
1008         * NEWS (Changes since GDB 8.0: Mention new '--readnever'
1009         feature.
1010         * coffread.c (coff_symfile_read): Do not map over sections with
1011         'coff_locate_sections' if readnever is on.
1012         * dwarf2read.c (dwarf2_has_info): Return 0 if
1013         readnever is on.
1014         * elfread.c (elf_symfile_read): Do not map over sections with
1015         'elf_locate_sections' if readnever is on.
1016         * main.c (validate_readnow_readnever): New function.
1017         (captured_main_1): Add support for --readnever.
1018         (print_gdb_help): Document --readnever.
1019         * objfile-flags.h (enum objfile_flag) <OBJF_READNEVER>: New
1020         flag.
1021         * symfile.c (readnever_symbol_files): New global.
1022         (symbol_file_add_with_addrs): Set 'OBJF_READNEVER' when
1023         'READNEVER_SYMBOL_FILES' is set.
1024         (validate_readnow_readnever): New function.
1025         (symbol_file_command): Handle '-readnever' option.
1026         Call 'validate_readnow_readnever'.
1027         (add_symbol_file_command): Handle '-readnever' option.
1028         Call 'validate_readnow_readnever'.
1029         (_initialize_symfile): Document new '-readnever' option for
1030         both 'symbol-file' and 'add-symbol-file' commands.
1031         * top.h (readnever_symbol_files): New extern global.
1032         * xcoffread.c (xcoff_initial_scan): Do not read debug
1033         information if readnever is on.
1034
1035 2017-12-01  Sergio Durigan Junior  <sergiodj@redhat.com>
1036
1037         * symfile.c (symbol_file_command): Call
1038         'symbol_file_add_main_1' only after processing all command
1039         line options.
1040         (add_symbol_file_command): Modify logic to make arguments
1041         position-independent.
1042
1043 2017-12-01  Joel Brobecker  <brobecker@adacore.com>
1044
1045         * ada-lang.c (symbol_list_obstack): Delete.
1046         (resolve_subexp): Make sure "candidates" gets xfree'ed.
1047         (ada_lookup_symbol_list_worker): Remove the limitation that
1048         the result is only good until the next call, now making it
1049         the responsibility of the caller to free the result when no
1050         longer needed.  Adjust the function's intro comment accordingly.
1051         (ada_lookup_symbol_list): Adjust the function's intro comment.
1052         (ada_iterate_over_symbols): Make sure "results" gets xfree'ed.
1053         (ada_lookup_encoded_symbol, get_var_value): Likewise.
1054         (_initialize_ada_language): Remove symbol_list_obstack
1055         initialization.
1056         * ada-exp.y (block_lookup): Make sure "syms" gets xfree'ed.
1057         (write_var_or_type, write_name_assoc): Likewise.
1058
1059 2017-12-01  Tom Tromey  <tom@tromey.com>
1060
1061         * Makefile.in (all_deps_files): New variable.
1062         Include .Po files using all_deps_files.
1063
1064 2017-12-01  Joel Brobecker  <brobecker@adacore.com>
1065
1066         * MAINTAINERS: Update list of maintainers, moving those who
1067         stepped down or became inactive to the "Past Maintainers"
1068         section.
1069
1070 2017-11-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1071
1072         * configure.ac Don't check for sys/fault.h, sys/syscall.h,
1073         sys/proc.h.
1074         (NEW_PROC_API): Remove.
1075         (prsysent_t, pr_sigset_t, pr_sigaction64_t, pr_siginfo64_t):
1076         Likewise.
1077         * common/common.m4 (GDB_AC_COMMON): Don't check for sys/syscall.h.
1078         * configure: Regenerate.
1079         * config.in: Regenerate.
1080         * gdbserver/configure: Regenerate.
1081         * gdbserver/config.in: Regenerate.
1082
1083         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Remove
1084         NEW_PROC_API test.
1085         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Likewise.
1086
1087         * linux-btrace.c: Remove HAVE_SYS_SYSCALL_H test.
1088
1089         * proc-api.c: Remove !NEW_PROC_API support.
1090         Remove HAVE_SYS_PROC_H and HAVE_SYS_USER_H tests.
1091         Remove tests for macros always defined on Solaris.
1092         * proc-events.c: Remove !NEW_PROC_API support.
1093         Remove Remove HAVE_SYS_SYSCALL_H, HAVE_SYS_PROC_H and
1094         HAVE_SYS_USER_H tests.
1095         (init_syscall_table): Remove non-Solaris syscalls.
1096         Remove tests for syscalls present on all Solaris versions.
1097         Add missing Solaris 10+ syscalls.
1098         (signal_table): Remove non-Solaris signals.
1099         Remove tests for signals present on all Solaris versions.
1100         (fault_table): Remove non-Solaris faults.
1101         Remove tests for faults present on all Solaris versions.
1102         * proc-flags.c: Remove !NEW_PROC_API support.
1103         (pr_flag_table): Remove non-Solaris and pre-Solaris 7 comments.
1104         Remove non-Solaris flags.
1105         * proc-why.c: Remove !NEW_PROC_API support.
1106         (pr_why_table): Remove meaningless comments.
1107         Remove tests for reasons present on all Solaris versions.
1108         Remove OSF/1 cases.
1109         (proc_prettyfprint_why): Likewise.
1110
1111         * procfs.c: Remove !NEW_PROC_API and DYNAMIC_SYSCALLS support.
1112         Remove HAVE_SYS_FAULT_H and HAVE_SYS_SYSCALL_H tests.
1113         Remove WA_READ test, IRIX watchpoint support.
1114         (gdb_sigset_t, gdb_sigaction_t, gdb_siginfo_t): Replace by base
1115         types.  Change users.
1116         (gdb_praddset, gdb_prdelset, gdb_premptysysset, gdb_praddsysset)
1117         (gdb_prdelset, gdb_pr_issyssetmember): Replace by base macros.
1118         Change callers.
1119         Remove CTL_PROC_NAME_FMT tests.
1120         (gdb_prstatus_t, gdb_lwpstatus_t): Replace by base types.  Change
1121         users.
1122         (sysset_t_size): Remove.  Use sizeof (sysset_t) in callers.
1123         Remove PROCFS_DONT_PIOCSSIG_CURSIG support.
1124         (proc_modify_flag): Replace GDBRESET by PCUNSET.
1125         Remove PR_ASYNC, PR_KLC tests.
1126         (proc_unset_inherit_on_fork): Remove PR_ASYNC test.
1127         (proc_parent_pid): Remove PCWATCH etc. tests.
1128         (proc_set_watchpoint): Remove !PCWATCH && !PIOCSWATCH support.
1129         Remove PCAGENT test.
1130         (proc_get_nthreads) [PIOCNTHR && PIOCTLIST]: Remove.
1131         Remove SYS_lwpcreate || SYS_lwp_create test.
1132         (proc_get_current_thread): Likewise.
1133         [PIOCNTHR && PIOCTLIST]: Remove.
1134         [PIOCLSTATUS]: Remove.
1135         (procfs_debug_inferior): Remove non-Solaris cases, conditionals.
1136         [PRFS_STOPEXEC]: Remove.
1137         (syscall_is_lwp_exit): Remove non-Solaris cases, conditionals.
1138         (syscall_is_exit): Likewise.
1139         (syscall_is_exec): Likewise.
1140         (syscall_is_lwp_create): Likewise.
1141         Remove SYS_syssgi support.
1142         (procfs_wait): Remove PR_ASYNC, !PIOCSSPCACT tests.
1143         [SYS_syssgi]: Remove.
1144         Remove non-Solaris cases, conditionals.
1145         (unconditionally_kill_inferior) [PROCFS_NEED_PIOCSSIG_FOR_KILL]:
1146         Remove.
1147         (procfs_init_inferior) [SYS_syssgi]: Remove.
1148         (procfs_set_exec_trap) [PRFS_STOPEXEC]: Remove.
1149         (procfs_inferior_created) [SYS_syssgi]: Remove.
1150         (procfs_set_watchpoint): Remove !AIX5 test.
1151         (procfs_stopped_by_watchpoint): Remove FLTWATCH test, FLTKWATCH
1152         case.
1153         (mappingflags) [MA_PHYS]: Remove.
1154         (info_mappings_callback): Remove PCAGENT test.
1155         Remove PIOCOPENLWP || PCAGENT test.
1156
1157 2017-11-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
1158
1159         * sol-thread.c (info_solthreads): Constify args.
1160         Cast args to void *.
1161
1162 2017-11-29  John Baldwin  <jhb@FreeBSD.org>
1163
1164         * target-float.c [HAVE_LIBMPFR]: Define MPFR_USE_INTMAX_T.
1165
1166 2017-11-29  Joel Brobecker  <brobecker@adacore.com>
1167
1168         * ada-lang.c (to_fixed_range_type): Make sure that the size
1169         of the range type being returned is the same as the size
1170         of the range type being fixed.
1171
1172 2017-11-29  Pedro Alves  <palves@redhat.com>
1173
1174         PR c++/19436
1175         * NEWS: Mention setting breakpoints on functions with C++ ABI
1176         tags.
1177         * completer.h (completion_match_for_lcd) <match,
1178         mark_ignored_range>: New methods.
1179         <finish>: Consider ignored ranges.
1180         <clear>: Clear ignored ranges.
1181         <m_ignored_ranges, m_finished_storage>: New fields.
1182         * cp-support.c (cp_search_name_hash): Ignore ABI tags.
1183         (cp_symbol_name_matches_1, cp_fq_symbol_name_matches): Pass the
1184         completion_match_for_lcd pointer to strncmp_iw_with_mode.
1185         (test_cp_symbol_name_cmp): Add [abi:...] tags unit tests.
1186         * language.c (default_symbol_name_matcher): Pass the
1187         completion_match_for_lcd pointer to strncmp_iw_with_mode.
1188         * linespec.c (linespec_lexer_lex_string): Don't tokenize ABI tags.
1189         * utils.c (skip_abi_tag): New function.
1190         (strncmp_iw_with_mode): Add completion_match_for_lcd parameter.
1191         Handle ABI tags.
1192         * utils.h (strncmp_iw_with_mode): Add completion_match_for_lcd
1193         parameter.
1194
1195 2017-11-29  Pedro Alves  <palves@redhat.com>
1196
1197         PR c++/19436
1198         * NEWS: Mention setting breakpoints on functions with C++ ABI
1199         tags.
1200         * completer.h (completion_match_for_lcd) <match,
1201         mark_ignored_range>: New methods.
1202         <finish>: Consider ignored ranges.
1203         <clear>: Clear ignored ranges.
1204         <m_ignored_ranges, m_finished_storage>: New fields.
1205         * cp-support.c (cp_search_name_hash): Ignore ABI tags.
1206         (cp_symbol_name_matches_1, cp_fq_symbol_name_matches): Pass the
1207         completion_match_for_lcd pointer to strncmp_iw_with_mode.
1208         (test_cp_symbol_name_cmp): Add [abi:...] tags unit tests.
1209         * language.c (default_symbol_name_matcher): Pass the
1210         completion_match_for_lcd pointer to strncmp_iw_with_mode.
1211         * linespec.c (linespec_lexer_lex_string): Don't tokenize ABI tags.
1212         * utils.c (skip_abi_tag): New function.
1213         (strncmp_iw_with_mode): Add completion_match_for_lcd parameter.
1214         Handle ABI tags.
1215         * utils.h (strncmp_iw_with_mode): Add completion_match_for_lcd
1216         parameter.
1217
1218 2017-11-29  Pedro Alves  <palves@redhat.com>
1219
1220         * NEWS: Mention that breakpoints on C++ functions are now set on
1221         on all namespaces/classes by default, and mention "break
1222         -qualified".
1223         * ax-gdb.c (agent_command_1): Adjust to pass a
1224         symbol_name_match_type to new_linespec_location.
1225         * breakpoint.c (parse_breakpoint_sals): Adjust to
1226         get_linespec_location's return type change.
1227         (strace_marker_create_sals_from_location): Adjust to pass a
1228         symbol_name_match_type to new_linespec_location.
1229         (strace_marker_decode_location): Adjust to get_linespec_location's
1230         return type change.
1231         (strace_command): Adjust to pass a symbol_name_match_type to
1232         new_linespec_location.
1233         (LOCATION_HELP_STRING): Add paragraph about wildmatching, and
1234         mention "-qualified".
1235         * c-lang.c (cplus_language_defn): Install cp_search_name_hash.
1236         * completer.c (explicit_location_match_type::MATCH_QUALIFIED): New
1237         enumerator.
1238         (complete_address_and_linespec_locations): New parameter
1239         'match_type'.  Pass it down.
1240         (explicit_options): Add "-qualified".
1241         (collect_explicit_location_matches): Pass the requested match type
1242         to the linespec completers.  Handle MATCH_QUALIFIED.
1243         (location_completer): Handle "-qualified" combined with linespecs.
1244         * cp-support.c (cp_search_name_hash): New.
1245         (cp_symbol_name_matches_1): Implement wild matching for C++.
1246         (cp_fq_symbol_name_matches): Reimplement.
1247         (cp_get_symbol_name_matcher): Return different matchers depending
1248         on the lookup name's match type.
1249         (selftests::test_cp_symbol_name_matches): Add wild matching tests.
1250         * cp-support.h (cp_search_name_hash): New declaration.
1251         * dwarf2read.c
1252         (selftests::dw2_expand_symtabs_matching::test_symbols): Add
1253         symbols.
1254         (test_dw2_expand_symtabs_matching_symbol): Add wild matching
1255         tests.
1256         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Adjust to
1257         pass a symbol_name_match_type to new_linespec_location.
1258         * linespec.c (linespec_parse_basic): Lookup function symbols using
1259         the parser's symbol name match type.
1260         (convert_explicit_location_to_linespec): New
1261         symbol_name_match_type parameter.  Pass it down to
1262         find_linespec_symbols.
1263         (convert_explicit_location_to_sals): Pass the location's name
1264         match type to convert_explicit_location_to_linespec.
1265         (parse_linespec): New match_type parameter.  Save it in the
1266         parser.
1267         (linespec_parser_new): Default to symbol_name_match_type::WILD.
1268         (linespec_complete_function): New symbol_name_match_type
1269         parameter.  Use it.
1270         (complete_linespec_component): Pass down the parser's recorded
1271         name match type.
1272         (linespec_complete_label): New symbol_name_match_type parameter.
1273         Use it.
1274         (linespec_complete): New symbol_name_match_type parameter.  Save
1275         it in the parser and pass it down.  Adjust to
1276         get_linespec_location's prototype change.
1277         (find_function_symbols, find_linespec_symbols): New
1278         symbol_name_match_type parameter.  Pass it down instead of
1279         assuming symbol_name_match_type::WILD.
1280         * linespec.h (linespec_complete, linespec_complete_function)
1281         (linespec_complete_label): New symbol_name_match_type parameter.
1282         * location.c (event_location::linespec_location): Now a struct
1283         linespec_location.
1284         (EL_LINESPEC): Adjust.
1285         (initialize_explicit_location): Default to
1286         symbol_name_match_type::WILD.
1287         (new_linespec_location): New symbol_name_match_type parameter.
1288         Record it in the location.
1289         (get_linespec_location): Now returns a struct linespec_location.
1290         (new_explicit_location): Also copy func_name_match_type.
1291         (explicit_to_string_internal)
1292         (string_to_explicit_location): Handle "-qualified".
1293         (copy_event_location): Adjust to LINESPEC_LOCATION type change.
1294         Copy symbol_name_match_type fields.
1295         (event_location_deleter::operator()): Adjust to LINESPEC_LOCATION
1296         type change.
1297         (event_location_to_string): Adjust to LINESPEC_LOCATION type
1298         change.  Handle "-qualfied".
1299         (string_to_explicit_location): Handle "-qualified".
1300         (string_to_event_location_basic): New symbol_name_match_type
1301         parameter.  Pass it down.
1302         (string_to_event_location): Handle "-qualified".
1303         * location.h (struct linespec_location): New.
1304         (explicit_location::func_name_match_type): New field.
1305         (new_linespec_location): Now returns a const linespec_location *.
1306         (string_to_event_location_basic): New symbol_name_match_type
1307         parameter.
1308         (explicit_completion_info::saw_explicit_location_option): New
1309         field.
1310         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Adjust to pass a
1311         symbol_name_match_type to new_linespec_location.
1312         * python/py-breakpoint.c (bppy_init): Likewise.
1313         * python/python.c (gdbpy_decode_line): Likewise.
1314
1315 2017-11-29  Pedro Alves  <palves@redhat.com>
1316
1317         * ada-lang.c (ada_lookup_name_info::matches): Change type of
1318         parameter from completion_match to completion_match_result.
1319         Adjust.
1320         (do_wild_match, do_full_match, ada_symbol_name_matches): Likewise.
1321         * completer.c (completion_tracker::maybe_add_completion): Add
1322         match_for_lcd parameter and use it.
1323         (completion_tracker::add_completion): Likewise.
1324         * completer.h (class completion_match_for_lcd): New class.
1325         (completion_match_result::match_for_lcd): New field.
1326         (completion_match_result::set_match): New method.
1327         (completion_tracker): Add comments.
1328         (completion_tracker::add_completion): Add match_for_lcd parameter.
1329         (completion_tracker::reset_completion_match_result): Reset
1330         match_for_lcd too.
1331         (completion_tracker::maybe_add_completion): Add match_for_lcd
1332         parameter.
1333         (completion_tracker::m_lowest_common_denominator_unique): Extend
1334         comments.
1335         * cp-support.c (cp_symbol_name_matches_1)
1336         (cp_fq_symbol_name_matches): Change type of parameter from
1337         completion_match to completion_match_result.  Adjust.
1338         * language.c (default_symbol_name_matcher): Change type of
1339         parameter from completion_match to completion_match_result.
1340         Adjust.
1341         * language.h (completion_match_for_lcd): Forward declare.
1342         (default_symbol_name_matcher): Change type of parameter from
1343         completion_match to completion_match_result.
1344         * symtab.c (compare_symbol_name): Adjust.
1345         (completion_list_add_name): Pass the match_for_lcd to the tracker.
1346         * symtab.h (ada_lookup_name_info::matches): Change type of
1347         parameter from completion_match to completion_match_result.
1348         (symbol_name_matcher_ftype): Likewise, and update comments.
1349
1350 2017-11-29  Pedro Alves  <palves@redhat.com>
1351
1352         * linespec.c (minsym_found, add_minsym): Use msymbol_is_function.
1353         * minsyms.c (msymbol_is_text): Delete.
1354         (msymbol_is_function): New function.
1355         * minsyms.h (msymbol_is_text): Delete.
1356         (msymbol_is_function): New declaration.
1357         * symtab.c (find_function_alias_target): Use msymbol_is_function.
1358
1359 2017-11-29  Tom Tromey  <tom@tromey.com>
1360
1361         * Makefile.in (distclean): Handle the case where rmdir fails.
1362
1363 2017-11-29  Tom Tromey  <tom@tromey.com>
1364
1365         * symfile.c (_initialize_symfile): Update usage text for
1366         add-symbol-file, symbol-file, load.
1367
1368 2017-11-29  Tom Tromey  <tom@tromey.com>
1369
1370         * symfile.c (add_symbol_file_command): Error if some arguments to
1371         -s are missing.  Change unrecognized-argument error message.
1372         (_initialize_symfile): Fix usage text for add-symbol-file.
1373
1374 2017-11-27  Tom Tromey  <tom@tromey.com>
1375
1376         * Makefile.in (REMOTE_OBS): Remove.
1377         (SFILES): Remove remote sources.
1378         (COMMON_SFILES): Add remote sources.
1379         (ALLDEPFILES): Remove dcache.c.
1380
1381 2017-11-27  Tom Tromey  <tom@tromey.com>
1382
1383         * Makefile.in (SUBDIR_TARGET_SRCS, SUBDIR_TARGET_OBS): New
1384         variables.
1385         (SFILES): Use SUBDIR_TARGET_SRCS.
1386         (COMMON_OBS): Use SUBDIR_TARGET_OBS.  Remove waitstatus.o.
1387         (CONFIG_SRC_SUBDIR): Add target.
1388         (%.o): Remove target rule.
1389
1390 2017-11-27  Tom Tromey  <tom@tromey.com>
1391
1392         * Makefile.in (COMMON_OBS): Remove filename-seen-cache.o,
1393         registry.o, thread-fsm.o, debug.o.
1394         (COMMON_SFILES): Add filename-seen-cache.c, registry.c,
1395         thread-fsm.c, debug.c.
1396
1397 2017-11-27  Tom Tromey  <tom@tromey.com>
1398
1399         * Makefile.in (COMMON_SFILES): New.
1400         (SFILES): Move some entries to COMMON_SFILES.
1401         (COMMON_OBS): Use COMMON_SFILES.
1402
1403 2017-11-27  Tom Tromey  <tom@tromey.com>
1404
1405         * Makefile.in (YYFILES): Update comment.
1406         (YYOBJ): Redefine.
1407
1408 2017-11-27  Tom Tromey  <tom@tromey.com>
1409
1410         * Makefile.in (SUBDIR_PYTHON_OBS): Redefine.
1411         (CONFIG_SRC_SUBDIR): Add python.
1412         (%.o): Remove python rule.
1413         (python/%.o): New rule.
1414         * configure: Rebuild.
1415         * configure.ac (CONFIG_OBS): Refer to python/python.o
1416
1417 2017-11-27  Tom Tromey  <tom@tromey.com>
1418
1419         * configure: Rebuild.
1420         * configure.ac (CONFIG_OBS): Refer to guile/guile.o.
1421         * Makefile.in (SUBDIR_GUILE_OBS): Redefine.
1422         (CONFIG_SRC_SUBDIR): Add guile.
1423         (%.o): Remove guile rule.
1424
1425 2017-11-27  Tom Tromey  <tom@tromey.com>
1426
1427         * Makefile.in (SUBDIR_UNITTESTS_OBS): Redefine.
1428         (%.o): Remove unittests rule.
1429         (CONFIG_SRC_SUBDIR): Add unittests.
1430
1431 2017-11-27  Tom Tromey  <tom@tromey.com>
1432
1433         * Makefile.in (SUBDIR_TUI_OBS): Redefine.
1434         (CONFIG_SRC_SUBDIR): Add tui.
1435         (%.o): Remove tui rule.
1436
1437 2017-11-27  Tom Tromey  <tom@tromey.com>
1438
1439         * Makefile.in (SUBDIR_GCC_COMPILE_OBS): Redefine.
1440         (%.o): Remove compile rule.
1441         (CONFIG_SRC_SUBDIR): Add compile.
1442
1443 2017-11-27  Tom Tromey  <tom@tromey.com>
1444
1445         * Makefile.in (SUBDIR_MI_OBS): Redefine.
1446         (%.o): Remove mi rule.
1447         (CONFIG_SRC_SUBDIR): Add mi.
1448         (COMMON_OBS): Use mi/mi-common.o
1449
1450 2017-11-27  Tom Tromey  <tom@tromey.com>
1451
1452         * Makefile.in (SUBDIR_CLI_OBS): Redefine.
1453         (%.o): Remove cli rule.
1454         (CONFIG_SRC_SUBDIR): Add cli.
1455
1456 2017-11-27  Tom Tromey  <tom@tromey.com>
1457
1458         * configure.ac (CONFIG_SRC_SUBDIR): Don't subst.
1459         * configure: Rebuild.
1460         * Makefile.in (CONFIG_SRC_SUBDIR): Redefine.
1461         (CONFIG_DEP_SUBDIR): New variable.
1462         (%.o): Add order-only dependency.
1463         ($(CONFIG_DEP_SUBDIR)): New target.
1464
1465 2017-11-26  Dominik Czarnota  <dominik.b.czarnota@gmail.com>
1466
1467         PR gdb/21945
1468         * findcmd.c (_initialize_mem_search): Update find command help
1469         text.
1470
1471 2017-11-26  Simon Marchi  <simon.marchi@polymtl.ca>
1472
1473         * python/python.c (do_start_initialization): Change progname
1474         type to gdb::unique_xmalloc_ptr.  Release the pointer when using
1475         Python 2.
1476
1477 2017-11-26  Tom Tromey  <tom@tromey.com>
1478
1479         * common/format.h: Add include guards.
1480
1481 2017-11-26  Tom Tromey  <tom@tromey.com>
1482
1483         * nat/linux-personality.h (class
1484         maybe_disable_address_space_randomization): New class.
1485         (maybe_disable_address_space_randomization): Don't declare
1486         function.
1487         * nat/linux-personality.c (restore_personality)
1488         (make_disable_asr_cleanup): Remove.
1489         (maybe_disable_address_space_randomization): Now a constructor.
1490         (~maybe_disable_address_space_randomization): New destructor.
1491         * linux-nat.c (linux_nat_create_inferior): Update.
1492
1493 2017-11-26  Tom Tromey  <tom@tromey.com>
1494
1495         * gcore.c (write_gcore_file_1): Use gdb::unique_xmalloc_ptr.
1496
1497 2017-11-26  Ulrich Weigand  <uweigand@de.ibm.com>
1498
1499         * spu-tdep.c (spu_software_single_step): Access SPU_LSLR_REGNUM as
1500         "cooked" register.  Access only first four bytes of branch target
1501         registers.
1502
1503 2017-11-25  Sergio Durigan Junior  <sergiodj@redhat.com>
1504
1505         PR gdb/22491
1506         * stap-probe.c (relocate_address): New function.
1507         (stap_probe::get_relocated_address): Use 'relocate_address'.
1508         (stap_probe::set_semaphore): Use 'relocate_address' and pass
1509         'm_sem_addr'.
1510         (stap_probe::clear_semaphore): Likewise.
1511
1512 2017-11-25  Pedro Alves  <palves@redhat.com>
1513
1514         * dictionary.c: Include "safe-ctype.h".
1515         * minsyms.c: Include "safe-ctype.h".
1516         * minsyms.c (SYMBOL_HASH_NEXT): Use TOLOWER instead of tolower.
1517
1518 2017-11-25   Pedro Alves  <palves@redhat.com>
1519
1520         * completer.c (complete_line_internal_1): Skip spaces until the
1521         start of the command.
1522
1523 2017-11-24  Pedro Alves  <palves@redhat.com>
1524
1525         * cp-support.c (cp_symbol_name_matches_1): New, factored out from
1526         cp_fq_symbol_name_matches.  Pass language_cplus to
1527         strncmp_with_mode.
1528         (cp_fq_symbol_name_matches): Call cp_symbol_name_matches_1.
1529         (selftests::test_cp_symbol_name_cmp): New.
1530         (_initialize_cp_support): Register "cp_symbol_name_matches"
1531         selftests.
1532         * language.c (default_symbol_name_matcher): Pass language_minimal
1533         to strncmp_iw_with_mode.
1534         * utils.c: Include "cp-support.h" and <algorithm>.
1535         (valid_identifier_name_char, cp_skip_operator_token, skip_ws)
1536         (cp_is_operator): New functions.
1537         (strncmp_iw_with_mode): Use them.  Add language parameter.  Don't
1538         skip whitespace in the symbol name when the lookup name doesn't
1539         have spaces, and vice versa.
1540         (strncmp_iw, strcmp_iw): Pass language to strncmp_iw_with_mode.
1541         * utils.h (strncmp_iw_with_mode): Add language parameter.
1542
1543 2017-11-24  Joel Brobecker  <brobecker@adacore.com>
1544
1545         * ada-lang.c (ada_exception_message_1, ada_exception_message):
1546         New functions.
1547         (print_it_exception): If available, display the exception
1548         message as well.
1549         * NEWS: Document new feature.
1550
1551 2017-11-24  Ulrich Weigand  <uweigand@de.ibm.com>
1552
1553         * configure.nat <spu-linux>: Add fork-inferior.o to NATDEPFILES.
1554
1555 2017-11-24  Philipp Rudo  <prudo@linux.vnet.ibm.com>
1556
1557         * dtrace-probe.c (dtrace_probe::build_arg_exprs)
1558         (dtrace_probe::is_enabled, dtrace_probe::enable)
1559         (dtrace_probe::disable): Remove keyword 'struct' at for-range
1560         variable
1561         * probe.c (gen_ui_out_table_header_info)
1562         (print_ui_out_not_applicables):  Remove keyword 'struct' at
1563         for-range variable
1564
1565 2017-11-24  Alan Hayward  <alan.hayward@arm.com>
1566
1567         * configure.tgt: Add arch/aarch64.o
1568
1569 2017-11-24  Simon Marchi  <simon.marchi@polymtl.ca>
1570
1571         * common/common-utils.h: Include poison.h.
1572         (xfree): Remove declaration, add definition with static_assert.
1573         * common/common-utils.c (xfree): Remove.
1574         * common/poison.h (IsMallocatable): Define.
1575         (IsFreeable): Define.
1576         (free): Delete for non-freeable types.
1577         (xnew): New.
1578         (XNEW): Undef and redefine.
1579         (xcnew): New.
1580         (XCNEW): Undef and redefine.
1581         (xdelete): New.
1582         (XDELETE): Undef and redefine.
1583         (xnewvec): New.
1584         (XNEWVEC): Undef and redefine.
1585         (xcnewvec): New.
1586         (XCNEWVEC): Undef and redefine.
1587         (xresizevec): New.
1588         (XRESIZEVEC): Undef and redefine.
1589         (xdeletevec): New.
1590         (XDELETEVEC): Undef and redefine.
1591         (xnewvar): New.
1592         (XNEWVAR): Undef and redefine.
1593         (xcnewvar): New.
1594         (XCNEWVAR): Undef and redefine.
1595         (xresizevar): New.
1596         (XRESIZEVAR): Undef and redefine.
1597
1598 2017-11-24  Simon Marchi  <simon.marchi@polymtl.ca>
1599
1600         * gdbthread.h (private_thread_info): Define structure type, add
1601         virtual pure destructor.
1602         (thread_info) <priv>: Change type to unique_ptr.
1603         <private_dtor>: Remove.
1604         * thread.c (add_thread_with_info): Adjust to use of unique_ptr.
1605         (private_thread_info::~private_thread_info): Provide default
1606         implementation.
1607         (thread_info::~thread_info): Don't call private_dtor nor
1608         manually free priv.
1609         * aix-thread.c (private_thread_info): Rename to ...
1610         (aix_thread_info): ... this.
1611         (get_aix_thread_info): New.
1612         (sync_threadlists): Adjust.
1613         (iter_tid): Adjust.
1614         (aix_thread_resume): Adjust.
1615         (aix_thread_fetch_registers): Adjust.
1616         (aix_thread_store_registers): Adjust.
1617         (aix_thread_extra_thread_info): Adjust.
1618         * darwin-nat.h (private_thread_info): Rename to ...
1619         (darwin_thread_info): ... this.
1620         (get_darwin_thread_info): New.
1621         * darwin-nat.c (darwin_init_thread_list): Adjust.
1622         (darwin_check_new_threads): Adjust.
1623         (thread_info_from_private_thread_info): Adjust.
1624         * linux-thread-db.c (private_thread_info): Rename to ...
1625         (thread_db_thread_info): ... this, initialize fields.
1626         (get_thread_db_thread_info): New.
1627         <dying>: Change type to bool.
1628         (update_thread_state): Adjust to type rename.
1629         (record_thread): Adjust to type rename an use of unique_ptr.
1630         (thread_db_pid_to_str): Likewise.
1631         (thread_db_extra_thread_info): Likewise.
1632         (thread_db_thread_handle_to_thread_info): Likewise.
1633         (thread_db_get_thread_local_address): Likewise.
1634         * nto-tdep.h (private_thread_info): Rename to ...
1635         (nto_thread_info): ... this, initialize fields.
1636         (get_nto_thread_info): New.
1637         <name>: Change type to std::string.
1638         * nto-tdep.c (nto_extra_thread_info): Adjust to type rename and
1639         use of unique_ptr.
1640         * nto-procfs.c (update_thread_private_data_name): Adjust to
1641         std::string change, allocate nto_private_thread_info with new.
1642         (update_thread_private_data): Adjust to unique_ptr.
1643         * remote.c (private_thread_info): Rename to ...
1644         (remote_thread_info): ... this, initialize data members with
1645         default values.
1646         <extra, name>: Change type to std::string.
1647         <thread_handle>: Change type to non-pointer.
1648         (free_private_thread_info): Remove.
1649         (get_private_info_thread): Rename to...
1650         (get_remote_thread_info): ... this, change return type, adjust to
1651         use of unique_ptr, use remote_thread_info constructor.
1652         (remote_add_thread): Adjust.
1653         (get_private_info_ptid): Rename to...
1654         (get_remote_thread_info): ...this, change return type.
1655         (remote_thread_name): Use get_remote_thread_info, adjust to
1656         change to std::string.
1657         (struct thread_item) <~thread_item>: Remove.
1658         <thread_handle>: Make non pointer.
1659         (start_thread): Adjust to thread_item::thread_handle type
1660         change.
1661         (remote_update_thread_list): Adjust to type name change, move
1662         strings from temporary to long-lived object instead of
1663         duplicating.
1664         (remote_threads_extra_info): Use get_remote_thread_info.
1665         (process_initial_stop_replies): Likewise.
1666         (resume_clear_thread_private_info): Likewise.
1667         (remote_resume): Adjust to type name change.
1668         (remote_commit_resume): Use get_remote_thread_info.
1669         (process_stop_reply): Adjust to type name change.
1670         (remote_stopped_by_sw_breakpoint): Use get_remote_thread_info.
1671         (remote_stopped_by_hw_breakpoint): Likewise.
1672         (remote_stopped_by_watchpoint): Likewise.
1673         (remote_stopped_data_address): Likewise.
1674         (remote_core_of_thread): Likewise.
1675         (remote_thread_handle_to_thread_info): Use
1676         get_private_info_thread, adjust to thread_handle field type
1677         change.
1678
1679 2017-11-24  Simon Marchi  <simon.marchi@polymtl.ca>
1680
1681         * remote.c (struct thread_item): Add constructor, disable copy
1682         construction and copy assignment, define default move
1683         construction and move assignment.
1684         <extra, name>: Change type to std::string.
1685         <core>: Initialize.
1686         <thread_handle>: Make non-pointer.
1687         (thread_item_t): Remove typedef.
1688         (DEF_VEC_O(thread_item_t)): Remove.
1689         (threads_listing_context) <contains_thread>: New method.
1690         <remove_thread>: New method.
1691         <items>: Change type to std::vector.
1692         (clear_threads_listing_context): Remove.
1693         (threads_listing_context_remove): Remove.
1694         (remote_newthread_step): Use thread_item constructor, adjust to
1695         change to std::vector.
1696         (start_thread): Use thread_item constructor, adjust to change to
1697         std::vector.
1698         (end_thread): Adjust to change to std::vector and std::string.
1699         (remote_get_threads_with_qthreadinfo): Use thread_item
1700         constructor, adjust to std::vector.
1701         (remote_update_thread_list): Adjust to change to std::vector and
1702         std::string, use threads_listing_context methods.
1703         (remove_child_of_pending_fork): Adjust.
1704         (remove_new_fork_children): Adjust.
1705         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add rsp-low-selftests.c.
1706         (SUBDIR_UNITTESTS_OBS): Add rsp-low-selftests.o.
1707         * unittests/rsp-low-selftests.c: New file.
1708         * common/rsp-low.h: Include common/byte-vector.h.
1709         (hex2bin): New overload.
1710         * common/rsp-low.c (hex2bin): New overload.
1711
1712 2017-11-24  Simon Marchi  <simon.marchi@ericsson.com>
1713
1714         * inferior.h (private_inferior): Define structure type, add
1715         virtual pure destructor.
1716         (inferior) <priv>: Change type to unique_ptr.
1717         * inferior.c (private_inferior::~private_inferior): Provide
1718         default implementation.
1719         (inferior::~inferior): Don't free priv field.
1720         (exit_inferior_1): Likewise.
1721         * darwin-nat.h (struct darwin_exception_info): Initialize fields.
1722         (darwin_exception_info): Remove typedef.
1723         (DEF_VEC_O (darwin_thread_t)); Remove.
1724         (private_inferior): Rename to ...
1725         (darwin_private_inferior): ... this, extend private_inferior.
1726         (get_darwin_inferior): New.
1727         <threads>: Change type to std::vector of darwin_thread_t pointers.
1728         * darwin-nat.c (darwin_check_new_threads): Adjust.
1729         (find_inferior_task_it): Adjust.
1730         (darwin_find_thread); Adjust.
1731         (darwin_suspend_inferior): Adjust.
1732         (darwin_resume_inferior): Adjust.
1733         (darwin_find_new_inferior): Adjust.
1734         (darwin_decode_notify_message): Adjust.
1735         (darwin_send_reply): Adjust.
1736         (darwin_resume_inferior_threads): Adjust.
1737         (darwin_suspend_inferior_threads): Adjust.
1738         (darwin_decode_message): Adjust.
1739         (darwin_wait): Adjust.
1740         (darwin_interrupt): Adjust.
1741         (darwin_deallocate_threads): Adjust.
1742         (darwin_mourn_inferior): Adjust, don't free private data.
1743         (darwin_reply_to_all_pending_messages): Adjust.
1744         (darwin_stop_inferior): Adjust.
1745         (darwin_setup_exceptions): Adjust.
1746         (darwin_kill_inferior): Adjust.
1747         (darwin_setup_request_notification): Adjust.
1748         (darwin_attach_pid): Adjust.
1749         (darwin_init_thread_list): Adjust.
1750         (darwin_setup_fake_stop_event): Adjust.
1751         (darwin_attach): Adjust.
1752         (darwin_detach): Adjust.
1753         (darwin_xfer_partial): Adjust.
1754         (set_enable_mach_exceptions): Adjust.
1755         (darwin_pid_to_exec_file): Adjust.
1756         (darwin_get_ada_task_ptid): Adjust.
1757         * darwin-nat-info.c (get_task_from_args): Adjust.
1758         (info_mach_ports_command): Adjust.
1759         (info_mach_region_command): Adjust.
1760         (info_mach_exceptions_command): Adjust.
1761         * remote.c (private_inferior): Rename to ...
1762         (remote_private_inferior): ... this, initialize fields.
1763         (get_remote_inferior); New.
1764         (remote_commit_resume): Use get_remote_inferior.
1765         (check_pending_event_prevents_wildcard_vcont_callback): Likewise.
1766
1767 2017-11-24  Pedro Alves  <palves@redhat.com>
1768
1769         * NEWS: Mention linespecs and explicit locations, and completion
1770         improvements.
1771
1772 2017-11-24  Yao Qi  <yao.qi@linaro.org>
1773
1774         * regcache.c (regcache::dump): Remove footnote_register_size.
1775
1776 2017-11-24  Yao Qi  <yao.qi@linaro.org>
1777
1778         * regcache.c (cooked_read_test): Add more test for readonly
1779         regcache.
1780
1781 2017-11-24  Yao Qi  <yao.qi@linaro.org>
1782
1783         * gdbarch-selftests.c (test_target_has_registers): Move it to
1784         target.c.
1785         (test_target_has_stack): Likewise.
1786         (test_target_has_memory): Likewise.
1787         (test_target_prepare_to_store): Likewise.
1788         (test_target_store_registers): Likewise.
1789         (test_target_ops): Likewise.
1790         * regcache.c: Include selftest-arch.h and gdbthread.h.
1791         (target_ops_no_register): New class.
1792         (test_target_fetch_registers): New.
1793         (test_target_store_registers): New.
1794         (test_target_xfer_partial): New.
1795         (readwrite_regcache): New.
1796         (cooked_read_test): New.
1797         (_initialize_regcache): Register the test.
1798         * target.c: (test_target_has_registers): Moved from
1799         gdbarch-selftests.c.
1800         (test_target_has_stack): Likewise.
1801         (test_target_has_memory): Likewise.
1802         (test_target_prepare_to_store): Likewise.
1803         (test_target_store_registers): Likewise.
1804         * target.h (test_target_ops): New class.
1805
1806 2017-11-24  Alan Hayward  <alan.hayward@arm.com>
1807
1808         * aarch64-tdep.c (_initialize_aarch64_tdep): Add target desc
1809         selftest.
1810
1811 2017-11-24  Alan Hayward  <alan.hayward@arm.com>
1812
1813         * aarch64-tdep.c (_initialize_aarch64_tdep): Remove init.
1814         * arch/aarch64.c (aarch64_create_target_description): Create
1815         new target description.
1816         * features/Makefile: Add new files.
1817         * features/aarch64.c: Remove file.
1818         * features/aarch64-core.c: New autogenerated file.
1819         * features/aarch64-fpu.c: New autogenerated file.
1820         * target-descriptions.c (maint_print_c_tdesc_cmd): Check for aarch64.
1821
1822 2017-11-24  Alan Hayward  <alan.hayward@arm.com>
1823
1824         * Makefile.in: Add new files.
1825         * aarch64-linux-nat.c (aarch64_linux_read_description): Call
1826         aarch64_read_description.
1827         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
1828         Call aarch64_read_description.
1829         * aarch64-tdep.c (aarch64_read_description): New function.
1830         (aarch64_gdbarch_init): Call aarch64_read_description.
1831         * aarch64-tdep.h (aarch64_read_description): New function.
1832         * arch/aarch64.c: New file.
1833         * configure.tgt: Add new files.
1834
1835 2017-11-24  Yao Qi  <yao.qi@linaro.org>
1836
1837         * mi/mi-main.c (register_changed_p): Update.
1838         * value.c (value_contents_bits_eq): Change return type.
1839         (value_contents_eq): Likewise.
1840         * value.h: Update comments.
1841
1842 2017-11-24  Yao Qi  <yao.qi@linaro.org>
1843
1844         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Remove
1845         local 'changed'.  Remove error.
1846         (register_changed_p): Change return type to bool.
1847
1848 2017-11-24  Yao Qi  <yao.qi@linaro.org>
1849
1850         * arch/tic6x.c: New file.
1851         * arch/tic6x.h: New file.
1852         * features/Makefile (FEATURE_XMLFILES): Add tic6x-c6xp.xml,
1853         tic6x-core.xml and tic6x-gp.xml.
1854         * features/tic6x-c6xp.c: Generated.
1855         * features/tic6x-core.c: Generated.
1856         * features/tic6x-gp.c: Generated.
1857         * target-descriptions.c (maint_print_c_tdesc_cmd): Match
1858         "tic6x-".
1859
1860 2017-11-23  Simon Marchi  <simon.marchi@ericsson.com>
1861
1862         * mi/mi-main.c (list_available_thread_groups): Change map value
1863         type to std::vector.
1864
1865 2017-11-23  Simon Marchi  <simon.marchi@ericsson.com>
1866
1867         * osdata.c (osdata_end_column, get_osdata): Remove std::move.
1868
1869 2017-11-23  Simon Marchi  <simon.marchi@ericsson.com>
1870
1871         * varobj.c (struct varobj_dynamic) <children_requested_>: Rename
1872         back to...
1873         <children_requested>: ... this.
1874         (varobj_get_num_children, varobj_update): Adjust.
1875
1876 2017-11-23  Simon Marchi  <simon.marchi@ericsson.com>
1877
1878         * ada-varobj.c (ada_value_is_changeable_p): Change int to bool where applicable.
1879         (ada_value_has_mutated): Likewise.
1880         * c-varobj.c (varobj_is_anonymous_child): Likewise.
1881         (c_is_path_expr_parent): Likewise.
1882         * mi/mi-cmd-var.c (varobj_update_one): Likewise.
1883         (mi_cmd_var_set_frozen): Likewise.
1884         (mi_cmd_var_update_iter): Likewise.
1885         (mi_cmd_var_update): Likewise.
1886         * varobj.c (pretty_printing): Likewise.
1887         (varobj_enable_pretty_printing): Likewise.
1888         (struct varobj_root) <floating, is_valid>: Likewise.
1889         (struct varobj_dynamic) <children_requested>: Likewise.
1890         (delete_variable): Likewise.
1891         (delete_variable_1): Likewise.
1892         (install_variable): Likewise.
1893         (update_type_if_necessary): Likewise.
1894         (install_new_value): Likewise.
1895         (value_of_root): Likewise.
1896         (is_root_p): Likewise.
1897         (varobj_create): Likewise.
1898         (varobj_delete): Likewise.
1899         (varobj_has_more): Likewise.
1900         (varobj_set_frozen): Likewise.
1901         (varobj_get_frozen): Likewise.
1902         (install_dynamic_child): Likewise.
1903         (dynamic_varobj_has_child_method): Likewise.
1904         (update_dynamic_varobj_children): Likewise.
1905         (varobj_get_num_children): Likewise.
1906         (varobj_list_children): Likewise.
1907         (is_path_expr_parent): Likewise.
1908         (varobj_default_is_path_expr_parent): Likewise.
1909         (varobj_is_dynamic_p): Likewise.
1910         (varobj_set_value): Likewise.
1911         (varobj_value_has_mutated): Likewise.
1912         (varobj_update): Likewise.
1913         (check_scope): Likewise.
1914         (value_of_root_1): Likewise.
1915         (varobj_value_get_print_value): Likewise.
1916         (varobj_editable_p): Likewise.
1917         (varobj_value_is_changeable_p): Likewise.
1918         (varobj_floating_p): Likewise.
1919         (varobj_default_value_is_changeable_p): Likewise.
1920         (varobj_invalidate_iter): Likewise.
1921         * varobj.h (struct varobj_update_result) <type_changed,
1922         children_changed, changed, value_installed>: Likewise.
1923         (struct varobj) <updated, frozen, not_fetched>: Likewise.
1924         (struct lang_varobj_ops) <value_is_changeable_p,
1925         value_has_mutated, is_path_expr_parent>: Likewise.
1926         (varobj_delete): Likewise.
1927         (varobj_set_frozen): Likewise.
1928         (varobj_get_frozen): Likewise.
1929         (varobj_set_value): Likewise.
1930         (varobj_update): Likewise.
1931         (varobj_editable_p): Likewise.
1932         (varobj_floating_p): Likewise.
1933         (varobj_has_more): Likewise.
1934         (varobj_is_dynamic_p): Likewise.
1935         (varobj_default_value_is_changeable_p): Likewise.
1936         (varobj_value_is_changeable_p): Likewise.
1937         (varobj_is_anonymous_child): Likewise.
1938         (varobj_default_is_path_expr_parent): Likewise.
1939
1940 2017-11-22  Sergio Durigan Junior  <sergiodj@redhat.com>
1941
1942         * dtrace-probe.c (struct probe_ops dtrace_probe_ops): Delete.
1943         (struct dtrace_probe_arg) <dtrace_probe_arg>: New constructor.
1944         <type_str>: Convert to 'std::string'.
1945         <expr>: Convert to 'expression_up'.
1946         (dtrace_probe_arg_s): Delete type and VEC.
1947         (dtrace_probe_enabler_s): Likewise.
1948         (struct dtrace_probe): Replace by...
1949         (class dtrace_static_probe_ops): ...this and...
1950         (class dtrace_probe): ...this.
1951         (dtrace_probe_is_linespec): Rename to...
1952         (dtrace_static_probe_ops::is_linespec): ...this.  Adjust code
1953         to reflect change.
1954         (dtrace_process_dof_probe): Use 'std::vector' instead of VEC.
1955         Adjust code.  Create new instance of 'dtrace_probe'.
1956         (dtrace_build_arg_exprs): Rename to...
1957         (dtrace_probe::build_arg_exprs): ...this.  Adjust code to
1958         reflect change.
1959         (dtrace_get_probes): Rename to...
1960         (dtrace_static_probe_ops::get_probes): ...this.  Adjust code
1961         to reflect change.
1962         (dtrace_get_arg): Rename to...
1963         (dtrace_probe::get_arg_by_number): ...this.  Adjust code to
1964         reflect change.
1965         (dtrace_probe_is_enabled): Rename to...
1966         (dtrace_probe::is_enabled): ...this.  Adjust code to reflect
1967         change.
1968         (dtrace_get_probe_address): Rename to...
1969         (dtrace_probe::get_relocated_address): ...this.  Adjust code
1970         to reflect change.
1971         (dtrace_get_probe_argument_count): Rename to...
1972         (dtrace_probe::get_argument_count): ...this.  Adjust code to
1973         reflect change.
1974         (dtrace_can_evaluate_probe_arguments): Rename to...
1975         (dtrace_probe::can_evaluate_arguments): ...this.  Adjust code
1976         to reflect change.
1977         (dtrace_evaluate_probe_argument): Rename to...
1978         (dtrace_probe::evaluate_argument): ...this.  Adjust code to
1979         reflect change.
1980         (dtrace_compile_to_ax): Rename to...
1981         (dtrace_probe::compile_to_ax): ...this.  Adjust code to
1982         reflect change.
1983         (dtrace_probe_destroy): Delete.
1984         (dtrace_type_name): Rename to...
1985         (dtrace_static_probe_ops::type_name): ...this.  Adjust code to
1986         reflect change.
1987         (dtrace_probe::get_static_ops): New method.
1988         (dtrace_gen_info_probes_table_header): Rename to...
1989         (dtrace_static_probe_ops::gen_info_probes_table_header):
1990         ...this.  Adjust code to reflect change.
1991         (dtrace_gen_info_probes_table_values): Rename to...
1992         (dtrace_probe::gen_info_probes_table_values): ...this.  Adjust
1993         code to reflect change.
1994         (dtrace_enable_probe): Rename to...
1995         (dtrace_probe::enable_probe): ...this.  Adjust code to reflect
1996         change.
1997         (dtrace_disable_probe): Rename to...
1998         (dtrace_probe::disable_probe): ...this.  Adjust code to reflect
1999         change.
2000         (struct probe_ops dtrace_probe_ops): Delete.
2001         (info_probes_dtrace_command): Call 'info_probes_for_spops'
2002         instead of 'info_probes_for_ops'.
2003         (_initialize_dtrace_probe): Use 'all_static_probe_ops' instead
2004         of 'all_probe_ops'.
2005
2006 2017-11-22  Sergio Durigan Junior  <sergiodj@redhat.com>
2007             Simon Marchi  <simark@simark.ca>
2008
2009         * stap-probe.c (struct probe_ops stap_probe_ops): Delete
2010         variable.
2011         (struct stap_probe_arg) <stap_probe_arg>: New constructor.
2012         <aexpr>: Change type to 'expression_up'.
2013         (stap_probe_arg_s): Delete type and VEC.
2014         (struct stap_probe): Delete.  Replace by...
2015         (class stap_static_probe_ops): ...this and...
2016         (class stap_probe): ...this.  Rename variables to add 'm_'
2017         prefix.  Do not use 'union' for arguments anymore.
2018         (stap_get_expected_argument_type): Receive probe name instead
2019         of 'struct stap_probe'.  Adjust code.
2020         (stap_parse_probe_arguments): Rename to...
2021         (stap_probe::parse_arguments): ...this.  Adjust code to
2022         reflect change.
2023         (stap_get_probe_address): Rename to...
2024         (stap_probe::get_relocated_address): ...this.  Adjust code
2025         to reflect change.
2026         (stap_get_probe_argument_count): Rename to...
2027         (stap_probe::get_argument_count): ...this.  Adjust code
2028         to reflect change.
2029         (stap_get_arg): Rename to...
2030         (stap_probe::get_arg_by_number'): ...this. Adjust code to
2031         reflect change.
2032         (can_evaluate_probe_arguments): Rename to...
2033         (stap_probe::can_evaluate_arguments): ...this.  Adjust code
2034         to reflect change.
2035         (stap_evaluate_probe_argument): Rename to...
2036         (stap_probe::evaluate_argument): ...this.  Adjust code
2037         to reflect change.
2038         (stap_compile_to_ax): Rename to...
2039         (stap_probe::compile_to_ax): ...this.  Adjust code to
2040         reflect change.
2041         (stap_probe_destroy): Delete.
2042         (stap_modify_semaphore): Adjust comment.
2043         (stap_set_semaphore): Rename to...
2044         (stap_probe::set_semaphore): ...this.  Adjust code to reflect
2045         change.
2046         (stap_clear_semaphore): Rename to...
2047         (stap_probe::clear_semaphore): ...this.  Adjust code to
2048         reflect change.
2049         (stap_probe::get_static_ops): New method.
2050         (handle_stap_probe): Adjust code to create instance of
2051         'stap_probe'.
2052         (stap_get_probes): Rename to...
2053         (stap_static_probe_ops::get_probes): ...this.  Adjust code to
2054         reflect change.
2055         (stap_probe_is_linespec): Rename to...
2056         (stap_static_probe_ops::is_linespec): ...this.  Adjust code to
2057         reflect change.
2058         (stap_type_name): Rename to...
2059         (stap_static_probe_ops::type_name): ...this.  Adjust code to
2060         reflect change.
2061         (stap_gen_info_probes_table_header): Rename to...
2062         (stap_static_probe_ops::gen_info_probes_table_header):
2063         ...this.  Adjust code to reflect change.
2064         (stap_gen_info_probes_table_values): Rename to...
2065         (stap_probe::gen_info_probes_table_values): ...this.  Adjust
2066         code to reflect change.
2067         (struct probe_ops stap_probe_ops): Delete.
2068         (info_probes_stap_command): Use 'info_probes_for_spops'
2069         instead of 'info_probes_for_ops'.
2070         (_initialize_stap_probe): Use 'all_static_probe_ops' instead
2071         of 'all_probe_ops'.
2072
2073 2017-11-22  Sergio Durigan Junior  <sergiodj@redhat.com>
2074
2075         * break-catch-throw.c (fetch_probe_arguments): Use
2076         'probe.prob' instead of 'probe.probe'.
2077         * breakpoint.c (create_longjmp_master_breakpoint): Call
2078         'can_evaluate_arguments' and 'get_relocated_address' methods
2079         from probe.
2080         (create_exception_master_breakpoint): Likewise.
2081         (add_location_to_breakpoint): Use 'sal->prob' instead of
2082         'sal->probe'.
2083         (bkpt_probe_insert_location): Call 'set_semaphore' method from
2084         probe.
2085         (bkpt_probe_remove_location): Likewise, for 'clear_semaphore'.
2086         * elfread.c (elf_get_probes): Use 'static_probe_ops' instead
2087         of 'probe_ops'.
2088         (probe_key_free): Call 'delete' on probe.
2089         (check_exception_resume): Use 'probe.prob' instead of
2090         'probe.probe'.
2091         * location.c (string_to_event_location_basic): Call
2092         'probe_linespec_to_static_ops'.
2093         * probe.c (class any_static_probe_ops): New class.
2094         (any_static_probe_ops any_static_probe_ops): New variable.
2095         (parse_probes_in_pspace): Receive 'static_probe_ops' as
2096         argument.  Adjust code to reflect change.
2097         (parse_probes): Use 'static_probe_ops' instead of
2098         'probe_ops'.  Adjust code to reflect change.
2099         (find_probes_in_objfile): Call methods to get name and
2100         provider from probe.
2101         (find_probe_by_pc): Use 'result.prob' instead of
2102         'result.probe'.  Call 'get_relocated_address' method from
2103         probe.
2104         (collect_probes): Adjust comment and argument list to receive
2105         'static_probe_ops' instead of 'probe_ops'.  Adjust code to
2106         reflect change.  Call necessary methods from probe.
2107         (compare_probes): Call methods to get name and provider from
2108         probes.
2109         (gen_ui_out_table_header_info): Receive 'static_probe_ops'
2110         instead of 'probe_ops'.  Use 'std::vector' instead of VEC,
2111         adjust code accordingly.
2112         (print_ui_out_not_applicables): Likewise.
2113         (info_probes_for_ops): Rename to...
2114         (info_probes_for_spops): ...this.  Receive 'static_probe_ops'
2115         as argument instead of 'probe_ops'.  Adjust code.  Call
2116         necessary methods from probe.
2117         (info_probes_command): Use 'info_probes_for_spops'.
2118         (enable_probes_command): Pass correct argument to
2119         'collect_probes'.  Call methods from probe.
2120         (disable_probes_command): Likewise.
2121         (get_probe_address): Move to 'any_static_probe_ops::get_address'.
2122         (get_probe_argument_count): Move to
2123         'any_static_probe_ops::get_argument_count'.
2124         (can_evaluate_probe_arguments): Move to
2125         'any_static_probe_ops::can_evaluate_arguments'.
2126         (evaluate_probe_argument): Move to
2127         'any_static_probe_ops::evaluate_argument'.
2128         (probe_safe_evaluate_at_pc): Use 'probe.prob' instead of
2129         'probe.probe'.
2130         (probe_linespec_to_ops): Rename to...
2131         (probe_linespec_to_static_ops): ...this.  Adjust code.
2132         (probe_any_is_linespec): Rename to...
2133         (any_static_probe_ops::is_linespec): ...this.
2134         (probe_any_get_probes): Rename to...
2135         (any_static_probe_ops::get_probes): ...this.
2136         (any_static_probe_ops::type_name): New method.
2137         (any_static_probe_ops::gen_info_probes_table_header): New
2138         method.
2139         (compute_probe_arg): Use 'pc_probe.prob' instead of
2140         'pc_probe.probe'.  Call methods from probe.
2141         (compile_probe_arg): Likewise.
2142         (std::vector<const probe_ops *> all_probe_ops): Delete.
2143         (std::vector<const static_probe_ops *> all_static_probe_ops):
2144         New variable.
2145         (_initialize_probe): Use 'all_static_probe_ops' instead of
2146         'all_probe_ops'.
2147         * probe.h (struct info_probe_column) <field_name>: Delete
2148         extraneous newline
2149         (info_probe_column_s): Delete type and VEC.
2150         (struct probe_ops): Delete.  Replace with...
2151         (class static_probe_ops): ...this and...
2152         (clas probe): ...this.
2153         (struct bound_probe) <bound_probe>: Delete extraneous
2154         newline.  Adjust constructor to receive 'probe' instead of
2155         'struct probe'.
2156         <probe>: Rename to...
2157         <prob>: ...this.  Delete extraneous newline.
2158         <objfile>: Delete extraneous newline.
2159         (register_probe_ops): Delete unused prototype.
2160         (info_probes_for_ops): Rename to...
2161         (info_probes_for_spops): ...this.  Adjust comment.
2162         (get_probe_address): Move to 'probe::get_address'.
2163         (get_probe_argument_count): Move to
2164         'probe::get_argument_count'.
2165         (can_evaluate_probe_arguments): Move to
2166         'probe::can_evaluate_arguments'.
2167         (evaluate_probe_argument): Move to 'probe::evaluate_argument'.
2168         * solib-svr4.c (struct svr4_info): Adjust comment.
2169         (struct probe_and_action) <probe>: Rename to...
2170         <prob>: ...this.
2171         (register_solib_event_probe): Receive 'probe' instead of
2172         'struct probe' as argument.  Use 'prob' instead of 'probe'
2173         when applicable.
2174         (solib_event_probe_action): Call 'get_argument_count' method
2175         from probe.  Adjust comment.
2176         (svr4_handle_solib_event): Adjust comment.  Call
2177         'evaluate_argument' method from probe.
2178         (svr4_create_probe_breakpoints): Call 'get_relocated_address'
2179         from probe.
2180         (svr4_create_solib_event_breakpoints): Use 'probe' instead of
2181         'struct probe'.  Call 'can_evaluate_arguments' from probe.
2182         * symfile.h: Forward declare 'class probe' instead of 'struct
2183         probe'.
2184         * symtab.h: Likewise.
2185         (struct symtab_and_line) <probe>: Rename to...
2186         <prob>: ...this.
2187         * tracepoint.c (start_tracing): Use 'prob' when applicable.
2188         Call probe methods.
2189         (stop_tracing): Likewise.
2190
2191 2017-11-22  Joel Brobecker  <brobecker@adacore.com>
2192
2193         * ravenscar-thread.c (ravenscar_inferior_created): Remove
2194         trailing newline at end of string in call to warning.
2195
2196 2017-11-22  Simon Marchi  <simon.marchi@polymtl.ca>
2197
2198         * osdata.h: Include vector isntead of vec.h.
2199         (osdata_column_s): Remove typedef.
2200         (struct osdata_column): Add constructor.
2201         <name, value>: Change type to std::string.
2202         (DEF_VEC_O (osdata_column_s)): Remove.
2203         (osdata_item_s): Remove typedef.
2204         (struct osdata_item) <columns>: Change type to std::vector.
2205         (DEF_VEC_O (osdata_item_s)): Remove.
2206         (struct osdata): Add constructor.
2207         <type>: Change type to std::string.
2208         <items>: Change type to std::vector.
2209         (osdata_p): Remove typedef.
2210         (DEF_VEC_P (osdata_p)): Remove.
2211         (osdata_parse): Return a unique_ptr.
2212         (osdata_free): Remove.
2213         (make_cleanup_osdata_free): Remove.
2214         (get_osdata): Return a unique_ptr.
2215         (get_osdata_column): Return pointer to std::string, take a
2216         reference to osdata_item as parameter.
2217         * osdata.c (struct osdata_parsing_data) <osdata>: Change type to
2218         unique_ptr.
2219         <property_name>: Change type to std::string.
2220         (osdata_start_osdata): Allocate osdata with new and adjust.
2221         (osdata_start_item): Adjust.
2222         (osdata_start_column): Adjust.
2223         (osdata_end_column): Adjust.
2224         (clear_parsing_data): Remove.
2225         (osdata_parse): Return a unique_ptr and adjust, remove cleanup.
2226         (osdata_item_clear): Remove.
2227         (get_osdata): return a unique_ptr and adjust.
2228         (get_osdata_column): Return a pointer to std::string and adjust.
2229         (info_osdata): Adjust.
2230         * mi/mi-main.c: Include <map>.
2231         (free_vector_of_osdata_items): Remove.
2232         (list_available_thread_groups): Adjust, use std::map instead of
2233         splay tree.
2234
2235 2017-11-22  Simon Marchi  <simon.marchi@ericsson.com>
2236
2237         * stack.c (iterate_over_block_locals): Add LOC_OPTIMIZED_OUT
2238         case in switch.
2239
2240 2017-11-22  Simon Marchi  <simon.marchi@polymtl.ca>
2241
2242         * varobj.h (DEF_VEC_P (varobj_p)): Remove.
2243
2244 2017-11-22  Simon Marchi  <simon.marchi@polymtl.ca>
2245
2246         * varobj.h (struct varobj_update_result): Add constructor, add
2247         move constructor, disable copy and assign, initialize fields.
2248         <newobj>: Change type to std::vector.
2249         (varobj_update): Return std::vector.
2250         * varobj.c (install_dynamic_child): Change VEC parameters to
2251         std::vector and adjust.
2252         (update_dynamic_varobj_children): Likewise.
2253         (varobj_update): Return std::vector and adjust.
2254         * mi/mi-cmd-var.c (varobj_update_one): Adjust to vector changes.
2255
2256 2017-11-22  Simon Marchi  <simon.marchi@polymtl.ca>
2257
2258         * varobj.h (struct varobj) <parent>: Remove const.
2259         <children>: Change type to std::vector.
2260         (varobj_list_children): Return std::vector const reference.
2261         (varobj_restrict_range): Change parameter type to std::vector
2262         const reference.
2263         * varobj.c (varobj_has_more): Adjust.
2264         (varobj_restrict_range): Change parameter type to std::vector
2265         const reference and adjust.
2266         (install_dynamic_child): Adjust.
2267         (update_dynamic_varobj_children): Adjust.
2268         (varobj_list_children): Return std::vector const reference and
2269         adjust.
2270         (varobj_add_child): Adjust.
2271         (update_type_if_necessary): Adjust.
2272         (varobj_update): Adjust.
2273         (delete_variable_1): Adjust.
2274         * ada-varobj.c (ada_value_has_mutated): Adjust.
2275         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Adjust.
2276
2277 2017-11-22  Simon Marchi  <simon.marchi@polymtl.ca>
2278
2279         * varobj.h (struct varobj): Add constructor and destructor,
2280         initialize fields.
2281         * varobj.c (struct varobj_root): Initialize fields.
2282         (struct varobj_dynamic): Initialize fields.
2283         (varobj_create): Use unique_ptr instead of cleanup.  Create
2284         varobj with new instead of new_root_variable.
2285         (delete_variable_1): Free variable with delete instead of
2286         free_variable.
2287         (create_child_with_value): Create variable with new instead of
2288         new_variable.
2289         (varobj::varobj): New.
2290         (varobj::~varobj): New (body mostly coming from free_variable).
2291         (new_variable): Remove.
2292         (free_variable): Remove.
2293         (do_free_variable_cleanup): Remove.
2294         (make_cleanup_free_variable): Remove.
2295
2296 2017-11-22  Ulrich Weigand  <uweigand@de.ibm.com>
2297
2298         * core-regset.c: Remove file.
2299         * Makefile.in (ALLDEPFILES): Remove core-regset.c.
2300
2301 2017-11-22  Ulrich Weigand  <uweigand@de.ibm.com>
2302
2303         * NEWS: Document use of GNU MPFR.
2304         * README: Likewise.
2305
2306         * Makefile.in (LIBMPFR): Add define.
2307         (CLIBS): Add $(LIBMPFR).
2308         * configure.ac: Add --with-mpfr configure option.
2309         * configure: Regenerate.
2310         * config.in: Regenerate.
2311
2312         * target-float.c [HAVE_LIBMPFR]: Include <mpfr.h>.
2313         (class mpfr_float_ops): New type.
2314         (mpfr_float_ops::from_target): Two new overloaded functions.
2315         (mpfr_float_ops::to_target): Likewise.
2316         (mpfr_float_ops::to_string): New function.
2317         (mpfr_float_ops::from_string): Likewise.
2318         (mpfr_float_ops::to_longest): Likewise.
2319         (mpfr_float_ops::from_longest): Likewise.
2320         (mpfr_float_ops::from_ulongest): Likewise.
2321         (mpfr_float_ops::to_host_double): Likewise.
2322         (mpfr_float_ops::from_host_double): Likewise.
2323         (mpfr_float_ops::convert): Likewise.
2324         (mpfr_float_ops::binop): Likewise.
2325         (mpfr_float_ops::compare): Likewise.
2326         (get_target_float_ops): Use mpfr_float_ops if available.
2327
2328 2017-11-22  Ulrich Weigand  <uweigand@de.ibm.com>
2329
2330         * target-float.c: Do not include <math.h>.
2331         Include <cmath> and <limits>.
2332         (DOUBLEST): Do not define.
2333         (class target_float_ops): New type.
2334         (class host_float_ops): New templated type.
2335         (class decimal_float_ops): New type.
2336
2337         (floatformat_to_doublest): Rename to ...
2338         (host_float_ops<T>::from_target): ... this.  Use template type T
2339         instead of DOUBLEST.  Use C++ math routines.  Update recursive calls.
2340         (host_float_ops<T>::from_target): New overload using a type argument.
2341         (floatformat_from_doublest): Rename to ...
2342         (host_float_ops<T>::to_target): ... this.  Use template type T
2343         instead of DOUBLEST.  Use C++ math routines.  Update recursive calls.
2344         (host_float_ops<T>::to_target): New overload using a type argument.
2345         (floatformat_printf_format): New function.
2346         (struct printf_length_modifier): New templated type.
2347         (floatformat_to_string): Rename to ...
2348         (host_float_ops<T>::to_string): ... this.  Use type instead of
2349         floatformat argument.  Use floatformat_printf_format and
2350         printf_length_modifier.  Remove special handling of invalid numbers,
2351         infinities and NaN (moved to target_float_to_string).
2352         (struct scanf_length_modifier): New templated type.
2353         (floatformat_from_string): Rename to ...
2354         (host_float_ops<T>::from_string): ... this.  Use type instead of
2355         floatformat argument.  Use scanf_length_modifier.
2356         (floatformat_to_longest): Rename to ...
2357         (host_float_ops<T>::to_longest): ... this.  Use type instead of
2358         floatformat argument.  Handle out-of-range values deterministically.
2359         (floatformat_from_longest): Rename to ...
2360         (host_float_ops<T>::from_longest): ... this.  Use type instead of
2361         floatformat argument.
2362         (floatformat_from_ulongest): Rename to ...
2363         (host_float_ops<T>::from_ulongest): ... this.  Use type instead of
2364         floatformat argument.
2365         (floatformat_to_host_double): Rename to ...
2366         (host_float_ops<T>::to_host_double): ... this.  Use type instead of
2367         floatformat argument.
2368         (floatformat_from_host_double): Rename to ...
2369         (host_float_ops<T>::from_host_double): ... this.  Use type instead of
2370         floatformat argument.
2371         (floatformat_convert): Rename to ...
2372         (host_float_ops<T>::convert): ... this.  Use type instead of
2373         floatformat arguments.  Remove handling of no-op conversions.
2374         (floatformat_binop): Rename to ...
2375         (host_float_ops<T>::binop): ... this.  Use type instead of
2376         floatformat arguments.
2377         (floatformat_compare): Rename to ...
2378         (host_float_ops<T>::compare): ... this.  Use type instead of
2379         floatformat arguments.
2380
2381         (match_endianness): Use type instead of length/byte_order arguments.
2382         (set_decnumber_context): Likewise.
2383         (decimal_from_number): Likewise.  Update calls.
2384         (decimal_to_number): Likewise.
2385         (decimal_is_zero): Likewise.  Update calls.  Move to earlier in file.
2386         (decimal_float_ops::to_host_double): New dummy function.
2387         (decimal_float_ops::from_host_double): Likewise.
2388         (decimal_to_string): Rename to ...
2389         (decimal_float_ops::to_string): ... this.  Use type instead of
2390         length/byte_order arguments.  Update calls.
2391         (decimal_from_string): Rename to ...
2392         (decimal_float_ops::from_string): ... this.  Use type instead of
2393         length/byte_order arguments.  Update calls.
2394         (decimal_from_longest): Rename to ...
2395         (decimal_float_ops::from_longest): ... this.  Use type instead of
2396         length/byte_order arguments.  Update calls.
2397         (decimal_from_ulongest): Rename to ...
2398         (decimal_float_ops::from_ulongest): ... this.  Use type instead of
2399         length/byte_order arguments.  Update calls.
2400         (decimal_to_longest): Rename to ...
2401         (decimal_float_ops::to_longest): ... this.  Use type instead of
2402         length/byte_order arguments.  Update calls.
2403         (decimal_binop): Rename to ...
2404         (decimal_float_ops::binop): ... this.  Use type instead of
2405         length/byte_order arguments.  Update calls.
2406         (decimal_compare): Rename to ...
2407         (decimal_float_ops::compare): ... this.  Use type instead of
2408         length/byte_order arguments.  Update calls.
2409         (decimal_convert): Rename to ...
2410         (decimal_float_ops::convert): ... this.  Use type instead of
2411         length/byte_order arguments.  Update calls.
2412
2413         (target_float_same_category_p): New function.
2414         (target_float_same_format_p): Likewise.
2415         (target_float_format_length): Likewise.
2416         (enum target_float_ops_kind): New type.
2417         (get_target_float_ops_kind): New function.
2418         (get_target_float_ops): Three new overloaded functions.
2419
2420         (target_float_is_zero): Update call.
2421         (target_float_to_string): Add special handling of invalid numbers,
2422         infinities and NaN (moved from floatformat_to_string).  Use
2423         target_float_ops callback.
2424         (target_float_from_string): Use target_float_ops callback.
2425         (target_float_to_longest): Likewise.
2426         (target_float_from_longest): Likewise.
2427         (target_float_from_ulongest): Likewise.
2428         (target_float_to_host_double): Likewise.
2429         (target_float_from_host_double): Likewise.
2430         (target_float_convert): Add special case for no-op conversions.
2431         Use target_float_ops callback.
2432         (target_float_binop): Use target_float_ops callback.
2433         (target_float_compare): Likewise.
2434
2435 2017-11-22  Yao Qi  <yao.qi@linaro.org>
2436
2437         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use strcpy.
2438
2439 2017-11-22  Yao Qi  <yao.qi@linaro.org>
2440
2441         * cli/cli-decode.c (help_list): Use memcpy instead of strncpy.
2442         * cp-namespace.c (cp_lookup_transparent_type_loop): Likewise.
2443
2444 2017-11-21  Jerome Guitton  <guitton@adacore.com>
2445
2446         * ravenscar-thread.c (ravenscar_wait): Update inferior ptid
2447         with event ptid from the lower layer before doing the
2448         ravenscar-specific update.
2449
2450 2017-11-21  Joel Brobecker  <brobecker@adacore.com>
2451
2452         * ravenscar-thread.c (is_ravenscar_task): Also verify that
2453         the ptid's TID is nonzero.
2454
2455 2017-11-21  Joel Brobecker  <brobecker@adacore.com>
2456
2457         * ada-lang.h (ada_get_tcb_types_info): Add declaration.
2458         * ada-tasks.c (ada_get_tcb_types_info): Renames get_tcb_types_info.
2459         Make non-static.  Change return type to char *.  Adjust code
2460         accordingly.  Rewrite the function's documentation.
2461         (read_atcb): Adjust call to get_tcb_types_info accordingly.
2462         * ravenscar-thread.c (ravenscar_inferior_created): Check that
2463         we have enough debugging information in the runtime to support
2464         Ada task debugging before we enable the ravenscar-thread layer.
2465
2466 2017-11-21  Joel Brobecker  <brobecker@adacore.com>
2467
2468         * ada-lang.h (ada_get_task_info_from_ptid): Add declaration.
2469         * ada-tasks.c (ada_get_task_info_from_ptid): New function.
2470         * ravenscar-thread.c: Add into comment.
2471         (base_magic_null_ptid): Delete.
2472         (base_ptid): Change documentation.
2473         (ravenscar_active_task): Renames ravenscar_running_thread.
2474         All callers updated throughout.
2475         (is_ravenscar_task, ravenscar_get_thread_base_cpu): New function.
2476         (ravenscar_task_is_currently_active): Likewise.
2477         (get_base_thread_from_ravenscar_task): Ditto.
2478         (ravenscar_update_inferior_ptid): Adjust to handle multiple CPUs.
2479         (ravenscar_runtime_initialized): Likewise.
2480         (get_running_thread_id): Add new parameter "cpu".  Adjust
2481         implementation to handle this new parameter.
2482         (ravenscar_fetch_registers): Small adjustment to use
2483         is_ravenscar_task and ravenscar_task_is_currently_active in
2484         order to decide whether to use the target beneath or this
2485         module's arch_ops.
2486         (ravenscar_store_registers, ravenscar_prepare_to_store): Likewise.
2487         (ravenscar_stopped_by_sw_breakpoint): Use
2488         get_base_thread_from_ravenscar_task to get the underlying
2489         thread, rather than using base_ptid.
2490         (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
2491         (ravenscar_stopped_data_address, ravenscar_core_of_thread):
2492         Likewise.
2493         (ravenscar_inferior_created): Do not set base_magic_null_ptid.
2494
2495 2017-11-21  Joel Brobecker  <brobecker@adacore.com>
2496
2497         * ada-lang.h (struct ada_task_info) <base_cpu>: New field.
2498         * ada-lang.c (struct atcb_fieldno) <base_cpu>: New field.
2499         (get_tcb_types_info): Set fieldnos.base_cpu.
2500         (read_atcb): Set task_info->base_cpu.
2501         (info_task): Print "Base CPU" info if set by runtime.
2502
2503 2017-11-21  Joel Brobecker  <brobecker@adacore.com>
2504
2505         * ravenscar-thread.c (ravenscar_stopped_by_sw_breakpoint)
2506         (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
2507         (ravenscar_stopped_data_address, ravenscar_core_of_thread):
2508         New functions.
2509         (init_ravenscar_thread_ops): Set the to_stopped_by_sw_breakpoint,
2510         to_stopped_by_hw_breakpoint, to_stopped_by_watchpoint,
2511         to_stopped_data_address and to_core_of_thread fields of
2512         ravenscar_ops.
2513
2514 2017-11-21  Ulrich Weigand  <uweigand@de.ibm.com>
2515
2516         * ppc-tdep.h (enum powerpc_long_double_abi): New data type.
2517         (struct gdbarch_tdep): New member long_double_abi.
2518         * rs6000-tdep.c (rs6000_gdbarch_init): Initialize long_double_abi
2519         member of tdep struct based on Tag_GNU_Power_ABI_FP attribute.
2520         * ppc-linux-tdep.c (ppc_linux_init_abi): Install long double data
2521         format depending on long_double_abi tdep member.
2522         (ppc_floatformat_for_type): Handle __ibm128 type.
2523
2524 2017-11-20  Simon Marchi  <simon.marchi@polymtl.ca>
2525
2526         * darwin-nat.c (set_enable_mach_exceptions): Constify parameter.
2527
2528 2017-11-21  Pedro Alves  <palves@redhat.com>
2529
2530         * dwarf2read.c (mapped_index::find_name_components_bounds)
2531         <completion mode, upper bound>: Use std::lower_bound instead of
2532         std::upper_bound.
2533         (test_mapped_index_find_name_component_bounds): Remove incorrect
2534         "t1_fund" from expected symbols.
2535
2536 2017-11-21  Pedro Alves  <palves@redhat.com>
2537
2538         * dwarf2read.c (mapped_index::name_components_casing): New field.
2539         (mapped_index) <build_name_components,
2540         find_name_components_bounds): Declare new methods.
2541         (mapped_index::find_name_components_bounds)
2542         (mapped_index::build_name_components): New methods, factored out
2543         from dw2_expand_symtabs_matching_symbol.
2544         (check_find_bounds_finds)
2545         (test_mapped_index_find_name_component_bounds): New.
2546         (run_test): Rename to ...
2547         (test_dw2_expand_symtabs_matching_symbol): ... this.
2548         (run_test): Reimplement.
2549
2550 2017-11-21  Pedro Alves  <palves@redhat.com>
2551
2552         * cp-name-parser.y (cp_ident_is_alpha, cp_ident_is_alnum): New.
2553         (symbol_end): Use cp_ident_is_alnum.
2554         (yylex): Use cp_ident_is_alpha and cp_ident_is_alnum.
2555         * dwarf2read.c (make_sort_after_prefix_name): New function.
2556         (dw2_expand_symtabs_matching_symbol): Use it.
2557         (test_symbols): Add more symbols.
2558         (run_test): Add tests.
2559
2560 2017-11-17  Tom Tromey  <tom@tromey.com>
2561
2562         * symtab.h (enum symbol_subclass_kind): New.
2563         (struct symbol) <is_cplus_template_function, is_rust_vtable>:
2564         Remove.
2565         <subclass>: New member.
2566         (SYMBOL_IS_CPLUS_TEMPLATE_FUNCTION): Update.
2567         * rust-lang.c (rust_get_trait_object_pointer): Update.
2568         * dwarf2read.c (read_func_scope): Update.
2569         (read_variable): Update.
2570
2571 2017-11-17  Tom Tromey  <tom@tromey.com>
2572
2573         * dwarf2read.c (read_func_scope): Update.
2574         * symtab.h (struct template_symbol): Derive from symbol.
2575         <base>: Remove.
2576
2577 2017-11-17  Tom Tromey  <tom@tromey.com>
2578
2579         * symtab.h (struct symbol) <is_rust_vtable>: New member.
2580         (struct rust_vtable_symbol): New.
2581         (find_symbol_at_address): Declare.
2582         * symtab.c (find_symbol_at_address): New function.
2583         * symfile.h (struct quick_symbol_functions)
2584         <find_compunit_symtab_by_address>: New member.
2585         * symfile-debug.c (debug_qf_find_compunit_symtab_by_address): New
2586         function.
2587         (debug_sym_quick_functions): Link to
2588         debug_qf_find_compunit_symtab_by_address.
2589         * rust-lang.c (rust_get_trait_object_pointer): New function.
2590         (rust_evaluate_subexp) <case UNOP_IND>: New case.  Call
2591         rust_get_trait_object_pointer.
2592         * psymtab.c (psym_relocate): Clear psymbol_map.
2593         (psym_fill_psymbol_map, psym_find_compunit_symtab_by_address): New
2594         functions.
2595         (psym_functions): Link to psym_find_compunit_symtab_by_address.
2596         * objfiles.h (struct objfile) <psymbol_map>: New member.
2597         * dwarf2read.c (dwarf2_gdb_index_functions): Update.
2598         (process_die) <DW_TAG_variable>: New case.  Call read_variable.
2599         (rust_containing_type, read_variable): New functions.
2600
2601 2017-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
2602
2603         * common/gdb_vecs.h (DEF_VEC_I (int)): Remove.
2604
2605 2017-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
2606
2607         * common/filestuff.c: Include <algorithm>.
2608         (open_fds): Change type to std::vector<int>.
2609         (do_mark_open_fd): Adjust.
2610         (unmark_fd_no_cloexec): Adjust.
2611         (do_close): Adjust.
2612
2613 2017-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
2614
2615         * breakpoint.c (output_thread_groups): Take an std::vector.
2616         (print_one_breakpoint_location): Adjust.
2617
2618 2017-11-17  Joel Brobecker  <brobecker@adacore.com>
2619
2620         * ada-lang.c (resolve_subexp): Add handling of OP_VAR_MSYM_VALUE.
2621         (ada_evaluate_subexp_for_cast): New function.
2622         (ada_evaluate_subexp) <UNOP_CAST>: Replace code by call to
2623         ada_evaluate_subexp_for_cast.
2624         (ada_evaluate_subexp) <nosideret>: Replace code by call to
2625         eval_skip_value.
2626         * eval.c (evaluate_var_value): Make non-static.
2627         (evaluate_var_msym_value, eval_skip_value): Likewise.
2628         * value.h (evaluate_var_value, evaluate_var_msym_value)
2629         (eval_skip_value): Declare.
2630
2631 2017-11-16  Joel Brobecker  <brobecker@adacore.com>
2632
2633         * ada-lang.c (ada_value_cast): Remove parameter "noside".
2634         Update all callers.
2635
2636 2017-11-16  Pedro Alves  <palves@redhat.com>
2637
2638         * python/py-unwind.c (pyuw_sniffer): Translate
2639         PyExc_KeyboardInterrupt to a GDB Quit exception.
2640
2641 2017-11-16  Pedro Alves  <palves@redhat.com>
2642
2643         * infrun.c (resume_cleanups): Delete.
2644         (resume): No longer install a resume_cleanups cleanup nor call
2645         QUIT.
2646         (proceed): Pass the terminal to the inferior.
2647         (keep_going_pass_signal): No longer install a resume_cleanups
2648         cleanup.
2649
2650 2017-11-16  Pedro Alves  <palves@redhat.com>
2651
2652         * inf-loop.c (inferior_event_handler): Don't swallow the exception
2653         if the prompt is blocked.
2654
2655 2017-11-16  Pedro Alves  <palves@redhat.com>
2656
2657         * breakpoint.c (insert_bp_location): Replace bp_err and
2658         bp_err_message locals by a gdb_exception local.
2659
2660 2017-11-16  Pedro Alves  <palves@redhat.com>
2661
2662         * inflow.c (scoped_ignore_sigttou): New class.
2663         (child_terminal_ours_1, new_tty): Use it.
2664
2665 2017-11-16  Ulrich Weigand  <uweigand@de.ibm.com>
2666
2667         * target-float.c (decimal_from_number): Add byte_order argument and
2668         call match_endianness.  Error if unknown floating-point type.
2669         (decimal_to_number): Add byte_order argument and call match_endianness.
2670         (decimal_from_longest): Update call.  Do not call match_endianness.
2671         (decimal_from_ulongest): Likewise.
2672         (decimal_binop): Likewise.
2673         (decimal_is_zero): Likewise.
2674         (decimal_compare): Likewise.
2675         (decimal_convert): Likewise.
2676
2677 2017-11-16  Phil Muldoon  <pmuldoon@redhat.com>
2678
2679         * python/python.c (gdbpy_rbreak): New function.
2680         * NEWS: Document Python rbreak feature.
2681
2682 2017-11-16  Yao Qi  <yao.qi@linaro.org>
2683
2684         * features/tic6x-c62x.xml: Remove.
2685         * features/tic6x-c64x.xml: Remove.
2686         * features/tic6x-c64xp.xml: Remove.
2687
2688 2017-11-15  John Baldwin  <jhb@FreeBSD.org>
2689
2690         * symtab.h: Include <array>.
2691
2692 2017-11-15  John Baldwin  <jhb@FreeBSD.org>
2693
2694         * bsd-kvm.c (bsd_kvm_cmd): Constify 'arg'.
2695         (bsd_kvm_proc_cmd): Likewise.
2696
2697 2017-11-15  Simon Marchi  <simon.marchi@ericsson.com>
2698
2699         * tui/tui-win.c (window_name_completer): Replace VEC with
2700         std::vector.
2701
2702 2017-11-15  Andrew Cagney  <cagney@gnu.org>
2703
2704         * MAINTAINERS: Remove no-longer applicable entries.
2705
2706 2017-11-15  Andrew Cagney  <cagney@gnu.org>
2707
2708         * MAINTAINERS: Move self to Past Maintainers.
2709
2710 2017-11-15  Yao Qi  <yao.qi@linaro.org>
2711
2712         * features/Makefile (XMLTOC): Remove nios2-linux.xml.
2713         * features/nios2-linux.c: Remove.
2714         * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Don't call
2715         initialize_tdesc_nios2_linux.
2716
2717 2017-11-15  Yao Qi  <yao.qi@linaro.org>
2718
2719         * m68hc11-tdep.c (M68HC11_NUM_REGS): Change it to
2720         M68HC11_LAST_HARD_REG + 1.
2721
2722 2017-11-14  Paul Carroll  <pcarroll@codesourcery.com>
2723
2724         PR gdb/22388
2725         * remote.c (remote_write_bytes_aux, remote_read_bytes_1,
2726         remote_read_bytes, remote_write_qxfer, remote_xfer_partial):
2727         Return TARGET_XFER_EOF if size of returned data is 0.
2728
2729 2017-11-14  Simon Marchi  <simon.marchi@ericsson.com>
2730
2731         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2732         memory-map-selftests.c.
2733         (SUBDIR_UNITTESTS_OBS): Add memory-map-selftests.o.
2734         * memory-map.c (memory_map_start_memory): Fix computation of hi
2735         address.
2736         * unittests/memory-map-selftests.c: New file.
2737
2738 2017-11-09  Joel Brobecker  <brobecker@adacore.com>
2739
2740         * ada-lang.c: Fix some typos in the general command documenting
2741         how Ada expressions are being evaluated and how their result
2742         is printed.
2743
2744 2017-11-09  Tom Tromey  <tom@tromey.com>
2745
2746         * psymtab.c (psymbol_hash): Do not hash string contents.
2747         (psymbol_compare): Add comment.
2748
2749 2017-11-09  Tom Tromey  <tom@tromey.com>
2750
2751         * dictionary.c (dict_hash): Move "TKB" check into the "switch".
2752
2753 2017-11-08  Joel Brobecker  <brobecker@adacore.com>
2754
2755         * ada-exp.y (write_var_from_sym): Remove parameter
2756         "orig_left_context".  Update all callers.
2757
2758 2017-11-08  Simon Marchi  <simon.marchi@ericsson.com>
2759
2760         * tracepoint.h (class collection_list) <stringify>: Return
2761         std::vector<std::string>.
2762         (encode_actions_rsp): Change parameters to
2763         std::vector<std::string> *.
2764         * tracepoint.c (collection_list::stringify): Return
2765         std::vector<std::string> and adjust accordingly.
2766         (encode_actions_rsp): Changee parameters to
2767         std::vector<std::string> and adjust accordingly.
2768         * remote.c (free_actions_list),
2769         free_actions_list_cleanup_wrapper): Remove.
2770         (remote_download_tracepoint): Adjust to std::vector.
2771
2772 2017-11-08  Tom Tromey  <tom@tromey.com>
2773
2774         * dwarf2read.c (symbolp): Remove typedef.
2775         (read_func_scope): Use std::vector.
2776         (process_structure_scope): Use std::vector.
2777
2778 2017-11-08  Pedro Alves  <palves@redhat.com>
2779
2780         * ada-lang.c (ada_make_symbol_completion_list): Use
2781         completion_skip_symbol.
2782         * symtab.c (symbol_is_function_or_method(minimal_symbol*)): New.
2783         (symbol_is_function_or_method(symbol*)): New.
2784         (add_symtab_completions): Add complete_symbol_mode parameter.  Use
2785         completion_skip_symbol.
2786         (default_collect_symbol_completion_matches_break_on): Use
2787         completion_skip_symbol.  Pass down mode.
2788         (collect_file_symbol_completion_matches): Pass down mode.
2789         * symtab.h (symbol_is_function_or_method): New declarations.
2790         (completion_skip_symbol): New template function.
2791
2792 2017-11-08  Pedro Alves  <palves@redhat.com>
2793
2794         * linespec.c (iterate_over_all_matching_symtabs): Add
2795         search_domain parameter.  Pass it down to expand_symtabs_matching.
2796         (decode_objc): Request FUNCTIONS_DOMAIN symbols only.
2797         (lookup_prefix_sym): Adjust by passing ALL_DOMAIN as
2798         search_domain.
2799         (add_all_symbol_names_from_pspace): Add search_domain parameter.
2800         Pass it down.
2801         (find_method, find_function_symbols): Request FUNCTIONS_DOMAIN
2802         symbols.
2803         (add_matching_symbols_to_info): Add search_domain parameter.  Pass
2804         it down.
2805
2806 2017-11-08  Pedro Alves  <palves@redhat.com>
2807
2808         * ada-lang.c (ada_make_symbol_completion_list): Remove text and
2809         text_len locals and don't pass them down.
2810         * symtab.c (completion_list_add_name): Remove
2811         sym_text/sym_text_len parameters and adjust.
2812         (completion_list_add_symbol, completion_list_add_msymbol)
2813         (completion_list_objc_symbol, completion_list_add_fields)
2814         (add_symtab_completions): Likewise.
2815         (default_collect_symbol_completion_matches_break_on)
2816         (collect_file_symbol_completion_matches): Remove sym_text_len
2817         local and don't pass it down.
2818         * symtab.h (completion_list_add_name): Remove
2819         sym_text/sym_text_len parameters.
2820
2821 2017-11-08  Pedro Alves  <palves@redhat.com>
2822
2823         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2824         unittests/lookup_name_info-selftests.c.
2825         (SUBDIR_UNITTESTS_OBS): Add lookup_name_info-selftests.o.
2826         * cp-support.c: Include "selftest.h".
2827         (cp_remove_params_1): Rename from cp_remove_params.  Add
2828         'require_param' parameter, and handle it.
2829         (cp_remove_params): Reimplement.
2830         (cp_remove_params_if_any): New.
2831         (selftests::quote): New.
2832         (selftests::check_remove_params): New.
2833         (selftests::test_cp_remove_params): New.
2834         (_initialize_cp_support): Install
2835         selftests::test_cp_remove_params.
2836         * cp-support.h (cp_remove_params_if_any): Declare.
2837         * dwarf2read.c :Include "selftest.h".
2838         (dw2_expand_symtabs_matching_symbol): Use
2839         lookup_name_info::make_ignore_params.
2840         (selftests::dw2_expand_symtabs_matching::mock_mapped_index)
2841         (selftests::dw2_expand_symtabs_matching::string_or_null)
2842         (selftests::dw2_expand_symtabs_matching::check_match)
2843         (selftests::dw2_expand_symtabs_matching::test_symbols)
2844         (selftests::dw2_expand_symtabs_matching::run_test): New.
2845         (_initialize_dwarf2_read): Register
2846         selftests::dw2_expand_symtabs_matching::run_test.
2847         * psymtab.c (psym_expand_symtabs_matching): Use
2848         lookup_name_info::make_ignore_params.
2849         * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info):
2850         If the lookup name wants to ignore parameters, strip them.
2851         (compare_symbol_name): Remove sym_text/sym_text_len parameters and
2852         code handling '('.
2853         (completion_list_add_name): Don't pass down sym_text/sym_text_len.
2854         (default_collect_symbol_completion_matches_break_on): Don't try to
2855         strip parameters.
2856         * symtab.h (lookup_name_info::lookup_name_info): Add
2857         'ignore_parameters' parameter.
2858         (lookup_name_info::ignore_parameters)
2859         (lookup_name_info::make_ignore_params): New methods.
2860         (lookup_name_info::m_ignore_parameters): New field.
2861         * unittests/lookup_name_info-selftests.c: New file.
2862
2863 2017-11-08  Pedro Alves  <palves@redhat.com>
2864
2865         * dwarf2read.c (dw2_expand_marked_cus)
2866         (dw2_expand_symtabs_matching_symbol): Remove forward declarations.
2867         (dw2_expand_symtabs_matching): Move further below.
2868         (dw2_expand_marked_cus): Reindent.
2869
2870 2017-11-08  Pedro Alves  <palves@redhat.com>
2871
2872         * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
2873         (struct name_component): New.
2874         (mapped_index::name_components): New field.
2875         (mapped_index::symbol_name_at): New method.
2876         (dwarf2_read_index): Call mapped_index ctor.
2877         (dw2_map_matching_symbols): Add comment about name_components
2878         table.
2879         (dw2_expand_symtabs_matching): Factor part to...
2880         (dw2_expand_symtabs_matching_symbol): ... this new function.
2881         Build name components table, and lookup symbols in it before
2882         calling the name matcher.
2883         (dw2_expand_marked_cus): New, factored out from
2884         dw2_expand_symtabs_matching.
2885         (dwarf2_per_objfile_free): Call the mapped_index's dtor.
2886
2887 2017-11-08   Pedro Alves  <palves@redhat.com>
2888
2889         * ada-lang.c (ada_encode): Rename to ..
2890         (ada_encode_1): ... this.  Add throw_errors parameter and handle
2891         it.
2892         (ada_encode): Reimplement.
2893         (match_name): Delete, folded into full_name.
2894         (resolve_subexp): No longer pass the encoded name to
2895         ada_lookup_symbol_list.
2896         (should_use_wild_match): Delete.
2897         (name_match_type_from_name): New.
2898         (ada_lookup_simple_minsym): Use lookup_name_info and the
2899         language's symbol_name_matcher_ftype.
2900         (add_symbols_from_enclosing_procs, ada_add_local_symbols)
2901         (ada_add_block_renamings): Adjust to use lookup_name_info.
2902         (ada_lookup_name): New.
2903         (add_nonlocal_symbols, ada_add_all_symbols)
2904         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
2905         (ada_iterate_over_symbols): Adjust to use lookup_name_info.
2906         (ada_name_for_lookup): Delete.
2907         (ada_lookup_encoded_symbol): Construct a verbatim name.
2908         (wild_match): Reverse sense of return type.  Use bool.
2909         (full_match): Reverse sense of return type.  Inline bits of old
2910         match_name here.
2911         (ada_add_block_symbols): Adjust to use lookup_name_info.
2912         (symbol_completion_match): Delete, folded into...
2913         (ada_lookup_name_info::matches): ... .this new method.
2914         (symbol_completion_add): Delete.
2915         (ada_collect_symbol_completion_matches): Add name_match_type
2916         parameter.  Adjust to use lookup_name_info and
2917         completion_list_add_name.
2918         (get_var_value, ada_add_global_exceptions): Adjust to use
2919         lookup_name_info.
2920         (ada_get_symbol_name_cmp): Delete.
2921         (do_wild_match, do_full_match): New functions.
2922         (ada_lookup_name_info::ada_lookup_name_info): New method.
2923         (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
2924         functions.
2925         (ada_language_defn): Install ada_get_symbol_name_matcher.
2926         * ada-lex.l (processId): If name starts with '<', copy it
2927         verbatim.
2928         * block.c (block_iter_match_step, block_iter_match_first)
2929         (block_iter_match_next, block_lookup_symbol)
2930         (block_lookup_symbol_primary, block_find_symbol): Adjust to use
2931         lookup_name_info.
2932         * block.h (block_iter_match_first, block_iter_match_next)
2933         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
2934         * c-lang.c (c_language_defn, cplus_language_defn)
2935         (asm_language_defn, minimal_language_defn): Adjust comments to
2936         refer to la_get_symbol_name_matcher.
2937         * completer.c (complete_files_symbols)
2938         (collect_explicit_location_matches, symbol_completer): Pass a
2939         symbol_name_match_type down.
2940         * completer.h (class completion_match, completion_match_result):
2941         New classes.
2942         (completion_tracker::reset_completion_match_result): New method.
2943         (completion_tracker::m_completion_match_result): New field.
2944         * cp-support.c (make_symbol_overload_list_block): Adjust to use
2945         lookup_name_info.
2946         (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
2947         functions.
2948         * cp-support.h (cp_get_symbol_name_matcher): New declaration.
2949         * d-lang.c: Adjust comments to refer to
2950         la_get_symbol_name_matcher.
2951         * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
2952         Adjust to use lookup_name_info.
2953         (dict_iter_match_first, dict_iter_match_next)
2954         (iter_match_first_hashed, iter_match_next_hashed)
2955         (iter_match_first_linear, iter_match_next_linear): Adjust to work
2956         with a lookup_name_info.
2957         * dictionary.h (dict_iter_match_first, dict_iter_match_next):
2958         Likewise.
2959         * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
2960         (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
2961         (gdb_index_symbol_name_matcher): New class.
2962         (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
2963         gdb_index_symbol_name_matcher.  Accept a NULL symbol_matcher.
2964         * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
2965         with a symbol_name_match_type.
2966         (f_language_defn): Adjust comments to refer to
2967         la_get_symbol_name_matcher.
2968         * go-lang.c (go_language_defn): Adjust comments to refer to
2969         la_get_symbol_name_matcher.
2970         * language.c (default_symbol_name_matcher)
2971         (language_get_symbol_name_matcher): New functions.
2972         (unknown_language_defn, auto_language_defn): Adjust comments to
2973         refer to la_get_symbol_name_matcher.
2974         * language.h (symbol_name_cmp_ftype): Delete.
2975         (language_defn) <la_collect_symbol_completion_matches>: Add match
2976         type parameter.
2977         <la_get_symbol_name_cmp>: Delete field.
2978         <la_get_symbol_name_matcher>: New field.
2979         <la_iterate_over_symbols>: Adjust to use lookup_name_info.
2980         (default_symbol_name_matcher, language_get_symbol_name_matcher):
2981         Declare.
2982         * linespec.c (iterate_over_all_matching_symtabs)
2983         (iterate_over_file_blocks): Adjust to use lookup_name_info.
2984         (find_methods): Add language parameter, and use lookup_name_info
2985         and the language's symbol_name_matcher_ftype.
2986         (linespec_complete_function): Adjust.
2987         (lookup_prefix_sym): Use lookup_name_info.
2988         (add_all_symbol_names_from_pspace): Adjust.
2989         (find_superclass_methods): Add language parameter and pass it
2990         down.
2991         (find_method): Pass symbol language down.
2992         (find_linespec_symbols): Don't demangle or Ada encode here.
2993         (search_minsyms_for_name): Add lookup_name_info parameter.
2994         (add_matching_symbols_to_info): Add name_match_type parameter.
2995         Use lookup_name_info.
2996         * m2-lang.c (m2_language_defn): Adjust comments to refer to
2997         la_get_symbol_name_matcher.
2998         * minsyms.c: Include <algorithm>.
2999         (add_minsym_to_demangled_hash_table): Remove table parameter and
3000         add objfile parameter.  Use search_name_hash, and add language to
3001         demangled languages vector.
3002         (struct found_minimal_symbols): New struct.
3003         (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
3004         New functions.
3005         (lookup_minimal_symbol): Adjust to use them.  Don't canonicalize
3006         input names here.  Use lookup_name_info instead.  Lookup up
3007         demangled names once for each language in the demangled names
3008         vector.
3009         (iterate_over_minimal_symbols): Use lookup_name_info.  Lookup up
3010         demangled names once for each language in the demangled names
3011         vector.
3012         (build_minimal_symbol_hash_tables): Adjust.
3013         * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
3014         lookup_name_info.
3015         * objc-lang.c (objc_language_defn): Adjust comment to refer to
3016         la_get_symbol_name_matcher.
3017         * objfiles.h: Include <vector>.
3018         (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
3019         * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
3020         la_get_symbol_name_matcher.
3021         * p-lang.c (pascal_language_defn): Adjust comment to refer to
3022         la_get_symbol_name_matcher.
3023         * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
3024         (match_partial_symbol): Use symbol_name_match_type,
3025         lookup_name_info and psymbol_name_matches.
3026         (lookup_partial_symbol): Use lookup_name_info.
3027         (map_block): Use symbol_name_match_type and lookup_name_info.
3028         (psym_map_matching_symbols): Use symbol_name_match_type.
3029         (psymbol_name_matches): New.
3030         (recursively_search_psymtabs): Use lookup_name_info and
3031         psymbol_name_matches.  Rename 'kind' parameter to 'domain'.
3032         (psym_expand_symtabs_matching): Use lookup_name_info.  Rename
3033         'kind' parameter to 'domain'.
3034         * rust-lang.c (rust_language_defn): Adjust comment to refer to
3035         la_get_symbol_name_matcher.
3036         * symfile-debug.c (debug_qf_map_matching_symbols)
3037         (debug_qf_map_matching_symbols): Use symbol_name_match_type.
3038         (debug_qf_expand_symtabs_matching): Use lookup_name_info.
3039         * symfile.c (expand_symtabs_matching): Use lookup_name_info.
3040         * symfile.h (quick_symbol_functions) <map_matching_symbols>:
3041         Adjust to use symbol_name_match_type.
3042         <expand_symtabs_matching>: Adjust to use lookup_name_info.
3043         (expand_symtabs_matching): Adjust to use lookup_name_info.
3044         * symmisc.c (maintenance_expand_symtabs): Use
3045         lookup_name_info::match_any ().
3046         * symtab.c (symbol_matches_search_name): New.
3047         (eq_symbol_entry): Adjust to use lookup_name_info and the
3048         language's matcher.
3049         (demangle_for_lookup_info::demangle_for_lookup_info): New.
3050         (lookup_name_info::match_any): New.
3051         (iterate_over_symbols, search_symbols): Use lookup_name_info.
3052         (compare_symbol_name): Add language, lookup_name_info and
3053         completion_match_result parameters, and use them.
3054         (completion_list_add_name): Make extern.  Add language and
3055         lookup_name_info parameters.  Use them.
3056         (completion_list_add_symbol, completion_list_add_msymbol)
3057         (completion_list_objc_symbol): Add lookup_name_info parameters and
3058         adjust.  Pass down language.
3059         (completion_list_add_fields): Add lookup_name_info parameters and
3060         adjust.  Pass down language.
3061         (add_symtab_completions): Add lookup_name_info parameters and
3062         adjust.
3063         (default_collect_symbol_completion_matches_break_on): Add
3064         name_match_type parameter, and use it.  Use lookup_name_info.
3065         (default_collect_symbol_completion_matches)
3066         (collect_symbol_completion_matches): Add name_match_type
3067         parameter, and pass it down.
3068         (collect_symbol_completion_matches_type): Adjust.
3069         (collect_file_symbol_completion_matches): Add name_match_type
3070         parameter, and use lookup_name_info.
3071         * symtab.h: Include <string> and "common/gdb_optional.h".
3072         (enum class symbol_name_match_type): New.
3073         (class ada_lookup_name_info): New.
3074         (struct demangle_for_lookup_info): New.
3075         (class lookup_name_info): New.
3076         (symbol_name_matcher_ftype): New.
3077         (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
3078         (symbol_matches_search_name): Declare.
3079         (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
3080         (default_collect_symbol_completion_matches)
3081         (collect_symbol_completion_matches)
3082         (collect_file_symbol_completion_matches): Add name_match_type
3083         parameter.
3084         (iterate_over_symbols): Use lookup_name_info.
3085         (completion_list_add_name): Declare.
3086         * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
3087         (strncmp_iw_with_mode): Now extern.
3088         * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
3089         (strncmp_iw_with_mode): Declare.
3090
3091 2017-11-08  Keith Seitz  <keiths@redhat.com>
3092             Pedro Alves  <palves@redhat.com>
3093
3094         * ada-lang.c (ada_language_defn): Install
3095         default_search_name_hash.
3096         * buildsym.c (struct buildsym_compunit): <language>: New field.
3097         (finish_block_internal): Pass language when creating dictionaries.
3098         (start_buildsym_compunit, start_symtab): New language parameters.
3099         Use them.
3100         (restart_symtab): Pass down compilation unit's language.
3101         * buildsym.h (enum language): Forward declare.
3102         (start_symtab): New 'language' parameter.
3103         * c-lang.c (c_language_defn, cplus_language_defn)
3104         (asm_language_defn, minimal_language_defn): Install
3105         default_search_name_hash.
3106         * coffread.c (coff_start_symtab): Adjust.
3107         * d-lang.c (d_language_defn): Install default_search_name_hash.
3108         * dbxread.c (struct symloc): Add 'pst_language' field.
3109         (PST_LANGUAGE): Define.
3110         (start_psymtab, read_ofile_symtab): Use it.
3111         (process_one_symbol): New 'language' parameter.  Pass it down.
3112         * dictionary.c (struct dictionary) <language>: New field.
3113         (DICT_LANGUAGE): Define.
3114         (dict_create_hashed, dict_create_hashed_expandable)
3115         (dict_create_linear, dict_create_linear_expandable): New parameter
3116         'language'.  Set the dictionary's language.
3117         (iter_match_first_hashed): Adjust to rename.
3118         (insert_symbol_hashed): Assert we don't see mismatching
3119         languages.  Adjust to rename.
3120         (dict_hash): Rename to ...
3121         (default_search_name_hash): ... this and make extern.
3122         * dictionary.h (struct language_defn): Forward declare.
3123         (dict_create_hashed): New parameter 'language'.
3124         * dwarf2read.c (dwarf2_start_symtab): Pass down language.
3125         * f-lang.c (f_language_defn): Install default_search_name_hash.
3126         * go-lang.c (go_language_defn): Install default_search_name_hash.
3127         * jit.c (finalize_symtab): Pass compunit's language to dictionary
3128         creation.
3129         * language.c (unknown_language_defn, auto_language_defn):
3130         * language.h (language_defn::la_search_name_hash): New field.
3131         (default_search_name_hash): Declare.
3132         * m2-lang.c (m2_language_defn): Install default_search_name_hash.
3133         * mdebugread.c (new_block): New parameter 'language'.
3134         * mdebugread.c (parse_symbol): Pass symbol language to block
3135         allocation.
3136         (psymtab_to_symtab_1): Pass down language.
3137         (new_symtab): Pass compunit's language to block allocation.
3138         * objc-lang.c (objc_language_defn): Install
3139         default_search_name_hash.
3140         * opencl-lang.c (opencl_language_defn):
3141         * p-lang.c (pascal_language_defn): Install
3142         default_search_name_hash.
3143         * rust-lang.c (rust_language_defn): Install
3144         default_search_name_hash.
3145         * stabsread.h (enum language): Forward declare.
3146         (process_one_symbol): Add 'language' parameter.
3147         * symtab.c (search_name_hash): New function.
3148         * symtab.h (search_name_hash): Declare.
3149         * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
3150
3151 2017-11-08  Pedro Alves  <palves@redhat.com>
3152
3153         * cp-name-parser.y (main): Don't initialize extra_chars.
3154
3155 2017-11-07  Tom Tromey  <tom@tromey.com>
3156
3157         * event-top.h (command_handler): Constify.
3158         * record-full.c (cmd_record_full_start): Update.
3159         * thread.c (thread_apply_all_command): Update.
3160         * printcmd.c (eval_command): Update.
3161         * mi/mi-main.c (mi_execute_cli_command): Update.
3162         (mi_execute_async_cli_command): Update.
3163         * tui/tui-stack.c (tui_update_command): Update.
3164         * cli/cli-interp.c (safe_execute_command): Constify.
3165         * record.c (record_start): Update.
3166         (record_start, record_stop, cmd_record_start): Update.
3167         * record-btrace.c (cmd_record_btrace_bts_start): Update.
3168         (cmd_record_btrace_pt_start): Update.
3169         (cmd_record_btrace_start): Update.
3170         (cmd_record_btrace_start): Update.
3171         * reverse.c (exec_reverse_once): Update.
3172         * python/python.c (execute_gdb_command): Don't copy the command.
3173         * event-top.c (command_line_handler): Update.
3174         (command_handler): Constify.
3175         * defs.h (deprecated_call_command_hook): Constify.
3176         * cli/cli-script.h (execute_user_command): Constify.
3177         * cli/cli-script.c (execute_user_command): Constify.
3178         (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
3179         (enum command_control_type): Update.
3180         * main.c (catch_command_errors): Remove non-const overload.
3181         (catch_command_errors_ftype): Remove.
3182         * python/py-cmd.c (cmdpy_function): Constify.
3183         * guile/scm-cmd.c (cmdscm_function): Constify.
3184         * cli/cli-dump.c (call_dump_func): Constify.
3185         * cli/cli-decode.c (do_const_cfunc): Constify.
3186         (do_sfunc): Constify.
3187         (cmd_func): Constify.
3188         * gdbcmd.h (execute_command, execute_command_to_string): Constify.
3189         * top.h (execute_command): Constify.
3190         * top.c (execute_command): Constify.
3191         (execute_command_to_string): Constify.
3192         (deprecated_call_command_hook): Constify.
3193         * command.h (cmd_func): Constify.
3194         * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
3195
3196 2017-11-07  Tom Tromey  <tom@tromey.com>
3197
3198         * ada-lang.c (catch_ada_exception_command): Constify.
3199         (catch_assert_command): Constify.
3200         * break-catch-throw.c (catch_catch_command, catch_throw_command)
3201         (catch_rethrow_command): Constify.
3202         (catch_exception_command_1): Constify.
3203         * breakpoint.h (add_catch_command): Constify.
3204         * break-catch-syscall.c (catch_syscall_command_1): Constify.
3205         (catch_syscall_split_args): Constify.
3206         * break-catch-sig.c (catch_signal_command): Constify.
3207         (catch_signal_split_args): Constify.
3208         * cli/cli-decode.h (struct cmd_list_element) <function>: Use
3209         cmd_const_sfunc_ftype.
3210         * cli/cli-decode.c (add_setshow_cmd_full): Constify.
3211         (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
3212         (add_setshow_boolean_cmd, add_setshow_filename_cmd)
3213         (add_setshow_string_cmd, struct cmd_list_element)
3214         (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
3215         (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
3216         (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
3217         Constify.
3218         (set_cmd_sfunc): Constify.
3219         (empty_sfunc): Constify.
3220         * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
3221         (add_setshow_boolean_cmd, add_setshow_filename_cmd)
3222         (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
3223         (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
3224         (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
3225         (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
3226         Constify.
3227         (set_cmd_sfunc): Constify.
3228         (cmd_sfunc_ftype): Remove.
3229         * compile/compile.c (set_compile_args): Constify.
3230         * infrun.c (set_disable_randomization): Constify.
3231         * infcmd.c (set_args_command, set_cwd_command): Constify.
3232         * breakpoint.c (set_condition_evaluation_mode): Constify.
3233         (add_catch_command): Constify.
3234         (catch_fork_command_1, catch_exec_command_1)
3235         (catch_load_command_1, catch_unload_command_1): Constify.
3236         (catch_load_or_unload): Constify.
3237         * guile/scm-param.c (pascm_set_func): Constify.
3238         (add_setshow_generic): Constify.
3239         * python/py-param.c (get_set_value): Constify.
3240         * top.h (set_verbose): Constify.
3241         * tui/tui-win.c (tui_set_var_cmd): Constify.
3242         * mi/mi-main.c (set_mi_async_command): Constify.
3243         * cli/cli-logging.c (set_logging_overwrite)
3244         (set_logging_redirect): Constify.
3245         * value.c (set_max_value_size): Constify.
3246         * valprint.c (set_input_radix, set_output_radix): Constify.
3247         * utils.c (set_width_command, set_height_command): Constify.
3248         * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
3249         * tracepoint.c (set_disconnected_tracing)
3250         (set_circular_trace_buffer, set_trace_buffer_size)
3251         (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
3252         * top.c (set_history_size_command, set_verbose, set_editing)
3253         (set_gdb_datadir, set_history_filename): Constify.
3254         * target.c (set_targetdebug, maint_set_target_async_command)
3255         (maint_set_target_non_stop_command, set_target_permissions)
3256         (set_write_memory_permission): Constify.
3257         (open_target): Constify.
3258         * target-descriptions.c (set_tdesc_filename_cmd): Constify.
3259         * target-dcache.c (set_stack_cache, set_code_cache): Constify.
3260         * symtab.c (set_symbol_cache_size_handler): Constify.
3261         * symfile.c (set_ext_lang_command): Constify.
3262         * symfile-debug.c (set_debug_symfile): Constify.
3263         * source.c (set_directories_command): Constify.
3264         * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
3265         * serial.c (set_parity): Constify.
3266         * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
3267         * remote.c (set_remote_exec_file, set_remotebreak)
3268         (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
3269         * record.c (set_record_insn_history_size)
3270         (set_record_call_history_size): Constify.
3271         * record-full.c (set_record_full_insn_max_num): Constify.
3272         * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
3273         * osabi.c (set_osabi): Constify.
3274         * mips-tdep.c (set_mips64_transfers_32bit_regs)
3275         (reinit_frame_cache_sfunc, mips_abi_update): Constify.
3276         * maint.c (maintenance_set_profile_cmd): Constify.
3277         * linux-thread-db.c (set_libthread_db_search_path): Constify.
3278         * language.c (set_language_command, set_range_command)
3279         (set_case_command): Constify.
3280         * infrun.c (set_non_stop, set_observer_mode)
3281         (set_stop_on_solib_events, set_schedlock_func)
3282         (set_exec_direction_func): Constify.
3283         * infcmd.c (set_inferior_tty_command): Constify.
3284         * disasm.c (set_disassembler_options_sfunc): Constify.
3285         * demangle.c (set_demangling_command): Constify.
3286         * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
3287         * cris-tdep.c (set_cris_version, set_cris_mode)
3288         (set_cris_dwarf2_cfi): Constify.
3289         * corefile.c (set_gnutarget_command): Constify.
3290         * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
3291         (set_target_wide_charset_sfunc): Constify.
3292         * breakpoint.c (update_dprintf_commands): Constify.
3293         * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
3294         * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
3295         (set_disassembly_style_sfunc): Constify.
3296         * arch-utils.c (set_endian, set_architecture): Constify.
3297         * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
3298         * agent.c (set_can_use_agent): Constify.
3299
3300 2017-11-07  Tom Tromey  <tom@tromey.com>
3301
3302         * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
3303         (go32_pde, go32_pte, go32_pte_for_address): Constify.
3304         * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
3305         (set_thread_default_pause_cmd, set_thread_default_run_cmd)
3306         (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
3307         (parse_int_arg, show_thread_default_detach_sc_cmd)
3308         (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
3309         (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
3310         (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
3311         (show_task_pause_cmd, set_task_detach_sc_cmd)
3312         (show_task_detach_sc_cmd, set_task_exc_port_cmd)
3313         (set_noninvasive_cmd, set_thread_pause_cmd)
3314         (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
3315         (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
3316         (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
3317         * windows-nat.c (display_selectors): Constify.
3318         * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
3319         non-const "cfunc".
3320         * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
3321         (cmd_cfunc_eq): Likewise.
3322         (struct cmd_list_element): Likewise.
3323         (do_cfunc): Remove.
3324         (cli_user_command_p): Update.
3325         * command.h (add_cmd): Remove non-const overload.
3326         (cmd_cfunc_ftype): Remove typedef.
3327         (cmd_cfunc_eq): Remove non-const overload.
3328         * value.c (show_values): Constify.
3329         * thread.c (thread_apply_all_command): Constify.
3330         * symfile.c (load_command): Constify.
3331         * source.c (directory_command): Constify.
3332         * maint.c (maintenance_internal_error)
3333         (maintenance_demangler_warning, maintenance_space_display)
3334         (maintenance_print_architecture, maintenance_translate_address)
3335         (maintenance_info_selftests, maintenance_internal_warning):
3336         Constify.
3337         * breakpoint.c (disable_trace_command, enable_trace_command):
3338         Constify.
3339         * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
3340         Constify.
3341         (add_auto_load_safe_path): Constify.
3342         * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
3343         * top.h (show_commands): Constify.
3344         * linux-thread-db.c (info_auto_load_libthread_db): Constify.
3345         * sparc64-tdep.c (adi_examine_command): Constify.
3346         (adi_assign_command): Constify.
3347
3348 2017-11-07  Tom Tromey  <tom@tromey.com>
3349
3350         * frame.h (info_locals_command, info_args_command): Constify.
3351         * auto-load.h (auto_load_info_scripts): Constify.
3352         * inferior.h (registers_info): Constify.
3353         * copying.c: Rebuild.
3354         * copying.awk: Constify generated commands.
3355         * auto-load.c (auto_load_info_scripts)
3356         (info_auto_load_gdb_scripts): Constify.
3357         * cli/cli-decode.c (struct cmd_list_element): Take a
3358         cmd_const_cfunc_ftype.
3359         * command.h (add_info): Take a cmd_const_cfunc_ftype.
3360         * tui/tui-win.c (tui_all_windows_info): Constify.
3361         * python/py-auto-load.c (info_auto_load_python_scripts):
3362         Constify.
3363         * cli/cli-cmds.c (show_command): Remove non-const overload.
3364         * tracepoint.c (info_tvariables_command, info_scope_command):
3365         Constify.
3366         (info_static_tracepoint_markers_command): Constify.
3367         * thread.c (info_threads_command): Constify.
3368         (print_thread_info_1): Constify.
3369         * target.c (info_target_command): Constify.
3370         * symtab.c (info_sources_command, info_functions_command)
3371         (info_types_command): Constify.
3372         (info_variables_command): Remove non-const overload.
3373         * symfile.c (info_ext_lang_command): Constify.
3374         * stack.c (info_frame_command, info_locals_command)
3375         (info_args_command): Constify.
3376         (backtrace_command): Remove non-const overload.
3377         * source.c (info_source_command, info_line_command): Constify.
3378         * solib.c (info_sharedlibrary_command): Constify.
3379         * skip.c (info_skip_command): Constify.
3380         * ser-go32.c (info_serial_command): Constify.
3381         * reverse.c (info_bookmarks_command): Constify.
3382         * printcmd.c (info_symbol_command, info_address_command)
3383         (info_display_command): Constify.
3384         * osdata.c (info_osdata_command): Constify.
3385         * objc-lang.c (info_selectors_command, info_classes_command):
3386         Constify.
3387         * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
3388         * memattr.c (info_mem_command): Constify.
3389         * macrocmd.c (info_macro_command, info_macros_command): Constify.
3390         * linux-fork.c (info_checkpoints_command): Constify.
3391         * infrun.c (info_signals_command): Constify.
3392         * inflow.c (info_terminal_command): Constify.
3393         * inferior.c (info_inferiors_command): Constify.
3394         (print_inferior): Constify.
3395         * infcmd.c (info_program_command, info_all_registers_command)
3396         (info_registers_command, info_vector_command)
3397         (info_float_command): Constify.
3398         (registers_info): Constify.
3399         * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
3400         (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
3401         Constify.
3402         * f-valprint.c (info_common_command): Constify.
3403         * dcache.c (info_dcache_command): Constify.
3404         (dcache_info_1): Constify.
3405         * darwin-nat-info.c (info_mach_tasks_command)
3406         (info_mach_task_command, info_mach_ports_command)
3407         (info_mach_port_command, info_mach_threads_command)
3408         (info_mach_thread_command, info_mach_regions_command)
3409         (info_mach_regions_recurse_command, info_mach_region_command)
3410         (info_mach_exceptions_command): Constify.
3411         (get_task_from_args): Constify.
3412         * cp-support.c (info_vtbl_command): Constify.
3413         * breakpoint.c (info_watchpoints_command)
3414         (info_tracepoints_command): Constify.
3415         (info_breakpoints_command): Remove non-const overload.
3416         * avr-tdep.c (avr_io_reg_read_command): Constify.
3417         * auxv.c (info_auxv_command): Constify.
3418         * ada-tasks.c (info_tasks_command): Constify.
3419         (info_task): Constify.
3420         * ada-lang.c (info_exceptions_command): Constify.
3421
3422 2017-11-07  Tom Tromey  <tom@tromey.com>
3423
3424         * solib.h (no_shared_libraries): Constify.
3425         * frame.h (return_command): Constify.
3426         * cli/cli-cmds.h (quit_command): Constify.
3427         * top.h (quit_command, execute_command): Constify.
3428         * target.h (flash_erase_command): Constify.
3429         * inferior.h (set_inferior_args, attach_command): Constify.
3430         * tracepoint.h (start_tracing, stop_tracing): Constify.
3431         * breakpoint.h (break_command, tbreak_command)
3432         (hbreak_command_wrapper, thbreak_command_wrapper)
3433         (rbreak_command_wrapper, watch_command_wrapper)
3434         (awatch_command_wrapper, rwatch_command_wrapper)
3435         (get_tracepoint_by_number): Constify.
3436         * symtab.c (info_variables_command, rbreak_command)
3437         (symtab_symbol_info): Constify.
3438         (info_variables_command): Add non-const overload.
3439         * top.c (dont_repeat_command): Constify.
3440         * breakpoint.c (ignore_command, commands_command)
3441         (condition_command, tbreak_command, hbreak_command)
3442         (thbreak_command, clear_command, break_command)
3443         (info_breakpoints_command, watch_command, rwatch_command)
3444         (awatch_command, trace_command, ftrace_command, strace_command)
3445         (trace_pass_command, break_range_command, dprintf_command)
3446         (agent_printf_command, get_tracepoint_by_number)
3447         (watch_maybe_just_location, trace_pass_command): Constify.
3448         (info_breakpoints_command): Add non-const overload.
3449         * tracefile.c (tsave_command): Constify.
3450         * infcmd.c (attach_command, disconnect_command, signal_command)
3451         (queue_signal_command, stepi_command, nexti_command)
3452         (finish_command, next_command, step_command, until_command)
3453         (advance_command, jump_command, continue_command, run_command)
3454         (start_command, starti_command, interrupt_command)
3455         (run_command_1, set_inferior_args, step_1): Constify.
3456         * inferior.c (add_inferior_command, remove_inferior_command)
3457         (clone_inferior_command): Constify.
3458         * linux-fork.c (checkpoint_command, restart_command): Constify.
3459         * windows-nat.c (signal_event_command): Constify.
3460         * guile/guile.c (guile_repl_command, guile_command): Constify.
3461         * printcmd.c (x_command, display_command, printf_command)
3462         (output_command, set_command, call_command, print_command)
3463         (eval_command): Constify.
3464         (non_const_set_command): Remove.
3465         (_initialize_printcmd): Update.
3466         * source.c (forward_search_command, reverse_search_command):
3467         Constify.
3468         * jit.c (jit_reader_load_command, jit_reader_unload_command):
3469         Constify.
3470         * infrun.c (handle_command): Constify.
3471         * memattr.c (mem_command): Constify.
3472         * stack.c (return_command, up_command, up_silently_command)
3473         (down_command, down_silently_command, frame_command)
3474         (backtrace_command, func_command, backtrace_command_1): Constify.
3475         (backtrace_command): Add non-const overload.
3476         * remote-sim.c (simulator_command): Constify.
3477         * exec.c (set_section_command): Constify.
3478         * tracepoint.c (tdump_command, trace_variable_command)
3479         (tstatus_command, tstop_command, tstart_command)
3480         (end_actions_pseudocommand, while_stepping_pseudocommand)
3481         (collect_pseudocommand, teval_pseudocommand, actions_command)
3482         (start_tracing, stop_tracing): Constify.
3483         * value.c (init_if_undefined_command): Constify.
3484         * tui/tui-stack.c (tui_update_command): Constify.
3485         * tui/tui-win.c (tui_refresh_all_command)
3486         (tui_set_tab_width_command, tui_set_win_height_command)
3487         (tui_set_focus_command, tui_scroll_forward_command)
3488         (tui_scroll_backward_command, tui_scroll_left_command)
3489         (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
3490         (tui_set_win_height): Constify.
3491         * tui/tui-layout.c (tui_layout_command): Constify.
3492         * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
3493         (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
3494         (proc_untrace_sysexit_cmd): Constify.
3495         * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
3496         (threadset_test_cmd, threadlist_update_test_cmd)
3497         (threadalive_test): Constify.
3498         * objc-lang.c (print_object_command): Constify.
3499         * command.h (add_com): Constify.
3500         * cli/cli-dump.c (restore_command): Constify.
3501         * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
3502         (help_command, complete_command, shell_command, edit_command)
3503         (list_command, disassemble_command, make_command)
3504         (apropos_command, alias_command): Constify.
3505         * cli/cli-script.c (document_command, define_command)
3506         (while_command, if_command, validate_comname): Constify.
3507         * cli/cli-decode.c (struct cmd_list_element): Change type of
3508         "fun".
3509         * target.c (do_monitor_command, flash_erase_command): Constify.
3510         * regcache.c (reg_flush_command): Constify.
3511         * reverse.c (reverse_step, reverse_next, reverse_stepi)
3512         (reverse_nexti, reverse_continue, reverse_finish)
3513         (save_bookmark_command, goto_bookmark_command)
3514         (exec_reverse_once): Constify.
3515         * python/python.c (python_interactive_command, python_command):
3516         Constify.
3517         * typeprint.c (ptype_command, whatis_command, whatis_exp):
3518         Constify.
3519         * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
3520         * gcore.c (gcore_command): Constify.
3521
3522 2017-11-07  Tom Tromey  <tom@tromey.com>
3523
3524         * printcmd.c (x_command): Call set_repeat_arguments.
3525         * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
3526         * top.c (repeat_arguments): New global.
3527         (set_repeat_arguments): New function.
3528         (execute_command): Handle repeat_arguments.
3529         (show_commands): Calls set_repeat_arguments.
3530         * command.h (set_repeat_arguments): Declare.
3531
3532 2017-11-07  Tom Tromey  <tom@tromey.com>
3533
3534         * stack.c (backtrace_command): Use std::string.
3535         (backtrace_command_1): Make "count_exp" const.
3536
3537 2017-11-07  Tom Tromey  <tom@tromey.com>
3538
3539         * source.c (directory_switch, mod_path, add_path): Constify.
3540         * defs.h (add_path, mod_path, directory_switch): Constify.
3541         * mi/mi-cmd-env.c (env_mod_path): Constify.
3542
3543 2017-11-07  Tom Tromey  <tom@tromey.com>
3544
3545         * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
3546         (run_command_1, continue_command, step_1, jump_command)
3547         (signal_command, until_command, advance_command, finish_command)
3548         (attach_command): Update.
3549
3550 2017-11-07  Tom Tromey  <tom@tromey.com>
3551
3552         * command.h (set_cmd_cfunc): Don't declare.
3553         * cli/cli-decode.c (set_cmd_cfunc): Now static.
3554
3555 2017-11-07  Tom Tromey  <tom@tromey.com>
3556
3557         * stack.c (select_frame_command): Constify.
3558         * cli/cli-decode.c (add_com_suppress_notification): Constify.
3559         * command.h (add_com_suppress_notification): Constify.
3560
3561 2017-11-07  Tom Tromey  <tom@tromey.com>
3562
3563         * breakpoint.c (stop_command): Constify.
3564         * cli/cli-decode.c (struct cmd_list_element): Constify.
3565         * command.h (add_abbrev_prefix_cmd): Constify.
3566
3567 2017-11-07  Pedro Alves  <palves@redhat.com>
3568
3569         * breakpoint.c (extract_bp_kind): New enum.
3570         (extract_bp_num, extract_bp_or_bp_range): New functions, partially
3571         factored out from ...
3572         (extract_bp_number_and_location): ... here.
3573         * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
3574
3575 2017-11-07  Pedro Alves  <palves@redhat.com>
3576
3577         * breakpoint.c (extract_bp_number_and_location): Change return
3578         type to void.  Throw error instead of warning.
3579         (enable_disable_command): Adjust.
3580
3581 2017-11-07  Xavier Roirand  <roirand@adacore.com>
3582             Pedro Alves  <palves@redhat.com>
3583
3584         * breakpoint.c (map_breakpoint_number_range): New, factored out
3585         from ...
3586         (map_breakpoint_numbers): ... here.
3587         (find_location_by_number): Change parameters from string to
3588         breakpoint number and location.
3589         (extract_bp_number_and_location): New function.
3590         (enable_disable_bp_num_loc)
3591         (enable_disable_breakpoint_location_range)
3592         (enable_disable_command): New functions, factored out ...
3593         (enable_command, disable_command): ... these functions, and
3594         adjusted to support ranges.
3595         * NEWS: Document enable/disable breakpoint location range feature.
3596
3597 2017-11-06  Luis Machado  <luis.machado@linaro.org>
3598
3599         * MAINTAINERS (Write After Approval): Update my e-mail address.
3600
3601 2017-11-06  Pedro Alves  <palves@redhat.com>
3602
3603         * gnu-nat.c (gnu_terminal_init): Delete.
3604         (gnu_target): Don't install gnu_terminal_init.
3605         * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
3606         (child_terminal_init): ... this function.
3607
3608 2017-11-06  Pedro Alves  <palves@redhat.com>
3609
3610         * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
3611         sgtty.h.
3612         * config.in, configure: Regenerate.
3613
3614 2017-11-06  Pedro Alves  <palves@redhat.com>
3615
3616         * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
3617         (async_init_signals): Adjust.
3618         (handle_stop_sig): Rename to ...
3619         (handle_sigtstp): ... this.
3620         (async_stop_sig): Rename to ...
3621         (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
3622         SIGTSTP path.
3623         * event-top.h: Move signal.h include to the top.  Check SIGTSTP
3624         instead of STOP_SIGNAL thoughout.
3625         (handle_stop_sig): Rename to ...
3626         (handle_sigtstp): ... this.
3627         * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
3628
3629 2017-11-06  Pedro Alves  <palves@redhat.com>
3630
3631         * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
3632         longer set flags twice in row.
3633
3634 2017-11-06  Pedro Alves  <palves@redhat.com>
3635
3636         * Makefile.in (SER_HARDWIRE): Update comment.
3637         (HFILES_NO_SRCDIR): Remove gdb_termios.h.
3638         * common/gdb_termios.h: Delete file.
3639         * common/job-control.c: Include termios.h and unistd.h instead of
3640         gdb_termios.h.
3641         (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
3642         check.
3643         (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
3644         Remove sgtty code.
3645         * configure.ac: No longer check for termio.h and sgtty.h.
3646         * configure: Regenerate.
3647         * inflow.c: Include termios.h instead of gdb_termios.h.  Replace
3648         PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
3649         Replace PROCESS_GROUP_TYPE references with pid_t references
3650         throughout.
3651         (gdb_getpgrp): Delete.
3652         (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
3653         (child_terminal_inferior): Remove comment.  Remove sgtty code.
3654         (child_terminal_ours_1): Use tcgetpgrp directly instead of
3655         gdb_getpgrp.  Use serial_set_tty_state instead aof
3656         serial_noflush_set_tty_state.  Remove sgtty code.
3657         * inflow.h: Include unistd.h instead of gdb_termios.h.  Replace
3658         PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
3659         (inferior_process_group): Now returns pid_t.
3660         * ser-base.c (ser_base_noflush_set_tty_state): Delete.
3661         * ser-base.h (ser_base_noflush_set_tty_state): Delete.
3662         * ser-event.c (serial_event_ops): Update.
3663         * ser-go32.c (dos_noflush_set_tty_state): Delete.
3664         (dos_ops): Update.
3665         * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
3666         * ser-pipe.c (pipe_ops): Update.
3667         * ser-tcp.c (tcp_ops): Update.
3668         * ser-unix.c: Include termios.h instead of gdb_termios.h.  Remove
3669         HAVE_TERMIOS checks.
3670         [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
3671         [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
3672         (get_tty_state, set_tty_state): Drop termio and sgtty code, and
3673         assume termios.
3674         (hardwire_noflush_set_tty_state): Delete.
3675         (hardwire_print_tty_state, hardwire_drain_output)
3676         (hardwire_flush_output, hardwire_flush_input)
3677         (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
3678         (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
3679         code, and assume termios.
3680         (hardwire_ops): Update.
3681         (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
3682         * serial.c (serial_noflush_set_tty_state): Delete.
3683         * serial.h (serial_noflush_set_tty_state): Delete.
3684         (serial_ops::noflush_set_tty_state): Delete.
3685
3686 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
3687
3688         * Makefile.in (SFILES): Remove doublest.c and dfp.c.
3689         (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
3690         (COMMON_OBS): Remove doublest.o and dfp.o.
3691         Do not build target-float.c (instead of doublest.c)
3692         with -Wformat-nonliteral.
3693
3694         * doublest.c: Remove file.
3695         * doublest.h: Remove file.
3696         * dfp.c: Remove file.
3697         * dfp.h: Remove file.
3698
3699         * target-float.c: Do not include "doublest.h" and "dfp.h".
3700         (DOUBLEST): Move here from doublest.h.
3701         (enum float_kind): Likewise.
3702         (FLOATFORMAT_CHAR_BIT): Likewise.
3703         (FLOATFORMAT_LARGEST_BYTES): Likewise.
3704         (floatformat_totalsize_bytes): Move here from doublest.c.  Make static.
3705         (floatformat_precision): Likewise.
3706         (floatformat_normalize_byteorder, get_field, put_field): Likewise.
3707         (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
3708         Likewise.
3709         (host_float_format, host_double_format, host_long_double_format):
3710         Likewise.
3711         (floatformat_to_string, floatformat_from_string): Likewise.
3712         (floatformat_to_doublest): Likewise.  Also, inline the original
3713         convert_floatformat_to_doublest.
3714         (floatformat_from_doublest): Likewise.  Also, inline the original
3715         convert_floatformat_from_doublest.
3716
3717         Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
3718         (MAX_DECIMAL_STRING): Move here from dfp.c.
3719         (match_endianness): Likewise.
3720         (set_decnumber_context, decimal_check_errors): Likewise.
3721         (decimal_from_number, decimal_to_number): Likewise.
3722         (decimal_to_string, decimal_from_string): Likewise.  Make static.
3723         (decimal_from_longest, decimal_from_ulongest): Likewise.
3724         (decimal_to_longest): Likewise.
3725         (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
3726         (decimal_convert): Likewise.
3727
3728 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
3729
3730         * doublest.c: Do not include "gdbtypes.h".
3731         (extract_typed_floating): Remove.
3732         (store_typed_floating): Remove.
3733         (convert_typed_floating): Remove.
3734         * doublest.h (struct type): Remove.
3735         (DOUBLEST_PRINT_FORMAT): Remove.
3736         (DOUBLEST_SCAN_FORMAT): Remove.
3737         (extract_typed_floating): Remove.
3738         (store_typed_floating): Remove.
3739         (convert_typed_floating): Remove.
3740
3741         * dfp.c (decimal_from_doublest): Remove.
3742         (decimal_to_doublest): Remove.
3743         * dfp.h: Do not include "doublest.h".
3744         (decimal_from_doublest): Remove.
3745         (decimal_to_doublest): Remove.
3746
3747         * value.c: Do not include "doublest.h" and "dfp.h".
3748         (value_as_double): Remove.
3749         (unpack_double): Remove.
3750         (value_from_double): Remove.
3751         (value_from_decfloat): Remove.
3752         * value.h: Do not include "doublest.h".
3753         (value_as_double): Remove.
3754         (unpack_double): Remove.
3755         (value_from_double): Remove.
3756         (value_from_decfloat): Remove.
3757
3758 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
3759
3760         * i386-tdep.c: Include "target-float.h".  Do not include "doublest.h".
3761         (i386_extract_return_value): Use target_float_convert.
3762         (i386_store_return_value): Likewise.
3763         * i387-tdep.c (i387_register_to_value): Use target_float_convert.
3764         (i387_value_to_register): Likewise.
3765         * ia64-tdep.c: Include "target-float.h".  Do not include "doublest.h".
3766         (ia64_register_to_value): Use target_float_convert.
3767         (ia64_value_to_register): Likewise.
3768         (ia64_extract_return_value): Likewise.
3769         (ia64_store_return_value): Likewise.
3770         (ia64_push_dummy_call): Likewise.
3771         * m68k-tdep.c: Include "target-float.h".
3772         (m68k_register_to_value): Use target_float_convert.
3773         (m68k_value_to_register): Likewise.
3774         (m68k_svr4_extract_return_value): Likewise.
3775         (m68k_svr4_store_return_value): Likewise.
3776         * ppc-sysv-tdep.c: Include "target-float.h".
3777         (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
3778         (do_ppc_sysv_return_value): Likewise.
3779         (ppc64_sysv_abi_push_freg): Likewise.
3780         (ppc64_sysv_abi_return_value_base): Likewise.
3781         * rs6000-aix-tdep.c: Include "target-float.h".
3782         (rs6000_push_dummy_call): Use target_float_convert.
3783         (rs6000_return_value): Likewise.
3784         * rs6000-lynx178-tdep.c: Include "target-float.h".
3785         (rs6000_lynx178_push_dummy_call): Use target_float_convert.
3786         (rs6000_lynx178_return_value): Likewise.
3787         * rs6000-tdep.c: Include "target-float.h".  Do not include "doublest.h".
3788         (rs6000_register_to_value): Use target_float_convert.
3789         (rs6000_value_to_register): Likewise.
3790         * arm-tdep.c: Include "target-float.h".  Do not include "doublest.h".
3791         (arm_extract_return_value): Use target_float_convert.
3792         (arm_store_return_value): Likewise.
3793         * sh-tdep.c: Include "target-float.h".  Do not include "doublest.h".
3794         (sh_register_convert_to_virtual): Use target_float_convert.
3795         (sh_register_convert_to_raw): Likewise.
3796         * sh64-tdep.c: Include "target-float.h".
3797         (sh64_extract_return_value): Use target_float_convert.
3798         (sh64_register_convert_to_virtual): Likewise.
3799         (sh64_register_convert_to_raw): Likewise.  Fix argument types.
3800
3801 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
3802
3803         * target-float.c (floatformat_to_host_double): New function.
3804         (floatformat_from_host_double): Likewise.
3805         (target_float_to_host_double): Likewise.
3806         (target_float_from_host_double): Likewise.
3807         * target-float.h (target_float_to_host_double): Add prototype.
3808         (target_float_from_host_double): Likewise.
3809
3810         * guile/scm-value.c: Include "target-float.h".
3811         (gdbscm_value_to_real): Use target_float_to_host_double.
3812         Handle integer source values via value_as_long.
3813         * guile/scm-math.c: Include "target-float.h".  Do not include
3814         "doublest.h", "dfp.h", and "expression.h".
3815         (vlscm_convert_typed_number): Use target_float_from_host_double.
3816         (vlscm_convert_number): Likewise.
3817
3818         * python/py-value.c (valpy_float): Use target_float_to_host_double.
3819         (convert_value_from_python): Use target_float_from_host_double.
3820
3821 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
3822
3823         * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
3824         (cast_from_fixed): Likewise.
3825         (ada_scaling_type): New function.
3826         (ada_delta): Return value instead of DOUBLEST.  Perform target
3827         arithmetic instead of host arithmetic.
3828         (scaling_factor): Rename to ...
3829         (ada_scaling_factor) ... this.  Make non-static.  Return value instead
3830         of DOUBLEST.  Perform target arithmetic instead of host arithmetic.
3831         (ada_fixed_to_float): Remove.
3832         (ada_float_to_fixed): Remove.
3833         * ada-lang.h (ada_fixed_to_float): Remove.
3834         (ada_float_to_fixed): Remove.
3835         (ada_delta): Return value instead of DOUBLEST.
3836         (ada_scaling_factor): Add prototype.
3837
3838         * ada-typeprint.c: Include "target-float.h".
3839         (print_fixed_point_type): Perform target arithmetic instead of
3840         host arithmetic.
3841         * ada-valprint.c: Include "target-float.h".
3842         (ada_val_print_num): Perform target arithmetic instead of
3843         host arithmetic for fixed-point types.
3844
3845 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
3846
3847         * target-float.c: Include <math.h>.
3848         (floatformat_binop): New function.
3849         (floatformat_compare): Likewise.
3850         (target_float_binop): Likewise.
3851         (target_float_compare): Likewise.
3852         * target-float.h: Include "expression.h".
3853         (target_float_binop): Add prototype.
3854         (target_float_compare): Likewise.
3855
3856         * valarith.c: Do not include "doublest.h" and "dfp.h".
3857         Include "common/byte-vector.h".
3858         (value_args_as_decimal): Remove, replace by ...
3859         (value_args_as_target_float): ... this function.  Handle both
3860         binary and decimal target floating-point formats.
3861         (scalar_binop): Handle both binary and decimal FP using
3862         value_args_as_target_float and target_float_binop.
3863         (value_equal): Handle both binary and decimal FP using
3864         value_args_as_target_float and target_float_compare.
3865         (value_less): Likewise.
3866         (value_pos): Handle all scalar types as simple copy.
3867         (value_neg): Handle all scalar types via BINOP_SUB from 0.
3868         * dfp.c (decimal_binop): Throw error instead of internal_error
3869         when called with an unsupported operation code.
3870
3871 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
3872
3873         * target-float.c (target_float_to_string): New function.
3874         (target_float_from_string): New function.
3875         * target-float.h (target_float_to_string): Add prototype.
3876         (target_float_from_string): Add prototype.
3877
3878         * valprint.c: Include "target-float.h".  Do not include
3879         "doublest.h" and "dfp.h".
3880         (print_floating): Use target_float_to_string.
3881         * printcmd.c: Include "target-float.h".  Do not include "dfp.h".
3882         (printf_floating): Use target_float_to_string.
3883         * i387-tdep.c: Include "target-float.h".  Do not include "doublest.h".
3884         (print_i387_value): Use target_float_to_string.
3885         * mips-tdep.c: Include "target-float.h".
3886         (mips_print_fp_register): Use target_float_to_string.
3887         * sh64-tdep.c: Include "target-float.h".
3888         (sh64_do_fp_register): Use target_float_to_string.
3889
3890         * parse.c: Include "target-float.h".  Do not include
3891         "doublest.h" and "dfp.h".
3892         (parse_float): Use target_float_from_string.
3893         * stabsread.c: Include "target-float.h".  Do not include "doublest.h".
3894         (define_symbol): Use target_float_from_string.
3895         * gdbarch-selftests.c: Include "target-float.h".
3896         (register_to_value_test): Use target_float_from_string.
3897
3898 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
3899
3900         * Makefile.c (SFILES): Add target-float.c.
3901         (HFILES_NO_SRCDIR): Add target-float.h.
3902         (COMMON_OBS): Add target-float.o.
3903         * target-float.h: New file.
3904         * target-float.c: New file.
3905
3906         * doublest.c (floatformat_classify): Fix detection of float_zero.
3907
3908         * gdbtypes.c (is_floating_type): New function.
3909         * gdbtypes.h (is_floating_type): Add prototype.
3910
3911         * value.c: Do not include "floatformat.h".
3912         (unpack_double): Use target_float_is_valid.
3913         (is_floating_value): New function.
3914         * value.h (is_floating_value): Add prototype-
3915
3916         * valarith.c: Include "target-float.h".
3917         (value_logical_not): Use target_float_is_zero.
3918
3919         * python/py-value.c: Include "target-float.h".
3920         (valpy_nonzero): Use target_float_is_zero.
3921
3922 2017-11-04  Tom Tromey  <tom@tromey.com>
3923
3924         * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
3925
3926 2017-11-04  Tom Tromey  <tom@tromey.com>
3927
3928         * breakpoint.c (set_momentary_breakpoint): Return
3929         breakpoint_up.
3930         (until_break_command): Update.
3931         (new_until_break_fsm): Change argument types to
3932         breakpoint_up.
3933         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
3934         (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
3935         Remove.
3936         * infcmd.c (finish_forward): Update.
3937         * breakpoint.h (set_momentary_breakpoint)
3938         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
3939         (make_cleanup_delete_breakpoint): Remove.
3940         (struct breakpoint_deleter): New.
3941         (breakpoint_up): New typedef.
3942         * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
3943         (insert_exception_resume_breakpoint): Update.
3944         (insert_exception_resume_from_probe): Update.
3945         (insert_longjmp_resume_breakpoint): Update.
3946         * arm-linux-tdep.c (arm_linux_copy_svc): Update.
3947         * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
3948         * infcall.c (call_function_by_hand_dummy): Update
3949
3950 2017-11-04  Tom Tromey  <tom@tromey.com>
3951
3952         * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
3953
3954 2017-11-04  Tom Tromey  <tom@tromey.com>
3955
3956         * linux-tdep.c (linux_core_info_proc_mappings): Use
3957         gdb::def_vector.
3958         (linux_get_siginfo_data): Return gdb::byte_vector.  Remove
3959         "size" argument.
3960         (linux_corefile_thread): Update.
3961         (linux_make_corefile_notes): Remove unused variable.
3962
3963 2017-11-04  Tom Tromey  <tom@tromey.com>
3964
3965         * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
3966         gdb::byte_vector.
3967
3968 2017-11-04  Tom Tromey  <tom@tromey.com>
3969
3970         * objfiles.c (do_free_objfile_cleanup): Remove.
3971         * compile/compile-object-load.c (compile_object_load): Update.
3972         * objfiles.h (make_cleanup_free_objfile): Remove.
3973
3974 2017-11-04  Tom Tromey  <tom@tromey.com>
3975
3976         * sparc64-tdep.c (do_examine): Use gdb::def_vector.
3977         (adi_read_versions): Change "tags" to "gdb_byte *".
3978         (adi_print_versions): Likewise.
3979
3980 2017-11-04  Tom Tromey  <tom@tromey.com>
3981
3982         * breakpoint.c
3983         (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
3984         from start_rbreak_breakpoints.
3985         (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
3986         * breakpoint.h (class scoped_rbreak_breakpoints): New.
3987         (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
3988         * symtab.c (do_end_rbreak_breakpoints): Remove.
3989         (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
3990
3991 2017-11-04  Tom Tromey  <tom@tromey.com>
3992
3993         * cp-namespace.c (reset_directive_searched): Remove.
3994         (cp_lookup_symbol_via_imports): Use scoped_restore.
3995         * cp-support.c (reset_directive_searched): Remove.
3996         (make_symbol_overload_list_using): Use scoped_restore.
3997         * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
3998         (reset_directive_searched): Remove.
3999
4000 2017-11-04  Tom Tromey  <tom@tromey.com>
4001
4002         * symfile.c (find_separate_debug_file_by_debuglink): Use
4003         unique_xmalloc_ptr.
4004
4005 2017-11-04  Tom Tromey  <tom@tromey.com>
4006
4007         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
4008         type of "info".
4009         (compute_stack_depth): Likewise.
4010         (do_compile_dwarf_expr_to_c): Use std::vector.
4011
4012 2017-11-04  Tom Tromey  <tom@tromey.com>
4013
4014         * compile/compile-object-load.c (link_callbacks_einfo): Use
4015         std::string.
4016
4017 2017-11-04  Tom Tromey  <tom@tromey.com>
4018
4019         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
4020         Use scoped_free_pendings.
4021         * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
4022         scoped_free_pendings.
4023         * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
4024         (xcoff_initial_scan): Likewise.
4025         * buildsym.c (reset_symtab_globals): Update comment.
4026         (scoped_free_pendings): Rename from really_free_pendings.
4027         (prepare_for_building): Update comment.
4028         (buildsym_init): Likewise.
4029         * buildsym.h (class scoped_free_pendings): New class.
4030         (really_free_pendings): Don't declare.
4031
4032 2017-11-03  Ulrich Weigand  <uweigand@de.ibm.com>
4033
4034         * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
4035         output when converting a zero value to a special byteorder format.
4036
4037 2017-11-02  Yao Qi  <yao.qi@linaro.org>
4038
4039         * frame.c (do_frame_register_read): Remove aspace.
4040         * jit.c (jit_frame_sniffer): Likwise.
4041         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
4042         * regcache.c (regcache::regcache): Pass nullptr.
4043         (regcache_print): Caller updated.
4044         * regcache.h (regcache::regcache): Remove one constructor
4045         parameter aspace.
4046
4047 2017-11-02  Yao Qi  <yao.qi@linaro.org>
4048
4049         * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
4050
4051 2017-11-02  Yao Qi  <yao.qi@linaro.org>
4052
4053         * breakpoint.c (insert_single_step_breakpoints): Update.
4054         * frame.c (struct frame_info) <aspace>: Add const.
4055         (frame_save_as_regcache): Add const.
4056         (get_frame_address_space): Return const address_space *.
4057         * frame.h (get_frame_address_space): Update declaration.
4058         * infrun.c (struct step_over_info) <aspace>: Add const.
4059         (set_step_over_info): Make aspace const.
4060         (displaced_step_prepare_throw): Change variable const.
4061         (resume): Likewise.
4062         (proceed): Likewise.
4063         (adjust_pc_after_break): Likewise.
4064         (save_waitstatus): Likewise.
4065         (handle_signal_stop): Likewise.
4066         (keep_going_pass_signal): Likewise.
4067         * jit.c (jit_frame_sniffer): Add const.
4068         * mips-tdep.c (mips_single_step_through_delay): Likewise.
4069         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
4070         * record-full.c (record_full_wait_1): Likewise.
4071         * regcache.c (regcache::regcache): Change parameter to const.
4072         * regcache.h (regcache::regcache): Likewise.
4073         (regcache::aspace): Return const address_space *.
4074         (regcache) <m_aspace>: Add const.
4075
4076 2017-11-02  Yao Qi  <yao.qi@linaro.org>
4077
4078         * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
4079         * frame.c (create_sentinel_frame): Likewise.
4080         * infrun.c (displaced_step_prepare_throw): Likewise.
4081         (resume): Likewise.
4082         (thread_still_needs_step_over_bp): Likewise.
4083         (proceed): Likewise.
4084         (do_target_wait): Likewise.
4085         (adjust_pc_after_break): Likewise.
4086         (handle_syscall_event): Likewise.
4087         (save_waitstatus): Likewise.
4088         (handle_inferior_event_1): Likewise.
4089         (handle_signal_stop): Likewise.
4090         (keep_going_pass_signal): Likewise.
4091         * linux-nat.c (status_callback): Likewise.
4092         (save_stop_reason): Likewise.
4093         (resume_stopped_resumed_lwps): Likewise.
4094         * record-full.c (record_full_exec_insn): Likewise.
4095         (record_full_wait_1): Likewise.
4096         * regcache.c (get_regcache_aspace): Remove.
4097         * regcache.h (get_regcache_aspace): Remove.
4098
4099 2017-11-02  Yao Qi  <yao.qi@linaro.org>
4100
4101         * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
4102         (init_regcache_descr): Use gdbarch_num_regs.
4103         (regcache::regcache): Likewise.
4104         (regcache::get_register_status): Likewise.
4105         (regcache::assert_raw_regnum): Likewise.
4106         (regcache::cooked_read): Likewise.
4107         (regcache::cooked_read_value): Likewise.
4108         (regcache::cooked_write): Likewise.
4109         (regcache::dump): Likewise.
4110         (regcache::num_raw_registers): New method.
4111         * regcache.h (class regcache) <num_raw_registers>: New.
4112
4113 2017-11-02  Yao Qi  <yao.qi@linaro.org>
4114
4115         * regcache.c (regcache::assert_regnum): New method.
4116         (regcache::invalidate): Call assert_regnum.
4117         (regcache::raw_update): Likewise.
4118         (regcache::raw_write): Likewise.
4119         (regcache::raw_read_part): Likewise.
4120         (regcache::raw_write_part): Likewise.
4121         (regcache::raw_supply): Likewise.
4122         (regcache::raw_supply_integer): Likewise.
4123         (regcache::raw_supply_zeroed): Likewise.
4124         (regcache::raw_collect): Likewise.
4125         (regcache::raw_collect_integer): Likewise.
4126         * regcache.h (regcache::assert_regnum): Declare.
4127
4128 2017-11-02  Yao Qi  <yao.qi@linaro.org>
4129
4130         * regcache.c (regcache::dump): Remove code.
4131
4132 2017-11-02  Yao Qi  <yao.qi@linaro.org>
4133
4134         * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
4135         Remove.
4136         <sizeof_cooked_register_status>: Remove.
4137         (init_regcache_descr): Update.
4138         (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
4139         (regcache::save): Likewise.
4140         (regcache::dump): Likewise.
4141
4142 2017-11-01  James Bowman  <james.bowman@ftdichip.com>
4143
4144         * ft32-tdep.c (ft32_fetch_instruction): New function.
4145         (ft32_analyze_prologue): Use ft32_fetch_instruction().
4146
4147 2017-10-31  Simon Marchi  <simon.marchi@polymtl.ca>
4148
4149         * cli/cli-script.c (execute_control_command): Rename to ...
4150         (execute_control_command_1): ... this.
4151         (execute_control_command): New function.
4152
4153 2017-10-31  Simon Marchi  <simon.marchi@ericsson.com>
4154
4155         * tracepoint.c (tfind_command): Remove const_cast.
4156
4157 2017-10-30  Mike Gulick  <mgulick@mathworks.com>
4158
4159         * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
4160
4161 2017-10-30  Simon Marchi  <simon.marchi@ericsson.com>
4162
4163         * common/common-utils.h (in_inclusive_range): New function.
4164         * arm-tdep.c (arm_record_extension_space): Use
4165         in_inclusive_range.
4166         (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
4167         * cris-tdep.c (cris_spec_reg_applicable): Use
4168         in_inclusive_range.
4169
4170 2017-10-30  Pedro Alves  <palves@redhat.com>
4171             Simon Marchi  <simon.marchi@ericsson.com>
4172
4173         * remote.c (remote_set_syscall_catchpoint): Build a std::string
4174         instead of a gdb::unique_xmalloc_ptr, using string_appendf.
4175
4176 2017-10-30  Pedro Alves  <palves@redhat.com>
4177
4178         * common/common-utils.c (string_appendf, string_vappendf): New
4179         functions.
4180         * common/common-utils.h (string_appendf, string_vappendf): New
4181         declarations.
4182         * unittests/common-utils-selftests.c (string_appendf_func)
4183         (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
4184         (string_vappendf_tests): New functions.
4185         (_initialize_common_utils_selftests): Register "string_appendf" and
4186         "string_vappendf tests".
4187
4188 2017-10-30  Pedro Alves  <palves@redhat.com>
4189
4190         * unittests/common-utils-selftests.c (format_func): New typedef.
4191         (string_printf_tests, string_vprintf_tests): Tests factored out
4192         and merged to ...
4193         (test_format_func): ... this new function.
4194         (string_printf_tests, string_vprintf_tests): Reimplement on top of
4195         test_format_func.
4196
4197 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
4198
4199         * darwin-nat.c: Remove include of gdb.h.
4200
4201 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
4202
4203         * xtensa-xtregs.c: Fix formatting issues.
4204
4205 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
4206
4207         * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
4208
4209 2017-10-28  Maksim Dzabraev  <dzabraew@gmail.com>
4210
4211         PR python/21213
4212         * python/py-infthread.c (thpy_get_inferior): Increment reference
4213         of inferior before returning it.
4214
4215 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
4216
4217         * unittests/common-utils-selftests.c (format): Add
4218         ATTRIBUTE_PRINTF.
4219
4220 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
4221
4222         * xml-syscall.c (struct syscall_desc): Add constructor.
4223         <name>: Change type to std::string.
4224         (syscall_desc_up): New typedef.
4225         (syscall_desc_p): Remove typeder.
4226         (DEF_VEC_P(syscall_desc_p)): Remove.
4227         (struct syscall_group_desc): Add constructor.
4228         <name>: Change type to std::string.
4229         <syscalls>: Change type to std::vector.
4230         (syscall_group_desc_up): New typedef.
4231         (syscall_group_desc_p): Remove typedef.
4232         (DEF_VEC_P(syscall_group_desc_p)): Remove.
4233         (struct syscalls_info) <syscalls>: Change type to std::vector of
4234         unique_ptr.
4235         <groups>: Likewise.
4236         <my_gdb_datadir>: Change type to std::string.
4237         (syscalls_info_up): New typedef.
4238         (allocate_syscalls_info): Remove.
4239         (syscalls_info_free_syscalls_desc): Remove.
4240         (syscalls_info_free_syscall_group_desc): Remove.
4241         (free_syscalls_info): Remove.
4242         (make_cleanup_free_syscalls_info): Remove.
4243         (syscall_group_create_syscall_group_desc): Adjust.
4244         (syscall_group_add_syscall): Adjust.
4245         (syscall_create_syscall_desc): Adjust.
4246         (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
4247         (init_syscalls_info): Adjust.
4248         (syscall_group_get_group_by_name): Adjust.
4249         (xml_get_syscall_number): Adjust.
4250         (xml_get_syscall_name): Adjust.
4251         (xml_list_of_syscalls): Adjust.
4252         (xml_list_syscalls_by_group): Adjust.
4253         (xml_list_of_groups): Adjust.
4254
4255 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
4256
4257         * probe.h: Don't include gdb_vecs.h.
4258         (DEF_VEC_P (probe_p)): Remove.
4259         (find_probes_in_objfile): Return an std::vector.
4260         * probe.c (find_probes_in_objfile): Likewise.
4261         * breakpoint.c (breakpoint_objfile_data)
4262         <longjmp_probes>: Change type to std::vector.
4263         <exception_probes>: Likewise.
4264         (free_breakpoint_probes): Don't manually free vectors.
4265         (create_longjmp_master_breakpoint): Adjust.
4266         (create_exception_master_breakpoint): Adjust.
4267         * solib-svr4.c (svr4_create_probe_breakpoints): Change
4268         parameter type, adjust.
4269         (svr4_create_solib_event_breakpoints): Adjust.
4270
4271 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
4272
4273         * breakpoint.c (breakpoint_objfile_data): Initialize fields.
4274         (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
4275         with new.
4276         (free_breakpoint_probes): Rename to ...
4277         (free_breakpoint_objfile_data): ... this, and call delete on
4278         bp_objfile_data..
4279
4280 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
4281
4282         * auto-load.c: Don't include gdb_vecs.h, include algorithm.
4283         (loaded_script_ptr): Remove typedef.
4284         (DEF_VEC_P (loaded_script_ptr)): Remove.
4285         (struct collect_matching_scripts_data): Add constructor.
4286         <scripts_p>: Change type to (pointer to) std::vector.
4287         (collect_matching_scripts_data): Adjust.
4288         (sort_scripts_by_name): Make suitable for std::sort.
4289         (print_scripts): Don't sort vector, adjust to std::vector.
4290         (auto_load_info_scripts): Sort vectors, adjust to std::vector.
4291
4292 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
4293
4294         * symfile.c (filename_language): Make struct, not typedef.  Add
4295         constructor.
4296         <ext>: Change type to std::string.
4297         (DEF_VEC_O (filename_language)): Remove.
4298         (filename_language_table): Change type to std::vector.
4299         (add_filename_language): Adjust.
4300         (set_ext_lang_command): Adjust.
4301         (info_ext_lang_command): Adjust.
4302         (deduce_language_from_filename): Adjust.
4303         (class scoped_restore_filename_language_table): Remove.
4304         (test_filename_language): Use scoped_restore.
4305         (test_set_ext_lang_command): Use scoped_restore, adjust to
4306         std::vector change.
4307
4308 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
4309
4310         * symfile.c: Include selftest.h.
4311         (class scoped_restore_filename_language_table): New.
4312         (test_filename_language): New test.
4313         (test_set_ext_lang_command): New test.
4314         (_initialize_symfile): Register tests.
4315
4316 2017-10-27  Keith Seitz  <keiths@redhat.com>
4317
4318         * breakpoint.c (print_breakpoint_location): Use the symbol saved
4319         in the bp_location, falling back to find_pc_sect_function when
4320         needed.
4321         (add_location_to_breakpoint): Save sal->symbol.
4322         * breakpoint.h (struct bp_location) <symbol>: New field.
4323         * symtab.c (find_function_start_sal): Save the symbol into the SaL.
4324         * symtab.h (struct symtab_and_line) <symbol>: New field.
4325
4326 2017-10-26  Patrick Frants  <osscontribute@gmail.com>
4327
4328         PR gdb/13669
4329         * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
4330         to rewind obstack.
4331
4332 2017-10-26  Pedro Alves  <palves@redhat.com>
4333
4334         * remote.c (remote_async_terminal_ours_p): Delete.
4335         (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
4336         Remove references to 'remote_async_terminal_ours_p'.
4337
4338 2017-10-26  Yao Qi  <yao.qi@linaro.org>
4339
4340         * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
4341
4342 2017-10-26  Yao Qi  <yao.qi@linaro.org>
4343
4344         * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
4345         aspace const.
4346         * break-catch-syscall.c (breakpoint_hit_catch_syscall):
4347         Likewise.
4348         * breakpoint.c (bpstat_check_location): Remove cast.
4349         (breakpoint_hit_catch_fork): Make aspce const.
4350         (breakpoint_hit_catch_solib): Likewise.
4351         (breakpoint_hit_catch_exec): Likewise.
4352         (breakpoint_hit_ranged_breakpoint): Likewise.
4353         (breakpoint_hit_watchpoint): Likewise.
4354         (base_breakpoint_breakpoint_hit): Likewise.
4355         (bkpt_breakpoint_hit): Likewise.
4356         (dprintf_breakpoint_hit): Likewise.
4357         (tracepoint_breakpoint_hit): Likewise.
4358         * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
4359
4360 2017-10-26  Yao Qi  <yao.qi@linaro.org>
4361
4362         * breakpoint.c (breakpoint_location_address_match): Change
4363         "struct address_space *" to "const address_space".
4364         (breakpoint_location_address_range_overlap): Likewise.
4365         (breakpoint_here_p): Likewise.
4366         (breakpoint_in_range_p): Likewise.
4367         (moribund_breakpoint_here_p): Likewise.
4368         (bp_location_inserted_here_p): Likewise.
4369         (software_breakpoint_inserted_here_p): Likewise.
4370         (hardware_breakpoint_inserted_here_p): Likewise.
4371         (hardware_watchpoint_inserted_in_range): Likewise.
4372         (bpstat_check_location): Likewise.
4373         (bpstat_stop_status): Likewise.
4374         (breakpoint_address_match): Likewise.
4375         (breakpoint_address_match_range): Likewise.
4376         (breakpoint_location_address_match): Likewise.
4377         (breakpoint_location_address_range_overlap): Likewise.
4378         (insert_single_step_breakpoint): Likewise.
4379         (breakpoint_has_location_inserted_here): Likewise.
4380         (single_step_breakpoint_inserted_here_p): Likewise.
4381         (pc_at_non_inline_function): Likewise.
4382         * breakpoint.h (bpstat_stop_status): Update declaration.
4383         (breakpoint_here_p): Likewise.
4384         (breakpoint_in_range_p): Likewise.
4385         (moribund_breakpoint_here_p): Likewise.
4386         (breakpoint_inserted_here_p): Likewise.
4387         (software_breakpoint_inserted_here_p): Likewise.
4388         (hardware_breakpoint_inserted_here_p): Likewise.
4389         (breakpoint_has_location_inserted_here): Likewise.
4390         (single_step_breakpoint_inserted_here_p): Likewise.
4391         (hardware_watchpoint_inserted_in_range): Likewise.
4392         (breakpoint_address_match): Likewise.
4393         (insert_single_step_breakpoint): Likewise.
4394         (pc_at_non_inline_function): Likewise.
4395         * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
4396         * record.c (record_check_stopped_by_breakpoint): Likewise.
4397         * record.h (record_check_stopped_by_breakpoint): Likewise.
4398         * thread.c (thread_has_single_step_breakpoint_here): Likewise.
4399
4400 2017-10-25  Yao Qi  <yao.qi@linaro.org>
4401
4402         * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
4403         regcache->arch () instead get_regcache_arch.
4404         * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
4405         Likewise.
4406         (aarch64_fbsd_store_inferior_registers): Likewise.
4407         * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
4408         (store_gregs_to_thread): Likewise.
4409         (fetch_fpregs_from_thread): Likewise.
4410         (store_fpregs_to_thread): Likewise.
4411         * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
4412         (aarch64_store_return_value): Likewise.
4413         (aarch64_software_single_step): Likewise.
4414         * aix-thread.c (aix_thread_wait): Likewise.
4415         (supply_reg32): Likewise.
4416         (supply_sprs64): Likewise.
4417         (supply_sprs32): Likewise.
4418         (fill_gprs64): Likewise.
4419         (fill_gprs32): Likewise.
4420         (fill_sprs64): Likewise.
4421         (fill_sprs32): Likewise.
4422         (store_regs_user_thread): Likewise.
4423         (store_regs_kernel_thread): Likewise.
4424         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
4425         (alphabsd_store_inferior_registers): Likewise.
4426         * alpha-tdep.c (alpha_extract_return_value): Likewise.
4427         (alpha_store_return_value): Likewise.
4428         (alpha_deal_with_atomic_sequence): Likewise.
4429         (alpha_next_pc): Likewise.
4430         (alpha_software_single_step): Likewise.
4431         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
4432         (amd64bsd_store_inferior_registers): Likewise.
4433         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
4434         Likewise.
4435         (amd64_linux_store_inferior_registers): Likewise.
4436         * amd64-nat.c (amd64_supply_native_gregset): Likewise.
4437         (amd64_collect_native_gregset): Likewise.
4438         * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
4439         (amd64obsd_collect_uthread): Likewise.
4440         * amd64-tdep.c (amd64_supply_fpregset): Likewise.
4441         (amd64_collect_fpregset): Likewise.
4442         (amd64_supply_fxsave): Likewise.
4443         (amd64_supply_xsave): Likewise.
4444         (amd64_collect_fxsave): Likewise.
4445         (amd64_collect_xsave): Likewise.
4446         * arc-tdep.c (arc_write_pc): Likewise.
4447         * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
4448         * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
4449         (arm_fbsd_store_inferior_registers): Likewise.
4450         * arm-linux-nat.c (fetch_vfp_regs): Likewise.
4451         (store_vfp_regs): Likewise.
4452         (arm_linux_fetch_inferior_registers): Likewise.
4453         (arm_linux_store_inferior_registers): Likewise.
4454         * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
4455         (arm_linux_sigreturn_next_pc): Likewise.
4456         (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
4457         * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
4458         (fetch_register): Likewise.
4459         (store_register): Likewise.
4460         * arm-tdep.c (arm_is_thumb): Likewise.
4461         (displaced_in_arm_mode): Likewise.
4462         (bx_write_pc): Likewise.
4463         (arm_get_next_pcs_addr_bits_remove): Likewise.
4464         (arm_software_single_step): Likewise.
4465         (arm_extract_return_value): Likewise.
4466         (arm_store_return_value): Likewise.
4467         (arm_write_pc): Likewise.
4468         * bfin-tdep.c (bfin_extract_return_value): Likewise.
4469         * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
4470         (bsd_uthread_store_registers): Likewise.
4471         * core-regset.c (fetch_core_registers): Likewise.
4472         * corelow.c (get_core_registers): Likewise.
4473         * cris-tdep.c (cris_store_return_value): Likewise.
4474         (cris_extract_return_value): Likewise.
4475         (find_step_target): Likewise.
4476         (find_step_target): Likewise.
4477         (cris_software_single_step): Likewise.
4478         * ctf.c (ctf_fetch_registers): Likewise.
4479         * darwin-nat.c (cancel_breakpoint): Likewise.
4480         * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
4481         * frv-tdep.c (frv_extract_return_value): Likewise.
4482         * ft32-tdep.c (ft32_store_return_value): Likewise.
4483         (ft32_extract_return_value): Likewise.
4484         * go32-nat.c (fetch_register): Likewise.
4485         (go32_fetch_registers): Likewise.
4486         (go32_store_registers): Likewise.
4487         (store_register): Likewise.
4488         * h8300-tdep.c (h8300_extract_return_value): Likewise.
4489         (h8300_store_return_value): Likewise.
4490         * hppa-linux-nat.c (fetch_register): Likewise.
4491         (store_register): Likewise.
4492         (hppa_linux_fetch_inferior_registers): Likewise.
4493         (hppa_linux_store_inferior_registers): Likewise.
4494         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
4495         (i386_darwin_store_inferior_registers): Likewise.
4496         * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
4497         (gnu_store_registers): Likewise.
4498         * i386-linux-nat.c (fetch_register): Likewise.
4499         (store_register): Likewise.
4500         (supply_gregset): Likewise.
4501         (fill_gregset): Likewise.
4502         (i386_linux_fetch_inferior_registers): Likewise.
4503         (i386_linux_store_inferior_registers): Likewise.
4504         (i386_linux_resume): Likewise.
4505         * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
4506         Likewise.
4507         * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
4508         * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
4509         * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
4510         (i386obsd_collect_uthread): Likewise.
4511         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
4512         (i386_supply_gregset): Likewise.
4513         (i386_collect_gregset): Likewise.
4514         (i386_supply_fpregset): Likewise.
4515         (i386_collect_fpregset): Likewise.
4516         (i386_mpx_bd_base): Likewise.
4517         * i386-v4-nat.c (supply_fpregset): Likewise.
4518         (fill_fpregset): Likewise.
4519         * i387-tdep.c (i387_supply_fsave): Likewise.
4520         (i387_collect_fsave): Likewise.
4521         (i387_supply_fxsave): Likewise.
4522         (i387_collect_fxsave): Likewise.
4523         (i387_supply_xsave): Likewise.
4524         (i387_collect_xsave): Likewise.
4525         * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
4526         (ia64_linux_store_registers): Likewise.
4527         * ia64-tdep.c (ia64_access_rse_reg): Likewise.
4528         (ia64_extract_return_value): Likewise.
4529         (ia64_store_return_value): Likewise.
4530         (find_func_descr): Likewise.
4531         * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
4532         * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
4533         (inf_ptrace_store_registers): Likewise.
4534         * infrun.c (use_displaced_stepping): Likewise.
4535         (displaced_step_prepare_throw): Likewise.
4536         (resume): Likewise.
4537         (proceed): Likewise.
4538         (do_target_wait): Likewise.
4539         (adjust_pc_after_break): Likewise.
4540         (handle_inferior_event_1): Likewise.
4541         (handle_signal_stop): Likewise.
4542         (save_infcall_suspend_state): Likewise.
4543         (restore_infcall_suspend_state): Likewise.
4544         * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
4545         * jit.c (jit_frame_prev_register): Likewise.
4546         * linux-nat.c (save_stop_reason): Likewise.
4547         (linux_nat_wait_1): Likewise.
4548         (resume_stopped_resumed_lwps): Likewise.
4549         * linux-record.c (record_linux_sockaddr): Likewise.
4550         (record_linux_msghdr): Likewise.
4551         (record_linux_system_call): Likewise.
4552         * linux-tdep.c (linux_collect_thread_registers): Likewise.
4553         * lm32-tdep.c (lm32_extract_return_value): Likewise.
4554         (lm32_store_return_value): Likewise.
4555         * m32c-tdep.c (m32c_read_flg): Likewise.
4556         (m32c_pseudo_register_read): Likewise.
4557         (m32c_pseudo_register_write): Likewise.
4558         * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
4559         (m32r_linux_collect_gregset): Likewise.
4560         * m32r-tdep.c (m32r_store_return_value): Likewise.
4561         (m32r_extract_return_value): Likewise.
4562         * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
4563         (m68kbsd_collect_fpregset): Likewise.
4564         * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
4565         * m68k-linux-nat.c (fetch_register): Likewise.
4566         (old_fetch_inferior_registers): Likewise.
4567         (old_store_inferior_registers): Likewise.
4568         (store_regs): Likewise.
4569         * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
4570         (m68k_svr4_store_return_value): Likewise.
4571         * m88k-tdep.c (m88k_store_arguments): Likewise.
4572         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
4573         (mi_cmd_data_write_register_values): Likewise.
4574         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
4575         (mips_fbsd_store_inferior_registers): Likewise.
4576         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
4577         (mips_fbsd_supply_gregs): Likewise.
4578         (mips_fbsd_collect_fpregs): Likewise.
4579         (mips_fbsd_collect_gregs): Likewise.
4580         (mips_fbsd_supply_fpregset): Likewise.
4581         (mips_fbsd_collect_fpregset): Likewise.
4582         (mips_fbsd_supply_gregset): Likewise.
4583         (mips_fbsd_collect_gregset): Likewise.
4584         * mips-linux-nat.c (supply_gregset): Likewise.
4585         (fill_gregset): Likewise.
4586         (supply_fpregset): Likewise.
4587         (fill_fpregset): Likewise.
4588         * mips-linux-tdep.c (mips_supply_gregset): Likewise.
4589         (mips_fill_gregset): Likewise.
4590         (mips_supply_fpregset): Likewise.
4591         (mips_fill_fpregset): Likewise.
4592         (mips64_supply_gregset): Likewise.
4593         (micromips_linux_sigframe_validate): Likewise.
4594         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
4595         (mipsnbsd_fetch_inferior_registers): Likewise.
4596         (mipsnbsd_store_inferior_registers): Likewise.
4597         * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
4598         (mipsnbsd_supply_gregset): Likewise.
4599         (mipsnbsd_iterate_over_regset_sections): Likewise.
4600         (mipsnbsd_supply_reg): Likewise.
4601         (mipsnbsd_supply_fpreg): Likewise.
4602         * mips-tdep.c (mips_in_frame_stub): Likewise.
4603         (mips_dummy_id): Likewise.
4604         (is_octeon_bbit_op): Likewise.
4605         (micromips_bc1_pc): Likewise.
4606         (extended_mips16_next_pc): Likewise.
4607         (mips16_next_pc): Likewise.
4608         (deal_with_atomic_sequence): Likewise.
4609         * moxie-tdep.c (moxie_process_readu): Likewise.
4610         * nios2-tdep.c (nios2_get_next_pc): Likewise.
4611         * nto-procfs.c (procfs_store_registers): Likewise.
4612         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
4613         (ppcfbsd_store_inferior_registers): Likewise.
4614         * ppc-linux-nat.c (fetch_vsx_register): Likewise.
4615         (fetch_altivec_register): Likewise.
4616         (get_spe_registers): Likewise.
4617         (fetch_spe_register): Likewise.
4618         (fetch_altivec_registers): Likewise.
4619         (fetch_all_gp_regs): Likewise.
4620         (fetch_all_fp_regs): Likewise.
4621         (store_vsx_register): Likewise.
4622         (store_altivec_register): Likewise.
4623         (set_spe_registers): Likewise.
4624         (store_spe_register): Likewise.
4625         (store_altivec_registers): Likewise.
4626         (store_all_gp_regs): Likewise.
4627         (store_all_fp_regs): Likewise.
4628         * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
4629         (ppc_linux_collect_gregset): Likewise.
4630         (ppc_canonicalize_syscall): Likewise.
4631         (ppc_linux_record_signal): Likewise.
4632         (ppu2spu_prev_register): Likewise.
4633         * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
4634         * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
4635         (ppcobsd_store_registers): Likewise.
4636         * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
4637         Likewise.
4638         (ppc_ravenscar_generic_store_registers): Likewise.
4639         * procfs.c (procfs_fetch_registers): Likewise.
4640         (procfs_store_registers): Likewise.
4641         * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
4642         (ravenscar_store_registers): Likewise.
4643         (ravenscar_prepare_to_store): Likewise.
4644         * record-btrace.c (record_btrace_fetch_registers): Likewise.
4645         * record-full.c (record_full_wait_1): Likewise.
4646         (record_full_registers_change): Likewise.
4647         (record_full_store_registers): Likewise.
4648         (record_full_core_fetch_registers): Likewise.
4649         (record_full_save): Likewise.
4650         (record_full_goto_insn): Likewise.
4651         * regcache.c (regcache_register_size): Likewise.
4652         (get_regcache_arch): Remove.
4653         (regcache_read_pc): Likewise.
4654         * regcache.h (get_regcache_arch): Remove.
4655         * remote-sim.c (gdbsim_fetch_register): Likewise.
4656         (gdbsim_store_register): Likewise.
4657         * remote.c (fetch_register_using_p): Likewise.
4658         (send_g_packet): Likewise.
4659         (remote_prepare_to_store): Likewise.
4660         (store_registers_using_G): Likewise.
4661         * reverse.c (save_bookmark_command): Likewise.
4662         (goto_bookmark_command): Likewise.
4663         * rs6000-aix-tdep.c (branch_dest): Likewise.
4664         * rs6000-nat.c (rs6000_ptrace64): Likewise.
4665         (fetch_register): Likewise.
4666         * rs6000-tdep.c (ppc_supply_reg): Likewise.
4667         (ppc_collect_reg): Likewise.
4668         (ppc_collect_gregset): Likewise.
4669         (ppc_collect_fpregset): Likewise.
4670         (ppc_collect_vsxregset): Likewise.
4671         (ppc_collect_vrregset): Likewise.
4672         (ppc_displaced_step_hw_singlestep): Likewise.
4673         (rs6000_pseudo_register_read): Likewise.
4674         (rs6000_pseudo_register_write): Likewise.
4675         * s390-linux-nat.c (supply_gregset): Likewise.
4676         (fill_gregset): Likewise.
4677         (s390_linux_fetch_inferior_registers): Likewise.
4678         * s390-linux-tdep.c (s390_write_pc): Likewise.
4679         (s390_software_single_step): Likewise.
4680         (s390_all_but_pc_registers_record): Likewise.
4681         (s390_linux_syscall_record): Likewise.
4682         * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
4683         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
4684         (shnbsd_store_inferior_registers): Likewise.
4685         * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
4686         (sh_extract_return_value_fpu): Likewise.
4687         (sh_store_return_value_nofpu): Likewise.
4688         (sh_corefile_supply_regset): Likewise.
4689         (sh_corefile_collect_regset): Likewise.
4690         * sh64-tdep.c (sh64_extract_return_value): Likewise.
4691         (sh64_store_return_value): Likewise.
4692         * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
4693         * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
4694         (sparc_store_inferior_registers): Likewise.
4695         * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
4696         (sparc_ravenscar_prepare_to_store): Likewise.
4697         * sparc-tdep.c (sparc32_store_arguments): Likewise.
4698         (sparc_analyze_control_transfer): Likewise.
4699         (sparc_step_trap): Likewise.
4700         (sparc_software_single_step): Likewise.
4701         (sparc32_gdbarch_init): Likewise.
4702         (sparc_supply_rwindow): Likewise.
4703         (sparc_collect_rwindow): Likewise.
4704         * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
4705         * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
4706         (sparc64nbsd_collect_gregset): Likewise.
4707         (sparc64nbsd_supply_fpregset): Likewise.
4708         (sparc64nbsd_collect_fpregset): Likewise.
4709         * sparc64-tdep.c (sparc64_store_arguments): Likewise.
4710         (sparc64_supply_gregset): Likewise.
4711         (sparc64_collect_gregset): Likewise.
4712         (sparc64_supply_fpregset): Likewise.
4713         (sparc64_collect_fpregset): Likewise.
4714         * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
4715         * spu-tdep.c (spu_unwind_sp): Likewise.
4716         (spu2ppu_prev_register): Likewise.
4717         (spu_memory_remove_breakpoint): Likewise.
4718         * stack.c (return_command): Likewise.
4719         * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
4720         * tracefile-tfile.c (tfile_fetch_registers): Likewise.
4721         * tracefile.c (trace_save_ctf): Likewise.
4722         * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
4723         (do_windows_store_inferior_registers): Likewise.
4724         (windows_resume): Likewise.
4725         * xtensa-linux-nat.c (fill_gregset): Likewise.
4726         (supply_gregset_reg): Likewise.
4727         * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
4728         (xtensa_register_read_masked): Likewise.
4729         (xtensa_supply_gregset): Likewise.
4730         (xtensa_extract_return_value): Likewise.
4731         (xtensa_store_return_value): Likewise.
4732
4733 2017-10-25  Ulrich Weigand  <uweigand@de.ibm.com>
4734
4735         * doublest.c (floatformat_from_string): New function.
4736         * doublest.h (floatformat_from_string): Add prototype.
4737
4738         * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
4739         (OP_FLOAT): ... this.
4740         * expression.h: Do not include "doublest.h".
4741         (union exp_element): Replace doubleconst and decfloatconst by
4742         new element floatconst.
4743         * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
4744         (ada_evaluate_subexp): Likewise.
4745         * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
4746         OP_DOUBLE and OP_DECFLOAT.
4747         * expprint.c (print_subexp_standard): Likewise.
4748         (dump_subexp_body_standard): Likewise.
4749         * breakpoint.c (watchpoint_exp_is_const): Likewise.
4750
4751         * parse.c: Include "dfp.h".
4752         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
4753         (write_exp_elt_floatcst): New function.
4754         (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
4755         and OP_DECFLOAT.
4756         (operator_check_standard): Likewise.
4757         (parse_float): Do not accept suffix.  Take type as input.  Return bool.
4758         Return target format buffer instead of host DOUBLEST.
4759         Use floatformat_from_string and decimal_from_string to parse
4760         either binary or decimal floating-point types.
4761         (parse_c_float): Remove.
4762         * parser-defs.h: Do not include "doublest.h".
4763         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
4764         (write_exp_elt_floatcst): Add prototype.
4765         (parse_float): Update prototype.
4766         (parse_c_float): Remove.
4767
4768         * c-exp.y: Do not include "dfp.h".
4769         (typed_val_float): Use byte buffer instead of DOUBLEST.
4770         (typed_val_decfloat): Remove.
4771         (DECFLOAT): Remove.
4772         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4773         (parse_number): Update to new parse_float interface.
4774         Parse suffixes and determine type before calling parse_float.
4775         Handle decimal and binary FP types the same way.
4776
4777         * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
4778         (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
4779         (parse_number): Update to new parse_float interface.
4780         Parse suffixes and determine type before calling parse_float.
4781
4782         * f-exp.y: Replace dval by typed_val_float.
4783         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4784         (parse_number): Use parse_float instead of atof.
4785
4786         * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
4787         (parse_go_float): Remove.
4788         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4789         (parse_number): Call parse_float instead of parse_go_float.
4790         Parse suffixes and determine type before calling parse_float.
4791
4792         * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
4793         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4794         (parse_number): Update to new parse_float interface.
4795         Parse suffixes and determine type before calling parse_float.
4796
4797         * m2-exp.y: Replace dval by byte buffer val.
4798         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4799         (parse_number): Call parse_float instead of atof.
4800
4801         * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
4802         (lex_number): Call parse_float instead of strtod.
4803         (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
4804         (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
4805         Use write_exp_elt_floatcst.
4806         (unit_testing): Remove static variable.
4807         (rust_type): Do not check unit_testing.
4808         (rust_lex_tests): Do not set uint_testing.  Set up dummy rust_parser.
4809
4810         * ada-exp.y (type_float, type_double): Remove.
4811         (typed_val_float): Use byte buffer instead of DOUBLEST.
4812         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4813         * ada-lex.l (processReal): Use parse_float instead of sscanf.
4814
4815 2017-10-25  Alan Hayward  <alan.hayward@arm.com>
4816
4817         * aarch64-tdep.h (enum aarch64_regnum): Remove.
4818         * arch/aarch64.h: New file.
4819
4820 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
4821
4822         * dfp.h (decimal_from_string): Use const reference for argument.
4823         * dfp.c (decimal_from_string): Likewise.
4824
4825 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
4826
4827         * i387-tdep.c (print_i387_value): Use floatformat_to_string.
4828         * sh64-tdep.c (sh64_do_fp_register): Likewise.
4829         * mips-tdep.c (mips_print_fp_register): Likewise.
4830
4831 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
4832
4833         * common/format.h (enum argclass): Replace decfloat_arg by
4834         dec32float_arg, dec64float_arg, and dec128float_arg.
4835         * common/format.c (parse_format_string): Update to return
4836         new decimal float argument classes.
4837
4838         * printcmd.c (printf_decfloat): Rename to ...
4839         (printf_floating): ... this.  Add argclass argument, and use it
4840         instead of parsing the format string again.  Add support for
4841         binary floating-point values, using floatformat_to_string.
4842         Convert value to the target format if it doesn't already match.
4843         (ui_printf): Call printf_floating instead of printf_decfloat,
4844         also for double_arg / long_double_arg.  Pass argclass.
4845
4846         * dfp.c (decimal_to_string): Add format string argument.
4847         * dfp.h (decimal_to_string): Likewise.
4848
4849         * doublest.c (floatformat_to_string): Add format string argument.
4850         * doublest.h (floatformat_to_string): Likewise.
4851
4852 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
4853
4854         * doublest.c (floatformat_precision): New routine.
4855         (floatformat_to_string): Likewise.
4856         * doublest.c (floatformat_to_string): Add prototype.
4857
4858         * printcmd.c (print_scalar_formatted): Only call print_floating
4859         on floating-point types.
4860         * valprint.c: Do not include "floatformat.h".
4861         (generic_val_print_decfloat): Remove.
4862         (generic_val_print): Call generic_val_print_float for both
4863         TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
4864         (print_floating): Use floatformat_to_string.  Handle decimal float.
4865         (print_decimal_floating): Remove, merge into floatformat_to_string.
4866         * value.h (print_decimal_floating): Remove.
4867
4868         * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
4869
4870 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
4871
4872         * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
4873
4874 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
4875
4876         * memattr.h: Don't include vec.h.
4877         (struct mem_attrib): Initialize fields.
4878         <unknown>: New static method.
4879         (struct mem_region): Add constructors, operator<, initialize
4880         fields.
4881         * memattr.c: Include algorithm.
4882         (default_mem_attrib, unknown_mem_attrib): Remove.
4883         (user_mem_region_list): New global.
4884         (target_mem_region_list, mem_region_list): Change type to
4885         std::vector<mem_region>.
4886         (mem_use_target): Now a function.
4887         (target_mem_regions_valid): Change type to bool.
4888         (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
4889         (require_user_regions): Adjust.
4890         (require_target_regions): Adjust.
4891         (create_mem_region): Adjust.
4892         (lookup_mem_region): Adjust.
4893         (invalidate_target_mem_regions): Adjust.
4894         (mem_clear): Rename to...
4895         (user_mem_clear): ... this, and adjust.
4896         (mem_command): Adjust.
4897         (info_mem_command): Adjust.
4898         (mem_enable, enable_mem_command, mem_disable,
4899         disable_mem_command): Adjust.
4900         (mem_delete): Adjust.
4901         (delete_mem_command): Adjust.
4902         * memory-map.h (parse_memory_map): Return an std::vector.
4903         * memory-map.c (parse_memory_map): Likewise.
4904         (struct memory_map_parsing_data): Add constructor.
4905         <memory_map>: Point to std::vector.
4906         (memory_map_start_memory): Adjust.
4907         (memory_map_end_memory): Adjust.
4908         (memory_map_end_property): Adjust.
4909         (clear_result): Remove.
4910         * remote.c (remote_memory_map): Return an std::vector.
4911         * target-debug.h (target_debug_print_VEC_mem_region_s__p):
4912         Remove.
4913         (target_debug_print_mem_region_vector): New.
4914         * target-delegates.c: Regenerate.
4915         * target.h (mem_region_vector): New typedef.
4916         (to_memory_map): Return mem_region_vector.
4917         (target_memory_map): Return an std::vector.
4918         * target.c (target_memory_map): Return an std::vector.
4919         (flash_erase_command): Adjust.
4920
4921 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
4922
4923         * memory-map.c (struct memory_map_parsing_data) <property_name>:
4924         Change type to std::string.
4925         (memory_map_start_property): Adjust.
4926         (memory_map_end_property): Adjust.
4927
4928 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
4929
4930         * infrun.h: Include common/byte-vector.h.
4931         (struct displaced_step_closure): New struct.
4932         (struct buf_displaced_step_closure): New struct.
4933         * infrun.c (displaced_step_closure::~displaced_step_closure):
4934         Provide default implementation.
4935         (displaced_step_clear): Deallocate step closure with delete.
4936         * aarch64-tdep.c (displaced_step_closure): Rename to ...
4937         (aarch64_displaced_step_closure): ... this, extend
4938         displaced_step_closure.
4939         (aarch64_displaced_step_data) <dsc>: Change type to
4940         aarch64_displaced_step_closure.
4941         (aarch64_displaced_step_copy_insn): Adjust to type change, use
4942         unique_ptr.
4943         (aarch64_displaced_step_fixup): Add cast for displaced step
4944         closure.
4945         * amd64-tdep.c (displaced_step_closure): Rename to ...
4946         (amd64_displaced_step_closure): ... this, extend
4947         displaced_step_closure.
4948         <insn_buf>: Change type to std::vector<gdb_byte>.
4949         <max_len>: Remove.
4950         (fixup_riprel): Change type of DSC parameter, adjust to type
4951         change of insn_buf.
4952         (fixup_displaced_copy): Change type of DSC parameter.
4953         (amd64_displaced_step_copy_insn): Instantiate
4954         amd64_displaced_step_closure.
4955         (amd64_displaced_step_fixup): Add cast for closure type, adjust
4956         to type change of insn_buf.
4957         * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
4958         parameter DSC.
4959         (arm_linux_copy_svc): Likewise.
4960         (cleanup_kernel_helper_return): Likewise.
4961         (arm_catch_kernel_helper_return): Likewise.
4962         (arm_linux_displaced_step_copy_insn): Instantiate
4963         arm_displaced_step_closure.
4964         * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
4965         (displaced_read_reg): Change type of parameter DSC.
4966         (branch_write_pc): Likewise.
4967         (load_write_pc): Likewise.
4968         (alu_write_pc): Likewise.
4969         (displaced_write_reg): Likewise.
4970         (arm_copy_unmodified): Likewise.
4971         (thumb_copy_unmodified_32bit): Likewise.
4972         (thumb_copy_unmodified_16bit): Likewise.
4973         (cleanup_preload): Likewise.
4974         (install_preload): Likewise.
4975         (arm_copy_preload): Likewise.
4976         (thumb2_copy_preload): Likewise.
4977         (install_preload_reg): Likewise.
4978         (arm_copy_preload_reg): Likewise.
4979         (cleanup_copro_load_store): Likewise.
4980         (install_copro_load_store): Likewise.
4981         (arm_copy_copro_load_store) Likewise.
4982         (thumb2_copy_copro_load_store): Likewise.
4983         (cleanup_branch): Likewise.
4984         (install_b_bl_blx): Likewise.
4985         (arm_copy_b_bl_blx): Likewise.
4986         (thumb2_copy_b_bl_blx): Likewise.
4987         (thumb_copy_b): Likewise.
4988         (install_bx_blx_reg): Likewise.
4989         (arm_copy_bx_blx_reg): Likewise.
4990         (thumb_copy_bx_blx_reg): Likewise.
4991         (cleanup_alu_imm): Likewise.
4992         (arm_copy_alu_imm): Likewise.
4993         (thumb2_copy_alu_imm): Likewise.
4994         (cleanup_alu_reg): Likewise.
4995         (install_alu_reg): Likewise.
4996         (arm_copy_alu_reg): Likewise.
4997         (thumb_copy_alu_reg): Likewise.
4998         (cleanup_alu_shifted_reg): Likewise.
4999         (install_alu_shifted_reg): Likewise.
5000         (arm_copy_alu_shifted_reg): Likewise.
5001         (cleanup_load): Likewise.
5002         (cleanup_store): Likewise.
5003         (arm_copy_extra_ld_st): Likewise.
5004         (install_load_store): Likewise.
5005         (thumb2_copy_load_literal): Likewise.
5006         (thumb2_copy_load_reg_imm): Likewise.
5007         (arm_copy_ldr_str_ldrb_strb): Likewise.
5008         (cleanup_block_load_all): Likewise.
5009         (cleanup_block_store_pc): Likewise.
5010         (cleanup_block_load_pc): Likewise.
5011         (arm_copy_block_xfer): Likewise.
5012         (thumb2_copy_block_xfer): Likewise.
5013         (cleanup_svc): Likewise.
5014         (install_svc): Likewise.
5015         (arm_copy_svc): Likewise.
5016         (thumb_copy_svc): Likewise.
5017         (arm_copy_undef): Likewise.
5018         (thumb_32bit_copy_undef): Likewise.
5019         (arm_copy_unpred): Likewise.
5020         (arm_decode_misc_memhint_neon): Likewise.
5021         (arm_decode_unconditional): Likewise.
5022         (arm_decode_miscellaneous): Likewise.
5023         (arm_decode_dp_misc): Likewise.
5024         (arm_decode_ld_st_word_ubyte): Likewise.
5025         (arm_decode_media): Likewise.
5026         (arm_decode_b_bl_ldmstm): Likewise.
5027         (arm_decode_ext_reg_ld_st): Likewise.
5028         (thumb2_decode_dp_shift_reg): Likewise.
5029         (thumb2_decode_ext_reg_ld_st): Likewise.
5030         (arm_decode_svc_copro): Likewise.
5031         (thumb2_decode_svc_copro): Likewise.
5032         (install_pc_relative): Likewise.
5033         (thumb_copy_pc_relative_16bit): Likewise.
5034         (thumb_decode_pc_relative_16bit): Likewise.
5035         (thumb_copy_pc_relative_32bit): Likewise.
5036         (thumb_copy_16bit_ldr_literal): Likewise.
5037         (thumb_copy_cbnz_cbz): Likewise.
5038         (thumb2_copy_table_branch): Likewise.
5039         (cleanup_pop_pc_16bit_all): Likewise.
5040         (thumb_copy_pop_pc_16bit): Likewise.
5041         (thumb_process_displaced_16bit_insn): Likewise.
5042         (decode_thumb_32bit_ld_mem_hints): Likewise.
5043         (thumb_process_displaced_32bit_insn): Likewise.
5044         (thumb_process_displaced_insn): Likewise.
5045         (arm_process_displaced_insn): Likewise.
5046         (arm_displaced_init_closure): Likewise.
5047         (arm_displaced_step_fixup): Add cast for closure.
5048         * arm-tdep.h: Include infrun.h.
5049         (displaced_step_closure): Rename to ...
5050         (arm_displaced_step_closure): ... this, extend
5051         displaced_step_closure.
5052         <u::svc::copy_svc_os>: Change type of parameter DSC.
5053         <cleanup>: Likewise.
5054         (arm_process_displaced_insn): Likewise.
5055         (arm_displaced_init_closure): Likewise.
5056         (displaced_read_reg): Likewise.
5057         (displaced_write_reg): Likewise.
5058         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
5059         Adjust.
5060         * i386-tdep.h: Include infrun.h.
5061         (i386_displaced_step_closure): New typedef.
5062         * i386-tdep.c (i386_displaced_step_copy_insn): Use
5063         i386_displaced_step_closure.
5064         (i386_displaced_step_fixup): Adjust.
5065         * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
5066         (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
5067         and unique_ptr.
5068         (ppc_displaced_step_fixup): Adjust.
5069         * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
5070         (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
5071         and unique_ptr.
5072         (s390_displaced_step_fixup): Adjust.
5073
5074 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
5075
5076         * interps.h (interp_resume, interp_suspend, interp_set_temp):
5077         Remove declarations.
5078
5079 2017-10-20  Tom Tromey  <tom@tromey.com>
5080
5081         * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
5082         std::vector.
5083         (gdb_bfd_record_inclusion): Update.
5084         (bfdp): Remove typedef.
5085
5086 2017-10-20  Tom Tromey  <tom@tromey.com>
5087
5088         * gdb_bfd.c (gdb_bfd_ref): Use new.
5089         (struct gdb_bfd_data): Add constructor, destructor, and member
5090         initializers.
5091         (gdb_bfd_unref): Use delete.
5092
5093 2017-10-20  Tom Tromey  <tom@tromey.com>
5094
5095         * exec.c (exec_file_attach): Use new_bfd_ref.
5096         * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
5097         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
5098         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
5099         new_bfd_ref.
5100         * gdb_bfd.h (new_bfd_ref): New function.
5101
5102 2017-10-20  Pedro Alves  <palves@redhat.com>
5103
5104         * main.c (captured_command_loop): Add attribute noinline.
5105
5106 2017-10-19  Simon Marchi  <simon.marchi@ericsson.com>
5107
5108         * interps.c (struct interp_factory): Add constructor.
5109         (interp_factory_p): Remove typedef.
5110         (DEF_VEC_P(interp_factory_p)): Remove.
5111         (interpreter_factories): Change type to std::vector.
5112         (interp_factory_register): Adjust.
5113         (interp_lookup): Adjust.
5114         (interpreter_completer): Adjust.
5115
5116 2017-10-19  Tom Tromey  <tom@tromey.com>
5117
5118         * break-catch-syscall.c (catch_syscall_completer): Use
5119         std::string, gdb::unique_xmalloc_ptr.
5120
5121 2017-10-19  Tom Tromey  <tom@tromey.com>
5122
5123         * infcall.c (call_function_by_hand_dummy): Use std::string.
5124
5125 2017-10-19  Tom Tromey  <tom@tromey.com>
5126
5127         * mi/mi-main.c (mi_cmd_execute): Update.
5128         * top.h (prepare_execute_command): Return scoped_value_mark.
5129         * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
5130         Add move constructor.
5131         * top.c (prepare_execute_command): Return scoped_value_mark.
5132         (execute_command): Update.
5133
5134 2017-10-19  Pedro Alves  <palves@redhat.com>
5135
5136         * xml-support.c (xml_fetch_content_from_file): Check fread's
5137         return.
5138
5139 2017-10-19  Pedro Alves  <palves@redhat.com>
5140
5141         * ser-base.c (ser_base_read_error_fd): Delete the file handler if
5142         async.
5143         (handle_error_fd): New function.
5144         (ser_base_async): Add/delete an event loop file handler for
5145         error_fd.
5146
5147 2017-10-19  Pedro Alves  <palves@redhat.com>
5148
5149         * xml-support.c (xml_fetch_content_from_file): Don't read in
5150         chunks.  Instead use fseek to determine the file's size, and read
5151         it in one go.
5152
5153 2017-11-18  Keith Seitz  <keiths@redhat.com>
5154
5155         * c-exp.y (oper): Canonicalize conversion operators of user-defined
5156         types.
5157         Add whitespace to front of type name.
5158
5159 2017-10-18  Keith Seitz  <keiths@redhat.com>
5160
5161         * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
5162         DW_AT_accessibility.
5163
5164 2017-10-18  Yao Qi  <yao.qi@linaro.org>
5165
5166         * features/tic6x-c62x-linux.c: Remove.
5167
5168 2017-10-17  Tom Tromey  <tom@tromey.com>
5169
5170         * disasm.c (do_mixed_source_and_assembly_deprecated): Use
5171         gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
5172         (do_mixed_source_and_assembly): Likewise.
5173
5174 2017-10-17  Tom Tromey  <tom@tromey.com>
5175
5176         * regcache.c (regcache::xfer_part): Remove assertion.
5177
5178 2017-10-17  Pedro Alves  <palves@redhat.com>
5179
5180         * xml-support.c (xml_fetch_content_from_file): Call
5181         unique_ptr::release() instead unique_ptr::get() when passing
5182         through xrealloc.
5183
5184 2017-10-17  Yao Qi  <yao.qi@linaro.org>
5185
5186         * regcache.c (regcache::xfer_part): Remove parameters read and
5187         write, add parameter is_raw.  All callers are updated.
5188
5189 2017-10-16  Keith Seitz  <keiths@redhat.com>
5190
5191         * c-typeprint.c (enum access_specifier): Moved here from
5192         c_type_print_base.
5193         (output_access_specifier): New function.
5194         (c_type_print_base): Consider typedefs when assessing
5195         whether access labels are needed.
5196         Use output_access_specifier as needed.
5197         Output access specifier for typedefs, if needed.
5198         * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
5199         * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
5200         fields.
5201         (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
5202         accessor macros.
5203
5204 2017-10-16  Tom Tromey  <tom@tromey.com>
5205
5206         * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
5207         (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
5208         * target.c (target_fileio_read_stralloc): Update.
5209         * sparc64-tdep.c (adi_is_addr_mapped): Update.
5210         * target.h (target_fileio_read_stralloc): Return
5211         unique_xmalloc_ptr.
5212
5213 2017-10-16  Tom Tromey  <tom@tromey.com>
5214
5215         * xml-syscall.c (xml_init_syscalls_info): Update.
5216         * xml-support.c (xinclude_start_include): Update.
5217         (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
5218         * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
5219         (xml_fetch_content_from_file): Likewise.
5220         * osdata.c (get_osdata): Update.
5221         * target.h (target_read_stralloc, target_get_osdata): Return
5222         unique_xmalloc_ptr.
5223         * solib-aix.c (solib_aix_get_library_list): Update.
5224         * solib-target.c (solib_target_current_sos): Update.
5225         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
5226         * xml-tdesc.c (fetch_available_features_from_target): Update.
5227         (target_fetch_description_xml): Update.
5228         (file_read_description_xml): Update.
5229         * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
5230         (remote_traceframe_info, btrace_read_config, remote_read_btrace)
5231         (remote_pid_to_exec_file): Update.
5232         * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
5233         (target_get_osdata): Likewise.
5234
5235 2017-10-16  Tom Tromey  <tom@tromey.com>
5236
5237         * remote.c (remote_register_number_and_offset): Use std::vector.
5238         (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
5239         (putpkt_binary): Use gdb::def_vector.
5240         (compare_sections_command): Use gdb::byte_vector.
5241
5242 2017-10-16  Tom Tromey  <tom@tromey.com>
5243
5244         * ppc-linux-nat.c (hwdebug_insert_point): Use
5245         gdb::unique_xmalloc_ptr, XDUP.
5246
5247 2017-10-16  Tom Tromey  <tom@tromey.com>
5248
5249         * probe.c (parse_probes): Use std::string.
5250         (info_probes_for_ops, enable_probes_command)
5251         (disable_probes_command): Remove cleanups.
5252
5253 2017-10-16  Tom Tromey  <tom@tromey.com>
5254
5255         * buildsym.c (block_compar): Remove.
5256         (end_symtab_get_static_block): Use std::vector.
5257
5258 2017-10-16  Simon Marchi  <simon.marchi@ericsson.com>
5259
5260         * memrange.h (struct mem_range): Define operator< and operator==.
5261         (mem_range_s): Remove.
5262         (DEF_VEC_O (mem_range_s)): Remove.
5263         (normalize_mem_ranges): Change parameter type to std::vector.
5264         * memrange.c (compare_mem_ranges): Remove.
5265         (normalize_mem_ranges): Change parameter type to std::vector,
5266         adjust to vector change.
5267         * exec.c (section_table_available_memory): Return vector, remove
5268         parameter.
5269         (section_table_read_available_memory): Adjust to std::vector
5270         change.
5271         * remote.c (remote_read_bytes): Adjust to std::vector
5272         change.
5273         * tracepoint.h (traceframe_available_memory): Change parameter
5274         type to std::vector.
5275         * tracepoint.c (traceframe_available_memory): Change parameter
5276         type to std::vector, adjust.
5277         * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
5278         std::vector change.
5279         * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5280         unittests/memrange-selftests.c.
5281         (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
5282         * gdb/unittests/memrange-selftests.c: New file.
5283
5284 2017-10-16  Pedro Alves  <palves@redhat.com>
5285
5286         * elfread.c (probe_key_free): Rename range-for variable.
5287         * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
5288         (find_probe_by_pc, collect_probes): Rename range-for variable.
5289
5290 2017-10-16  Yao Qi  <yao.qi@linaro.org>
5291
5292         * features/Makefile (XMLTOC): Remove tic6x-*.xml.
5293         * features/tic6x-c62x.c: Remove.
5294         * features/tic6x-c64x-linux.c: Remove.
5295         * features/tic6x-c64x.c: Remove.
5296         * features/tic6x-c64xp-linux.c: Remove.
5297         * features/tic6x-c64xp.c: Remove.
5298         * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
5299         initialize_tdesc_tic6x_*_linux functions.
5300         * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
5301         initialize_tdesc_tic6x_* functions.
5302
5303 2017-10-16  Yao Qi  <yao.qi@linaro.org>
5304
5305         * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
5306         tic6x-c62x.
5307         * regformats/tic6x-c62x.dat: Remove.
5308         * regformats/tic6x-c64x.dat: Remove.
5309         * regformats/tic6x-c64xp.dat: Remove.
5310
5311 2017-10-15  Simon Marchi  <simon.marchi@ericsson.com>
5312
5313         * tracepoint.c (parse_traceframe_info): Return a unique_ptr
5314         (the !HAVE_LIBEXPAT version).
5315
5316 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
5317
5318         * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
5319         const.
5320
5321 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
5322
5323         * target.h: Include tracepoint.h.
5324         (enum trace_find_type): Move to tracepoint.h.
5325         (struct target_ops) <to_traceframe_info>: Return a unique ptr.
5326         * tracepoint.h: Don't include target.h
5327         (enum trace_find_type): Move from target.h.
5328         (parse_traceframe_info): Return a unique ptr.
5329         * tracepoint.c (current_traceframe_info): Change type to unique
5330         ptr.
5331         (free_traceframe_info): Remove.
5332         (clear_traceframe_info): Don't manually free
5333         current_traceframe_info.
5334         (free_result): Remove.
5335         (parse_traceframe_info): Return a unique ptr.
5336         (get_traceframe_info): Adjust to unique ptr.
5337         * ctf.c (ctf_traceframe_info): Return a unique ptr.
5338         * remote.c (remote_traceframe_info): Return a unique ptr.
5339         * tracefile-tfile.c (tfile_traceframe_info): Return a unique
5340         ptr.
5341         * target-debug.h (target_debug_print_traceframe_info_up): New
5342         macro.
5343         * target-delegates.c: Regenerate.
5344
5345 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
5346
5347         * memrange.h (struct mem_range): Add constructors.
5348         * tracepoint.h (struct traceframe_info) <memory>: Change type to
5349         std::vector<mem_range>.
5350         * tracepoint.c (free_traceframe_info): Don't manually free
5351         vector.
5352         (traceframe_info_start_memory): Adjust to vector change.
5353         (traceframe_available_memory): Likewise.
5354         * tracefile-tfile.c (build_traceframe_info): Likewise.
5355         * ctf.c (ctf_traceframe_info): Likewise.
5356
5357 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
5358
5359         * tracepoint.h (struct traceframe_info) <tvars>: Change type to
5360         std::vector<int>.
5361         * tracepoint.c (free_traceframe_info): Deallocate with delete.
5362         (traceframe_info_start_tvar): Adjust to vector change.
5363         (parse_traceframe_info): Allocate with new.
5364         * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
5365         vector change.
5366         * tracefile-tfile.c (build_traceframe_info): Adjust to vector
5367         change.
5368         tfile_traceframe_info): Allocate with new.
5369         * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
5370         change.
5371
5372 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
5373
5374         * tracepoint.c (traceframe_info): Rename to...
5375         (current_traceframe_info): ...this.
5376         (clear_traceframe_info): Adjust.
5377         (get_traceframe_info): Adjust.
5378
5379 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
5380
5381         * nat/linux-osdata.c: Include algorithm.
5382         (compare_processes): Remove.
5383         (struct pid_pgid_entry): New struct.
5384         (linux_xfer_osdata_processgroups): Use std::vector instead of
5385         XNEWVEC.
5386
5387 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
5388
5389         * objfiles.h: Don't include symfile.h.
5390         (struct partial_symbol): Remove forward-declaration.
5391         (struct objfile) <global_psymbols, static_psymbols>: Change type
5392         to std::vector<partial_symbol *>.
5393         * objfiles.c (objfile::objfile): Don't memset those fields.
5394         (objfile::~objfile): Don't free those fields.
5395         * psympriv.h (struct psymbol_allocation_list): Remove
5396         forward-declaration.
5397         (add_psymbol_to_list): Change psymbol_allocation_list parameter
5398         to std::vector.
5399         (start_psymtab_common): Change parameters to std::vector.
5400         * psymtab.c: Include algorithm.
5401         (require_partial_symbols): Call shrink_to_fit.
5402         (find_pc_sect_psymbol): Adjust to vector change.
5403         (match_partial_symbol): Likewise.
5404         (lookup_partial_symbol): Likewise.
5405         (psym_relocate): Likewise.
5406         (dump_psymtab): Likewise.
5407         (recursively_search_psymtabs): Likewise.
5408         (compare_psymbols): Remove.
5409         (sort_pst_symbols): Adjust to vector change.
5410         (start_psymtab_common): Likewise.
5411         (end_psymtab_common): Likewise.
5412         (psymbol_bcache_full): De-constify return value.
5413         (add_psymbol_to_bcache): Likewise.
5414         (extend_psymbol_list): Remove.
5415         (append_psymbol_to_list): Adjust to vector change.
5416         (add_psymbol_to_list): Likewise.
5417         (init_psymbol_list): Likewise.
5418         (maintenance_info_psymtabs): Likewise.
5419         (maintenance_check_psymtabs): Likewise.
5420         * symfile.h (struct psymbol_allocation_list): Remove.
5421         * symfile.c (reread_symbols): Adjust to vector change.
5422         * dbxread.c (start_psymtab): Change type of parameters.
5423         (dbx_symfile_read): Adjust to vector change.
5424         (read_dbx_symtab): Likewise.
5425         (start_psymtab): Change type of parameters.
5426         * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
5427         (create_partial_symtab): Likewise.
5428         (add_partial_symbol): Likewise.
5429         (write_one_signatured_type): Likewise.
5430         (recursively_write_psymbols): Likewise.
5431         * mdebugread.c (parse_partial_symbols): Likewise.
5432         * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
5433         (scan_xcoff_symtab): Adjust to vector change.
5434         (xcoff_initial_scan): Likewise.
5435
5436 2017-10-13  Simon Marchi  <simon.marchi@ericsson.com>
5437
5438         * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
5439
5440 2017-10-13  Yao Qi  <yao.qi@linaro.org>
5441
5442         * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
5443         Remove s390x-*-expedite, add s390x-expedite.
5444
5445 2017-10-13  Yao Qi  <yao.qi@linaro.org>
5446
5447         * features/s390-gs-linux64.c: Regenerated.
5448         * features/s390x-gs-linux64.c: Regenerated.
5449
5450 2017-10-13  Tom Tromey  <tom@tromey.com>
5451
5452         * compile/compile-object-run.c (do_module_cleanup): Use delete.
5453         * solib.c (update_solib_list, reload_shared_libraries_1): Use
5454         delete.
5455         * symfile.c (symbol_file_add_with_addrs): Use new.
5456         (symbol_file_add_separate): Update comment.
5457         (syms_from_objfile_1, remove_symbol_file_command): Use delete.
5458         * jit.c (jit_object_close_impl): Use new.
5459         (jit_unregister_code): Use delete.
5460         * objfiles.c (objfile::objfile): Rename from allocate_objfile.
5461         (~objfile): Rename from free_objfile.
5462         (free_objfile_separate_debug, do_free_objfile_cleanup)
5463         (free_all_objfiles, objfile_purge_solibs): Use delete.
5464         * objfiles.h (struct objfile): Add constructor and destructor.
5465         Use DISABLE_COPY_AND_ASSIGN.  Add initializers to data members.
5466         (allocate_objfile, free_objfile): Don't declare.
5467         (struct objstats): Add initializers.
5468
5469 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
5470
5471         * arch-utils.h (simple_displaced_step_copy_insn): Remove.
5472         * arch-utils.c (simple_displaced_step_copy_insn): Remove.
5473         * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
5474         * gdbarch.h: Regenerate.
5475         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
5476         Adjust comment.
5477         * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
5478         (i386_displaced_step_fixup): Adjust comment.
5479         * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
5480
5481 2017-10-12  Tom Tromey  <tom@tromey.com>
5482
5483         * prologue-value.h (pv_area::store_would_trash): Return bool.
5484         (pv_area::find_reg): Likewise.
5485         * prologue-value.c (pv_area::store_would_trash): Return bool.
5486         (pv_area::find_reg): Likewise.
5487
5488 2017-10-12  Tom Tromey  <tom@tromey.com>
5489
5490         * s390-linux-tdep.c (s390_store, s390_load)
5491         (s390_check_for_saved, s390_analyze_prologue): Update.
5492         * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
5493         * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
5494         * prologue-value.h (class pv_area): Move from prologue-value.c.
5495         Change names of members.  Add constructor, destructor, member
5496         functions.
5497         (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
5498         (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
5499         (pv_area_fetch, pv_area_scan): Don't declare.
5500         * prologue-value.c (struct pv_area::area_entry): Now member of
5501         pv_area.
5502         (struct pv_area): Move to prologue-value.h.
5503         (pv_area::pv_area): Rename from make_pv_area.
5504         (pv_area::~pv_area): Rename from free_pv_area.
5505         (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
5506         (clear_entries, find_entry, overlaps, store_would_trash, store)
5507         (fetch, find_reg, scan): Now member of pv_area.
5508         Remove "area" argument.  Update.
5509         * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
5510         Update.
5511         * mn10300-tdep.c (push_reg, check_for_saved)
5512         (mn10300_analyze_prologue): Update.
5513         * mep-tdep.c (is_arg_spill, check_for_saved)
5514         (mep_analyze_prologue): Update.
5515         * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
5516         (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
5517         (m32c_is_struct_return, m32c_analyze_prologue): Update.
5518         * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
5519         Update.
5520         * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
5521         * aarch64-tdep.c (aarch64_analyze_prologue): Update.
5522
5523 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
5524
5525         * linux-nat.h (linux_nat_set_delete_thread): New declaration.
5526         * linux-nat.c (linux_nat_delete_thread): New variable.
5527         (lwp_free): Invoke linux_nat_delete_thread if set.
5528         (linux_nat_set_delete_thread): New function.
5529         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
5530         thread delete callback.
5531         * arm-linux-nat.c (arm_linux_delete_thread): New function.
5532         (_initialize_arm_linux_nat): Assign thread delete callback.
5533         * s390-linux-nat.c (s390_delete_thread): New function.
5534         (_initialize_s390_nat): Assign thread delete callback.
5535         * x86-linux-nat.c (x86_linux_add_target): Likewise.
5536         * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
5537         function.
5538         * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
5539         declaration.
5540         * nat/x86-linux.c (x86_linux_delete_thread): New function.
5541         * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
5542
5543 2017-10-09  Tom Tromey  <tom@tromey.com>
5544
5545         * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
5546         std::string.
5547         * tui/tui-layout.c (enum tui_status): Use std::string.
5548
5549 2017-10-11  Tom Tromey  <tom@tromey.com>
5550
5551         * gdbthread.h (thread_command): Constify.
5552         * inferior.h (detach_command): Constify.
5553         * top.h (set_history, show_history): Constify.
5554         * arm-tdep.c (set_arm_command, show_arm_command): Constify.
5555         * serial.c (serial_set_cmd, serial_show_cmd): Constify.
5556         * bsd-kvm.c (bsd_kvm_cmd): Constify.
5557         * printcmd.c (set_command): Constify.
5558         (non_const_set_command): New function.
5559         * dcache.c (set_dcache_command, show_dcache_command): Constify.
5560         * breakpoint.c (enable_command, disable_command, delete_command)
5561         (catch_command, tcatch_command, set_breakpoint_cmd)
5562         (show_breakpoint_cmd): Constify.
5563         * macrocmd.c (macro_command): Constify.
5564         * infcmd.c (unset_command, kill_command, detach_command)
5565         (info_proc_cmd): Constify.
5566         * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
5567         * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
5568         (info_auto_load_cmd): Constify.
5569         * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
5570         (unset_tdesc_cmd): Constify.
5571         * ada-lang.c (set_ada_command, show_ada_command)
5572         (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
5573         * guile/guile.c (set_guile_command, show_guile_command)
5574         (info_guile_command): Constify.
5575         * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
5576         Constify.
5577         * skip.c (skip_command): Constify.
5578         * compile/compile.c (_initialize_compile): Constify.
5579         * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
5580         * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
5581         (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
5582         (maint_btrace_pt_show_cmd): Constify.
5583         * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
5584         Constify.
5585         * python/python.c (user_show_python, user_set_python): Constify.
5586         * mips-tdep.c (set_mips_command, show_mips_command)
5587         (set_mipsfpu_command): Constify.
5588         * record-btrace.c (cmd_record_btrace_start)
5589         (cmd_set_record_btrace, cmd_show_record_btrace)
5590         (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
5591         (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
5592         * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
5593         Constify.
5594         * symfile.c (overlay_command): Constify.
5595         * spu-tdep.c (set_spu_command, show_spu_command): Constify.
5596         * cli/cli-logging.c (set_logging_command, show_logging_command):
5597         Constify.
5598         * cli/cli-dump.c (dump_command, append_command)
5599         (srec_dump_command, ihex_dump_command, verilog_dump_command)
5600         (tekhex_dump_command, binary_dump_command)
5601         (binary_append_command): Constify.
5602         * cli/cli-decode.c (struct cmd_list_element): Change type of
5603         "fun".
5604         * cli/cli-cmds.c (info_command, show_command, set_debug)
5605         (show_debug): Constify.
5606         (show_command): Add non-const overload.
5607         * top.c (set_history, show_history): Constify.
5608         * sh-tdep.c (set_sh_command, show_sh_command): Constify.
5609         * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
5610         * target.c (target_command): Constify.
5611         * sparc64-tdep.c (info_adi_command): Constify.
5612         * record-full.c (cmd_record_full_start): Constify.
5613         (set_record_full_command): Constify.  Fix typo.
5614         (show_record_full_command): Constify.
5615         * thread.c (thread_command, thread_apply_command): Constify.
5616         * memattr.c (dummy_cmd): Constify.
5617         * value.c (function_command): Constify.
5618         * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
5619         * probe.c (info_probes_command): Constify.
5620         * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
5621         * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
5622         (show_thread_cmd, set_thread_default_cmd)
5623         (show_thread_default_cmd): Constify.
5624         (check_empty): Constify.
5625         * tracepoint.c (tfind_command): Constify.
5626         * cp-support.c (maint_cplus_command): Constify.
5627         * windows-tdep.c (info_w32_command): Constify.
5628         * record.c (cmd_record_start, set_record_command)
5629         (show_record_command, info_record_command, cmd_record_goto):
5630         Constify.
5631         * ravenscar-thread.c (set_ravenscar_command)
5632         (show_ravenscar_command): Constify.
5633         * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
5634         Constify.
5635         (add_internal_problem_command): Remove casts.
5636         * arc-tdep.c (maintenance_print_arc_command): Constify.
5637         * valprint.c (set_print, show_print, set_print_raw)
5638         (show_print_raw): Constify.
5639         * maint.c (maintenance_command, maintenance_info_command)
5640         (maintenance_print_command, maintenance_set_cmd)
5641         (maintenance_show_cmd, set_per_command_cmd)
5642         (show_per_command_cmd, maintenance_check_command): Constify.
5643         * language.c (set_check, show_check): Constify.
5644         * typeprint.c (show_print_type, set_print_type): Constify.
5645         * go32-nat.c (go32_info_dos_command): Constify.
5646
5647 2017-10-11  Tom Tromey  <tom@tromey.com>
5648
5649         * breakpoint.c (prepare_re_set_context): Remove.
5650         (breakpoint_re_set_one): Update.  Don't use cleanups.
5651         (breakpoint_re_set): Use scoped_restore, std::string, and
5652         scoped_restore_current_language.
5653
5654 2017-10-11  Tom Tromey  <tom@tromey.com>
5655
5656         * breakpoint.c (commands_command_1): Use std::string.
5657         (cleanup_executing_breakpoints): Remove.
5658         (bpstat_do_actions_1): Use scoped_restore.
5659         (bpstat_check_watchpoint): Use std::string.
5660         (decode_static_tracepoint_spec): Likewise.
5661         (break_range_command): Likewise.
5662         (watch_command_1): Likewise.
5663         (compare_breakpoints): Change argument types.
5664         (clear_command): Use std::vector.
5665         (cleanup_executing_breakpoints): Remove.
5666         (update_global_location_list): Use unique_xmalloc_ptr.
5667         (strace_command): Remove unused declaration.
5668
5669 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
5670
5671         * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
5672         * NEWS: Mention new FreeBSD/arm native configuration.
5673         * configure.host: Add arm*-*-freebsd*.
5674         * configure.nat: Likewise.
5675         * arm-fbsd-nat.c: New file.
5676
5677 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
5678
5679         * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
5680         (ALLDEPFILES): Add arm-fbsd-tdep.c.
5681         * NEWS: Mention new FreeBSD/arm target.
5682         * configure.tgt: Add arm*-*-freebsd*.
5683         * arm-fbsd-tdep.c: New file.
5684         * arm-fbsd-tdep.h: New file.
5685
5686 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
5687
5688         * linux-tdep.c (linux_make_corefile_notes): Remove call to
5689         `gdbarch_elfcore_write_linux_prpsinfo'.
5690         * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
5691         method.
5692         (elf_internal_linux_prpsinfo): Remove declaration.
5693         * gdbarch.h: Regenerate.
5694         * gdbarch.c: Regenerate.
5695
5696 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
5697
5698         * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
5699         `set_gdbarch_elfcore_write_linux_prpsinfo'.
5700
5701 2017-10-11  Pedro Alves  <palves@redhat.com>
5702
5703         * breakpoint.c (reattach_breakpoints): Delete.
5704         * breakpoint.h (reattach_breakpoints): Delete.
5705
5706 2017-10-11  Simon Marchi  <simon.marchi@ericsson.com>
5707
5708         * symfile.c (registered_sym_fns): Make struct, not typedef.
5709         (DEF_VEC_O (registered_sym_fns)): Remove.
5710         (symtab_fns): Change type to std::vector.
5711         (add_symtab_fns): Adjust.
5712         (find_sym_fns): Adjust.
5713
5714 2017-10-11  Anton Kolesov  <Anton.Kolesov@synopsys.com>
5715
5716         * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
5717         * arc-tdep.h (arc_arch_is_em): New function.
5718         (arc_arch_is_hs): Likewise.
5719
5720 2017-10-11  Egeyar Bagcioglu  <egeyar.bagcioglu@oracle.com>
5721
5722         * macrotab.h (macro_lookup_inclusion): Remove unnecessary
5723         parentheses in the declaration.
5724         (macro_lookup_inclusion): Likewise.
5725         (macro_lookup_definition): Likewise.
5726         * p-lang.h (pascal_builtin_types): Likewise.
5727         * tui/tui-data.c (tui_win_list): Likewise.
5728         * tui/tui-data.h (tui_win_list): Likewise.
5729         * utils.h (make_cleanup_free_section_addr_info): Likewise.
5730
5731 2017-10-11  Mark Rages  <markrages@gmail.com>
5732
5733         * target-memory.c (block_boundaries): Fix for block address not
5734         aligned on block size.
5735
5736 2017-10-10  Pedro Alves <palves@redhat.com>
5737             Tom Tromey  <tom@tromey.com>
5738
5739         * breakpoint.c (struct captured_breakpoint_query_args)
5740         (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
5741         (print_breakpoint): New.
5742         * breakpoint.h (print_breakpoint): Declare.
5743         * common/common-exceptions.h (enum return_reason): Remove
5744         references to catch_exceptions.
5745         * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
5746         Delete.
5747         * exceptions.h (catch_exceptions_ftype, catch_exceptions)
5748         (catch_exception_ftype, catch_exceptions_with_msg): Delete.
5749         * gdb.h: Delete.
5750         * gdbthread.h (thread_select): Declare.
5751         * mi/mi-cmd-break.c: Don't include gdb.h.
5752         (breakpoint_notify): Use print_breakpoint.
5753         * mi/mi-cmd-catch.c: Don't include gdb.h.
5754         * mi/mi-interp.c: Don't include gdb.h.
5755         (mi_print_breakpoint_for_event): New.
5756         (mi_breakpoint_created, mi_breakpoint_modified): Use
5757         mi_print_breakpoint_for_event.
5758         * mi/mi-main.c: Don't include gdb.h.
5759         (mi_cmd_thread_select): Parse the global thread ID here.  Use
5760         thread_select instead of gdb_thread_select.
5761         (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
5762         of using gdb_list_thread_ids.
5763         * remote-fileio.c (do_remote_fileio_request): Change type.  Reply
5764         FILEIO_ENOSYS here.
5765         (remote_fileio_request): Use TRY/CATCH instead of
5766         catch_exceptions.
5767         * symfile-mem.c (struct symbol_file_add_from_memory_args)
5768         (symbol_file_add_from_memory_wrapper): Delete.
5769         (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
5770         * thread.c: Don't include gdb.h.
5771         (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
5772         (thread_alive): Use thread_select.
5773         (do_captured_thread_select): Delete, parts salvaged as ...
5774         (thread_select): ... this new function.
5775         (gdb_thread_select): Delete.
5776
5777 2017-10-10  Pedro Alves  <palves@redhat.com>
5778             Tom Tromey  <tom@tromey.com>
5779
5780         * breakpoint.c (breakpoint_cond_eval): Change return type to bool
5781         and reverse logic.
5782         (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
5783         No longer macros.  Instead ...
5784         (enum wp_check_result): They're now values of this new
5785         enumeration.
5786         (watchpoint_check): Change return type to wp_check_result and
5787         parameter type to bpstat.
5788         (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
5789         (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
5790         catch_errors.  Reverse logic of watchpoint_check call.
5791         (breakpoint_re_set_one): Now returns void and takes a breakpoint
5792         pointer as parameter.
5793         (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
5794         * common/common-exceptions.c (throw_exception_sjlj): Update
5795         comments to avoid mentioning catch_errors.
5796         * exceptions.c (catch_errors): Delete.
5797         * exceptions.h: Update comments to avoid mentioning catch_errors.
5798         (catch_errors_ftype, catch_errors): Delete.
5799         * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
5800         (hook_stop_stub): Delete.
5801         (restore_selected_frame): Change return type to void, and
5802         parameter type to const frame_id &.
5803         (restore_infcall_control_state): Use TRY/CATCH instead of
5804         catch_errors.
5805         * main.c (captured_command_loop): Return void and remove
5806         parameter.  Remove references to catch_errors.
5807         (captured_main): Use TRY/CATCH instead of catch_errors.
5808         * objc-lang.c (objc_submethod_helper_data)
5809         (find_objc_msgcall_submethod_helper): Delete.
5810         (find_objc_msgcall_submethod): Use TRY/CATCH instead of
5811         catch_errors.
5812         * record-full.c (record_full_message): Return void.
5813         (record_full_message_args, record_full_message_wrapper): Delete.
5814         (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
5815         instead of catch_errors.
5816         * solib-aix.c (solib_aix_open_symbol_file_object): Change
5817         parameter type to int.
5818         * solib-darwin.c (open_symbol_file_object): Ditto.
5819         * solib-dsbt.c (open_symbol_file_object): Ditto.
5820         * solib-frv.c (open_symbol_file_object): Ditto.
5821         * solib-svr4.c (open_symbol_file_object): Ditto.
5822         * solib-target.c (solib_target_open_symbol_file_object): Ditto.
5823         * solib.c (update_solib_list): Use TRY/CATCH instead of
5824         catch_errors.
5825         * solist.h (struct target_so_ops) <open_symbol_file_object>:
5826         Change type.
5827         * symmisc.c (struct print_symbol_args): Remove.
5828         (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
5829         (print_symbol): Change type.
5830         * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
5831         and remove parameters.
5832         (catch_errors): New.
5833         (get_windows_debug_event): Adjust.
5834
5835 2017-10-09  Tom Tromey  <tom@tromey.com>
5836
5837         * mi/mi-main.c (free_splay_tree): Remove.
5838         (list_available_thread_groups): Use splay_tree_up.
5839         * common/gdb_splay_tree.h: New file.
5840
5841 2017-10-09  Tom Tromey  <tom@tromey.com>
5842
5843         * mi/mi-main.c (do_nothing): Remove.
5844         (list_available_thread_groups): Update.
5845
5846 2017-10-09  Pedro Alves  <palves@redhat.com>
5847
5848         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
5849         reading registers when switching context.
5850
5851 2017-10-09  John Baldwin  <jhb@FreeBSD.org>
5852
5853         * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
5854         (fbsd_convert_siginfo): Likewise.
5855         * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
5856
5857 2017-10-09  Simon Marchi  <simon.marchi@polymtl.ca>
5858
5859         * configure.ac (try_guile_versions): Remove guile-2.2.
5860         * configure: Regenerate.
5861
5862 2017-10-09  Tom Tromey  <tom@tromey.com>
5863
5864         * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
5865         (COMPILE.pre): Use $(CXX).
5866
5867 2017-10-09  Pedro Alves  <palves@redhat.com>
5868
5869         * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
5870         Use bool.
5871         (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
5872         * cp-support.h (cp_remove_params): Now returns a
5873         gdb::unique_xmalloc_ptr.
5874         * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
5875         Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
5876         * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
5877         returning a gdb::unique_xmalloc_ptr.
5878         (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
5879         * stack.c (find_frame_funname): Adjust to cp_remove_params
5880         returning a gdb::unique_xmalloc_ptr.
5881
5882 2017-10-08  Tom Tromey  <tom@tromey.com>
5883
5884         * dwarf2read.c (dwarf2_get_dwz_file): Use
5885         gdb::unique_xmalloc_ptr.
5886         (find_slot_in_mapped_hash): Likewise.
5887         (dwarf2_physname): Likewise.
5888         (create_dwo_unit_in_dwp_v1): Use std::string.
5889         (create_dwo_unit_in_dwp_v2): Likewise.
5890         (lookup_dwo_cutu): Likewise.
5891         (inherit_abstract_dies): Use std::vector.
5892         (read_array_type): Likewise.
5893         (dwarf_decode_macros): Remove unused declaration.
5894         (unsigned_int_compar): Remove.
5895         (dwarf2_build_psymtabs_hard): Use scoped_restore.
5896         (psymtabs_addrmap_cleanup): Remove.
5897
5898 2017-10-08  Tom Tromey  <tom@tromey.com>
5899
5900         * frame-unwind.c (frame_unwind_try_unwinder): Update.
5901         * frame.h (frame_cleanup_after_sniffer): Declare.
5902         (frame_prepare_for_sniffer): Return void.
5903         * frame.c (frame_cleanup_after_sniffer): No longer static.  Change
5904         type of argument.
5905         (frame_prepare_for_sniffer): Return void.
5906
5907 2017-10-08  Tom Tromey  <tom@tromey.com>
5908
5909         * utils.h (make_cleanup_value_free): Remove.
5910         * utils.c (do_value_free, struct cleanup): Remove.
5911         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
5912         Use gdb_value_up.
5913         * value.h (struct value_deleter): New.
5914         (gdb_value_up): New typedef.
5915
5916 2017-10-08  Tom Tromey  <tom@tromey.com>
5917
5918         * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
5919         (make_cleanup_free_search_symbols): Remove.
5920         (search_symbols): Return std::vector.
5921         (symbol_search::compare_search_syms): Now member of
5922         symbol_search.  Change arguments.
5923         (sort_search_symbols_remove_dups): Change arguments.  Rewrite.
5924         (symtab_symbol_info, rbreak_command): Update.
5925         * symtab.h (struct symbol_search) <next>: Remove.
5926         Add constructors.
5927         (symbol_search::operator<): New function.
5928         (symbol_search::operator==): New function.
5929         (search_symbols): Remove std::vector.
5930         (free_search_symbols, make_cleanup_free_search_symbols): Remove.
5931         (symbol_search::compare_search_syms): Declare.
5932
5933 2017-10-06  Yao Qi  <yao.qi@linaro.org>
5934
5935         * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
5936         arch/aarch64-insn.o.
5937         Remove one rule.
5938         * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
5939
5940 2017-10-06  Yao Qi  <yao.qi@linaro.org>
5941
5942         * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
5943         and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
5944         arch/arm-linux.o respectively.
5945         * configure.tgt: Likewise.
5946
5947 2017-10-06  Yao Qi  <yao.qi@linaro.org>
5948
5949         * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
5950         * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
5951
5952 2017-10-06  Pedro Alves  <palves@redhat.com>
5953
5954         * windows-nat.c: Include <algorithm>.
5955
5956 2017-10-06  Yao Qi  <yao.qi@linaro.org>
5957
5958         * configure.tgt (i386_tobjs): New variable.
5959         (amd64_tobjs): New variable.
5960         Set $cpu_obs and $os_obs.
5961
5962 2017-10-06  Yao Qi  <yao.qi@linaro.org>
5963
5964         * Makefile.in (CONFIG_SRC_SUBDIR): New.
5965         (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
5966         (clean): Remove object files and dependency files.
5967         (distclean): Remove the directory.
5968         * configure.ac: Invoke AC_CONFIG_COMMANDS.
5969         * configure: Re-generated.
5970         * configure.tgt: Replace amd64.o with arch/amd64.o.
5971
5972 2017-10-05  Jose E. Marchesi  <jose.marchesi@oracle.com>
5973
5974         PR build/22188
5975         * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
5976         and SETEND.
5977
5978 2017-10-05  Pedro Alves  <palves@redhat.com>
5979
5980         * linux-nat.c (linux_child_follow_fork): When following the parent
5981         and detaching the child, consult the parent thread's architecture
5982         instead of the child's.
5983
5984 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
5985
5986         * ax.h: Do not include "doublest.h".
5987         (union agent_val): Remove.
5988
5989 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
5990
5991         * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
5992         (decimal_to_string): Return std::string object.
5993         (decimal_from_string): Accept std::string object.  Return bool.
5994         (decimal_from_integral, decimal_from_doublest): Remove.
5995         (decimal_from_longest): Add prototype.
5996         (decimal_from_ulongest): Likewise.
5997         (decimal_to_longest): Likewise.
5998         (decimal_from_doublest): Likewise.
5999         * dfp.c: Do not include "gdbtypes.h" or "value.h".
6000         (MAX_DECIMAL_STRING): Move here.
6001         (decimal_to_string): Return std::string object.
6002         (decimal_from_string): Accept std::string object.  Return bool.
6003         (decimal_from_integral): Remove, replace by ...
6004         (decimal_from_longest, decimal_from_ulongest): ... these new functions.
6005         (decimal_to_longest): New function.
6006         (decimal_from_floating): Remove, replace by ...
6007         (decimal_from_doublest): ... this new function.
6008         (decimal_to_doublest): Update to new decimal_to_string interface.
6009
6010         * value.c (unpack_long): Use decimal_to_longest.
6011         * valops.c (value_cast): Use decimal_from_doublest instead of
6012         decimal_from_floating.  Use decimal_from_[u]longest isntead of
6013         decimal_from_integral.
6014         * valarith.c (value_args_as_decimal): Likewise.
6015         * valprint.c (print_decimal_floating): Update to new
6016         decimal_to_string interface.
6017         * printcmd.c (printf_decfloat): Likewise.
6018         * c-exp.y (parse_number): Update to new decimal_from_string interface.
6019
6020 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
6021
6022         * doublest.h: Do not include "floatformat.h".  Remove stale comments.
6023         * gdbtypes.c: Include "floatformat.h".
6024         * value.c: Likewise.
6025         * m68k-tdep.c: Likewise.
6026
6027         * findvar.c: Do not include "floatformat.h".
6028         * amd64-darwin-tdep.c: Likewise.
6029         * arm-linux-tdep.c: Likewise.
6030         * i386-darwin-tdep.c: Likewise.
6031         * i387-tdep.c: Likewise.
6032         * m68k-linux-tdep.c: Likewise.
6033         * mep-tdep.c: Likewise.
6034         * mips-tdep.c: Likewise.
6035         * nios2-tdep.c: Likewise.
6036         * s390-linux-tdep.c: Likewise.
6037         * sparc-obsd-tdep.c: Likewise.
6038         * sparc-tdep.c: Likewise.
6039         * sparc64-tdep.c: Likewise.
6040         * spu-tdep.c: Likewise.
6041         * tic6x-tdep.c: Likewise.
6042         * tilegx-tdep.c: Likewise.
6043         * vax-tdep.c: Likewise.
6044         * xstormy16-tdep.c: Likewise.
6045         * xtensa-tdep.c: Likewise.
6046
6047         * top.c: Do not include "doublest.h".
6048         * aarch64-tdep.c: Likewise.
6049         * alpha-tdep.c: Likewise.
6050         * arm-linux-tdep.c: Likewise.
6051         * m68k-linux-tdep.c: Likewise.
6052         * tilegx-tdep.c: Likewise.
6053         * xstormy16-tdep.c: Likewise.
6054
6055 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
6056
6057         * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
6058         (mipsn32_fbsd_sigframe): Define.
6059         (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
6060         for FreeBSD/mipsn32.
6061
6062 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
6063
6064         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
6065         AT_HWCAP.
6066
6067 2017-10-05  Tristan Gingold  <tgingold@free.fr>
6068
6069         * MAINTAINERS (Misc): Update my email address.
6070
6071 2017-10-04  Pedro Alves  <palves@redhat.com>
6072
6073         * remote.c (get_remote_arch_state): New 'gdbarch' parameter.  Use
6074         it instead of target_gdbarch.
6075         (get_remote_state, get_remote_packet_size): Adjust
6076         get_remote_arch_state calls, passing down target_gdbarch
6077         explicitly.
6078         (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
6079         'gdbarch' and use it instead of target_gdbarch.
6080         (get_memory_packet_size): Adjust get_remote_arch_state calls,
6081         passing down target_gdbarch explicitly.
6082         (struct stop_reply) <arch>: New field.
6083         (remote_parse_stop_reply): Use the stopped thread's architecture,
6084         not the current inferior's.  Save the architecture in the
6085         stop_reply.
6086         (process_stop_reply): Use the stop reply's architecture.
6087         (process_g_packet, remote_fetch_registers)
6088         (remote_prepare_to_store, store_registers_using_G)
6089         (remote_store_registers): Adjust get_remote_arch_state calls,
6090         using the regcache's architecture.
6091         (remote_get_trace_status): Adjust get_remote_arch_state calls,
6092         passing down target_gdbarch explicitly.
6093         * spu-multiarch.c (spu_thread_architecture): Defer to the target
6094         beneath instead of calling target_gdbarch.
6095         * target.c (default_thread_architecture): Use the specified
6096         inferior's architecture, instead of the current inferior's
6097         architecture (via target_gdbarch).
6098
6099 2017-10-04  Pedro Alves  <palves@redhat.com>
6100
6101         * regcache.c (get_thread_arch_regcache): Remove null_ptid special
6102         case.
6103         (regcache_print): Handle !target_has_registers here instead.
6104
6105 2017-10-04  Pedro Alves  <palves@redhat.com>
6106
6107         * frame.c (create_test_frame): Delete.
6108         * frame.h (create_test_frame): Delete.
6109         * gdbarch-selftests.c: Include gdbthread.h and target.h.
6110         (class regcache_test): Delete.
6111         (test_target_has_registers, test_target_has_stack)
6112         (test_target_has_memory, test_target_prepare_to_store)
6113         (test_target_store_registers): New functions.
6114         (test_target_ops): New class.
6115         (register_to_value_test): Error out if there's already a
6116         process_stratum (or higher) target pushed.  Create a fuller mock
6117         environment, with mock target_ops, inferior, address space, thread
6118         and inferior_ptid.
6119         * progspace.c (struct address_space): Move to ...
6120         * progspace.h (struct address_space): ... here.
6121         * regcache.h (regcache::~regcache, regcache::raw_write)
6122         [GDB_SELF_TEST]: No longer virtual.
6123
6124 2017-10-04  Simon Marchi  <simon.marchi@ericsson.com>
6125
6126         * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
6127
6128 2017-10-04  Pedro Alves  <palves@redhat.com>
6129
6130         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
6131         out of 'between TRY and CATCH'.
6132
6133 2017-10-04  Pedro Alves  <palves@redhat.com>
6134
6135         * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
6136         * common/common-exceptions.h (TRY): Open an outermost scope.
6137         Expand intro comment.
6138         (CATCH): Reindent.
6139         (END_CATCH): Close the outermost scope.
6140         * completer.c (complete_line_internal): Add missing END_CATCH.
6141
6142 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
6143
6144         * NEWS (Changes since GDB 8.0): Add entry about new
6145         'set-cwd-on-gdbserver' feature.
6146         (New remote packets): Add entry for QSetWorkingDir.
6147         * common/common-inferior.h (set_inferior_cwd): New prototype.
6148         * infcmd.c (set_inferior_cwd): Remove "static".
6149         (show_cwd_command): Expand text to include remote debugging.
6150         * remote.c: Add PACKET_QSetWorkingDir.
6151         (remote_protocol_features) <QSetWorkingDir>: New entry for
6152         PACKET_QSetWorkingDir.
6153         (extended_remote_set_inferior_cwd): New function.
6154         (extended_remote_create_inferior): Call
6155         "extended_remote_set_inferior_cwd".
6156         (_initialize_remote): Call "add_packet_config_cmd" for
6157         QSetWorkingDir.
6158
6159 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
6160
6161         * NEWS (New commands): Mention "set/show cwd".
6162         * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
6163         "cd" command's help text.
6164         * common/common-inferior.h (get_inferior_cwd): New prototype.
6165         * infcmd.c (inferior_cwd_scratch): New global variable.
6166         (set_inferior_cwd): New function.
6167         (get_inferior_cwd): Likewise.
6168         (set_cwd_command): Likewise.
6169         (show_cwd_command): Likewise.
6170         (_initialize_infcmd): Add "set/show cwd" commands.
6171         * inferior.h (class inferior) <cwd>: New field.
6172         * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
6173         (fork_inferior): Change inferior's cwd before its execution.
6174         * windows-nat.c (windows_create_inferior): Pass inferior's cwd
6175         to CreateProcess.
6176
6177 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
6178
6179         * Makefile.in (SFILES): Add gdb_tilde_expand.c.
6180         (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
6181         (COMMON_OBS): Add gdb_tilde_expand.o.
6182         * common/gdb_tilde_expand.c: New file.
6183         * common/gdb_tilde_expand.h: Likewise.
6184
6185 2017-10-03  Maciej W. Rozycki  <macro@imgtec.com>
6186
6187         * gdbarch.sh (objfile): Remove duplicate declaration.
6188         * gdbarch.h: Regenerate.
6189
6190 2017-10-03  Tom Tromey  <tom@tromey.com>
6191
6192         * utils.c (internal_vproblem): Use string_vprintf.
6193
6194 2017-10-03  Tom Tromey  <tom@tromey.com>
6195
6196         * printcmd.c (info_symbol_command): Use std::string.
6197
6198 2017-10-03  Tom Tromey  <tom@tromey.com>
6199
6200         * top.c (gdb_safe_append_history): Use std::string.
6201
6202 2017-10-03  Tom Tromey  <tom@tromey.com>
6203
6204         * event-top.c (stdin_event_handler): Update.
6205         * main.c (captured_main_1): Update.
6206         * top.h (make_delete_ui_cleanup): Remove.
6207         (struct ui): Add constructor and destructor.
6208         (new_ui, delete_ui): Remove.
6209         * top.c (make_delete_ui_cleanup): Remove.
6210         (new_ui_command): Use std::unique_ptr.
6211         (delete_ui_cleanup): Remove.
6212         (ui::ui): Rename from new_ui.  Update.
6213         (free_ui): Remove.
6214         (ui::~ui): Rename from delete_ui.  Update.
6215
6216 2017-10-03  Tom Tromey  <tom@tromey.com>
6217
6218         * symfile.c (load_progress): Use gdb::byte_vector.
6219
6220 2017-10-03  Tom Tromey  <tom@tromey.com>
6221
6222         * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
6223         declaration.
6224         * printcmd.c (x_command): Remove unused declaration.
6225         * symfile.c (symbol_file_command): Remove unused declaration.
6226
6227 2017-10-03  Tom Tromey  <tom@tromey.com>
6228
6229         * utils.c (internal_vproblem): Use std::string.
6230         (defaulted_query): Likewise.
6231
6232 2017-10-03  Tom Tromey  <tom@tromey.com>
6233
6234         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
6235         * top.c (execute_command_to_string): Update.
6236         * utils.c (make_cleanup_restore_page_info): Remove.
6237         (do_restore_page_info_cleanup): Remove.
6238         (set_batch_flag_and_restore_page_info):
6239         New.
6240         (make_cleanup_restore_page_info): Remove.
6241         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
6242         (~set_batch_flag_and_restore_page_info): New
6243         (make_cleanup_restore_uinteger): Remove.
6244         (make_cleanup_restore_integer): Remove.
6245         (struct restore_integer_closure): Remove.
6246         (restore_integer): Remove.
6247         * utils.h (struct set_batch_flag_and_restore_page_info): New
6248         class.
6249         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
6250         (make_cleanup_restore_page_info): Remove.
6251         (make_cleanup_restore_uinteger) Remove.
6252         (make_cleanup_restore_integer) Remove.
6253
6254 2017-10-03  Tom Tromey  <tom@tromey.com>
6255
6256         * record-full.h (record_full_gdb_operation_disable_set): Return
6257         scoped_restore_tmpl<int>.
6258         * infrun.c (adjust_pc_after_break): Update.
6259         (handle_signal_stop): Update.
6260         * record-full.c (record_full_gdb_operation_disable_set): Return
6261         scoped_restore_tmpl<int>.
6262         (record_full_wait_1, record_full_insert_breakpoint)
6263         (record_full_remove_breakpoint, record_full_save)
6264         (record_full_goto_insn): Update.
6265
6266 2017-10-02  Tom Tromey  <tom@tromey.com>
6267
6268         PR rust/22236:
6269         * rust-lang.c (rust_val_print_str): New function.
6270         (val_print_struct): Call it.
6271         (rust_subscript): Preserve name of slice type.
6272
6273 2017-10-02  Tom Tromey  <tom@tromey.com>
6274
6275         * rust-lang.c (rust_subscript): Handle slices in
6276         EVAL_AVOID_SIDE_EFFECTS case.
6277
6278 2017-10-02  Tom Tromey  <tom@tromey.com>
6279
6280         * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
6281
6282 2017-10-02  Tom Tromey  <tom@tromey.com>
6283
6284         * rust-lang.h (rust_slice_type): Add "extern".
6285
6286 2017-10-02  Tom Tromey  <tom@tromey.com>
6287             Pedro Alves  <palves@redhat.com>
6288
6289         * ada-lang.h (ada_exc_info::operator<): Make const.
6290         (ada_exc_info::operator==): Make const.
6291         * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
6292         Make const.
6293
6294 2017-09-29  Tom Tromey  <tom@tromey.com>
6295
6296         * target.c (read_whatever_is_readable): Change type of "result".
6297         Update.
6298         (free_memory_read_result_vector): Remove.
6299         (read_memory_robust): Change return type.  Update.
6300         * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update.  Use
6301         bin2hex, std::string.
6302         * target.h (memory_read_result_s): Remove typedef.
6303         (free_memory_read_result_vector): Remove.
6304         (read_memory_robust): Return std::vector.
6305
6306 2017-09-29  Tom Tromey  <tom@tromey.com>
6307
6308         * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
6309
6310 2017-09-29  Tom Tromey  <tom@tromey.com>
6311
6312         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
6313         * ada-lang.h (struct ada_exc_info): Remove typedef.  Declare
6314         operator< and operator==.
6315         (ada_exceptions_list): Return a std::vector.
6316         * ada-lang.c (ada_exc_info::operator<): Rename from
6317         compare_ada_exception_info.
6318         (ada_exc_info::operator==): New.
6319         (sort_remove_dups_ada_exceptions_list): Change type of
6320         "exceptions".
6321         (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
6322         (ada_add_global_exceptions): Likewise.
6323         (ada_exceptions_list_1): Return a std::vector.
6324         (ada_exceptions_list): Likewise.
6325
6326 2017-09-29  Tom Tromey  <tom@tromey.com>
6327
6328         * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
6329         'std::set *'.
6330         (print_one_inferior): Update.
6331         (free_vector_of_ints): Remove.
6332         (list_available_thread_groups): Change "ids" to std::set.
6333         (mi_cmd_list_thread_groups): Update.
6334         (struct collect_cores_data) <core>: Now a std::set.
6335         (collect_cores): Update.
6336         (unique): Remove.
6337         (print_one_inferior): Update.
6338
6339 2017-09-29  Tom Tromey  <tom@tromey.com>
6340
6341         * mi/mi-main.c (mi_execute_cli_command): Use std::string.
6342         (mi_execute_async_cli_command): Likewise.
6343         (mi_cmd_trace_frame_collected): Use field_fmt.
6344
6345 2017-09-29  Tom Tromey  <tom@tromey.com>
6346
6347         * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
6348         gdb::byte_vector.
6349
6350 2017-09-29  Tom Tromey  <tom@tromey.com>
6351
6352         * mi/mi-parse.c (mi_parse): Remove unused declaration.
6353
6354 2017-09-29  Tom Tromey  <tom@tromey.com>
6355
6356         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
6357
6358 2017-09-29  Tom Tromey  <tom@tromey.com>
6359
6360         * varobj.h (varobj_gen_name): Return std::string.
6361         * varobj.c (varobj_gen_name): Return std::string.
6362         * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
6363         (mi_cmd_var_delete): Don't copy "name".
6364
6365 2017-09-29  Tom Tromey  <tom@tromey.com>
6366
6367         * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
6368         (mi_cmd_break_insert_1): Update.
6369
6370 2017-09-29  Tom Tromey  <tom@tromey.com>
6371
6372         * target.h (make_scoped_defer_target_commit_resume): Update.
6373         * target.c (make_scoped_defer_target_commit_resume): Rename from
6374         make_cleanup_defer_target_commit_resume.  Return a
6375         scoped_restore.
6376         * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
6377
6378 2017-09-29  Tom Tromey  <tom@tromey.com>
6379
6380         * main.c (captured_main_1): Remove unused declaration.
6381         * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
6382
6383 2017-09-29  Tom Tromey  <tom@tromey.com>
6384
6385         * symtab.c (search_symbols): Remove unused outer cleanup.
6386         (make_source_files_completion_list): Remove unused declaration.
6387
6388 2017-09-29  Tom Tromey  <tom@tromey.com>
6389
6390         * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
6391
6392 2017-09-29  Tom Tromey  <tom@tromey.com>
6393
6394         * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
6395         gdb::byte_vector.
6396
6397 2017-09-29  Tom Tromey  <tom@tromey.com>
6398
6399         * complaints.c (vcomplaint): Use std::string.
6400
6401 2017-09-29  Tom Tromey  <tom@tromey.com>
6402
6403         * tracepoint.c (trace_variable_command): Use std::string.
6404         (encode_actions_1): Remove unused declarations.
6405         (create_tsv_from_upload): Use std::string.
6406
6407 2017-09-29  Tom Tromey  <tom@tromey.com>
6408
6409         * cp-support.c (gdb_demangle): Use std::string.
6410
6411 2017-09-29  Tom Tromey  <tom@tromey.com>
6412
6413         * stack.c (parse_frame_specification): Use std::string
6414         (info_frame_command): Use gdb::unique_xmalloc_ptr.
6415
6416 2017-09-29  Tom Tromey  <tom@tromey.com>
6417
6418         * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
6419
6420 2017-09-29  Tom Tromey  <tom@tromey.com>
6421
6422         * utils.c (vfprintf_maybe_filtered): Use std::string.
6423         (vfprintf_unfiltered): Likewise.
6424
6425 2017-09-29  Tom Tromey  <tom@tromey.com>
6426
6427         * event-top.c (top_level_prompt): Return std::string.
6428         (display_gdb_prompt): Update.
6429
6430 2017-09-29  Tom Tromey  <tom@tromey.com>
6431
6432         * unittests/common-utils-selftests.c (format): New function.
6433         (string_vprintf_tests): New function.
6434         (_initialize_common_utils_selftests): Register new tests.
6435         * common/common-utils.c (string_vprintf): New function.
6436         * common/common-utils.h (string_vprintf): Declare.
6437
6438 2017-09-29  Pedro Alves  <palves@redhat.com>
6439
6440         * common/rsp-low.c (unpack_varlen_hex): Constify.
6441         * common/rsp-low.h (unpack_varlen_hex): Constify.
6442         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
6443         Constify.
6444         * remote.c (remote_set_permissions, read_ptid)
6445         (remote_current_thread, remote_get_threads_with_qthreadinfo)
6446         (remote_static_tracepoint_marker_at)
6447         (remote_static_tracepoint_markers_by_strid)
6448         (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
6449         * tracepoint.c (parse_trace_status, parse_tracepoint_status)
6450         (parse_tracepoint_definition, parse_tsv_definition)
6451         (parse_static_tracepoint_marker_definition): Constify.
6452         * tracepoint.h (parse_static_tracepoint_marker_definition)
6453         (parse_trace_status, parse_tracepoint_status)
6454         (parse_tracepoint_definition, parse_tsv_definition): Constify.
6455
6456 2017-09-29  Pedro Alves  <palves@redhat.com>
6457
6458         * remote.c (target_buf, target_buf_size): Delete.
6459         (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
6460         Use the connection's packet buffer instead.
6461         All callers adjusted.
6462         (_initialize_remote): Remove references to target_buf and
6463         target_buf_size.
6464
6465 2017-09-28  Pedro Alves  <palves@redhat.com>
6466
6467         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6468         unittests/common-utils-selftests.c.
6469         (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
6470         (COMMON_OBS): Remove utils-selftests.o.
6471         * utils-selftests.c: Move to ...
6472         * unittests/common-utils-selftests.c: ... here and rename self
6473         test to "string_printf".
6474
6475 2017-09-28  Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
6476
6477         * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
6478         having NULL cus or tus.
6479
6480 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
6481
6482         * arm-tdep.c: (convert_from_extended): Remove.
6483         (convert_to_extended): Likewise.
6484         (arm_extract_return_value): Use convert_typed_floating.
6485         (arm_store_return_value): Likewise.
6486
6487         * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
6488         * sh-tdep.c: Do not include "floatformat.h".
6489         (sh_littlebyte_bigword_type): New function.
6490         (sh_register_convert_to_virtual): Use convert_typed_floating.
6491         (sh_register_convert_to_raw): Likewise.
6492         * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
6493         (sh64_littlebyte_bigword_type): New function.
6494         (sh64_extract_return_value): Use convert_typed_floating.
6495         (sh64_register_convert_to_virtual): Likewise.
6496         (sh64_register_convert_to_raw): Likewise.
6497
6498 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
6499
6500         * doublest.h (floatformat_from_type): Move to gdbtypes.h.
6501         * doublest.c (floatformat_from_type): Move to gdbtypes.c.
6502
6503         * gdbtypes.h (union type_specific): Make field floatformat hold
6504         just a single struct floatformat, not an array.
6505         (floatformat_from_type): Move here.
6506         * gdbtypes.c (floatformat_from_type): Move here.  Update to
6507         changed TYPE_FLOATFORMAT definition.
6508         (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
6509         (recursive_dump_type): Likewise.
6510         (init_float_type): Install correct floatformat for byte order.
6511         (arch_float_type): Likewise.
6512
6513 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
6514
6515         * gdbtypes.c (init_type): Change incoming argument from
6516         length-in-bytes to length-in-bits.  Assert length is a
6517         multiple of TARGET_CHAR_BITS.
6518         (arch_type, arch_flags_type): Likewise.
6519         (init_integer_type): Update call to init_type.
6520         (init_character_type): Likewise.
6521         (init_boolean_type): Likewise.
6522         (init_float_type): Likewise.
6523         (init_decfloat_type): Likewise.
6524         (init_complex_type): Likewise.
6525         (init_pointer_type): Likewise.
6526         (objfile_type): Likewise.
6527         (arch_integer_type): Update call to arch_type.
6528         (arch_character_type): Likewise.
6529         (arch_boolean_type): Likewise.
6530         (arch_float_type): Likewise.
6531         (arch_decfloat_type): Likewise.
6532         (arch_complex_type): Likewise.
6533         (arch_pointer_type): Likewise.
6534         (gdbtypes_post_init): Likewise.
6535
6536         * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
6537         (read_base_type): Likewise.
6538         * mdebugread.c (basic_type): Likewise.
6539         * stabsread.c (dbx_init_float_type): Likewise.
6540         (rs6000_builtin_type): Likewise.
6541         (read_range_type): Likewise.  Also, fix call to init_integer_type
6542         with erroneous length argument.
6543
6544         * ada-lang.c (ada_language_arch_info): Update call to arch_type.
6545         * d-lang.c (build_d_types): Likewise.
6546         * f-lang.c (build_fortran_types): Likewise.
6547         * go-lang.c (build_go_types): Likewise.
6548         * opencl-lang.c (build_opencl_types): Likewise.
6549         * jit.c (finalize_symtab): Likewise.
6550         * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
6551         (build_std_type_info_type): Likewise.
6552         * target-descriptions.c (tdesc_gdb_type): Likewise.  Also,
6553         update call to arch_flags_type.
6554
6555         * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
6556         arch_type.
6557         * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
6558         * windows-tdep.c (windows_get_tlb_type): Likewise.
6559
6560         * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
6561         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
6562         * m32c-tdep.c (make_types): Likewise.
6563         * rl78-tdep.c (rl78_gdbarch_init): Likewise.
6564         (rl78_psw_type): Update call to arch_flags_type.
6565         * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
6566         * rx-tdep.c (rx_psw_type): Likewise.
6567         (rx_fpsw_type): Likewise.
6568         * sparc-tdep.c (sparc_psr_type): Likewise.
6569         (sparc_fsr_type): Likewise.
6570         * sparc64-tdep.c (sparc64_pstate_type): Likewise.
6571         (sparc64_ccr_type): Likewise.
6572         (sparc64_fsr_type): Likewise.
6573         (sparc64_fprs_type): Likewise.
6574
6575 2017-09-27  Tom Tromey  <tom@tromey.com>
6576
6577         * findcmd.c (find_command): Constify.
6578
6579 2017-09-27  Tom Tromey  <tom@tromey.com>
6580
6581         * ada-tasks.c (task_command_1, task_command): Constify.
6582
6583 2017-09-27  Tom Tromey  <tom@tromey.com>
6584
6585         * symtab.c (maintenance_print_symbol_cache)
6586         (maintenance_flush_symbol_cache)
6587         (maintenance_print_symbol_cache_statistics): Constify.
6588
6589 2017-09-27  Tom Tromey  <tom@tromey.com>
6590
6591         * inferior.c (detach_inferior_command, kill_inferior_command)
6592         (inferior_command): Constify.
6593
6594 2017-09-27  Tom Tromey  <tom@tromey.com>
6595
6596         * regcache.c (regcache_print, maintenance_print_registers)
6597         (maintenance_print_raw_registers)
6598         (maintenance_print_cooked_registers)
6599         (maintenance_print_register_groups)
6600         (maintenance_print_remote_registers): Constify.
6601
6602 2017-09-27  Tom Tromey  <tom@tromey.com>
6603
6604         * printcmd.c (map_display_numbers, undisplay_command)
6605         (enable_disable_display_command, enable_display_command)
6606         (disable_display_command): Constify.
6607
6608 2017-09-27  Tom Tromey  <tom@tromey.com>
6609
6610         * breakpoint.h (delete_command): Don't declare.
6611         * breakpoint.c (delete_command, enable_once_command)
6612         (enable_count_command, enable_delete_command, breakpoint_1)
6613         (maintenance_info_breakpoints, stopin_command, stopat_command)
6614         (delete_command, delete_trace_command, save_breakpoints)
6615         (save_breakpoints_command, save_tracepoints_command): Constify.
6616
6617 2017-09-27  Tom Tromey  <tom@tromey.com>
6618
6619         * macrocmd.c (macro_expand_command, macro_expand_once_command)
6620         (skip_ws, extract_identifier, macro_define_command)
6621         (macro_undef_command, macro_list_command): Constify.
6622
6623 2017-09-27  Tom Tromey  <tom@tromey.com>
6624
6625         * infcmd.c (environment_info, set_environment_command)
6626         (unset_environment_command, path_info, info_proc_cmd_1)
6627         (info_proc_cmd_mappings, info_proc_cmd_stat)
6628         (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
6629         (info_proc_cmd_exe, info_proc_cmd_all): Constify.
6630
6631 2017-09-27  Tom Tromey  <tom@tromey.com>
6632
6633         * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
6634         Constify.
6635
6636 2017-09-27  Tom Tromey  <tom@tromey.com>
6637
6638         * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
6639
6640 2017-09-27  Tom Tromey  <tom@tromey.com>
6641
6642         * demangle.c (demangle_command): Constify.
6643
6644 2017-09-27  Tom Tromey  <tom@tromey.com>
6645
6646         * progspace.c (maintenance_info_program_spaces_command):
6647         Constify.
6648
6649 2017-09-27  Tom Tromey  <tom@tromey.com>
6650
6651         * compile/compile.c (check_raw_argument, compile_file_command)
6652         (compile_code_command, compile_print_command): Constify.
6653
6654 2017-09-27  Tom Tromey  <tom@tromey.com>
6655
6656         * reggroups.c (maintenance_print_reggroups): Constify.
6657
6658 2017-09-27  Tom Tromey  <tom@tromey.com>
6659
6660         * dwarf2read.c (save_gdb_index_command): Constify.
6661
6662 2017-09-27  Tom Tromey  <tom@tromey.com>
6663
6664         * stap-probe.c (info_probes_stap_command): Constify.
6665
6666 2017-09-27  Tom Tromey  <tom@tromey.com>
6667
6668         * fork-child.c (unset_exec_wrapper_command): Constify.
6669
6670 2017-09-27  Tom Tromey  <tom@tromey.com>
6671
6672         * btrace.c (get_uint, get_context_size, no_chunk)
6673         (maint_btrace_packet_history_cmd)
6674         (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
6675         (maint_info_btrace_cmd): Constify.
6676
6677 2017-09-27  Tom Tromey  <tom@tromey.com>
6678
6679         * reverse.c (delete_bookmark_command): Constify.
6680
6681 2017-09-27  Tom Tromey  <tom@tromey.com>
6682
6683         * remote.c (set_memory_packet_size)
6684         (set_memory_write_packet_size, show_memory_write_packet_size)
6685         (set_memory_read_packet_size, show_memory_read_packet_size)
6686         (compare_sections_command, packet_command, remote_put_command)
6687         (remote_get_command, remote_delete_command): Constify.
6688
6689 2017-09-27  Tom Tromey  <tom@tromey.com>
6690
6691         * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
6692         (set_mipsfpu_double_command, set_mipsfpu_none_command)
6693         (set_mipsfpu_auto_command): Constify.
6694
6695 2017-09-27  Tom Tromey  <tom@tromey.com>
6696
6697         * cli/cli-cmds.h (cd_command): Constify.
6698         * cli/cli-cmds.c (cd_command): Constify.
6699
6700 2017-09-27  Tom Tromey  <tom@tromey.com>
6701
6702         * thread.c (thread_name_command, thread_find_command): Constify.
6703
6704 2017-09-27  Tom Tromey  <tom@tromey.com>
6705
6706         * probe.c (enable_probes_command, disable_probes_command):
6707         Constify.
6708
6709 2017-09-27  Tom Tromey  <tom@tromey.com>
6710
6711         * symfile.c (symbol_file_command): Constify.
6712         * gdbcore.h (deprecated_file_changed_hook): Constify.
6713         * exec.c (deprecated_file_changed_hook, exec_file_command)
6714         (file_command): Constify.
6715         * defs.h (symbol_file_command): Constify.
6716
6717 2017-09-27  Tom Tromey  <tom@tromey.com>
6718
6719         * remote-fileio.c (set_system_call_allowed)
6720         (show_system_call_allowed): Constify.
6721
6722 2017-09-27  Tom Tromey  <tom@tromey.com>
6723
6724         * tracepoint.c (delete_trace_variable_command)
6725         (tfind_end_command, tfind_start_command, tfind_pc_command)
6726         (tfind_tracepoint_command, tfind_line_command)
6727         (tfind_range_command, tfind_outside_command): Constify.
6728
6729 2017-09-27  Tom Tromey  <tom@tromey.com>
6730
6731         * ax-gdb.c (maint_agent_printf_command, agent_command)
6732         (agent_eval_command): Constify.
6733
6734 2017-09-27  Tom Tromey  <tom@tromey.com>
6735
6736         * tracepoint.c (info_scope_command): Constify.
6737         * python/python.c (gdbpy_decode_line): Constify.
6738         * python/py-breakpoint.c (bppy_init): Constify.
6739         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
6740         * location.h: (new_linespec_location)
6741         (string_to_event_location_basic, string_to_event_location):
6742         Constify.
6743         * location.c (new_linespec_location)
6744         (string_to_event_location_basic, string_to_event_location):
6745         Constify.
6746         * linespec.h (decode_line_with_current_source)
6747         (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
6748         * linespec.c (linespec_lex_to_end)
6749         (decode_line_with_current_source)
6750         (decode_line_with_last_displayed): Constify.
6751         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
6752         Constify.
6753         * cli/cli-cmds.c (edit_command, list_command): Constify.
6754         * breakpoint.h (until_break_command, watch_command_wrapper)
6755         (awatch_command_wrapper, rwatch_command_wrapper)
6756         (init_ada_exception_breakpoint): Constify.
6757         * breakpoint.c (break_command_1, dprintf_command)
6758         (break_range_command, watch_command_wrapper)
6759         (rwatch_command_wrapper, awatch_command_wrapper)
6760         (until_break_command, init_ada_exception_breakpoint)
6761         (strace_marker_create_sals_from_location, trace_command)
6762         (ftrace_command, strace_command, struct tracepoint): Constify.
6763         * ax-gdb.c (agent_command_1): Constify.
6764         * ada-lang.c (ada_exception_sal): Constify.
6765
6766 2017-09-27  Tom Tromey  <tom@tromey.com>
6767
6768         * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
6769         (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
6770         (get_context_size, no_chunk, get_insn_history_modifiers)
6771         (cmd_record_insn_history, get_call_history_modifiers)
6772         (cmd_record_call_history): Constify.
6773
6774 2017-09-27  Tom Tromey  <tom@tromey.com>
6775
6776         * source.c (show_substitute_path_command)
6777         (unset_substitute_path_command, set_substitute_path_command):
6778         Constify.
6779
6780 2017-09-27  Tom Tromey  <tom@tromey.com>
6781
6782         * typeprint.c (maintenance_print_type): Constify.
6783         * maint.c (maintenance_dump_me, maintenance_demangle)
6784         (maintenance_time_display, maintenance_info_sections)
6785         (maintenance_print_statistics, maintenance_deprecate)
6786         (maintenance_undeprecate): Constify.
6787         (maintenance_do_deprecate): Constify.  Use std::string.
6788         (maintenance_selftest): Constify.
6789         * gdbtypes.h (maintenance_print_type): Constify.
6790
6791 2017-09-27  Tom Tromey  <tom@tromey.com>
6792
6793         * hppa-tdep.c (unwind_command): Constify.
6794
6795 2017-09-27  Tom Tromey  <tom@tromey.com>
6796
6797         * target-descriptions.c (unset_tdesc_filename_cmd)
6798         (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
6799         Constify.
6800
6801 2017-09-27  Tom Tromey  <tom@tromey.com>
6802
6803         * dummy-frame.c (maintenance_print_dummy_frames): Constify.
6804
6805 2017-09-27  Tom Tromey  <tom@tromey.com>
6806
6807         * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
6808
6809 2017-09-27  Tom Tromey  <tom@tromey.com>
6810
6811         * tui/tui-regs.c (tui_reg_command): Constify.
6812
6813 2017-09-27  Tom Tromey  <tom@tromey.com>
6814
6815         * skip.c (skip_file_command, skip_function_command)
6816         (skip_enable_command, skip_disable_command, skip_delete_command):
6817         Constify.
6818
6819 2017-09-27  Tom Tromey  <tom@tromey.com>
6820
6821         * record-btrace.c (cmd_record_btrace_bts_start)
6822         (cmd_record_btrace_pt_start): Constify.
6823
6824 2017-09-27  Tom Tromey  <tom@tromey.com>
6825
6826         * symmisc.c (maintenance_print_symbols)
6827         (maintenance_print_msymbols, maintenance_print_objfiles)
6828         (maintenance_info_symtabs, maintenance_check_symtabs)
6829         (maintenance_expand_symtabs, maintenance_info_line_tables):
6830         Constify.
6831
6832 2017-09-27  Tom Tromey  <tom@tromey.com>
6833
6834         * top.c (new_ui_command): Constify.
6835
6836 2017-09-27  Tom Tromey  <tom@tromey.com>
6837
6838         * symfile.c (add_symbol_file_command)
6839         (remove_symbol_file_command, list_overlays_command)
6840         (map_overlay_command, unmap_overlay_command)
6841         (overlay_auto_command, overlay_manual_command)
6842         (overlay_off_command, overlay_load_command): Constify.
6843
6844 2017-09-27  Tom Tromey  <tom@tromey.com>
6845
6846         * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
6847         (info_spu_mailbox_command, info_spu_dma_command)
6848         (info_spu_proxydma_command): Constify.
6849
6850 2017-09-27  Tom Tromey  <tom@tromey.com>
6851
6852         * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
6853
6854 2017-09-27  Tom Tromey  <tom@tromey.com>
6855
6856         * cli/cli-script.c (user_defined_command): Constify.
6857
6858 2017-09-27  Tom Tromey  <tom@tromey.com>
6859
6860         * cli/cli-dump.c (dump_memory_command, dump_value_command)
6861         (dump_srec_memory, dump_srec_value, dump_ihex_memory)
6862         (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
6863         (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
6864         (dump_binary_value, append_binary_memory, append_binary_value):
6865         Constify.
6866         (struct dump_context) <func>: Constify.
6867         (add_dump_command): Update.
6868
6869 2017-09-27  Tom Tromey  <tom@tromey.com>
6870
6871         * cli/cli-cmds.c (show_version, show_configuration)
6872         (source_command, show_user): Constify.
6873
6874 2017-09-27  Tom Tromey  <tom@tromey.com>
6875
6876         * target.c (maintenance_print_target_stack): Constify.
6877
6878 2017-09-27  Tom Tromey  <tom@tromey.com>
6879
6880         * interps.c (interpreter_exec_cmd): Constify.
6881
6882 2017-09-27  Tom Tromey  <tom@tromey.com>
6883
6884         * record-full.c (cmd_record_full_restore): Constify.
6885
6886 2017-09-27  Tom Tromey  <tom@tromey.com>
6887
6888         * memattr.c (enable_mem_command, disable_mem_command)
6889         (delete_mem_command): Constify.
6890
6891 2017-09-27  Tom Tromey  <tom@tromey.com>
6892
6893         * value.c (show_convenience): Constify.
6894
6895 2017-09-27  Tom Tromey  <tom@tromey.com>
6896
6897         * gdbcore.h (core_file_command): Update.
6898         * corefile.c (core_file_command): Constify.
6899
6900 2017-09-27  Tom Tromey  <tom@tromey.com>
6901
6902         * user-regs.c (maintenance_print_user_registers): Constify.
6903
6904 2017-09-27  Tom Tromey  <tom@tromey.com>
6905
6906         * cp-namespace.c (maintenance_cplus_namespace): Constify.
6907
6908 2017-09-27  Tom Tromey  <tom@tromey.com>
6909
6910         * cp-support.c (first_component_command): Constify.
6911
6912 2017-09-27  Tom Tromey  <tom@tromey.com>
6913
6914         * psymtab.c (maintenance_print_psymbols)
6915         (maintenance_info_psymtabs, maintenance_check_psymtabs):
6916         Constify.
6917
6918 2017-09-27  Tom Tromey  <tom@tromey.com>
6919
6920         * windows-tdep.c (display_tib): Constify.
6921
6922 2017-09-27  Tom Tromey  <tom@tromey.com>
6923
6924         * linux-fork.c (delete_checkpoint_command)
6925         (detach_checkpoint_command): Constify.
6926
6927 2017-09-27  Tom Tromey  <tom@tromey.com>
6928
6929         * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
6930
6931 2017-09-27  Tom Tromey  <tom@tromey.com>
6932
6933         * arc-tdep.c (dump_arc_instruction_command): Constify.
6934
6935 2017-09-27  Tom Tromey  <tom@tromey.com>
6936
6937         * valprint.c (set_radix, show_radix): Constify.
6938
6939 2017-09-27  Tom Tromey  <tom@tromey.com>
6940
6941         * dtrace-probe.c (info_probes_dtrace_command): Constify.
6942
6943 2017-09-27  Tom Tromey  <tom@tromey.com>
6944
6945         * command.h (not_just_help_class_command): Update.
6946         * cli/cli-decode.h (not_just_help_class_command): Update.
6947         * cli/cli-decode.c (not_just_help_class_command): Constify.
6948
6949 2017-09-27  Tom Tromey  <tom@tromey.com>
6950
6951         * gdb_bfd.c (maintenance_info_bfds): Constify.
6952
6953 2017-09-27  Tom Tromey  <tom@tromey.com>
6954
6955         * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
6956         overloads.
6957         (do_add_cmd): Rename from add_cmd.  Don't call set_cmd_cfunc.
6958         (do_const_cfunc): New function.
6959         (cmd_cfunc_eq): New overload.
6960         (cli_user_command_p): Check do_const_cfunc.
6961         * cli/cli-decode.h (struct cmd_list_element) <function>: New field
6962         const_cfunc.
6963         * command.h (add_cmd): Add const overload and no-function
6964         overload.
6965         (set_cmd_cfunc): Add const overload.
6966         (cmd_const_cfunc_ftype): Declare.
6967         (cmd_cfunc_eq): Add const overload.
6968         * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
6969         python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
6970         overload.
6971
6972 2017-09-27  Tom Tromey  <tom@tromey.com>
6973
6974         * macroexp.c (get_next_token_for_substitution): New function.
6975         (substitute_args): Call it.  Check for __VA_OPT__.
6976
6977 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
6978             Pedro Alves <palves@redhat.com>
6979
6980         * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
6981         producer_is_icc_lt_14.
6982         (producer_is_icc_lt_14): New function.
6983         (check_producer): Add code for checking version of ICC.
6984         (producer_is_icc): Move to producer.c.
6985         (read_structure_type): Restrict ICC workaround to ICC<14.
6986         * producer.c: Include selftest.h.
6987         (producer_is_icc, producer_parsing_tests, _initialize_producer):
6988         New functions.
6989         * producer.h (producer_is_icc): New declaration.
6990
6991 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
6992
6993         * Makefile.in (SFILES): Add producer.c.
6994         (COMMON_OBS): Add producer.o
6995         * amd64-tdep.c (producer.h): Add new include.
6996         * dwarf2read.c (producer.h): Add new include.
6997         * producer.c: New file.
6998         * producer.h: New file.
6999         * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
7000         producer.c.
7001         * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
7002         producer.h.
7003
7004 2017-09-26  Matthias Klose  <doko@ubuntu.com>
7005
7006         * configure.ac: Search ncursesw before ncurses.
7007         Check ncursesw/ncurses.h before ncurses/ncurses.h.
7008         * gdb_curses.h: Include <ncursesw/ncurses.h>
7009         * config.in, configure: Regenerate.
7010
7011 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7012
7013         PR gdb/22185
7014         * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
7015         obsolete.
7016         Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
7017         Remove i386sol2 support.
7018         * configure.nat <i386sol2>: Remove.
7019         <sol2-64>: Fold into ...
7020         <sol2>: ... this.
7021         Move common settings to default section.
7022         Add sol-thread.o.
7023         * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
7024         x86_64-*-solaris2.1[0-9]*>: Rename to ...
7025         <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
7026         <i[34567]86-*-solaris*>: Remove.
7027         <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
7028
7029         * configure.ac: Remove wctype in libw check.
7030         (_MSE_INT_H): Don't define on Solaris 7-9.
7031         <solaris*>: Remove libthread_db.so.1 check.
7032         * configure: Regenerate.
7033         * config.in: Regenerate.
7034
7035         * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
7036         (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
7037         (gdb_ps_size_t): Remove.
7038         Use base types in users.
7039         * sol-thread.c: Likewise, also for gdb_ps_addr_t.
7040
7041         * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
7042
7043 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7044
7045         PR build/22206
7046         * sparc64-tdep.c (adi_tag_fd): Print pid as long.
7047         (adi_is_addr_mapped): Likewise.
7048         (PSR_ICC): Don't redefine.
7049         (PSR_IMPL): Likewise.
7050
7051 2017-09-25  Tom Tromey  <tom@tromey.com>
7052
7053         * regcache.c (regcache::dump): Use string_printf.
7054
7055 2017-09-25  Tom Tromey  <tom@tromey.com>
7056
7057         * regcache.c (class regcache_invalidator): New.
7058         (struct register_to_invalidate): Remove.
7059         (make_cleanup_regcache_invalidate): Remove.
7060         (regcache::raw_write): Use regcache_invalidator.
7061
7062 2017-09-25  Tom Tromey  <tom@tromey.com>
7063
7064         * spu-tdep.c (spu2ppu_sniffer): Update.
7065         * regcache.h (make_cleanup_regcache_xfree): Don't declare.
7066         * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
7067         Remove.
7068         * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
7069         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
7070         * frame.h (frame_save_as_regcache): Return std::unique_ptr.
7071         * frame.c (frame_save_as_regcache): Return std::unique_ptr.
7072         (frame_pop): Update.
7073
7074 2017-09-25  Tom Tromey  <tom@tromey.com>
7075
7076         * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
7077         * regcache.h (regcache_xfree): Don't declare.
7078         * regcache.c (regcache_xfree): Remove.
7079         (do_regcache_xfree): Use delete.
7080         * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
7081         * linux-fork.c (free_fork): Use delete.
7082         (fork_save_infrun_state): Likewise.
7083         * jit.c (jit_dealloc_cache): Use delete.
7084         * infrun.c (discard_infcall_suspend_state): Use delete.
7085
7086 2017-09-25  Tom Tromey  <tom@tromey.com>
7087
7088         * regcache.h (regcache_xmalloc): Don't declare.
7089         (regcache_raw_set_cached_value): Update comment.
7090         * regcache.c (regcache_xmalloc): Remove.
7091         * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
7092         * jit.c (jit_frame_sniffer): Use new.
7093         * frame.c (frame_save_as_regcache): Use new.
7094
7095 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7096
7097         * NEWS: Advertise support for guarded-storage registers on IBM z.
7098
7099 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7100
7101         * s390-linux-nat.c (have_regset_gs): New static variable.
7102         (s390_linux_fetch_inferior_registers): Handle guarded-storage
7103         control block and guarded-storage broadcast control regsets.
7104         (s390_read_description): Detect whether the target has
7105         guarded-storage support, return appropriate tdesc.
7106         * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
7107         (features/s390x-gs-linux64.c): Likewise.
7108         (struct gdbarch_tdep) <have_gs>: New field.
7109         (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
7110         (s390_gsbc_regset): New variables.
7111         (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
7112         and s390_gsbc_regset, if applicable.
7113         (s390_core_read_description): Check whether core file was from a
7114         target with guarded-storage support; include appropriate regsets.
7115         (s390_gdbarch_init): Add registers for guarded-storage support.
7116         (_initialize_s390_tdep): Initialize new target descriptions that
7117         include registers for guarded-storage support.
7118         * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
7119         (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
7120         (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
7121         (S390_NUM_REGS): Adjust macro definition.
7122         (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
7123         (tdesc_s390x_gs_linux64): New declarations.
7124
7125 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
7126
7127         * features/s390-gs-linux64.xml: New file.
7128         * features/s390-gs.xml: New file.
7129         * features/s390-gsbc.xml: New file.
7130         * features/s390x-gs-linux64.xml: New file.
7131         * features/Makefile (WHICH): Add s390-gs-linux64 and
7132         s390x-gs-linux64.
7133         (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
7134         (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
7135         * features/s390-gs-linux64.c: New generated file.
7136         * features/s390x-gs-linux64.c: New file.
7137         * regformats/s390-gs-linux64.dat: New file.
7138         * regformats/s390x-gs-linux64.dat: New file.
7139
7140 2017-09-23  Tom Tromey  <tom@tromey.com>
7141
7142         * defs.h (make_cleanup_override_quit_handler): Don't declare.
7143
7144 2017-09-22  Tom Tromey  <tom@tromey.com>
7145
7146         * utils.c (class scoped_input_handler) <m_quit_handler>: Change
7147         type to scoped_restore_tmpl.
7148         <scoped_input_handler>: Initialize m_quit_handler directly.
7149
7150 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
7151
7152         * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
7153         (cd_command): Likewise.  Free "current_directory" before
7154         assigning to it.
7155         * main.c (captured_main_1): Use "getcwd (NULL, 0)".
7156         * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
7157         * top.c (gdb_dirbuf): Remove global declaration.
7158         * top.h (gdb_dirbuf): Likewise.
7159
7160 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
7161
7162         * gnulib/aclocal.m4: Regenerate.
7163         * gnulib/config.in: Regenerate.
7164         * gnulib/configure: Regenerate.
7165         * gnulib/import/Makefile.am: Regenerate.
7166         * gnulib/import/Makefile.in: Regenerate.
7167         * gnulib/import/assure.h: New file.
7168         * gnulib/import/at-func.c: Likewise
7169         * gnulib/import/chdir-long.c: New file.
7170         * gnulib/import/chdir-long.h: New file.
7171         * gnulib/import/cloexec.c: New file.
7172         * gnulib/import/cloexec.h: New file.
7173         * gnulib/import/close.c: New file.
7174         * gnulib/import/closedir.c: New file.
7175         * gnulib/import/dirent-private.h: New file.
7176         * gnulib/import/dup-safer.c: New file.
7177         * gnulib/import/dup.c: New file.
7178         * gnulib/import/dup2.c: New file.
7179         * gnulib/import/error.c: New file.
7180         * gnulib/import/error.h: New file.
7181         * gnulib/import/exitfail.c: New file.
7182         * gnulib/import/exitfail.h: New file.
7183         * gnulib/import/fchdir.c: New file.
7184         * gnulib/import/fcntl.c: New file.
7185         * gnulib/import/fcntl.in.h: New file.
7186         * gnulib/import/fd-hook.c: New file.
7187         * gnulib/import/fd-hook.h: New file.
7188         * gnulib/import/fd-safer.c: New file.
7189         * gnulib/import/fdopendir.c: New file.
7190         * gnulib/import/filename.h: New file.
7191         * gnulib/import/filenamecat-lgpl.c: New file.
7192         * gnulib/import/filenamecat.h: New file.
7193         * gnulib/import/fstat.c: New file.
7194         * gnulib/import/fstatat.c: New file.
7195         * gnulib/import/getcwd-lgpl.c: New file.
7196         * gnulib/import/getcwd.c: New file.
7197         * gnulib/import/getdtablesize.c: New file.
7198         * gnulib/import/getlogin_r.c: New file.
7199         * gnulib/import/getprogname.c: New file.
7200         * gnulib/import/getprogname.h: New file.
7201         * gnulib/import/gettext.h: New file.
7202         * gnulib/import/glob-libc.h: New file.
7203         * gnulib/import/glob.c: New file.
7204         * gnulib/import/glob.in.h: New file.
7205         * gnulib/import/intprops.h: New file.
7206         * gnulib/import/m4/chdir-long.m4: New file.
7207         * gnulib/import/m4/close.m4: New file.
7208         * gnulib/import/m4/closedir.m4: New file.
7209         * gnulib/import/m4/d-ino.m4: New file.
7210         * gnulib/import/m4/d-type.m4: New file.
7211         * gnulib/import/m4/dup.m4: New file.
7212         * gnulib/import/m4/dup2.m4: New file.
7213         * gnulib/import/m4/error.m4: New file.
7214         * gnulib/import/m4/fchdir.m4: New file.
7215         * gnulib/import/m4/fcntl.m4: New file.
7216         * gnulib/import/m4/fcntl_h.m4: New file.
7217         * gnulib/import/m4/fdopendir.m4: New file.
7218         * gnulib/import/m4/filenamecat.m4: New file.
7219         * gnulib/import/m4/fstat.m4: New file.
7220         * gnulib/import/m4/fstatat.m4: New file.
7221         * gnulib/import/m4/getcwd-abort-bug.m4: New file.
7222         * gnulib/import/m4/getcwd-path-max.m4: New file.
7223         * gnulib/import/m4/getcwd.m4: New file.
7224         * gnulib/import/m4/getdtablesize.m4: New file.
7225         * gnulib/import/m4/getlogin_r.m4: New file.
7226         * gnulib/import/m4/getprogname.m4: New file.
7227         * gnulib/import/m4/glob.m4: New file.
7228         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
7229         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
7230         * gnulib/import/m4/mempcpy.m4: New file.
7231         * gnulib/import/m4/memrchr.m4: New file.
7232         * gnulib/import/m4/mode_t.m4: New file.
7233         * gnulib/import/m4/msvc-inval.m4: New file.
7234         * gnulib/import/m4/msvc-nothrow.m4: New file.
7235         * gnulib/import/m4/open.m4: New file.
7236         * gnulib/import/m4/openat.m4: New file.
7237         * gnulib/import/m4/opendir.m4: New file.
7238         * gnulib/import/m4/readdir.m4: New file.
7239         * gnulib/import/m4/realloc.m4: New file.
7240         * gnulib/import/m4/rewinddir.m4: New file.
7241         * gnulib/import/m4/save-cwd.m4: New file.
7242         * gnulib/import/m4/strdup.m4: New file.
7243         * gnulib/import/m4/strerror.m4: New file.
7244         * gnulib/import/m4/unistd-safer.m4: New file.
7245         * gnulib/import/mempcpy.c: New file.
7246         * gnulib/import/memrchr.c: New file.
7247         * gnulib/import/msvc-inval.c: New file.
7248         * gnulib/import/msvc-inval.h: New file.
7249         * gnulib/import/msvc-nothrow.c: New file.
7250         * gnulib/import/msvc-nothrow.h: New file.
7251         * gnulib/import/open.c: New file.
7252         * gnulib/import/openat-die.c: New file.
7253         * gnulib/import/openat-priv.h: New file.
7254         * gnulib/import/openat-proc.c: New file.
7255         * gnulib/import/openat.c: New file.
7256         * gnulib/import/openat.h: New file.
7257         * gnulib/import/opendir.c: New file.
7258         * gnulib/import/pipe-safer.c: New file.
7259         * gnulib/import/readdir.c: New file.
7260         * gnulib/import/realloc.c: New file.
7261         * gnulib/import/rewinddir.c: New file.
7262         * gnulib/import/save-cwd.c: New file.
7263         * gnulib/import/save-cwd.h: New file.
7264         * gnulib/import/strdup.c: New file.
7265         * gnulib/import/strerror-override.c: New file.
7266         * gnulib/import/strerror-override.h: New file.
7267         * gnulib/import/strerror.c: New file.
7268         * gnulib/import/unistd--.h: New file.
7269         * gnulib/import/unistd-safer.h: New file.
7270         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
7271         "getcwd" and "glob".
7272         * ser-tcp.c: Undefine "close" before redefining it.
7273
7274 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
7275
7276         * guile/scm-value.c (gdbscm_value_address): Initialize address,
7277         get rid of res_val.
7278
7279 2017-09-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7280
7281         * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
7282         <sol2,sparc>: Likewise.
7283         <sol2-64,i386>: Likewise.
7284
7285         * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
7286         -Wdeprecated-declarations on *-*-solaris*.
7287         * configure: Regenerate.
7288
7289         * procfs.c: Include "nat/inferior.h".
7290         (procfs_info_proc): Fix typo.
7291
7292 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
7293
7294         * remote.c (vector): Include.
7295         (struct private_thread_info): Add field, thread_handle.
7296         (free_private_thread_info): Deallocate storage associated with
7297         thread handle.
7298         (get_private_info_thread): Initialize `thread_handle' field.
7299         (struct thread_item): Add field, thread_handle.
7300         (clear_threads_listing_context): Deallocate storage associated
7301         with thread handle.
7302         (start_thread): Add support for "handle" attribute.
7303         (thread_attributes): Add "handle".
7304         (remote_get_threads_with_qthreadinfo): Initialize thread_handle
7305         field.
7306         (remote_update_thread_list): Update thread_handle.
7307         (remote_thread_handle_to_thread_info): New function.
7308         (init_remote_ops): Initialize to_thread_handle_to_thread_info.
7309
7310 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
7311
7312         * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
7313         function.
7314         (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
7315         * python/python-internal.h (thread_object_type): Declare.
7316
7317 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
7318
7319         * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
7320         (target_thread_handle_to_thread_info): Declare.
7321         * target.c (target_thread_handle_to_thread_info): New function.
7322         * target-delegates.c: Regenerate.
7323         * gdbthread.h (find_thread_by_handle): Declare.
7324         * thread.c (find_thread_by_handle): New function.
7325         * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
7326         function.
7327         (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
7328
7329 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
7330
7331         * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
7332
7333 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
7334
7335         * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
7336
7337 2017-09-21  Yao Qi  <yao.qi@linaro.org>
7338
7339         * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
7340         to gdb_target_obs.
7341
7342 2017-09-20  Tom Tromey  <tom@tromey.com>
7343
7344         * breakpoint.c (struct counted_command_line): Remove.
7345         (breakpoint_commands): Update.
7346         (alloc_counted_command_line, incref_counted_command_line)
7347         (decref_counted_command_line, do_cleanup_counted_command_line)
7348         (make_cleanup_decref_counted_command_line): Remove.
7349         (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
7350         (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
7351         (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
7352         (save_breakpoints): Update.
7353         * breakpoint.h (counted_command_line): Now a typedef to
7354         shared_ptr.
7355         (struct breakpoint) <commands>: Now a counted_command_line.
7356         (struct bpstats) <command>: Likewise.
7357
7358 2017-09-20  Tom Tromey  <tom@tromey.com>
7359
7360         * breakpoint.c (struct commands_info, do_map_commands_command):
7361         Remove.
7362         (commands_command_1): Update.
7363         (iterate_over_related_breakpoints): Take a function_view.
7364         (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
7365         (delete_command): Update.
7366         (map_breakpoint_numbers): Take a function_view.
7367         (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
7368         (disable_command): Update.
7369         (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
7370         (enable_command): Update.
7371         (struct disp_data, do_enable_breakpoint_disp)
7372         (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
7373         (do_map_enable_delete_breakpoint): Remove.
7374         (enable_once_command, enable_count_command, enable_delete_command)
7375         (delete_trace_variable_command): Update.
7376
7377 2017-09-20  Tom Tromey  <tom@tromey.com>
7378
7379         * breakpoint.c (~bpstats): Rename from bpstat_free.  Update.
7380         (bpstat_clear): Use delete.
7381         (bpstats): New constructors.
7382         (bpstat_copy, bpstat_stop_status): Use new.
7383         (dprintf_after_condition_true): Update.
7384         * breakpoint.h (bpstats::bpstats): Add constructors.
7385         (bpstats::~bpstats): Add destructor.
7386
7387 2017-09-20  Pedro Alves  <palves@redhat.com>
7388
7389         * eval.c (make_params): Delete, refactored as ...
7390         (class fake_method): ... this new type's ctor.
7391         (fake_method::~fake_method): New.
7392         (evaluate_subexp_standard): Use 'fake_method'.
7393
7394 2017-09-20  Tom Tromey  <tom@tromey.com>
7395
7396         * windows-nat.c (get_windows_debug_event, windows_wait)
7397         (do_initial_windows_stuff, windows_attach): Update.
7398         * utils.c (vwarning, internal_vproblem): Update.
7399         (ui_unregister_input_event_handler_cleanup)
7400         (prepare_to_handle_input): Remove.
7401         (class scoped_input_handler): New.
7402         (defaulted_query, prompt_for_continue): Update.
7403         * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
7404         Update.
7405         * top.c (undo_terminal_modifications_before_exit): Update.
7406         * target/target.h (target_terminal_init, target_terminal_inferior)
7407         (target_terminal_ours): Don't declare.
7408         (class target_terminal): New.
7409         * target.h (target_terminal_is_inferior, target_terminal_is_ours)
7410         (target_terminal_ours_for_output)
7411         (make_cleanup_restore_target_terminal): Don't declare.
7412         (target_terminal_info): Remove.
7413         * target.c (enum terminal_state, terminal_state): Remove.
7414         (target_terminal::terminal_state): Define.
7415         (target_terminal::init): Rename from target_terminal_init.
7416         (target_terminal::inferior): Rename from
7417         target_terminal_inferior.
7418         (target_terminal::ours): Rename from target_terminal_ours.
7419         (target_terminal::ours_for_output): Rename from
7420         target_terminal_ours_for_output.
7421         (target_terminal::info): New method.
7422         (cleanup_restore_target_terminal)
7423         (make_cleanup_restore_target_terminal): Remove.
7424         * solib.c (handle_solib_event): Update.
7425         * remote.c (remote_serial_quit_handler): Update.
7426         (remote_terminal_inferior, remote_wait_as): Update.
7427         * record-full.c (record_full_wait_1): Update.
7428         * nto-procfs.c (procfs_create_inferior): Update.
7429         * nat/fork-inferior.c (startup_inferior): Update.
7430         * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
7431         (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
7432         (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
7433         (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
7434         (mi_breakpoint_created, mi_breakpoint_deleted)
7435         (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
7436         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
7437         (mi_user_selected_context_changed, report_initial_inferior):
7438         Update.
7439         * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
7440         (linux_nat_terminal_inferior): Update.
7441         * infrun.c (follow_fork_inferior)
7442         (handle_vfork_child_exec_or_exit, do_target_resume)
7443         (check_curr_ui_sync_execution_done, handle_inferior_event_1)
7444         (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
7445         Update.
7446         * inflow.c (child_terminal_init, info_terminal_command): Update.
7447         * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
7448         (attach_command): Update.
7449         * infcall.c (call_thread_fsm_should_stop): Update.
7450         * gnu-nat.c (gnu_attach): Update.
7451         * extension.c (struct active_ext_lang_state)
7452         (restore_active_ext_lang): Update.
7453         * exceptions.c (print_flush): Update.
7454         * event-top.c (async_enable_stdin, default_quit_handler): Update.
7455         (struct quit_handler_cleanup_data, restore_quit_handler)
7456         (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
7457         Remove.
7458         * cp-support.c (gdb_demangle): Update.
7459         * breakpoint.c (update_inserted_breakpoint_locations)
7460         (insert_breakpoint_locations, handle_jit_event)
7461         (disable_breakpoints_in_unloaded_shlib): Update.
7462         * annotate.c (annotate_breakpoints_invalid)
7463         (annotate_frames_invalid): Update.
7464
7465 2017-09-20  Tom Tromey  <tom@tromey.com>
7466
7467         * main.c (catch_command_errors): Rename from
7468         catch_command_errors_const.
7469         (captured_main_1): Update.
7470
7471 2017-09-20  Pedro Alves  <palves@redhat.com>
7472
7473         * cli/cli-cmds.c (list_command): Use print_sal_location.
7474         (print_sal_location): New function.
7475         (ambiguous_line_spec): Use print_sal_location.
7476         * linespec.c (symbol_to_sal): Record the symbol in the sal.
7477         * symtab.c (find_function_start_sal): Likewise.
7478         * symtab.h (symtab_and_line::symbol): New field.
7479
7480 2017-09-20  Pedro Alves  <palves@redhat.com>
7481
7482         * linespec.c (minsym_found): Handle non-text minsyms.
7483         (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
7484
7485 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
7486
7487         * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
7488         backslash.
7489
7490 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
7491
7492         * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
7493         vmovups instead vmovaps.
7494         (move_zmm_data_to_memory): Use vmovups instead vmovaps.
7495
7496 2017-09-19  John Baldwin  <jhb@FreeBSD.org>
7497
7498         * NEWS (Changes since GDB 8.0): Add starti.
7499         * infcmd.c (enum run_break): New.
7500         (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
7501         case.
7502         (run_command): Use enum run_how.
7503         (start_command): Likewise.
7504         (starti_command): New function.
7505         (RUN_ARGS_HELP): New macro.
7506         (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
7507         commands.  Add starti command.
7508
7509 2017-09-19  Yao Qi  <yao.qi@linaro.org>
7510
7511         * Makefile.in (monitor.o): Remove the rule.
7512
7513 2017-09-19  Yao Qi  <yao.qi@linaro.org>
7514
7515         * annotate.h (struct annotate_arg_emitter): Use
7516         DISABLE_COPY_AND_ASSIGN.
7517         * common/refcounted-object.h (refcounted_object): Likewise.
7518         * completer.h (struct completion_result): Likewise.
7519         * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
7520         * filename-seen-cache.h (filename_seen_cache): Likewise.
7521         * gdbcore.h (thread_section_name): Likewise.
7522         * gdb_regex.h (compiled_regex): Likewise.
7523         * gdbthread.h (scoped_restore_current_thread): Likewise.
7524         * inferior.h (scoped_restore_current_inferior): Likewise.
7525         * jit.c (jit_reader): Likewise.
7526         * linespec.h (struct linespec_result): Likewise.
7527         * mi/mi-parse.h (struct mi_parse): Likewise.
7528         * nat/fork-inferior.c (execv_argv): Likewise.
7529         * progspace.h (scoped_restore_current_program_space): Likewise.
7530         * python/python-internal.h (class gdbpy_enter): Likewise.
7531         * regcache.h (regcache): Likewise.
7532         * target-descriptions.c (struct tdesc_reg): Likewise.
7533         (struct tdesc_type): Likewise.
7534         (struct tdesc_feature): Likewise.
7535         * ui-out.h (ui_out_emit_type): Likewise.
7536
7537 2017-09-18  Simon Marchi  <simon.marchi@ericsson.com>
7538
7539         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
7540         label abort_expression.
7541
7542 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
7543
7544         * common/buffer.c (buffer_xml_printf): Adjust.
7545         * common/xml-utils.c (xml_escape_text): Change return type to
7546         std::string, update code accordingly.
7547         * common/xml-utils.h (xml_escape_text): Change return type to
7548         std::string.
7549         * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
7550         * windows-tdep.c (windows_xfer_shared_library): Adjust.
7551         * unittests/xml-utils-selftests.c (test_xml_escape_text):
7552         Adjust.
7553
7554 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
7555
7556         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
7557         (SUBDIR_UNITTESTS_OBS): Add new object file.
7558         * unittests/xml-utils-selftests.c: New file.
7559
7560 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
7561
7562         * common/selftest.h (selftest): New struct/interface.
7563         (register_test): Add name parameter, add new overload.
7564         (run_tests): Add filter parameter.
7565         (for_each_selftest_ftype): New typedef.
7566         (for_each_selftest): New declaration.
7567         * common/selftest.c (tests): Change type to
7568         map<string, unique_ptr<selftest>>.
7569         (simple_selftest): New struct.
7570         (register_test): New function.
7571         (register_test): Add name parameter and use it.
7572         (run_tests): Add filter parameter and use it.  Add prints.
7573         Adjust to vector -> map change.
7574         * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
7575         registering selftests.
7576         * arm-tdep.c (_initialize_arm_tdep): Likewise.
7577         * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
7578         * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
7579         * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
7580         * findvar.c (_initialize_findvar): Likewise.
7581         * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
7582         * maint.c (maintenance_selftest): Update call to run_tests.
7583         (maintenance_info_selftests): New function.
7584         (_initialize_maint_cmds): Register "maintenance info selftests"
7585         command.  Update "maintenance selftest" doc.
7586         * regcache.c (_initialize_regcache): Add names when registering
7587         selftests.
7588         * rust-exp.y (_initialize_rust_exp): Likewise.
7589         * selftest-arch.c (gdbarch_selftest): New struct.
7590         (gdbarch_tests): Remove.
7591         (register_test_foreach_arch): Add name parameter.  Call
7592         register_test.
7593         (tests_with_arch): Remove, move most content to
7594         gdbarch_selftest::operator().
7595         (_initialize_selftests_foreach_arch): Remove.
7596         * selftest-arch.h (register_test_foreach_arch): Add name
7597         parameter.
7598         (run_tests_with_arch): New declaration.
7599         * utils-selftests.c (_initialize_utils_selftests): Add names
7600         when registering selftests.
7601         * utils.c (_initialize_utils): Likewise.
7602         * unittests/array-view-selftests.c
7603         (_initialize_array_view_selftests): Likewise.
7604         * unittests/environ-selftests.c (_initialize_environ_selftests):
7605         Likewise.
7606         * unittests/function-view-selftests.c
7607         (_initialize_function_view_selftests): Likewise.
7608         * unittests/offset-type-selftests.c
7609         (_initialize_offset_type_selftests): Likewise.
7610         * unittests/optional-selftests.c
7611         (_initialize_optional_selftests): Likewise.
7612         * unittests/scoped_restore-selftests.c
7613         (_initialize_scoped_restore_selftests): Likewise.
7614         * NEWS: Document "maintenance selftest" and "maint info
7615         selftests".
7616
7617 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
7618
7619         * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
7620         scoped_restore.
7621
7622 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
7623
7624         * mi/mi-main.c (mi_load_progress): Make uiout variable
7625         a unique_ptr.
7626
7627 2017-09-15  Pedro Alves  <palves@redhat.com>
7628
7629         * compile/compile-c-types.c (convert_enum, convert_int)
7630         (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
7631
7632 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
7633
7634         * dwarf2read.c (copy_string): Remove.
7635         (parse_macro_definition): Replace copy_string with savestring.
7636
7637 2017-09-15  Yao Qi  <yao.qi@linaro.org>
7638
7639         * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
7640         gdb_target_obs.
7641         (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
7642         Likewise.
7643         (i[34567]86-*-linux*): Likewise.
7644
7645 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
7646
7647         * dwarf2expr.h (dwarf_stack_value): Add constructor.
7648         (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
7649         <stack>: Change type to std::vector.
7650         <stack_len, stack_allocated>: Remove.
7651         <grow_stack>: Remove.
7652         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
7653         (dwarf_expr_context::~dwarf_expr_context): Remove.
7654         (dwarf_expr_context::grow_stack): Remove.
7655         (dwarf_expr_context::push): Adjust.
7656         (dwarf_expr_context::pop): Adjust.
7657         (dwarf_expr_context::fetch): Adjust.
7658         (dwarf_expr_context::fetch_in_stack_memory): Adjust.
7659         (dwarf_expr_context::stack_empty_p): Adjust.
7660         (dwarf_expr_context::execute_stack_op): Adjust.
7661
7662 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
7663
7664         * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
7665         return type to bool.
7666         * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
7667
7668 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
7669
7670         * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
7671         Change type to bool.
7672         (dwarf_stack_value) <in_stack_memory>: Likewise.
7673         (dwarf_expr_context) <push_address>: Change parameter type to
7674         bool.
7675         <fetch_in_stack_memory>: Change return type to bool.
7676         <push>: Change parameter type to bool.
7677         * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
7678         to bool.
7679         (dwarf_expr_context::push_address): Likewise.
7680         (dwarf_expr_context::fetch_in_stack_memory): Change return type
7681         to bool.
7682         (dwarf_expr_context::execute_stack_op): Adjust.
7683         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
7684
7685 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
7686
7687         * dwarf2expr.h (struct dwarf_expr_piece): Move up.
7688         (struct dwarf_expr_context) <n_pieces>: Remove.
7689         <pieces>: Change type to std::vector.
7690         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
7691         (dwarf_expr_context::~dwarf_expr_context): Don't manually free
7692         pieces.
7693         (dwarf_expr_context::add_piece): Adjust.
7694         * dwarf2loc.c (struct piece_closure): Initialize fields.
7695         <n_pieces>: Remove.
7696         <pieces>: Change type to std::vector.
7697         (allocate_piece_closure): Adjust, change parameter to
7698         std::vector rvalue and std::move it to piece_closure.
7699         (rw_pieced_value): Adjust.
7700         (check_pieced_synthetic_pointer): Adjust.
7701         (indirect_synthetic_pointer): Adjust.
7702         (coerce_pieced_ref): Adjust.
7703         (free_pieced_value_closure):  Adjust.  Use delete to free
7704         piece_closure.
7705         (dwarf2_evaluate_loc_desc_full): Adjust.  std::move ctx.pieces
7706         to allocate_piece_closure.
7707         (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
7708
7709 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
7710
7711         * probe.h (probe_ops_cp): Remove typedef.
7712         (DEF_VEC_P (probe_ops_cp)): Remove.
7713         (all_probe_ops): Change type to std::vector.
7714         * probe.c (info_probes_for_ops): Adjust to vector change.
7715         (probe_linespec_to_ops): Likewise.
7716         (all_probe_ops): Change type to std::vector.
7717         (_initialize_probe): Adjust to vector change.
7718         * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
7719         * elfread.c (elf_get_probes): Likewise.
7720         * stap-probe.c (_initialize_stap_probe): Likewise.
7721
7722 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
7723
7724         * probe.h (struct bound_probe): Define constructors.
7725         * probe.c (bound_probe_s): Remove typedef.
7726         (DEF_VEC_O (bound_probe_s)): Remove VEC.
7727         (collect_probes): Change return type to std::vector, remove
7728         cleanup.
7729         (compare_probes): Return bool, change parameter type.  Change
7730         semantic to "less than".
7731         (gen_ui_out_table_header_info): Change parameter to std::vector
7732         and update.
7733         (exists_probe_with_pops): Likewise.
7734         (info_probes_for_ops): Update to std::vector change.
7735         (enable_probes_command): Likewise.
7736         (disable_probes_command): Likewise.
7737
7738 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
7739
7740         * probe.h (struct probe_ops) <get_probes>: Change parameter from
7741         vec to std::vector.
7742         * probe.c (parse_probes_in_pspace): Update.
7743         (find_probes_in_objfile): Update.
7744         (find_probe_by_pc): Update.
7745         (collect_probes): Update.
7746         (probe_any_get_probes): Update.
7747         * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
7748         return type to reference to std::vector.
7749         * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
7750         std::vector and update.
7751         (dtrace_process_dof): Likewise.
7752         (dtrace_get_probes): Likewise.
7753         * elfread.c (elf_get_probes): Change return type to std::vector,
7754         store an std::vector in bfd_data.
7755         (probe_key_free): Update to std::vector.
7756         * stap-probe.c (handle_stap_probe): Change parameter to
7757         std::vector and update.
7758         (stap_get_probes): Likewise.
7759         * symfile-debug.c (debug_sym_get_probes): Change return type to
7760         std::vector and update.
7761
7762 2017-09-11  Tom Tromey  <tom@tromey.com>
7763
7764         * breakpoint.c (program_breakpoint_here_p): Update.
7765         * target.c (make_scoped_restore_show_memory_breakpoints): Rename
7766         from make_show_memory_breakpoints_cleanup.  Return a
7767         scoped_restore_tmpl<int>.
7768         (restore_show_memory_breakpoints): Remove.
7769         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
7770         * mem-break.c (memory_validate_breakpoint): Update.
7771         * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
7772         (ia64_memory_remove_breakpoint): Update.
7773         (ia64_breakpoint_from_pc): Update.
7774         * target.h (make_scoped_restore_show_memory_breakpoints): Rename
7775         from make_show_memory_breakpoints_cleanup.
7776
7777 2017-09-11  Tom Tromey  <tom@tromey.com>
7778
7779         * d-namespace.c (d_lookup_symbol): Use std::string.
7780         (find_symbol_in_baseclass): Likewise.
7781
7782 2017-09-11  Tom Tromey  <tom@tromey.com>
7783
7784         * ctf.c (ctf_start): Use std::string.
7785
7786 2017-09-11  Tom Tromey  <tom@tromey.com>
7787
7788         * ada-lang.c (is_known_support_routine): Update.
7789         (ada_unhandled_exception_name_addr_from_raise): Update.
7790         * guile/scm-frame.c (gdbscm_frame_name): Update.
7791         * python/py-frame.c (frapy_name): Update.
7792         (frapy_function): Update.
7793         * stack.h (find_frame_funname): Update.
7794         * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
7795         (print_frame): Update.
7796
7797 2017-09-11  Tom Tromey  <tom@tromey.com>
7798
7799         * findcmd.c (put_bits): Take a gdb::byte_vector.
7800         (parse_find_args): Return gdb::byte_vector.  "args" now const.
7801         Remove "pattern_bufp" and "pattern_lenp" parameters.  Remove
7802         cleanups.
7803         (find_command): Update.
7804
7805 2017-09-11  Tom Tromey  <tom@tromey.com>
7806
7807         * cli/cli-script.c (class scoped_restore_hook_in): New.
7808         (clear_hook_in_cleanup): Remove.
7809         (execute_cmd_pre_hook, execute_cmd_post_hook): Use
7810         scoped_restore_hook_in.
7811
7812 2017-09-11  Tom Tromey  <tom@tromey.com>
7813
7814         * cli/cli-script.c (restore_interp): Remove.
7815         (read_command_lines): Use scoped_restore_interp.
7816         * interps.c (scoped_restore_interp::set_temp): Rename from
7817         interp_set_temp.
7818         * interps.h (class scoped_restore_interp): New.
7819         (interp_set_temp): Remove.
7820
7821 2017-09-11  Tom Tromey  <tom@tromey.com>
7822
7823         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
7824         (mi_cmd_catch_exception, mi_catch_load_unload): Update.
7825         * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
7826         scoped_restore.
7827         (mi_cmd_break_insert_1): Update.
7828         * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
7829         scoped_restore.
7830
7831 2017-09-11  Tom Tromey  <tom@tromey.com>
7832
7833         * demangle.c (demangle_command): Update.
7834         * breakpoint.c (disable_command): Update.
7835         (enable_command): Update.
7836         (find_location_by_number): Make "number" const.  Use
7837         get_number_trailer.
7838         * cli/cli-utils.c (extract_arg): Return std::string.
7839         * probe.c (parse_probe_linespec): Update.  Change types.
7840         (collect_probes): Take string arguments.
7841         (parse_probe_linespec): Likewise.
7842         (info_probes_for_ops): Update.
7843         (enable_probes_command): Update.
7844         (disable_probes_command): Update.
7845         * break-catch-sig.c (catch_signal_split_args): Update.
7846         * mi/mi-parse.c (mi_parse): Update.
7847
7848 2017-09-11  Tom Tromey  <tom@tromey.com>
7849
7850         * language.h (language_enum): Make argument const.
7851         * language.c (language_enum): Make argument const.
7852
7853 2017-09-11  Tom Tromey  <tom@tromey.com>
7854
7855         * common/common-utils.h (skip_to_space): Remove macro, redeclare
7856         as function.
7857         (skip_to_space): Rename from skip_to_space_const.
7858         * common/common-utils.c (skip_to_space): New function.
7859         (skip_to_space): Rename from skip_to_space_const.
7860         * cli/cli-utils.h (get_number): Rename from get_number_const.
7861         (extract_arg): Rename from extract_arg_const.
7862         * cli/cli-utils.c (get_number): Rename from get_number_const.
7863         (extract_arg): Rename from extract_arg_const.
7864         (number_or_range_parser::get_number): Use ::get_number.
7865         * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
7866         break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
7867         cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
7868         completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
7869         linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
7870         minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
7871         python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
7872         stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
7873
7874 2017-09-11  Tom Tromey  <tom@tromey.com>
7875
7876         * python/python.c (do_start_initialization): Use
7877         py-event-types.def to initialize types.
7878         Define all object type structures.
7879         * python/python-internal.h: Don't declare event initialization
7880         functions.
7881         * python/py-threadevent.c (thread_event_object_type): Don't
7882         define.
7883         * python/py-stopevent.c (stop_event_object_type): Don't define.
7884         * python/py-signalevent.c (signal_event_object_type): Don't
7885         declare or define.
7886         * python/py-newobjfileevent.c (new_objfile_event_object_type)
7887         (clear_objfiles_event_object_type): Don't declare or define.
7888         * python/py-infevents.c (inferior_call_pre_event_object_type)
7889         (inferior_call_post_event_object_type)
7890         (register_changed_event_object_type)
7891         (memory_changed_event_object_type): Don't declare or define.
7892         * python/py-inferior.c (new_thread_event_object_type)
7893         (new_inferior_event_object_type)
7894         (inferior_deleted_event_object_type): Don't declare or define.
7895         * python/py-exitedevent.c (exited_event_object_type): Don't
7896         declare or define.
7897         * python/py-evts.c (gdbpy_initialize_py_events): Use
7898         py-all-events.def.
7899         * python/py-events.h (thread_event_object_type): Don't declare.
7900         (events_object): Use py-all-events.def.
7901         * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove.  Use
7902         py-event-types.def.
7903         * python/py-event-types.def: New file.
7904         * python/py-continueevent.c (create_continue_event_object): Don't
7905         declare or define.
7906         * python/py-bpevent.c (breakpoint_event_object_type): Don't
7907         declare or define.
7908         * python/py-all-events.def: New file.
7909
7910 2017-09-11  Tom Tromey  <tom@tromey.com>
7911
7912         * python/py-threadevent.c (create_thread_event_object): Return
7913         gdbpy_ref.
7914         * python/py-stopevent.h (create_stop_event_object)
7915         (create_breakpoint_event_object, create_signal_event_object):
7916         Update.
7917         * python/py-stopevent.c (create_stop_event_object): Return
7918         gdbpy_ref.
7919         (emit_stop_event): Update.
7920         * python/py-signalevent.c (create_signal_event_object): Return
7921         gdbpy_ref.
7922         * python/py-infevents.c (create_inferior_call_event_object):
7923         Update.
7924         * python/py-event.h (create_event_object)
7925         (create_thread_event_object): Update.
7926         * python/py-event.c (create_event_object): Return gdbpy_ref.
7927         * python/py-continueevent.c: Return gdbpy_ref.
7928         * python/py-bpevent.c (create_breakpoint_event_object): Return
7929         gdbpy_ref.
7930
7931 2017-09-11  Tom Tromey  <tom@tromey.com>
7932
7933         PR python/15622:
7934         * NEWS: Add entry.
7935         * python/python.c (do_start_initialization): Initialize new event
7936         types.
7937         * python/python-internal.h (gdbpy_initialize_new_inferior_event)
7938         (gdbpy_initialize_inferior_deleted_event)
7939         (gdbpy_initialize_new_thread_event): Declare.
7940         * python/py-threadevent.c (create_thread_event_object): Add option
7941         "thread" parameter.
7942         * python/py-inferior.c (new_thread_event_object_type)
7943         (new_inferior_event_object_type)
7944         (inferior_deleted_event_object_type): Declare.
7945         (python_new_inferior, python_inferior_deleted): New functions.
7946         (add_thread_object): Emit new_thread event.
7947         (gdbpy_initialize_inferior): Attach new functions to corresponding
7948         observers.
7949         (new_thread, new_inferior, inferior_deleted): Define new event
7950         types.
7951         * python/py-evts.c (gdbpy_initialize_py_events): Add new
7952         registries.
7953         * python/py-events.h (events_object) <new_inferior,
7954         inferior_deleted, new_thread>: New fields.
7955         * python/py-event.h (create_thread_event_breakpoint): Add optional
7956         "thread" parameter.
7957
7958 2017-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
7959
7960         * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
7961         check current_ui instead.
7962         (internal_vproblem): Likewise.
7963
7964 2017-09-09  Simon Marchi  <simon.marchi@ericsson.com>
7965
7966         * thread.c (print_thread_info_1): Remove unnecessary calls to
7967         uiout->is_mi_like_p.
7968
7969 2017-09-09  Tom Tromey  <tom@tromey.com>
7970
7971         * namespace.h (add_using_directive): Update.
7972         * namespace.c (add_using_directive): Change type of excludes to
7973         std::vector.
7974         * dwarf2read.c (read_import_statement): Use std::vector.
7975         (read_namespace): Update.
7976         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
7977
7978 2017-09-09  Tom Tromey  <tom@tromey.com>
7979
7980         * linespec.c (create_sals_line_offset): Use gdb::def_vector.
7981
7982 2017-09-09  Tom Tromey  <tom@tromey.com>
7983
7984         * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
7985
7986 2017-09-09  Tom Tromey  <tom@tromey.com>
7987
7988         * stack.c (func_command): Use gdb::def_vector.
7989
7990 2017-09-09  Tom Tromey  <tom@tromey.com>
7991
7992         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
7993         ui_out_emit_list, ui_out_emit_tuple.
7994         (mi_cmd_var_update): Likewise.
7995
7996 2017-09-09  Tom Tromey  <tom@tromey.com>
7997
7998         * mi/mi-interp.c (mi_user_selected_context_changed): Use
7999         ui_out_redirect_pop.
8000         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
8001         ui_out_redirect_pop.
8002         * utils.c (do_ui_out_redirect_pop)
8003         (make_cleanup_ui_out_redirect_pop): Remove.
8004         * top.c (execute_command_to_string): Use ui_out_redirect_pop.
8005         * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
8006         * ui-out.h (ui_out_redirect_pop): New class.
8007
8008 2017-09-09  Tom Tromey  <tom@tromey.com>
8009
8010         * mi/mi-main.c (output_cores): Use ui_out_emit_list.
8011         (list_available_thread_groups, mi_cmd_list_thread_groups)
8012         (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
8013         (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
8014         Likewise.
8015
8016 2017-09-09  Tom Tromey  <tom@tromey.com>
8017
8018         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
8019         ui_out_emit_tuple.
8020
8021 2017-09-09  Tom Tromey  <tom@tromey.com>
8022
8023         * target.c (flash_erase_command): Use ui_out_emit_tuple.
8024         * stack.c (print_frame): Use ui_out_emit_tuple.
8025         * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
8026         (info_spu_mailbox_command, info_spu_dma_command)
8027         (info_spu_proxydma_command): Likewise.
8028         * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
8029         ui_out_emit_tuple, gdb::byte_vector, bin2hex.
8030         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
8031         ui_out_emit_tuple.
8032         * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
8033
8034 2017-09-09  Tom Tromey  <tom@tromey.com>
8035
8036         * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
8037         (class ui_out_emit_table): Update comment.
8038         * ui-out.c (do_cleanup_table_end)
8039         (make_cleanup_ui_out_table_begin_end): Remove.
8040         * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
8041         (info_spu_dma_cmdlist): Likewise.
8042         * probe.c (info_probes_for_ops): Use ui_out_emit_table.
8043         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
8044         ui_out_emit_table.
8045
8046 2017-09-09  Tom Tromey  <tom@tromey.com>
8047
8048         * thread.c (print_thread_info_1): Use ui_out_emit_table,
8049         ui_out_emit_list, gdb::optional.
8050
8051 2017-09-09  John Baldwin  <jhb@FreeBSD.org>
8052
8053         * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
8054         prototype.
8055         * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
8056         prototype.
8057         * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
8058         prototype.
8059         * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
8060         * ada-exp.y: Remove _initialize_ada_exp prototype.
8061         * ada-lang.c: Remove _initialize_ada_language prototype.
8062         * ada-tasks.c: Remove _initialize_tasks prototype.
8063         * addrmap.c: Remove _initialize_addrmap prototype.
8064         * agent.c: Remove _initialize_agent prototype.
8065         * aix-thread.c: Remove _initialize_aix_thread prototype.
8066         * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
8067         * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
8068         * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
8069         prototype.
8070         * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
8071         * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
8072         * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
8073         * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
8074         prototype.
8075         * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
8076         prototype.
8077         * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
8078         * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
8079         * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
8080         * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
8081         prototype.
8082         * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
8083         * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
8084         * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
8085         * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
8086         * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
8087         * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
8088         * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
8089         prototype.
8090         * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
8091         prototype.
8092         * annotate.c: Remove _initialize_annotate prototype.
8093         * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
8094         * arc-tdep.c: Remove _initialize_arc_tdep prototype.
8095         * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
8096         * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
8097         * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
8098         * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
8099         * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
8100         * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
8101         prototype.
8102         * arm-tdep.c: Remove _initialize_arm_tdep prototype.
8103         * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
8104         * auto-load.c: Remove _initialize_auto_load prototype.
8105         * auxv.c: Remove _initialize_auxv prototype.
8106         * avr-tdep.c: Remove _initialize_avr_tdep prototype.
8107         * ax-gdb.c: Remove _initialize_ax_gdb prototype.
8108         * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
8109         * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
8110         * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
8111         * break-catch-syscall.c: Remove _initialize_break_catch_syscall
8112         prototype.
8113         * break-catch-throw.c: Remove _initialize_break_catch_throw
8114         prototype.
8115         * breakpoint.c: Remove _initialize_breakpoint prototype.
8116         * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
8117         * btrace.c: Remove _initialize_btrace prototype.
8118         * charset.c: Remove _initialize_charset prototype.
8119         * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
8120         * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
8121         * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
8122         * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
8123         * cli/cli-script.c: Remove _initialize_cli_script prototype.
8124         * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
8125         * coffread.c: Remove _initialize_coffread prototype.
8126         * compile/compile.c: Remove _initialize_compile prototype.
8127         * complaints.c: Remove _initialize_complaints prototype.
8128         * completer.c: Remove _initialize_completer prototype.
8129         * copying.awk: Remove _initialize_copying prototype.
8130         * copying.c: Regenerate.
8131         * core-regset.c: Remove _initialize_core_regset prototype.
8132         * corefile.c: Remove _initialize_core prototype.
8133         * corelow.c: Remove _initialize_corelow prototype.
8134         * cp-abi.c: Remove _initialize_cp_abi prototype.
8135         * cp-namespace.c: Remove _initialize_cp_namespace prototype.
8136         * cp-support.c: Remove _initialize_cp_support prototype.
8137         * cp-valprint.c: Remove _initialize_cp_valprint prototype.
8138         * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
8139         * cris-tdep.c: Remove _initialize_cris_tdep prototype.
8140         * ctf.c: Remove _initialize_ctf prototype.
8141         * d-lang.c: Remove _initialize_d_language prototype.
8142         * darwin-nat-info.c: Remove _initialize_darwin_info_commands
8143         prototype.
8144         * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
8145         * dbxread.c: Remove _initialize_dbxread prototype.
8146         * dcache.c: Remove _initialize_dcache prototype.
8147         * demangle.c: Remove _initialize_demangler prototype.
8148         * disasm-selftests.c: Remove _initialize_disasm_selftests
8149         prototype.
8150         * disasm.c: Remove _initialize_disasm prototype.
8151         * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
8152         * dummy-frame.c: Remove _initialize_dummy_frame prototype.
8153         * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
8154         prototype.
8155         * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
8156         * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
8157         * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
8158         * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
8159         * elfread.c: Remove _initialize_elfread prototype.
8160         * exec.c: Remove _initialize_exec prototype.
8161         * extension.c: Remove _initialize_extension prototype.
8162         * f-lang.c: Remove _initialize_f_language prototype.
8163         * f-valprint.c: Remove _initialize_f_valprint prototype.
8164         * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
8165         * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
8166         * filesystem.c: Remove _initialize_filesystem prototype.
8167         * findcmd.c: Remove _initialize_mem_search prototype.
8168         * fork-child.c: Remove _initialize_fork_child prototype.
8169         * frame-base.c: Remove _initialize_frame_base prototype.
8170         * frame-unwind.c: Remove _initialize_frame_unwind prototype.
8171         * frame.c: Remove _initialize_frame prototype.
8172         * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
8173         * frv-tdep.c: Remove _initialize_frv_tdep prototype.
8174         * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
8175         * gcore.c: Remove _initialize_gcore prototype.
8176         * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
8177         * gdbarch.c: Regenerate.
8178         * gdbarch.sh: Remove _initialize_gdbarch prototype.
8179         * gdbtypes.c: Remove _initialize_gdbtypes prototype.
8180         * gnu-nat.c: Remove _initialize_gnu_nat prototype.
8181         * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
8182         * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
8183         * go-lang.c: Remove _initialize_go_language prototype.
8184         * go32-nat.c: Remove _initialize_go32_nat prototype.
8185         * guile/guile.c: Remove _initialize_guile prototype.
8186         * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
8187         * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
8188         * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
8189         * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
8190         * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
8191         * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
8192         * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
8193         * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
8194         * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
8195         * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
8196         prototype.
8197         * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
8198         prototype.
8199         * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
8200         * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
8201         * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
8202         * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
8203         * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
8204         * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
8205         * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
8206         * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
8207         * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
8208         * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
8209         * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
8210         * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
8211         * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
8212         * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
8213         * i386-tdep.c: Remove _initialize_i386_tdep prototype.
8214         * i386-windows-nat.c: Remove _initialize_i386_windows_nat
8215         prototype.
8216         * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
8217         prototype.
8218         * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
8219         * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
8220         * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
8221         * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
8222         * infcall.c: Remove _initialize_infcall prototype.
8223         * infcmd.c: Remove _initialize_infcmd prototype.
8224         * inferior.c: Remove _initialize_inferiors prototype.
8225         * inflow.c: Remove _initialize_inflow prototype.
8226         * infrun.c: Remove _initialize_infrun prototype.
8227         * interps.c: Remove _initialize_interpreter prototype.
8228         * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
8229         * jit.c: Remove _initialize_jit prototype.
8230         * language.c: Remove _initialize_language prototype.
8231         * linux-fork.c: Remove _initialize_linux_fork prototype.
8232         * linux-nat.c: Remove _initialize_linux_nat prototype.
8233         * linux-tdep.c: Remove _initialize_linux_tdep prototype.
8234         * linux-thread-db.c: Remove _initialize_thread_db prototype.
8235         * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
8236         * m2-lang.c: Remove _initialize_m2_language prototype.
8237         * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
8238         * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
8239         * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
8240         * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
8241         * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
8242         * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
8243         * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
8244         * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
8245         * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
8246         * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
8247         * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
8248         * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
8249         * machoread.c: Remove _initialize_machoread prototype.
8250         * macrocmd.c: Remove _initialize_macrocmd prototype.
8251         * macroscope.c: Remove _initialize_macroscope prototype.
8252         * maint.c: Remove _initialize_maint_cmds prototype.
8253         * mdebugread.c: Remove _initialize_mdebugread prototype.
8254         * memattr.c: Remove _initialize_mem prototype.
8255         * mep-tdep.c: Remove _initialize_mep_tdep prototype.
8256         * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
8257         * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
8258         * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
8259         * mi/mi-main.c: Remove _initialize_mi_main prototype.
8260         * microblaze-linux-tdep.c: Remove
8261         _initialize_microblaze_linux_tdep prototype.
8262         * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
8263         * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
8264         * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
8265         * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
8266         * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
8267         * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
8268         * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
8269         * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
8270         * mips-tdep.c: Remove _initialize_mips_tdep prototype.
8271         * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
8272         * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
8273         prototype.
8274         * mipsread.c: Remove _initialize_mipsread prototype.
8275         * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
8276         prototype.
8277         * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
8278         * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
8279         * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
8280         * mt-tdep.c: Remove _initialize_mt_tdep prototype.
8281         * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
8282         * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
8283         prototype.
8284         * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
8285         * nto-procfs.c: Remove _initialize_procfs prototype.
8286         * nto-tdep.c: Remove _initialize_nto_tdep prototype.
8287         * objc-lang.c: Remove _initialize_objc_language prototype.
8288         * objfiles.c: Remove _initialize_objfiles prototype.
8289         * observer.c: Remove observer_test_first_notification_function,
8290         observer_test_second_notification_function,
8291         observer_test_third_notification_function, and
8292         _initialize_observer prototypes.
8293         * opencl-lang.c: Remove _initialize_opencl_language prototypes.
8294         * osabi.c: Remove _initialize_gdb_osabi prototype.
8295         * osdata.c: Remove _initialize_osdata prototype.
8296         * p-valprint.c: Remove _initialize_pascal_valprint prototype.
8297         * parse.c: Remove _initialize_parse prototype.
8298         * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
8299         * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
8300         * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
8301         * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
8302         * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
8303         * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
8304         * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
8305         * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
8306         * printcmd.c: Remove _initialize_printcmd prototype.
8307         * probe.c: Remove _initialize_probe prototype.
8308         * proc-api.c: Remove _initialize_proc_api prototype.
8309         * proc-events.c: Remove _initialize_proc_events prototype.
8310         * proc-service.c: Remove _initialize_proc_service prototype.
8311         * procfs.c: Remove _initialize_procfs prototype.
8312         * psymtab.c: Remove _initialize_psymtab prototype.
8313         * python/python.c: Remove _initialize_python prototype.
8314         * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
8315         * record-btrace.c: Remove _initialize_record_btrace prototype.
8316         * record-full.c: Remove _initialize_record_full prototype.
8317         * record.c: Remove _initialize_record prototype.
8318         * regcache.c: Remove _initialize_regcache prototype.
8319         * reggroups.c: Remove _initialize_reggroup prototype.
8320         * remote-notif.c: Remove _initialize_notif prototype.
8321         * remote-sim.c: Remove _initialize_remote_sim prototype.
8322         * remote.c: Remove _initialize_remote prototype.
8323         * reverse.c: Remove _initialize_reverse prototype.
8324         * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
8325         * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
8326         * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
8327         prototype.
8328         * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
8329         * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
8330         * rust-exp.y: Remove _initialize_rust_exp prototype.
8331         * rx-tdep.c: Remove _initialize_rx_tdep prototype.
8332         * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
8333         * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
8334         * score-tdep.c: Remove _initialize_score_tdep prototype.
8335         * selftest-arch.c: Remove _initialize_selftests_foreach_arch
8336         prototype.
8337         * ser-go32.c: Remove _initialize_ser_dos prototype.
8338         * ser-mingw.c: Remove _initialize_ser_windows prototype.
8339         * ser-pipe.c: Remove _initialize_ser_pipe prototype.
8340         * ser-tcp.c: Remove _initialize_ser_tcp prototype.
8341         * ser-unix.c: Remove _initialize_ser_hardwire prototype.
8342         * serial.c: Remove _initialize_serial prototype.
8343         * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
8344         * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
8345         * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
8346         * sh-tdep.c: Remove _initialize_sh_tdep prototype.
8347         * skip.c: Remove _initialize_step_skip prototype.
8348         * sol-thread.c: Remove _initialize_sol_thread prototype.
8349         * solib-aix.c: Remove _initialize_solib_aix prototype.
8350         * solib-darwin.c: Remove _initialize_darwin_solib prototype.
8351         * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
8352         * solib-frv.c: Remove _initialize_frv_solib prototype.
8353         * solib-spu.c: Remove _initialize_spu_solib prototype.
8354         * solib-svr4.c: Remove _initialize_svr4_solib prototype.
8355         * solib-target.c: Remove _initialize_solib_target prototype.
8356         * solib.c: Remove _initialize_solib prototype.
8357         * source.c: Remove _initialize_source prototype.
8358         * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
8359         * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
8360         prototype.
8361         * sparc-nat.c: Remove _initialize_sparc_nat prototype.
8362         * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
8363         * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
8364         * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
8365         prototype.
8366         * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
8367         * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
8368         * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
8369         * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
8370         prototype.
8371         * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
8372         prototype.
8373         * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
8374         prototype.
8375         * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
8376         prototype.
8377         * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
8378         * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
8379         prototype.
8380         * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
8381         prototype.
8382         * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
8383         prototype.
8384         * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
8385         prototype.
8386         * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
8387         prototype.
8388         * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
8389         * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
8390         * spu-tdep.c: Remove _initialize_spu_tdep prototype.
8391         * stabsread.c: Remove _initialize_stabsread prototype.
8392         * stack.c: Remove _initialize_stack prototype.
8393         * stap-probe.c: Remove _initialize_stap_probe prototype.
8394         * std-regs.c: Remove _initialize_frame_reg prototype.
8395         * symfile-debug.c: Remove _initialize_symfile_debug prototype.
8396         * symfile-mem.c: Remove _initialize_symfile_mem prototype.
8397         * symfile.c: Remove _initialize_symfile prototype.
8398         * symmisc.c: Remove _initialize_symmisc prototype.
8399         * symtab.c: Remove _initialize_symtab prototype.
8400         * target-dcache.c: Remove _initialize_target_dcache prototype.
8401         * target-descriptions.c: Remove _initialize_target_descriptions
8402         prototype.
8403         * thread.c: Remove _initialize_thread prototype.
8404         * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
8405         prototype.
8406         * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
8407         * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
8408         * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
8409         prototype.
8410         * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
8411         * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
8412         * tracefile.c: Remove _initialize_tracefile prototype.
8413         * tracepoint.c: Remove _initialize_tracepoint prototype.
8414         * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
8415         * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
8416         * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
8417         * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
8418         * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
8419         * tui/tui-win.c: Remove _initialize_tui_win prototype.
8420         * tui/tui.c: Remove _initialize_tui prototype.
8421         * typeprint.c: Remove _initialize_typeprint prototype.
8422         * user-regs.c: Remove _initialize_user_regs prototype.
8423         * utils.c: Remove _initialize_utils prototype.
8424         * v850-tdep.c: Remove _initialize_v850_tdep prototype.
8425         * valarith.c: Remove _initialize_valarith prototype.
8426         * valops.c: Remove _initialize_valops prototype.
8427         * valprint.c: Remove _initialize_valprint prototype.
8428         * value.c: Remove _initialize_values prototype.
8429         * varobj.c: Remove _initialize_varobj prototype.
8430         * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
8431         * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
8432         * vax-tdep.c: Remove _initialize_vax_tdep prototype.
8433         * windows-nat.c: Remove _initialize_windows_nat,
8434         _initialize_check_for_gdb_ini, and _initialize_loadable
8435         prototypes.
8436         * windows-tdep.c: Remove _initialize_windows_tdep prototype.
8437         * xcoffread.c: Remove _initialize_xcoffread prototype.
8438         * xml-support.c: Remove _initialize_xml_support prototype.
8439         * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
8440         * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
8441         prototype.
8442         * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
8443         prototype.
8444         * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
8445
8446 2017-09-08  Keith Seitz  <keiths@redhat.com>
8447
8448         * dwarf2read.c (struct field_info) <fnfields>: Remove unused
8449         field.
8450
8451 2017-09-08  Christoph Weinmann  <christoph.t.weinmann@intel.com>
8452
8453         * f-valprint.c (f_val_print): Remove check for one byte
8454         sized integers. Remove printing of character type.
8455
8456 2017-09-08  Frank Penczek  <frank.penczek@intel.com>
8457             Christoph Weinmann  <christoph.t.weinmann@intel.com>
8458             Bernhard Heckel  <bernhard.heckel@intel.com>
8459
8460         * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
8461         to maintain proper indentation when printing pointers/refs.
8462
8463 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
8464
8465         GDB 8.0.1 released.
8466
8467 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
8468
8469         * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
8470
8471 2017-09-05  Tom Tromey  <tom@tromey.com>
8472
8473         * parse.c (funcall_chain): Now a std::vector.
8474         (start_arglist, end_arglist): Simplify.
8475         (free_funcalls): Remove.
8476         (parse_exp_in_context_1): Remove cleanup.
8477
8478 2017-09-05  Tom Tromey  <tom@tromey.com>
8479
8480         * go-exp.y (go_parse): Don't create a cleanup.
8481
8482 2017-09-05  Tom Tromey  <tom@tromey.com>
8483
8484         * d-exp.y (PrimaryExpression): Use std::string.
8485         (d_parse): Don't create a cleanup.
8486
8487 2017-09-05  Tom Tromey  <tom@tromey.com>
8488
8489         * utils.c (do_clear_parser_state): Remove.
8490         (make_cleanup_clear_parser_state): Remove.
8491         * p-exp.y (pascal_parse): Use scoped_restore.
8492         * m2-exp.y (m2_parse): Use scoped_restore.
8493         * f-exp.y (f_parse): Use scoped_restore.
8494         * d-exp.y (d_parse): Use scoped_restore.
8495         * c-exp.y (c_parse): Use scoped_restore.
8496         * ada-exp.y (ada_parse): Use scoped_restore.
8497         * utils.h (make_cleanup_clear_parser_state): Remove.
8498
8499 2017-09-06  Keith Seitz  <keiths@redhat.com>
8500
8501         * dwarf2read.c (dw2_linkage_name_attr): New function.
8502         (dw2_linkage_name): New function.
8503         (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
8504         (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
8505         (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
8506
8507 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
8508
8509         * config/djgpp/djconfig.sh: Correct shell portability issue.
8510
8511 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
8512
8513         * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
8514
8515 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
8516
8517         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
8518         * NEWS: Mention new FreeBSD/mips native configuration.
8519         * configure.host: Add aarch64*-*-freebsd*.
8520         * configure.nat: Likewise.
8521         * aarch64-fbsd-nat.c: New file.
8522
8523 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
8524
8525         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
8526         (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
8527         * NEWS: Mention new FreeBSD/aarch64 target.
8528         * configure.tgt: Add aarch64*-*-freebsd*.
8529         * aarch64-fbsd-tdep.c: New file.
8530         * aarch64-fbsd-tdep.h: New file.
8531
8532 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
8533
8534         * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
8535
8536 2017-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
8537
8538         * parse.c (find_minsym_type_and_address): Don't relocate addresses
8539         of TLS symbols.
8540
8541 2017-09-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8542
8543         * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
8544         call.
8545
8546 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
8547
8548         * infrun.c (follow_exec): Call add_thread after
8549         target_find_description.
8550
8551 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
8552
8553         * infrun.c (handle_inferior_event_1): When exec'ing, read
8554         stop_pc after follow_exec.
8555
8556 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
8557
8558         * remote.c (process_g_packet): Update error message.
8559
8560 2017-09-05  Yao Qi  <yao.qi@linaro.org>
8561
8562         * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
8563         targets.
8564
8565 2017-09-05  Pedro Alves  <palves@redhat.com>
8566
8567         * eval.c (eval_call, evaluate_funcall): New functions, factored
8568         out from ...
8569         (evaluate_subexp_standard): ... this.
8570
8571 2017-09-05  Yao Qi  <yao.qi@linaro.org>
8572
8573         * amd64-tdep.c (amd64_target_description): Create target
8574         descriptions.
8575         (_initialize_amd64_tdep): Don't call functions
8576         initialize_tdesc_amd64_*.  Add self tests.
8577         * arch/amd64.c (amd64_create_target_description): Add parameter
8578         is_linux.  Call set_tdesc_osabi if is_linux is true.
8579         * arch/amd64.h (amd64_create_target_description): Update the
8580         declaration.
8581         * arch/i386.c (i386_create_target_description): Add parameter
8582         is_linux.  Call set_tdesc_osabi if is_linux is true.
8583         * arch/i386.h (i386_create_target_description): Update
8584         declaration.
8585         * configure.tgt: Add i386.o to gdb_target_obs.
8586         * features/Makefile (XMLTOC): Remove i386/*.xml.
8587         * features/i386/amd64-avx-avx512.c: Remove.
8588         * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
8589         * features/i386/amd64-avx-mpx.c: Remove.
8590         * features/i386/amd64-avx.c: Remove.
8591         * features/i386/amd64-mpx.c: Remove.
8592         * features/i386/amd64.c: Remove.
8593         * features/i386/i386-avx-avx512.c: Remove.
8594         * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
8595         * features/i386/i386-avx-mpx.c: Remove.
8596         * features/i386/i386-avx.c: Remove.
8597         * features/i386/i386-mmx.c: Remove.
8598         * features/i386/i386-mpx.c: Remove.
8599         * features/i386/i386.c: Remove.
8600         * i386-tdep.c: Don't include features/i386/i386*.c., include
8601         target-descriptions.h and arch/i386.h.
8602         (i386_target_description): Create target descriptions.
8603         (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
8604         functions.  Do self tests.
8605
8606 2017-09-05  Yao Qi  <yao.qi@linaro.org>
8607
8608         * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
8609         * features/i386/amd64-avx-avx512-linux.c: Removed.
8610         * features/i386/amd64-avx-linux.c: Removed.
8611         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
8612         * features/i386/amd64-avx-mpx-linux.c: Removed.
8613         * features/i386/amd64-linux.c: Removed.
8614         * features/i386/amd64-mpx-linux.c: Removed.
8615         * features/i386/x32-avx-avx512-linux.c: Removed.
8616         * features/i386/x32-avx-linux.c: Removed.
8617         * features/i386/x32-linux.c: Removed.
8618
8619 2017-09-05  Yao Qi  <yao.qi@linaro.org>
8620
8621         * amd64-linux-tdep.c: Include arch/amd64.h.  Don't include
8622         features/i386/*.c.
8623         (amd64_linux_read_description): Call
8624         amd64_create_target_description.
8625         * arch/amd64.c: New file.
8626         * arch/amd64.h: New file.
8627         * configure.tgt (x86_64-*-linux*): Append amd64.o.
8628         * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
8629
8630 2017-09-05  Yao Qi  <yao.qi@linaro.org>
8631
8632         * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
8633         x32-XXX-linux.c.  Include 64bit-XX.c and x32-XX.c.
8634         (amd64_linux_read_description): Create target descriptions.
8635         (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
8636         functions.  Add unit tests.
8637         * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
8638         x32-core.xml.
8639         * features/i386/64bit-avx.c: Generated.
8640         * features/i386/64bit-avx512.c: Generated.
8641         * features/i386/64bit-core.c: Generated.
8642         * features/i386/64bit-linux.c: Generated.
8643         * features/i386/64bit-mpx.c: Generated.
8644         * features/i386/64bit-pkeys.c: Generated.
8645         * features/i386/64bit-segments.c: Generated.
8646         * features/i386/64bit-sse.c: Generated.
8647         * features/i386/x32-core.c: Generated.
8648         * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
8649         c files for amd64-linux and x32-linux.
8650
8651 2017-09-05  Yao Qi  <yao.qi@linaro.org>
8652
8653         * amd64-linux-tdep.c (amd64_linux_read_description): New
8654         function.
8655         (amd64_linux_core_read_description): Call
8656         amd64_linux_read_description.
8657         (amd64_linux_init_abi): Likewise.
8658         (amd64_x32_linux_init_abi): Likewise.
8659         * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
8660         * x86-linux-nat.c (x86_linux_read_description): Call
8661         amd64_linux_read_description.
8662
8663 2017-09-05  Yao Qi  <yao.qi@linaro.org>
8664
8665         * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
8666         comments.
8667
8668 2017-09-05  Yao Qi  <yao.qi@linaro.org>
8669
8670         * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
8671         * features/i386/i386-avx-avx512-linux.c: Remove.
8672         * features/i386/i386-avx-linux.c: Remove.
8673         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
8674         * features/i386/i386-avx-mpx-linux.c: Remove.
8675         * features/i386/i386-linux.c: Remove.
8676         * features/i386/i386-mmx-linux.c: Remove.
8677         * features/i386/i386-mpx-linux.c: Remove.
8678
8679 2017-09-05  Yao Qi  <yao.qi@linaro.org>
8680
8681         * Makefile.in (ALL_TARGET_OBS): Add i386.o.
8682         (SFILES): Add arch/i386.c.
8683         (HFILES_NO_SRCDIR): Add arch/i386.h.
8684         * arch/i386.c: New file.
8685         * arch/i386.h: New file.
8686         * arch/tdesc.h (allocate_target_description): Declare.
8687         (set_tdesc_architecture): Declare.
8688         (set_tdesc_osabi): Declare.
8689         * configure.tgt (i[34567]86-*-linux*): Add i386.o.
8690         * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
8691         include arch/i386.h.
8692         (i386_linux_read_description): Remove code and call
8693         i386_create_target_description.
8694         (set_tdesc_architecture): New function.
8695         (set_tdesc_osabi): New function.
8696         * target-descriptions.h (allocate_target_description): Remove.
8697
8698 2017-09-05  Yao Qi  <yao.qi@linaro.org>
8699
8700         * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
8701         * target-descriptions.c (tdesc_create_feature): Likewise, and
8702         adjust code.
8703         * features/i386/32bit-avx.c: Re-generated.
8704         * features/i386/32bit-avx512.c: Re-generated.
8705         * features/i386/32bit-core.c: Re-generated.
8706         * features/i386/32bit-linux.c: Re-generated.
8707         * features/i386/32bit-mpx.c: Re-generated.
8708         * features/i386/32bit-pkeys.c: Re-generated.
8709         * features/i386/32bit-sse.c: Re-generated.
8710
8711 2017-09-05  Yao Qi  <yao.qi@linaro.org>
8712
8713         * regformats/regdef.h (struct reg): Override operator == and !=.
8714
8715 2017-09-05  Yao Qi  <yao.qi@linaro.org>
8716
8717         * arch/tdesc.h: New file.
8718         * regformats/regdat.sh: Generate code using tdesc_create_reg.
8719         * target-descriptions.c: Update comments.
8720         * target-descriptions.h: Include "arch/tdesc.h".  Remove the
8721         declarations.
8722         * features/i386/32bit-avx.c: Re-generated.
8723         * features/i386/32bit-avx512.c: Re-generated.
8724         * features/i386/32bit-core.c: Re-generated.
8725         * features/i386/32bit-linux.c: Re-generated.
8726         * features/i386/32bit-mpx.c: Re-generated.
8727         * features/i386/32bit-pkeys.c: Re-generated.
8728         * features/i386/32bit-sse.c: Re-generated.
8729
8730 2017-09-05  Yao Qi  <yao.qi@linaro.org>
8731
8732         * regformats/regdat.sh: Update generated code.
8733
8734 2017-09-05  Yao Qi  <yao.qi@linaro.org>
8735
8736         * regformats/regdat.sh: Adjust code order.
8737
8738 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
8739
8740         * expprint.c (dump_subexp_body_standard): Use constant format
8741         string in fprintf_filtered call.
8742
8743 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
8744
8745         * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
8746         NetBSD/i386.
8747         * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
8748
8749 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
8750
8751         * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
8752
8753 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
8754
8755         * bsd-kvm.o: Define _KMEMUSER.
8756         * configure.ac: Define _KMEMUSER when checking for "struct lwp".
8757         * configure: Regenerate.
8758
8759 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
8760
8761         * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
8762         * i386-fbsd-nat.c: Likewise.
8763
8764 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
8765
8766         * unittests/array-view-selftests.c: Add include of <array>.
8767
8768 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
8769
8770         * spu-tdep.c (flush_ea_cache): Add missing argument to
8771         call_function_by_hand.
8772
8773 2017-09-04  Pedro Alves  <palves@redhat.com>
8774
8775         * NEWS (Safer support for debugging with no debug info): New.
8776
8777 2017-09-04  Pedro Alves  <palves@redhat.com>
8778
8779         * c-exp.y (function_method, function_method_void): Add current
8780         instance flags to TYPE_INSTANCE.
8781         * dwarf2read.c (check_modifier): New.
8782         (compute_delayed_physnames): Assert that only C++ adds delayed
8783         physnames.  Mark fn_fields as const/volatile depending on
8784         physname.
8785         * eval.c (make_params): New type_instance_flags parameter.  Use
8786         it as the new type's instance flags.
8787         (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
8788         flags element and pass it to make_params.
8789         * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
8790         instance flags element.
8791         (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
8792         * gdbtypes.h: Include "enum-flags.h".
8793         (type_instance_flags): New enum-flags type.
8794         (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
8795         (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
8796         * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
8797         (follow_type_instance_flags): New function.
8798         (operator_check_standard) <TYPE_INSTANCE>: Adjust.
8799         * parser-defs.h (follow_type_instance_flags): Declare.
8800         * valops.c (value_struct_elt_for_reference): const/volatile must
8801         match too.
8802
8803 2017-09-04  Pedro Alves  <palves@redhat.com>
8804
8805         * cp-namespace.c (cp_search_static_and_baseclasses): Handle
8806         function/method scopes; lookup the nested name as a function local
8807         static variable.
8808
8809 2017-09-04  Pedro Alves  <palves@redhat.com>
8810
8811         (%type <voidval>): Add function_method.
8812         * c-exp.y (exp): New production for calls with no arguments.
8813         (function_method, function_method_void_or_typelist): New
8814         productions.
8815         (exp): New production for "method()::static_var".
8816         * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
8817         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
8818         Handle OP_FUNC_STATIC_VAR.
8819         * parse.c (operator_length_standard):
8820         Handle OP_FUNC_STATIC_VAR.
8821
8822 2017-09-04  Pedro Alves  <palves@redhat.com>
8823
8824         * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
8825         handling.
8826         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
8827         Ditto.
8828         * parse.c (operator_length_standard, operator_check_standard):
8829         Ditto.
8830         * std-operator.def (UNOP_MEMVAL_TLS): Delete.
8831
8832 2017-09-04  Pedro Alves  <palves@redhat.com>
8833
8834         * ax-gdb.c: Include "typeprint.h".
8835         (gen_expr_for_cast): New function.
8836         (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
8837         <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
8838         type is unknown.
8839         * dwarf2read.c (new_symbol_full): Fallback to int instead of
8840         nodebug_data_symbol.
8841         * eval.c: Include "typeprint.h".
8842         (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
8843         Error out if symbol has unknown type.
8844         <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
8845         evaluate_subexp_for_cast.
8846         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
8847         OP_VAR_MSYM_VALUE.
8848         (evaluate_subexp_for_cast): New function.
8849         * gdbtypes.c (init_nodebug_var_type): New function.
8850         (objfile_type): Use it to initialize types of variables with no
8851         debug info.
8852         * typeprint.c (error_unknown_type): New.
8853         * typeprint.h (error_unknown_type): New declaration.
8854         * compile/compile-c-types.c (convert_type_basic): Handle
8855         TYPE_CODE_ERROR; warn and fallback to int for variables with
8856         unknown type.
8857
8858 2017-09-04  Pedro Alves  <palves@redhat.com>
8859
8860         * eval.c (evaluate_var_value): New function, factored out from ...
8861         (evaluate_subexp_standard): ... here.
8862
8863 2017-09-04  Pedro Alves  <palves@redhat.com>
8864
8865         * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
8866         Remove useless assignments to 'op'.
8867
8868 2017-09-04  Pedro Alves  <palves@redhat.com>
8869
8870         * eval.c (eval_skip_value): New function.
8871         (evaluate_subexp_standard): Use it.
8872
8873 2017-09-04  Pedro Alves  <palves@redhat.com>
8874
8875         * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
8876         function name from symbol/minsym and pass it to
8877         error_call_unknown_return_type.
8878
8879 2017-09-04  Pedro Alves  <palves@redhat.com>
8880
8881         * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
8882         * ax-gdb.c (gen_msym_var_ref): New function.
8883         (gen_expr): Handle OP_VAR_MSYM_VALUE.
8884         * eval.c (evaluate_var_msym_value): New function.
8885         * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
8886         <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
8887         to call_function_by_hand.
8888         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
8889         Handle OP_VAR_MSYM_VALUE.
8890         (union exp_element) <msymbol>: New field.
8891         * minsyms.h (struct type): Forward declare.
8892         (find_minsym_type_and_address): Declare.
8893         * parse.c (write_exp_elt_msym): New function.
8894         (write_exp_msymbol): Delete, refactored as ...
8895         (find_minsym_type_and_address): ... this new function.
8896         (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
8897         (operator_length_standard, operator_check_standard): Handle
8898         OP_VAR_MSYM_VALUE.
8899         * std-operator.def (OP_VAR_MSYM_VALUE): New.
8900
8901 2017-09-04  Pedro Alves  <palves@redhat.com>
8902
8903         * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
8904         TYPE_GNU_IFUNC specially here.  Throw error if return type is
8905         unknown.
8906         * ada-typeprint.c (print_func_type): Handle functions with unknown
8907         return type.
8908         * c-typeprint.c (c_type_print_base): Handle functions and methods
8909         with unknown return type.
8910         * compile/compile-c-symbols.c (convert_symbol_bmsym)
8911         <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
8912         * compile/compile-c-types.c: Include "objfiles.h".
8913         (convert_func): For functions with unknown return type, warn and
8914         default to int.
8915         * compile/compile-object-run.c (compile_object_run): Adjust call
8916         to call_function_by_hand_dummy.
8917         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
8918         call_function_by_hand.
8919         * eval.c (evaluate_subexp_standard): Adjust calls to
8920         call_function_by_hand.  Handle functions and methods with unknown
8921         return type.  Pass expect_type to call_function_by_hand.
8922         * f-typeprint.c (f_type_print_base): Handle functions with unknown
8923         return type.
8924         * gcore.c (call_target_sbrk): Adjust call to
8925         call_function_by_hand.
8926         * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
8927         return type instead of int.  Make nodebug_text_gnu_ifunc_symbol be
8928         an integer address type instead of nodebug.
8929         * guile/scm-value.c (gdbscm_value_call): Adjust call to
8930         call_function_by_hand.
8931         * infcall.c (error_call_unknown_return_type): New function.
8932         (call_function_by_hand): New "default_return_type" parameter.
8933         Pass it down.
8934         (call_function_by_hand_dummy): New "default_return_type"
8935         parameter.  Use it instead of defaulting to int.  If there's no
8936         default and the return type is unknown, throw an error.  If
8937         there's a default return type, and the called function has no
8938         debug info, then assume the function is prototyped.
8939         * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
8940         New "default_return_type" parameter.
8941         (error_call_unknown_return_type): New declaration.
8942         * linux-fork.c (call_lseek): Cast return type of lseek.
8943         (inferior_call_waitpid, checkpoint_command): Adjust calls to
8944         call_function_by_hand.
8945         * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
8946         calls to call_function_by_hand.
8947         * m2-typeprint.c (m2_procedure): Handle functions with unknown
8948         return type.
8949         * objc-lang.c (lookup_objc_class, lookup_child_selector)
8950         (value_nsstring, print_object_command): Adjust calls to
8951         call_function_by_hand.
8952         * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
8953         functions with unknown return type.
8954         (pascal_type_print_func_varspec_suffix): New function.
8955         (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
8956         TYPE_CODE_METHOD>: Use it.
8957         * python/py-value.c (valpy_call): Adjust call to
8958         call_function_by_hand.
8959         * rust-lang.c (rust_evaluate_funcall): Adjust call to
8960         call_function_by_hand.
8961         * valarith.c (value_x_binop, value_x_unop): Adjust calls to
8962         call_function_by_hand.
8963         * valops.c (value_allocate_space_in_inferior): Adjust call to
8964         call_function_by_hand.
8965         * typeprint.c (type_print_unknown_return_type): New function.
8966         * typeprint.h (type_print_unknown_return_type): New declaration.
8967
8968 2017-09-04  Pedro Alves  <palves@redhat.com>
8969
8970         * gdbtypes.c (lookup_function_type_with_arguments): Mark function
8971         types with more than one parameter as prototyped.
8972
8973 2017-09-04  Pedro Alves  <palves@redhat.com>
8974
8975         * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
8976         (disassemble_command): Use gdb_disassembly_flags instead of bare
8977         int.
8978         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
8979         (dump_insns, do_mixed_source_and_assembly_deprecated)
8980         (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
8981         Use gdb_disassembly_flags instead of bare int.
8982         * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
8983         (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
8984         (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
8985         (DISASSEMBLY_SPECULATIVE): No longer macros.  Instead they're...
8986         (enum gdb_disassembly_flag): ... values of this new enumeration.
8987         (gdb_disassembly_flags): Define.
8988         (gdb_disassembly)
8989         (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
8990         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
8991         gdb_disassembly_flags instead of bare int.
8992         * record-btrace.c (btrace_insn_history)
8993         (record_btrace_insn_history, record_btrace_insn_history_range)
8994         (record_btrace_insn_history_from): Use gdb_disassembly_flags
8995         instead of bare int.
8996         * record.c (get_insn_history_modifiers, cmd_record_insn_history):
8997         Use gdb_disassembly_flags instead of bare int.
8998         * target-debug.h (target_debug_print_gdb_disassembly_flags):
8999         Define.
9000         * target-delegates.c: Regenerate.
9001         * target.c (target_insn_history, target_insn_history_from)
9002         (target_insn_history_range): Use gdb_disassembly_flags instead of
9003         bare int.
9004         * target.h: Include "disasm.h".
9005         (struct target_ops) <to_insn_history, to_insn_history_from,
9006         to_insn_history_range>: Use gdb_disassembly_flags instead of bare
9007         int.
9008         (target_insn_history, target_insn_history_from)
9009         (target_insn_history_range): Use gdb_disassembly_flags instead of
9010         bare int.
9011
9012 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
9013
9014         * cli/cli-script.c (build_command_line): For if/while commands,
9015         check whether args is empty.
9016
9017 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
9018
9019         * cli/cli-script.h (enum misc_command_type): Move from defs.h.
9020         (enum command_control_type): Likewise.
9021         (struct command_line): Likewise.
9022         (free_command_lines): Likewise.
9023         (struct command_lines_deleter): Likewise.
9024         (command_line_up): Likewise.
9025         (read_command_lines): Likewise.
9026         (read_command_lines_1): Likewise.
9027         * defs.h (enum misc_command_type): Move to cli/cli-script.h.
9028         (enum command_control_type): Likewise.
9029         (struct command_line): Likewise.
9030         (free_command_lines): Likewise.
9031         (struct command_lines_deleter): Likewise.
9032         (command_line_up): Likewise.
9033         (read_command_lines): Likewise.
9034         (read_command_lines_1): Likewise.
9035         * breakpoint.h: Include cli/cli-script.h.
9036         * extension-priv.h: Likewise.
9037         * gdbcmd.h: Likewise.
9038
9039 2017-09-04  Pedro Alves  <palves@redhat.com>
9040
9041         * ada-lang.c (is_known_support_routine): Move sal declaration to
9042         where it is initialized.
9043         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
9044         (parse_breakpoint_sals, decode_static_tracepoint_spec)
9045         (clear_command, update_static_tracepoint): Remove init_sal
9046         references.  Move declarations closer to initializations.
9047         * cli/cli-cmds.c (list_command): Move sal declarations closer to
9048         initializations.
9049         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
9050         references.  Move sal declarations closer to initializations.
9051         * frame.c (find_frame_sal): Return a symtab_and_line via function
9052         return instead of output parameter.  Remove init_sal references.
9053         * frame.h (find_frame_sal): Return a symtab_and_line via function
9054         return instead of output parameter.
9055         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
9056         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
9057         instead of memset.
9058         (gdbscm_find_pc_line): Remove init_sal reference.
9059         * infcall.c (call_function_by_hand_dummy): Remove init_sal
9060         references.  Move declarations closer to initializations.
9061         * infcmd.c (set_step_frame): Update.  Move declarations closer to
9062         initializations.
9063         (finish_backward): Remove init_sal references.  Move declarations
9064         closer to initializations.
9065         * infrun.c (process_event_stop_test, handle_step_into_function)
9066         (insert_hp_step_resume_breakpoint_at_frame)
9067         (insert_step_resume_breakpoint_at_caller): Likewise.
9068         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
9069         (symbol_to_sal): Likewise.
9070         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
9071         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
9072         to its initialization.
9073         * reverse.c (save_bookmark_command): Use new/delete.  Remove
9074         init_sal references.  Move declarations closer to initializations.
9075         * source.c (get_current_source_symtab_and_line): Remove brace
9076         initialization.
9077         (set_current_source_symtab_and_line): Now takes the sal by const
9078         reference.  Remove brace initialization.
9079         (line_info): Remove init_sal reference.
9080         * source.h (set_current_source_symtab_and_line): Now takes a
9081         symtab_and_line via const reference.
9082         * stack.c (set_current_sal_from_frame): Adjust.
9083         (print_frame_info): Adjust.
9084         (get_last_displayed_sal): Return the sal via function return
9085         instead of via output parameter.  Simplify.
9086         (frame_info): Adjust.
9087         * stack.h (get_last_displayed_sal): Return the sal via function
9088         return instead of via output parameter.
9089         * symtab.c (init_sal): Delete.
9090         (find_pc_sect_line): Remove init_sal references.  Move
9091         declarations closer to initializations.
9092         (find_function_start_sal): Remove init_sal references.  Move
9093         declarations closer to initializations.
9094         * symtab.h (struct symtab_and_line): In-class initialize all
9095         fields.
9096         * tracepoint.c (set_traceframe_context)
9097         (print_one_static_tracepoint_marker): Remove init_sal references.
9098         Move declarations closer to initializations.
9099         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
9100         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
9101         declarations closer to initializations.
9102         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
9103         init_sal references.  Adjust.
9104
9105 2017-09-04  Pedro Alves  <palves@redhat.com>
9106
9107         * ax-gdb.c (agent_command_1): Use range-for.
9108         * break-catch-throw.c (re_set_exception_catchpoint): Update.
9109         * breakpoint.c: Include "common/array-view.h".
9110         (init_breakpoint_sal, create_breakpoint_sal): Change sals
9111         parameter from struct symtabs_and_lines to
9112         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
9113         (breakpoint_sals_to_pc): Change sals parameter from struct
9114         symtabs_and_lines to std::vector reference.
9115         (check_fast_tracepoint_sals): Change sals parameter from struct
9116         symtabs_and_lines to std::array_view.  Use range-for.
9117         (decode_static_tracepoint_spec): Return a std::vector instead of
9118         symtabs_and_lines.  Update.
9119         (create_breakpoint): Update.
9120         (break_range_command, until_break_command, clear_command): Update.
9121         (base_breakpoint_decode_location, bkpt_decode_location)
9122         (bkpt_probe_create_sals_from_location)
9123         (bkpt_probe_decode_location, tracepoint_decode_location)
9124         (tracepoint_probe_decode_location)
9125         (strace_marker_create_sals_from_location): Return a std::vector
9126         instead of symtabs_and_lines.
9127         (strace_marker_create_breakpoints_sal): Update.
9128         (strace_marker_decode_location): Return a std::vector instead of
9129         symtabs_and_lines.  Update.
9130         (update_breakpoint_locations): Change struct symtabs_and_lines
9131         parameters to gdb::array_view.  Adjust.
9132         (location_to_sals): Return a std::vector instead of
9133         symtabs_and_lines.  Update.
9134         (breakpoint_re_set_default): Use std::vector instead of struct
9135         symtabs_and_lines.
9136         (decode_location_default): Return a std::vector instead of
9137         symtabs_and_lines.  Update.
9138         * breakpoint.h: Include "common/array-view.h".
9139         (struct breakpoint_ops) <decode_location>: Now returns a
9140         std::vector instead of returning a symtabs_and_lines via output
9141         parameter.
9142         (update_breakpoint_locations): Change sals parameters to use
9143         gdb::array_view.
9144         * cli/cli-cmds.c (edit_command, list_command): Update to use
9145         std::vector and gdb::array_view.
9146         (ambiguous_line_spec): Adjust to use gdb::array_view and
9147         range-for.
9148         (compare_symtabs): Rename to ...
9149         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
9150         const reference and adjust.
9151         (filter_sals): Rewrite using std::vector and standard algorithms.
9152         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
9153         (jump_command): Update to use std::vector.
9154         * linespec.c (struct linespec_state) <canonical_names>: Update
9155         comment.
9156         (add_sal_to_sals_basic): Delete.
9157         (add_sal_to_sals, filter_results, convert_results_to_lsals)
9158         (decode_line_2, create_sals_line_offset)
9159         (convert_address_location_to_sals, convert_linespec_to_sals)
9160         (convert_explicit_location_to_sals, parse_linespec)
9161         (event_location_to_sals, decode_line_full, decode_line_1)
9162         (decode_line_with_current_source)
9163         (decode_line_with_last_displayed, decode_objc)
9164         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
9165         (linespec_result::~linespec_result): Adjust to use std::vector
9166         instead of symtabs_and_lines.
9167         * linespec.h (linespec_sals::sals): Now a std::vector.
9168         (struct linespec_result): Use std::vector, bool, and in-class
9169         initialization.
9170         (decode_line_1, decode_line_with_current_source)
9171         (decode_line_with_last_displayed): Return std::vector.
9172         * macrocmd.c (info_macros_command): Use std::vector.
9173         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
9174         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
9175         std::vector.
9176         * probe.h (parse_probes): Return a std::vector.
9177         * python/python.c (gdbpy_decode_line): Use std::vector and
9178         gdb::array_view.
9179         * source.c (select_source_symtab, line_info): Use std::vector.
9180         * stack.c (func_command): Use std::vector.
9181         * symtab.h (struct symtabs_and_lines): Delete.
9182         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
9183
9184 2017-09-04  Pedro Alves  <palves@redhat.com>
9185
9186         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9187         unittests/array-view-selftests.c.
9188         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
9189         * common/array-view.h: New file.
9190         * unittests/array-view-selftests.c: New file.
9191
9192 2017-09-04  Pedro Alves  <palves@redhat.com>
9193
9194         * cli/cli-cmds.c (edit_command): Pass message to
9195         ambiguous_line_spec.
9196         (list_command): Pass message to ambiguous_line_spec.  Say
9197         "first"/"last" instead of "start" and "end" to be consistent with
9198         the manual.
9199         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
9200         them to print formatted message.
9201
9202 2017-09-04  Pedro Alves  <palves@redhat.com>
9203
9204         * btrace.c (ftrace_add_pt): Pass btrace_insn to
9205         ftrace_update_insns by reference instead of pointer.
9206
9207 2017-09-04  Yao Qi  <yao.qi@linaro.org>
9208
9209         * i386-go32-tdep.c: Include x86-xstate.h.
9210         (i386_go32_init_abi): Call i386_target_description.
9211         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
9212         if xcr0 is X86_XSTATE_X87_MASK.
9213         * i386-tdep.h (tdesc_i386): Remove the declaration.
9214         (tdesc_i386_mmx): Likewise.
9215
9216 2017-09-04  Yao Qi  <yao.qi@linaro.org>
9217
9218         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
9219         X86_XSTATE_SSE_MASK instead of 0.
9220
9221 2017-09-04  Yao Qi  <yao.qi@linaro.org>
9222
9223         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
9224         i386_target_description.
9225         * i386-fbsd-nat.c (i386fbsd_read_description): Call
9226         i386_target_description.
9227         * i386-tdep.c (i386_gdbarch_init): Likewise.
9228
9229 2017-09-04  Yao Qi  <yao.qi@linaro.org>
9230
9231         * amd64-darwin-tdep.c: Include "x86-xstate.h".
9232         (x86_darwin_init_abi_64): Call amd64_target_description.
9233         * amd64-dicos-tdep.c: Likewise.
9234         * amd64-fbsd-nat.c: Likewise.
9235         * amd64-fbsd-tdep.c: Likewise.
9236         * amd64-nbsd-tdep.c: Likewise.
9237         * amd64-obsd-tdep.c: Likewise.
9238         * amd64-sol2-tdep.c: Likewise.
9239         * amd64-windows-tdep.c: Likewise.
9240         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
9241
9242 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
9243
9244         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
9245         (btrace_function) <insn>: Change type to use std::vector.
9246         * btrace.c (ftrace_debug, ftrace_call_num_insn,
9247         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
9248         ftrace_update_insns, ftrace_compute_global_level_offset,
9249         btrace_stitch_bts, btrace_clear, btrace_insn_get,
9250         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
9251         change to std::vector.
9252         (ftrace_update_insns): Adjust to change to std::vector, change
9253         type of INSN parameter.
9254         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
9255         * record-btrace.c (btrace_call_history_insn_range,
9256         btrace_compute_src_line_range,
9257         record_btrace_frame_prev_register): Adjust to change to
9258         std::vector.
9259         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
9260         to change to std::vector.
9261
9262 2017-09-03  Tom Tromey  <tom@tromey.com>
9263
9264         * corefile.c (reopen_exec_file): Use std::string.
9265
9266 2017-09-03  Tom Tromey  <tom@tromey.com>
9267
9268         * compile/compile.c (compile_register_name_mangled): Return
9269         std::string.
9270         * compile/compile-loc2c.c (pushf_register_address): Update.
9271         (pushf_register): Update.
9272         * compile/compile-c-types.c (convert_array): Update.
9273         * compile/compile-c-symbols.c (generate_vla_size): Update.
9274         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
9275         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
9276         (convert_one_symbol): Update.
9277         (generate_c_for_for_one_variable): Update.
9278         * compile/compile-c-support.c (c_get_range_decl_name): Return a
9279         std::string.
9280         (generate_register_struct): Update.
9281         * compile/compile-internal.h (c_get_range_decl_name): Return a
9282         std::string.
9283         (compile_register_name_mangled): Return std::string.
9284
9285 2017-09-03  Tom Tromey  <tom@tromey.com>
9286
9287         * utils.c (perror_string): Return a std::string.
9288         (throw_perror_with_name, perror_warning_with_name): Update.
9289
9290 2017-09-03  Tom Tromey  <tom@tromey.com>
9291
9292         * demangle.c (demangle_command): Use std::string,
9293         unique_xmalloc_ptr.
9294
9295 2017-09-03  Tom Tromey  <tom@tromey.com>
9296
9297         * cli/cli-setshow.c (do_set_command): Use std::string.
9298
9299 2017-09-03  Tom Tromey  <tom@tromey.com>
9300
9301         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
9302
9303 2017-09-03  Tom Tromey  <tom@tromey.com>
9304
9305         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
9306
9307 2017-09-03  Tom Tromey  <tom@tromey.com>
9308
9309         * mi/mi-cmd-env.c (env_execute_cli_command): Use
9310         gdb::unique_xmalloc_ptr.
9311
9312 2017-09-03  Tom Tromey  <tom@tromey.com>
9313
9314         * thread.c (print_thread_info_1): Use string_printf.
9315         (thread_apply_command, thread_apply_all_command): Use
9316         std::string.
9317
9318 2017-09-03  Tom Tromey  <tom@tromey.com>
9319
9320         * valprint.c (val_print_string): Update.
9321         * gdbcore.h (memory_error_message): Return std::string.
9322         * corefile.c (memory_error_message): Return std::string.
9323         (memory_error): Update.
9324         * breakpoint.c (insert_bp_location): Update.
9325
9326 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
9327
9328         * target/waitstatus.h (target_waitstatus_to_string): Change
9329         return type to std::string.
9330         * target/waitstatus.c (target_waitstatus_to_string): Return
9331         std::string.
9332         * target.h (target_waitstatus_to_string): Remove declaration.
9333         * infrun.c (resume, clear_proceed_status_thread,
9334         print_target_wait_results, do_target_wait, save_waitstatus,
9335         stop_all_threads): Adjust.
9336         * record-btrace.c (record_btrace_wait): Adjust.
9337         * target-debug.h
9338         (target_debug_print_struct_target_waitstatus_p): Adjust.
9339
9340 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
9341
9342         PR gdb/22046
9343         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
9344         detection.
9345
9346 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
9347
9348         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
9349         for setting/unsetting environment variables on the remote target.
9350         (New remote packets): Add entries for QEnvironmentHexEncoded,
9351         QEnvironmentUnset and QEnvironmentReset.
9352         * common/environ.c (gdb_environ::operator=): Extend method to
9353         handle m_user_set_env_list and m_user_unset_env_list.
9354         (gdb_environ::clear): Likewise.
9355         (match_var_in_string): Change type of first parameter from 'char
9356         *' to 'const char *'.
9357         (gdb_environ::set): Extend method to handle
9358         m_user_set_env_list and m_user_unset_env_list.
9359         (gdb_environ::unset): Likewise.
9360         (gdb_environ::clear_user_set_env): New method.
9361         (gdb_environ::user_set_envp): Likewise.
9362         (gdb_environ::user_unset_envp): Likewise.
9363         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
9364         m_user_unset_env_list on move constructor/assignment.
9365         (unset): Add new default parameter 'update_unset_list = true'.
9366         (clear_user_set_env): New method.
9367         (user_set_envp): Likewise.
9368         (user_unset_envp): Likewise.
9369         (m_user_set_env_list): New std::set.
9370         (m_user_unset_env_list): Likewise.
9371         * common/rsp-low.c (hex2str): New function.
9372         (bin2hex): New overload for bin2hex function.
9373         * common/rsp-low.c (hex2str): New prototype.
9374         (str2hex): New overload prototype.
9375         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
9376         QEnvironmentUnset and QEnvironmentReset.
9377         (remote_protocol_features): Add QEnvironmentHexEncoded,
9378         QEnvironmentUnset and QEnvironmentReset packets.
9379         (send_environment_packet): New function.
9380         (extended_remote_environment_support): Likewise.
9381         (extended_remote_create_inferior): Call
9382         extended_remote_environment_support.
9383         (_initialize_remote): Add QEnvironmentHexEncoded,
9384         QEnvironmentUnset and QEnvironmentReset packet configs.
9385         * unittests/environ-selftests.c (gdb_selftest_env_var):
9386         New variable.
9387         (test_vector_initialization): New function.
9388         (test_init_from_host_environ): Likewise.
9389         (test_reinit_from_host_environ): Likewise.
9390         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
9391         Likewise.
9392         (test_unset_set_empty_vector): Likewise.
9393         (test_vector_clear): Likewise.
9394         (test_std_move): Likewise.
9395         (test_move_constructor):
9396         (test_self_move): Likewise.
9397         (test_set_unset_reset): Likewise.
9398         (run_tests): Rewrite in terms of the functions above.
9399
9400 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
9401
9402         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
9403         (adi_available): Use a temp variable of type CORE_ADDR as argument
9404         3 when calling target_auxv_search.
9405         (adi_normalize_address): Use masks and xor operators to calculate
9406         normalized address.
9407         (adi_read_versions, adi_write_versions, adi_print_versions)
9408         (do_examine, do_assign): Use paddress.
9409
9410 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
9411
9412         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
9413         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
9414         out of loop and add supply of FIR.
9415         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
9416         add collect of FIR.
9417
9418 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
9419
9420         PR gdb/21827
9421         * cli/cli-script.c (define_command): Don't convert command name
9422         to lower case.
9423
9424 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
9425
9426         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
9427         Update all callers accordingly. Remove all code blocks handling
9428         the case where DISPP is not NULL.
9429
9430 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
9431
9432         PR symtab/22003
9433         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
9434         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
9435         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
9436
9437 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
9438
9439         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
9440         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
9441         (read_comp_units_from_section): New parameter abbrev_section, use
9442         read_and_check_comp_unit_head, allocate signatured_type if needed.
9443         (create_all_comp_units): Update read_comp_units_from_section caller.
9444
9445 2017-08-23  Pedro Alves  <palves@redhat.com>
9446
9447         PR remote/21852
9448         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
9449         to null_ptid and switch to thread without reading the registers
9450         after adding the inferior.
9451
9452 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
9453
9454         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
9455         compile-gcc.
9456         * compile/compile.c (compile_gcc, show_compile_gcc): New.
9457         (compile_to_object): Implement compile_gcc.
9458         (_initialize_compile): Install "set compile-gcc".  Initialize
9459         compile_gcc.
9460
9461 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
9462
9463         * compile/compile.c (compile_to_object): Conditionally call
9464         set_verbose.  Conditionally call compile or compile_v0.
9465
9466 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
9467
9468         * sparc64-tdep.h: (adi_normalize_address): New export.
9469         * sparc-nat.h: (open_adi_tag_fd): New export.
9470         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
9471         * sparc64-linux-tdep.c:
9472         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
9473         (sparc64_linux_handle_segmentation_fault): New function.
9474         (sparc64_linux_init_abi): Register
9475         sparc64_linux_handle_segmentation_fault
9476         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
9477         (sparc64_addr_bits_remove): New function.
9478         (sparc64_init_abi): Register sparc64_addr_bits_remove.
9479         (MAX_PROC_NAME_SIZE): New macro.
9480         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
9481         (sparc64adilist): New variable.
9482         (adi_proc_list): New variable.
9483         (find_adi_info): New function.
9484         (add_adi_info): New function.
9485         (get_adi_info_proc): New function.
9486         (get_adi_info): New function.
9487         (info_adi_command): New function.
9488         (read_maps_entry): New function.
9489         (adi_available): New function.
9490         (adi_normalize_address): New function.
9491         (adi_align_address): New function.
9492         (adi_convert_byte_count): New function.
9493         (adi_tag_fd): New function.
9494         (adi_is_addr_mapped): New function.
9495         (adi_read_versions): New function.
9496         (adi_write_versions): New function.
9497         (adi_print_versions): New function.
9498         (do_examine): New function.
9499         (do_assign): New function.
9500         (adi_examine_command): New function.
9501         (adi_assign_command): New function.
9502         (_initialize_sparc64_adi_tdep): New function.
9503
9504 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
9505
9506         * breakpoint.c (breakpoints_info): Rename to ...
9507         (info_breakpoints_command): ... this.
9508         (watchpoints_info): Rename to ...
9509         (info_watchpoints_command): ... this.
9510         (tracepoints_info): Rename to ...
9511         (info_tracepoints_command): ... this.
9512         (_initialize_breakpoint): Adjust.
9513         * dcache.c (dcache_info): Rename to ...
9514         (info_display_command): ... this.
9515         (_initialize_dcache): Adjust.
9516         * frame.h (args_info): Rename to ...
9517         (info_args_command): ... this.
9518         (locals_info): Rename to ...
9519         (info_locals_command): ... this.
9520         * infcmd.c (nofp_registers_info): Rename to ...
9521         (info_registers_command): ... this.
9522         (float_info): Rename to ...
9523         (info_float_command): ... this.
9524         (program_info): Rename to ...
9525         (info_program_command): ... this.
9526         (all_registers_info): Rename to ...
9527         (info_all_registers_command): ... this.
9528         (vector_info): Rename to ...
9529         (info_vector_command): ... this.
9530         (float_info): Rename to ...
9531         (info_float_command): ... this.
9532         (_initialize_infcmd): Adjust.
9533         * inferior.h (term_info): Rename to ...
9534         (info_terminal_command): ... this.
9535         * inflow.c (term_info): Rename to ...
9536         (info_terminal_command): ... this.
9537         (_initialize_inflow): Adjust.
9538         * infrun.c (signals_info): Rename to ...
9539         (info_signals_command): ... this.
9540         (_initialize_infrun): Adjust.
9541         * objc-lang.c (classes_info): Rename to ...
9542         (info_classes_command): ... this.
9543         (selectors_info): Rename to ...
9544         (info_selectors_command): ... this.
9545         (_initialize_objc_language): Adjust.
9546         * printcmd.c (sym_info): Rename to ...
9547         (info_symbol_command): ... this.
9548         (address_info): Rename to ...
9549         (info_address_command): ... this.
9550         (display_info): Rename to ...
9551         (info_display_command): ... this.
9552         (_initialize_printcmd): Adjust.
9553         * reverse.c (bookmarks_info): Rename to ...
9554         (info_breakpoints_command): ... this.
9555         (_initialize_reverse): Adjust.
9556         * ser-go32.c (dos_info): Rename to ...
9557         (info_serial_command): ... this.
9558         (_initialize_ser_dos): Adjust.
9559         * skip.c (skip_info): Rename to ...
9560         (info_skip_command): ... this.
9561         (_initialize_step_skip): Adjust.
9562         * source.c (line_info): Rename to ...
9563         (info_line_command): ... this.
9564         (source_info): Rename to ...
9565         (info_source_command)
9566         * stack.c (frame_info): Rename to ...
9567         (info_frame_command): ... this.
9568         (locals_info): Rename to ...
9569         (info_locals_command): ... this.
9570         (args_info): Rename to ...
9571         (info_args_command): ... this.
9572         (_initialize_stack): Adjust.
9573         * symtab.c (sources_info): Rename to ...
9574         (info_sources_command): ... this.
9575         (variables_info): Rename to ...
9576         (info_variables_command): ... this.
9577         (functions_info): Rename to ...
9578         (info_functions_command): ... this.
9579         (types_info): Rename to ...
9580         (info_types_command): ... this.
9581         (_initialize_symtab): Adjust.
9582         * target.c (target_info): Rename to ...
9583         (info_target_command): ... this.
9584         (initialize_targets): Adjust.
9585         * tracepoint.c (tvariables_info): Rename to ...
9586         (info_tvariables_command): ... this.
9587         (scope_info): Rename to ...
9588         (info_scope_command): ... this.
9589         (trace_dump_actions): Adjust.
9590         (_initialize_tracepoint): Adjust.
9591
9592 2017-08-22  Tom Tromey  <tom@tromey.com>
9593
9594         * breakpoint.h (install_breakpoint): Update.
9595         * breakpoint.c (add_solib_catchpoint): Update.
9596         (install_breakpoint): Change argument to a std::unique_ptr.
9597         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
9598         (create_breakpoint_sal, create_breakpoint): Update.
9599         (watch_command_1, catch_exec_command_1)
9600         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
9601         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
9602         Return the breakpoint.
9603         (set_raw_breakpoint_without_location, set_raw_breakpoint)
9604         (new_single_step_breakpoint): Update.
9605         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
9606         std::unique_ptr.
9607         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
9608         std::unique_ptr.
9609         * break-catch-sig.c (create_signal_catchpoint): Use
9610         std::unique_ptr.
9611         * ada-lang.c (create_ada_exception_catchpoint): Use
9612         std::unique_ptr.
9613
9614 2017-08-22  Tom Tromey  <tom@tromey.com>
9615
9616         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
9617
9618 2017-08-22  Tom Tromey  <tom@tromey.com>
9619
9620         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
9621         (lookup_partial_symbol): Update.
9622
9623 2017-08-22  Tom Tromey  <tom@tromey.com>
9624
9625         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
9626         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
9627         (find_and_open_source, symtab_to_fullname): Update.
9628         * psymtab.c (psymtab_to_fullname): Update.
9629
9630 2017-08-22  Tom Tromey  <tom@tromey.com>
9631
9632         * exec.c (exec_file_attach): Update.
9633         * linux-thread-db.c (try_thread_db_load): Update.
9634         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
9635         * utils.c (gdb_realpath): Change return type.
9636         (gdb_realpath_keepfile): Update.
9637         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
9638         (_initialize_utils): Register the new self test.
9639         * source.c (openp): Update.
9640         (find_and_open_source): Update.
9641         * nto-tdep.c (nto_find_and_open_solib): Update.
9642         * main.c (set_gdb_data_directory): Update.
9643         (captured_main_1): Update.
9644         * dwarf2read.c (dwarf2_get_dwz_file): Update
9645         (dw2_map_symbol_filenames): Update.
9646         * auto-load.c (auto_load_safe_path_vec_update): Update.
9647         (filename_is_in_auto_load_safe_path_vec): Change type of
9648         "filename_realp".
9649         (auto_load_objfile_script): Update.
9650         (file_is_auto_load_safe): Update.  Use std::string.
9651         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
9652
9653 2017-08-22  Tom Tromey  <tom@tromey.com>
9654
9655         * utils.c (gdb_realpath_keepfile): Return a
9656         gdb::unique_xmalloc_ptr.
9657         * exec.c (exec_file_attach): Update.
9658         * utils.h (gdb_realpath_keepfile): Return a
9659         gdb::unique_xmalloc_ptr.
9660
9661 2017-08-22  Tom Tromey  <tom@tromey.com>
9662
9663         * compile/compile.c (compile_file_command): Use
9664         gdb::unique_xmalloc_ptr, std::string.
9665         * utils.c (gdb_abspath): Change return type.
9666         * source.c (openp): Update.
9667         * objfiles.c (allocate_objfile): Update.
9668         * main.c (set_gdb_data_directory): Update.
9669         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
9670
9671 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
9672
9673         * cli-cmds.c (list_commands): List actual code around more than
9674         one location.
9675
9676 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
9677
9678         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
9679
9680 2017-08-21  Pedro Alves  <palves@redhat.com>
9681
9682         PR gdb/19487
9683         * c-exp.y (variable production): Handle function aliases.
9684         * minsyms.c (msymbol_is_text): New function.
9685         * minsyms.h (msymbol_is_text): Declare.
9686         * symtab.c (find_function_alias_target): New function.
9687         * symtab.h (find_function_alias_target): Declare.
9688
9689 2017-08-21  Pedro Alves  <palves@redhat.com>
9690
9691         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
9692         typedefs.
9693         * typeprint.c (whatis_exp): If handling "whatis", and expression
9694         is OP_TYPE, strip one typedef level.  Otherwise don't strip
9695         typedefs here.
9696         * valops.c (value_cast): Save "to" type before resolving
9697         stubs/typedefs.  Use that type as resulting value's type.
9698
9699 2017-08-18  Tom Tromey  <tom@tromey.com>
9700             Pedro Alves  <palves@redhat.com>
9701
9702         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
9703         * sol-thread.c (sol_thread_resume, sol_thread_wait)
9704         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
9705         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
9706         * proc-service.c (ps_xfer_memory): Use scoped_restore.
9707         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
9708         (linux_get_siginfo_data): Add "thread" argument.  Use
9709         scoped_restore.
9710         * linux-nat.c (linux_child_follow_fork)
9711         (check_stopped_by_watchpoint): Use scoped_restore.
9712         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
9713         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
9714         (restore_inferior_ptid, save_inferior_ptid): Remove.
9715         * btrace.c (btrace_fetch): Use scoped_restore.
9716         * bsd-uthread.c (bsd_uthread_fetch_registers)
9717         (bsd_uthread_store_registers): Use scoped_restore.
9718         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
9719         scoped_restore.
9720         * aix-thread.c (aix_thread_resume, aix_thread_wait)
9721         (aix_thread_xfer_partial): Use scoped_restore.
9722         * inferior.h (save_inferior_ptid): Remove.
9723
9724 2017-08-18  Yao Qi  <yao.qi@linaro.org>
9725
9726         PR tdep/21818
9727         * arm-tdep.c (gdb_print_insn_arm): Mark
9728         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
9729
9730 2017-08-18  Yao Qi  <yao.qi@linaro.org>
9731
9732         * NEWS: Mention GDBserver's new option "--selftest".
9733         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
9734         * selftest.c: Move it to common/selftest.c.
9735         * selftest.h: Move it to common/selftest.h.
9736         * selftest-arch.c (reset): New function.
9737         (tests_with_arch): Call reset.
9738
9739 2017-08-18  Yao Qi  <yao.qi@linaro.org>
9740
9741         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
9742         instead of exception_fprintf and printf_filtered.
9743
9744 2017-08-18  Yao Qi  <yao.qi@linaro.org>
9745
9746         * selftest.c (register_self_test): Rename it to
9747         selftests::register_test.
9748         (run_self_tests): selftest::run_tests.
9749         * selftest.h: Update declarations.
9750         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
9751         selftests::register_test_foreach_arch.
9752         * selftest-arch.h: Update declaration.
9753         * aarch64-tdep.c: Update.
9754         * arm-tdep.c: Likewise.
9755         * disasm-selftests.c: Likewise.
9756         * dwarf2loc.c: Likewise.
9757         * dwarf2-frame.c: Likewise.
9758         * findvar.c: Likewise.
9759         * gdbarch-selftests.c: Likewise.
9760         * maint.c (maintenance_selftest): Likewise.
9761         * regcache.c: Likewise.
9762         * rust-exp.y: Likewise.
9763         * selftest-arch.c: Likewise.
9764         * unittests/environ-selftests.c: Likewise.
9765         * unittests/function-view-selftests.c: Likewise.
9766         * unittests/offset-type-selftests.c: Likewise.
9767         * unittests/optional-selftests.c: Likewise.
9768         * unittests/scoped_restore-selftests.c: Likewise.
9769         * utils-selftests.c: Likewise.
9770
9771 2017-08-17  Pedro Alves  <palves@redhat.com>
9772
9773         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
9774         local.
9775
9776 2017-08-17  Pedro Alves  <palves@redhat.com>
9777
9778         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
9779         field.
9780         (reset_die_in_process): Delete, replaced by ...
9781         (process_die_scope): ... this new class.  Make it responsible for
9782         freeing cu->line_header too.
9783         (process_die): Use process_die_scope.
9784         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
9785         cu->line_header_die_owner.  Don't release the line header if it's
9786         owned by the CU.
9787         (setup_type_unit_groups): Make the CU/DIE own the line header.
9788         Don't release the line header here.
9789
9790 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
9791
9792         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
9793
9794 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
9795
9796         * NEWS: Mention new shortcuts for nexti and stepi in TUI
9797         Single-Key mode
9798
9799 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
9800
9801         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
9802         mode command list.
9803
9804 2017-08-15  Stafford Horne  <shorne@gmail.com>
9805
9806         * MAINTAINERS (Write After Approval): Add Stafford Horne.
9807
9808 2017-08-15  Stafford Horne  <shorne@gmail.com>
9809
9810         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
9811
9812 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
9813
9814         PR gdb/21954
9815         * infcmd.c (unset_environment_command): Use the 'clear' method on
9816         the environment instead of resetting it.
9817
9818 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
9819
9820         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
9821         platforms.
9822
9823 2017-08-14  Tom Tromey  <tom@tromey.com>
9824
9825         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
9826         (print_binary_chars): Likewise.
9827         (BITS_IN_BYTES): Remove.
9828
9829 2017-08-14  Tom Tromey  <tom@tromey.com>
9830
9831         PR gdb/21675
9832         * valprint.c (LOW_ZERO): Change value to 034.
9833         (print_octal_chars): Add static_asserts for octal constants.
9834         * printcmd.c (print_scalar_formatted): Add 'd' case.
9835
9836 2017-08-11  Tom Tromey  <tom@tromey.com>
9837
9838         * symfile.c (add_symbol_file_command): Use std::vector.
9839
9840 2017-08-14  Tom Tromey  <tom@tromey.com>
9841
9842         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
9843         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
9844         std::move.
9845         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
9846
9847 2017-08-11  Pedro Alves  <palves@redhat.com>
9848
9849         * infrun.c (process_event_stop_test): Adjust
9850         function_name_is_marked_for_skip call.
9851         * skip.c: Include <list>.
9852         (skiplist_entry): Make it a class with private fields, and
9853         getters/setters.
9854         (skiplist_entry_chain): Delete.
9855         (skiplist_entries): New.
9856         (skiplist_entry_count): Delete.
9857         (highest_skiplist_entry_num): New.
9858         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
9859         (add_skiplist_entry): Delete.
9860         (skiplist_entry::skiplist_entry): New.
9861         (skiplist_entry::add_entry): New.
9862         (skip_file_command, skip_function): Adjust.
9863         (compile_skip_regexp): Delete.
9864         (skip_command): Don't compile regexp here.  Adjust to use
9865         skiplist_entry::add_entry.
9866         (skip_info): Adjust to use range-for and getters.
9867         (skip_enable_command, skip_disable_command): Adjust to use
9868         range-for and setters.
9869         (skip_delete_command): Adjust to use std::list.
9870         (add_skiplist_entry): Delete.
9871         (skip_file_p): Delete, refactored as ...
9872         (skiplist_entry::do_skip_file_p): ... this new method.
9873         (skip_gfile_p): Delete, refactored as ...
9874         (skiplist_entry::do_gskip_file_p): ... this new method.
9875         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
9876         (skiplist_entry::skip_function_p): ... this new method.
9877         (function_name_is_marked_for_skip): Now returns bool, and takes
9878         the function sal by const reference.  Adjust to use range-for and
9879         skiplist_entry methods.
9880         (_initialize_step_skip): Remove references to
9881         skiplist_entry_chain, skiplist_entry_count.
9882         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
9883         takes the function sal by const reference.
9884
9885 2017-08-11  Yao Qi  <yao.qi@linaro.org>
9886
9887         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
9888         (dwarf2_frame_cache): Remove reset_cache_cleanup.
9889         (dwarf2_frame_cache):
9890         * frame-unwind.c (frame_unwind_try_unwinder): Catch
9891         RETURN_MASK_ALL and set *this_case to NULL.
9892         * frame-unwind.h: Update comments.
9893
9894 2017-08-11  Yao Qi  <yao.qi@linaro.org>
9895
9896         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
9897         (dwarf2_frame_state_copy_regs): Remove.
9898         (dwarf2_frame_state_free_regs): Remove.
9899         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
9900         (dwarf2_restore_rule): Call method .alloc_regs instead of
9901         dwarf2_frame_state_alloc_regs.
9902         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
9903         constructor.  Call std::move.
9904         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
9905         (dwarf2_frame_cache): Likewise.
9906
9907         [GDB_SELF_TEST]: Include selftest.h and
9908         selftest-arch.h.
9909         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
9910         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
9911         execute_cfa_program_test.
9912
9913         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
9914         copy ctor, assignment operator, move assignment.
9915         <alloc_regs>: New method.
9916         <swap>: New method.
9917         (struct dwarf2_frame_state): Delete dtor.
9918         (dwarf2_frame_state_alloc_regs): Remove declaration.
9919         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
9920         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
9921
9922 2017-08-11  Yao Qi  <yao.qi@linaro.org>
9923
9924         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
9925         (dwarf2_frame_state::dwarf2_frame_state): New.
9926         (dwarf2_frame_state::~dwarf2_frame_state): New.
9927         (dwarf2_fetch_cfa_info): Update.
9928         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
9929         rather than a pointer.  Update code.
9930         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
9931         dtor.
9932         <data_align, code_align, retaddr_column>: Change them to const.
9933         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
9934         to bool.
9935
9936 2017-08-11  Yao Qi  <yao.qi@linaro.org>
9937
9938         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
9939         <loc.exp>: New field.
9940         * dwarf2-frame.c (execute_cfa_program): Update.
9941         (dwarf2_frame_prev_register): Update.
9942
9943 2017-08-10  Pedro Alves  <palves@redhat.com>
9944
9945         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
9946
9947 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
9948
9949         * fbsd-nat.c (struct fbsd_fork_info): Remove.
9950         (fbsd_pending_children): Use std::list.
9951         (fbsd_remember_child): Likewise.
9952         (fbsd_is_child_pending): Likewise.
9953         (fbsd_pending_vfork_done): Use std::forward_list.
9954         (fbsd_add_vfork_done): Likewise.
9955         (fbsd_is_vfork_done_pending): Likewise.
9956         (fbsd_next_vfork_done): Likewise.
9957
9958 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
9959
9960         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
9961         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
9962         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
9963         for `mapfilename'.
9964         (fbsd_xfer_partial): Use gdb::byte_vector.
9965         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
9966
9967 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
9968
9969         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
9970         "filestuff.h".
9971         (fbsd_find_memory_regions): Fix `mapfile' initialization.
9972
9973 2017-08-09  Tom Tromey  <tom@tromey.com>
9974
9975         * skip.c (skiplist_entry): New constructor.
9976         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
9977         (skiplist_entry::file_is_glob): Now bool.
9978         (skiplist_entry::file, skiplist_entry::function): Now
9979         std::string.
9980         (make_skip_entry): Return a unique_ptr.  Use new.
9981         (free_skiplist_entry, free_skiplist_entry_cleanup)
9982         (make_free_skiplist_entry_cleanup): Remove.
9983         (skip_command, skip_disable_command, add_skiplist_entry)
9984         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
9985         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
9986         (function_name_is_marked_for_skip): Update.
9987         (skip_delete_command): Update.  Use delete.
9988
9989 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
9990
9991         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
9992         (aarch64_linux_core_read_description): New function.
9993         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
9994
9995 2017-08-09  Pedro Alves  <palves@redhat.com>
9996
9997         * cp-name-parser.y (cp_comp_to_string): Return a
9998         gdb::unique_xmalloc_ptr<char>.
9999         * cp-support.c (replace_typedefs_qualified_name)
10000         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
10001         (cp_canonicalize_string_full): Use op= instead of explicit
10002         convertion.
10003         (cp_class_name_from_physname, method_name_from_physname)
10004         (cp_func_name, cp_remove_params): Adjust to use
10005         gdb::unique_xmalloc_ptr<char>.
10006         * cp-support.h (cp_comp_to_string): Return a
10007         gdb::unique_xmalloc_ptr<char>.
10008         * python/py-type.c (typy_lookup_type): Adjust to use
10009         gdb::unique_xmalloc_ptr<char>.
10010
10011 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
10012
10013         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
10014
10015 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
10016             Yao Qi  <yao.qi@linaro.org>
10017
10018         * cp-support.c (cp_canonicalize_string_full): Use
10019         gdb::unique_xmalloc_ptr<char>.
10020         (cp_canonicalize_string): Likewise.
10021
10022 2017-08-09  Yao Qi  <yao.qi@linaro.org>
10023
10024         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
10025         * regformats/i386/amd64-avx-avx512.dat: Remove.
10026         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
10027         * regformats/i386/amd64-avx-mpx.dat:Remove.
10028         * regformats/i386/amd64-avx.dat: Remove.
10029         * regformats/i386/amd64-mpx.dat: Remove.
10030         * regformats/i386/i386-avx-avx512.dat: Remove.
10031         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
10032         * regformats/i386/i386-avx-mpx.dat: Remove.
10033         * regformats/i386/i386-mmx.dat: Remove.
10034         * regformats/i386/i386-mpx.dat: Remove.
10035
10036 2017-08-09  Yao Qi  <yao.qi@linaro.org>
10037
10038         * amd64-tdep.h (tdesc_x32): Remove the declaration.
10039         * amd64-tdep.c: Don't include features/i386/x32*.c.
10040         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
10041         functions.
10042         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
10043         and i386/x32-avx-avx512.
10044         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
10045         and i386/x32.xml.
10046         * features/i386/x32-avx-avx512.c: Removed.
10047         * features/i386/x32-avx-avx512.xml: Removed.
10048         * features/i386/x32-avx.c: Removed.
10049         * features/i386/x32-avx.xml: Removed.
10050         * features/i386/x32.c: Removed.
10051         * features/i386/x32.xml: Removed.
10052         * regformats/i386/x32-avx-avx512.dat: Removed.
10053         * regformats/i386/x32-avx.dat: Removed.
10054         * regformats/i386/x32.dat: Removed.
10055
10056 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
10057
10058         PR breakpoints/21886
10059         * mem-break.c (default_memory_insert_breakpoint): Use
10060         `->placed_address' rather than `->reqstd_address' for the
10061         breakpoint location.
10062
10063 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
10064
10065         * arch-utils.c (default_print_insn): Remove arch/mach/endian
10066         assertions.
10067
10068 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
10069
10070         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
10071         a union of `tdep_info', `tdesc_data' and `id'.
10072         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
10073         rather than `info.tdep_info'.
10074         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
10075         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
10076         * i386-tdep.c (i386_gdbarch_init): Likewise.
10077         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
10078         * mips-tdep.c (mips_gdbarch_init): Likewise.
10079         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
10080         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
10081         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
10082         `info.tdep_info'.
10083         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
10084         `info.tdep_info'.
10085         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
10086         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
10087         `info.tdep_info'.
10088         * spu-tdep.c (spu_gdbarch_init): Likewise.
10089         * gdbarch.h: Regenerate.
10090
10091 2017-08-07  Leszek Swirski  <leszeks@google.com>
10092
10093         PR symtab/20899
10094         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
10095
10096 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
10097
10098         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
10099         (gdbsim_open): Rename gdb_argv args object to argv.
10100
10101 2017-08-05  Tom Tromey  <tom@tromey.com>
10102
10103         * compile/compile-object-load.c (compile_object_load): Use
10104         gdb::unique_xmalloc_ptr.
10105         * cli/cli-dump.c (scan_filename): Rename from
10106         scan_filename_with_cleanup.  Change return type.
10107         (scan_expression): Rename from scan_expression_with_cleanup.
10108         Change return type.
10109         (dump_memory_to_file, dump_value_to_file, restore_command):
10110         Use gdb::unique_xmalloc_ptr.  Update.
10111         * cli/cli-cmds.c (find_and_open_script): Use
10112         gdb::unique_xmalloc_ptr.
10113         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
10114         * symmisc.c (maintenance_print_symbols)
10115         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
10116         * symfile.c (symfile_bfd_open, generic_load)
10117         (add_symbol_file_command, remove_symbol_file_command): Use
10118         gdb::unique_xmalloc_ptr.
10119         * source.c (openp): Use gdb::unique_xmalloc_ptr.
10120         * psymtab.c (maintenance_print_psymbols): Use
10121         gdb::unique_xmalloc_ptr.
10122         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
10123         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
10124         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
10125         (reload_shared_libraries_1): Likewise.
10126
10127 2017-08-05  Tom Tromey  <tom@tromey.com>
10128
10129         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
10130         (rust_op_vector, rust_set_vector): New typedefs.
10131         (current_parser): New global.
10132         (work_obstack): Change to pointer type.  Update all users.
10133         (rust_ast, pstate): Remove globals.
10134         (struct rust_parser): New.
10135         (%union) <params, field_inits>: Change type.
10136         (start, tuple_expr, unit_expr, struct_expr_list, literal)
10137         (field_expr, expr_list, maybe_expr_list, type_list): Update.
10138         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
10139         (convert_params_to_types, convert_params_to_expression): Change
10140         type of "params".
10141         (ast_string): Change type of "fields".
10142         (rust_parse): Make a rust_parser.  Remove cleanups.
10143         (rust_lex_tests): Make and install an auto_obstack.
10144
10145 2017-08-04  Yao Qi  <yao.qi@linaro.org>
10146
10147         * configure.srv (ipa_x32_linux_regobj): New.
10148         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
10149         instead of X86_TDESC_AVX512.
10150         (initialize_low_tracepoint): Call
10151         init_registers_x32_avx_avx512_linux.
10152
10153 2017-08-04  Yao Qi  <yao.qi@linaro.org>
10154
10155         * utils.h (gdb_argv): Add namespace std for nullptr_t.
10156
10157 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
10158
10159         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
10160
10161 2017-08-03  Tom Tromey  <tom@tromey.com>
10162
10163         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
10164         Remove.
10165         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
10166
10167 2017-08-03  Tom Tromey  <tom@tromey.com>
10168
10169         * python/py-param.c (compute_enum_values): Use gdb_argv.
10170
10171 2017-08-03  Tom Tromey  <tom@tromey.com>
10172
10173         * utils.h (struct gdb_argv_deleter): New.
10174         (gdb_argv): New class.
10175         * utils.c (gdb_argv::reset): New method.
10176         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
10177         * tracefile.c (tsave_command): Use gdb_argv.
10178         * top.c (new_ui_command): Use gdb_argv.
10179         * symmisc.c (maintenance_print_symbols)
10180         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
10181         * symfile.c (symbol_file_command, generic_load)
10182         (remove_symbol_file_command): Use gdb_argv.
10183         * stack.c (backtrace_command): Use gdb_argv.
10184         * source.c (add_path, show_substitute_path_command)
10185         (unset_substitute_path_command, set_substitute_path_command):
10186         Use gdb_argv.
10187         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
10188         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
10189         * remote.c (extended_remote_run, remote_put_command)
10190         (remote_get_command, remote_delete_command): Use gdb_argv.
10191         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
10192         (gdbsim_open): Use gdb_argv.
10193         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
10194         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
10195         * procfs.c (procfs_info_proc): Use gdb_argv.
10196         * interps.c (interpreter_exec_cmd): Use gdb_argv.
10197         * infrun.c (handle_command): Use gdb_argv.
10198         * inferior.c (add_inferior_command, clone_inferior_command):
10199         Use gdb_argv.
10200         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
10201         * exec.c (exec_file_command): Use gdb_argv.
10202         * cli/cli-cmds.c (alias_command): Use gdb_argv.
10203         * compile/compile.c (build_argc_argv): Use gdb_argv.
10204
10205 2017-08-03  Tom Tromey  <tom@tromey.com>
10206
10207         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
10208
10209 2017-08-03  Tom Tromey  <tom@tromey.com>
10210
10211         * python/python.c (compute_python_string): Return std::string.
10212         (gdbpy_eval_from_control_command): Update.
10213         (do_start_initialization): Use std::string.
10214         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
10215         xstrprintf.
10216         * python/py-breakpoint.c (local_setattro): Use string_printf, not
10217         xstrprintf.
10218
10219 2017-08-03  Tom Tromey  <tom@tromey.com>
10220
10221         * top.h (do_restore_instream_cleanup): Remove.
10222         * top.c (do_restore_instream_cleanup): Remove.
10223         (read_command_file): Use scoped_restore.
10224         * cli/cli-script.c (execute_user_command): Use scoped_restore.
10225
10226 2017-08-03  Tom Tromey  <tom@tromey.com>
10227
10228         * cli/cli-script.c (execute_user_command)
10229         (execute_control_command): Use scoped_restore.
10230
10231 2017-08-03  Tom Tromey  <tom@tromey.com>
10232
10233         * cli/cli-script.c (do_restore_user_call_depth): Remove.
10234         (execute_user_command): Remove user_call_depth; use
10235         user_args_stack's size instead.
10236
10237 2017-08-03  Tom Tromey  <tom@tromey.com>
10238
10239         * top.h (in_user_command): Remove.
10240         * top.c (in_user_command): Remove.
10241         * cli/cli-script.c (do_restore_user_call_depth)
10242         (execute_user_command): Update.
10243
10244 2017-08-03  Tom Tromey  <tom@tromey.com>
10245
10246         * valops.c (search_struct_method): Use gdb::byte_vector.
10247         * valarith.c (value_concat): Use std::vector.
10248         * target.c (memory_xfer_partial): Use gdb::byte_vector.
10249         (simple_search_memory): Likewise.
10250         * printcmd.c (find_string_backward): Use gdb::byte_vector.
10251         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
10252         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
10253         * elfread.c (elf_rel_plt_read): Use std::string.
10254         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
10255         * cli/cli-dump.c (restore_section_callback): Use
10256         gdb::byte_vector.
10257
10258 2017-08-03  Tom Tromey  <tom@tromey.com>
10259
10260         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
10261
10262 2017-08-03  Tom Tromey  <tom@tromey.com>
10263
10264         * tui/tui-regs.c (tui_restore_gdbout): Remove.
10265         (tui_register_format): Use scoped_restore.
10266
10267 2017-08-03  Tom Tromey  <tom@tromey.com>
10268
10269         * reverse.c (exec_direction_default): Remove.
10270         (exec_reverse_once): Use scoped_restore.
10271         * remote.c (restore_remote_timeout): Remove.
10272         (remote_flash_erase, remote_flash_write, remote_flash_done)
10273         (readchar, remote_serial_write): Use scoped_restore.
10274         * cli/cli-script.c (struct source_cleanup_lines_args)
10275         (source_cleanup_lines): Remove.
10276         (script_from_file): Use scoped_restore.
10277         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
10278         (source_command): Use scoped_restore.
10279
10280 2017-08-03  Tom Tromey  <tom@tromey.com>
10281
10282         * utils.h (make_cleanup_free_so): Remove.
10283         * utils.c (do_free_so, make_cleanup_free_so): Remove.
10284         * solist.h (struct so_deleter): New.
10285         (so_list_up): New typedef.
10286         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
10287
10288 2017-08-03  Tom Tromey  <tom@tromey.com>
10289
10290         * utils.h (make_cleanup_restore_current_language): Remove.
10291         * utils.c (do_restore_current_language)
10292         (make_cleanup_restore_current_language): Remove.
10293         * parse.c (parse_exp_in_context_1)
10294         (parse_expression_with_language): Use
10295         scoped_restore_current_language.
10296         * mi/mi-main.c (mi_cmd_execute): Use
10297         scoped_restore_current_language.
10298         * language.h (scoped_restore_current_language): New class.
10299
10300 2017-08-03  Tom Tromey  <tom@tromey.com>
10301
10302         * compile/compile.c (cleanup_unlink_file): Remove.
10303         (compile_to_object): Use gdb::unlinker.
10304         (eval_compile_command): Likewise.
10305
10306 2017-08-03  Tom Tromey  <tom@tromey.com>
10307
10308         * utils.h (make_cleanup_fclose): Remove.
10309         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
10310
10311 2017-08-03  Tom Tromey  <tom@tromey.com>
10312
10313         * top.c (open_terminal_stream): Return gdb_file_up.
10314         (new_ui_command): Update.
10315
10316 2017-08-03  Tom Tromey  <tom@tromey.com>
10317
10318         * source.c (print_source_lines_base, forward_search_command)
10319         (reverse_search_command): Use gdb_file_up.
10320
10321 2017-08-03  Tom Tromey  <tom@tromey.com>
10322
10323         * fbsd-nat.c (fbsd_find_memory_regions): Update.
10324
10325 2017-08-03  Tom Tromey  <tom@tromey.com>
10326
10327         * cli/cli-cmds.c (find_and_open_script): Change return type.
10328         Remove "streamp" and "full_path" parameters.
10329         (source_script_with_search): Update.
10330         * auto-load.c (source_script_file): Update.
10331         * cli/cli-cmds.h (find_and_open_script): Change type.
10332         (open_script): New struct.
10333
10334 2017-08-03  Tom Tromey  <tom@tromey.com>
10335
10336         * xml-support.c (xml_fetch_content_from_file): Update.
10337         * ui-file.c (stdio_file::open): Update.
10338         * tracefile-tfile.c (tfile_start): Update.
10339         * remote.c (remote_file_put, remote_file_get): Update.
10340         * nat/linux-procfs.c (linux_proc_get_int)
10341         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
10342         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
10343         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
10344         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
10345         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
10346         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
10347         * linux-nat.c (linux_proc_pending_signals): Update.
10348         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
10349         (file_closer): Remove.
10350         * compile/compile.c (compile_to_object): Update.
10351         * common/filestuff.h (struct gdb_file_deleter): New.
10352         (gdb_file_up): New typedef.
10353         (gdb_fopen_cloexec): Change return type.
10354         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
10355         * cli/cli-dump.c (fopen_with_cleanup): Remove.
10356         (dump_binary_file, restore_binary_file): Update.
10357         * auto-load.c (auto_load_objfile_script_1): Update.
10358
10359 2017-08-03  Tom Tromey  <tom@tromey.com>
10360
10361         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
10362         (info_static_tracepoint_markers_command): Likewise.
10363         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
10364         * skip.c (skip_info): Use ui_out_emit_table.
10365         * progspace.c (print_program_space): Use ui_out_emit_table.
10366         * osdata.c (info_osdata): Use ui_out_emit_table.
10367         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
10368         ui_out_emit_table.
10369         * linux-thread-db.c (info_auto_load_libthread_db): Use
10370         ui_out_emit_table.
10371         * inferior.c (print_inferior): Use ui_out_emit_table.
10372         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
10373         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
10374         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
10375         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
10376         * ui-out.h (class ui_out_emit_table): New.
10377
10378 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
10379
10380         * mips-tdep.c (mips_fpu_type_str): New function.
10381         (mips_dump_tdep): Call it.
10382
10383 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
10384
10385         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
10386         `->mips_fpu_type'.
10387
10388 2017-07-31  Xavier Roirand  <roirand@adacore.com>
10389
10390         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
10391
10392 2017-07-27  Xavier Roirand  <roirand@adacore.com>
10393
10394         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
10395
10396 2017-07-26  Yao Qi  <yao.qi@linaro.org>
10397
10398         * cli/cli-cmds.c (maintenancechecklist): New variable.
10399         * gdbcmd.h (maintenancechecklist): Declare it.
10400         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
10401         Call i386_linux_read_description with different masks.
10402         * maint.c (maintenance_check_command): New function.
10403         (_initialize_maint_cmds): Call add_prefix_cmd.
10404         * target-descriptions.c (tdesc_reg): override operator != and ==.
10405         (tdesc_type): Likewise.
10406         (tdesc_feature): Likewise.
10407         (target_desc): Likewise.
10408         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
10409         (maintenance_check_xml_descriptions): New function.
10410         (_initialize_target_descriptions) Add command "xml-descriptions".
10411         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
10412
10413 2017-07-26  Yao Qi  <yao.qi@linaro.org>
10414
10415         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
10416         Include features/i386/32bit-*.c.
10417         (i386_linux_read_description): Generate target description if it
10418         doesn't exist.
10419         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
10420         functions.
10421         * features/i386/32bit-linux.c: Re-generated.
10422         * features/i386/32bit-sse.c: Likewise.
10423         * target-descriptions.c (print_c_feature::visit): Print code to
10424         set register number if needed.
10425         (print_c_feature) <m_next_regnum>: New field.
10426
10427 2017-07-26  Yao Qi  <yao.qi@linaro.org>
10428
10429         * features/Makefile (CFILES): Rename with TDESC_CFILES.
10430         (FEATURE_XMLFILES): New.
10431         (FEATURE_CFILES): New.
10432         New rules.
10433         (clean-cfiles): Remove generated c files.
10434         * features/i386/32bit-avx.c: Generated.
10435         * features/i386/32bit-avx512.c: Generated.
10436         * features/i386/32bit-core.c: Generated.
10437         * features/i386/32bit-linux.c: Generated.
10438         * features/i386/32bit-mpx.c: Generated.
10439         * features/i386/32bit-pkeys.c: Generated.
10440         * features/i386/32bit-sse.c: Generated.
10441         * target-descriptions.c: Include algorithm.
10442         (tdesc_element_visitor): Add method visit_end.
10443         (print_c_tdesc): Implement visit_end.
10444         (print_c_tdesc:: m_filename_after_features): Move it to
10445         protected.
10446         (print_c_feature): New class.
10447         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
10448         name starts with "i386/32bit-".
10449
10450 2017-07-26  Yao Qi  <yao.qi@linaro.org>
10451
10452         * target-descriptions.c (tdesc_element_visitor): New class.
10453         (tdesc_element): New class.
10454         (tdesc_reg): Inherit from tdesc_element.
10455         (tdesc_reg::accept): New function.
10456         (tdesc_type): Inherit from tdesc_element.
10457         (tdesc_type::accept): New function.
10458         (tdesc_feature): Inherit from tdesc_element.
10459         (tdesc_feature::accept): New function.
10460         (target_desc): Inherit from tdesc_element.
10461         (target_desc::target_desc): New.
10462         (target_desc::~target_desc): New.
10463         (target_desc::accept): New.
10464         (allocate_target_description): Use new.
10465         (free_target_description): Use delete.
10466         (print_c_tdesc): New class.
10467         (maint_print_c_tdesc_cmd): Adjust.
10468
10469         * features/aarch64.c: Re-generated.
10470         * features/arc-arcompact.c: Re-generated.
10471         * features/arc-v2.c: Re-generated.
10472         * features/arm/arm-with-iwmmxt.c: Re-generated.
10473         * features/arm/arm-with-m.c: Re-generated.
10474         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
10475         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
10476         * features/arm/arm-with-neon.c: Re-generated.
10477         * features/arm/arm-with-vfpv2.c: Re-generated.
10478         * features/arm/arm-with-vfpv3.c: Re-generated.
10479         * features/i386/amd64-avx-avx512.c: Re-generated.
10480         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
10481         * features/i386/amd64-avx.c: Re-generated.
10482         * features/i386/amd64-avx-linux.c: Re-generated.
10483         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
10484         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
10485         * features/i386/amd64-avx-mpx.c: Re-generated.
10486         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
10487         * features/i386/amd64.c: Re-generated.
10488         * features/i386/amd64-linux.c: Re-generated.
10489         * features/i386/amd64-mpx.c: Re-generated.
10490         * features/i386/amd64-mpx-linux.c: Re-generated.
10491         * features/i386/i386-avx-avx512.c: Re-generated.
10492         * features/i386/i386-avx-avx512-linux.c: Re-generated.
10493         * features/i386/i386-avx.c: Re-generated.
10494         * features/i386/i386-avx-linux.c: Re-generated.
10495         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
10496         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
10497         * features/i386/i386-avx-mpx.c: Re-generated.
10498         * features/i386/i386-avx-mpx-linux.c: Re-generated.
10499         * features/i386/i386.c: Re-generated.
10500         * features/i386/i386-linux.c: Re-generated.
10501         * features/i386/i386-mmx.c: Re-generated.
10502         * features/i386/i386-mmx-linux.c: Re-generated.
10503         * features/i386/i386-mpx.c: Re-generated.
10504         * features/i386/i386-mpx-linux.c: Re-generated.
10505         * features/i386/x32-avx-avx512.c: Re-generated.
10506         * features/i386/x32-avx-avx512-linux.c: Re-generated.
10507         * features/i386/x32-avx.c: Re-generated.
10508         * features/i386/x32-avx-linux.c: Re-generated.
10509         * features/i386/x32.c: Re-generated.
10510         * features/i386/x32-linux.c: Re-generated.
10511         * features/microblaze.c: Re-generated.
10512         * features/microblaze-with-stack-protect.c: Re-generated.
10513         * features/mips64-dsp-linux.c: Re-generated.
10514         * features/mips64-linux.c: Re-generated.
10515         * features/mips-dsp-linux.c: Re-generated.
10516         * features/mips-linux.c: Re-generated.
10517         * features/nds32.c: Re-generated.
10518         * features/nios2.c: Re-generated.
10519         * features/nios2-linux.c: Re-generated.
10520         * features/rs6000/powerpc-32.c: Re-generated.
10521         * features/rs6000/powerpc-32l.c: Re-generated.
10522         * features/rs6000/powerpc-403.c: Re-generated.
10523         * features/rs6000/powerpc-403gc.c : Re-generated.
10524         * features/rs6000/powerpc-405.c: Re-generated.
10525         * features/rs6000/powerpc-505.c: Re-generated.
10526         * features/rs6000/powerpc-601.c: Re-generated.
10527         * features/rs6000/powerpc-602.c: Re-generated.
10528         * features/rs6000/powerpc-603.c: Re-generated.
10529         * features/rs6000/powerpc-604.c: Re-generated.
10530         * features/rs6000/powerpc-64.c: Re-generated.
10531         * features/rs6000/powerpc-64l.c: Re-generated.
10532         * features/rs6000/powerpc-7400.c: Re-generated.
10533         * features/rs6000/powerpc-750.c: Re-generated.
10534         * features/rs6000/powerpc-860.c: Re-generated.
10535         * features/rs6000/powerpc-altivec32.c: Re-generated.
10536         * features/rs6000/powerpc-altivec32l.c: Re-generated.
10537         * features/rs6000/powerpc-altivec64.c: Re-generated.
10538         * features/rs6000/powerpc-altivec64l.c: Re-generated.
10539         * features/rs6000/powerpc-cell32l.c: Re-generated.
10540         * features/rs6000/powerpc-cell64l.c: Re-generated.
10541         * features/rs6000/powerpc-e500.c: Re-generated.
10542         * features/rs6000/powerpc-e500l.c: Re-generated.
10543         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
10544         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
10545         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
10546         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
10547         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
10548         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
10549         * features/rs6000/powerpc-vsx32.c: Re-generated.
10550         * features/rs6000/powerpc-vsx32l.c: Re-generated.
10551         * features/rs6000/powerpc-vsx64.c: Re-generated.
10552         * features/rs6000/powerpc-vsx64l.c: Re-generated.
10553         * features/rs6000/rs6000.c: Re-generated.
10554         * features/s390-linux32.c: Re-generated.
10555         * features/s390-linux32v1.c: Re-generated.
10556         * features/s390-linux32v2.c: Re-generated.
10557         * features/s390-linux64.c: Re-generated.
10558         * features/s390-linux64v1.c: Re-generated.
10559         * features/s390-linux64v2.c: Re-generated.
10560         * features/s390-te-linux64.c: Re-generated.
10561         * features/s390-tevx-linux64.c: Re-generated.
10562         * features/s390-vx-linux64.c: Re-generated.
10563         * features/s390x-linux64.c: Re-generated.
10564         * features/s390x-linux64v1.c: Re-generated.
10565         * features/s390x-linux64v2.c: Re-generated.
10566         * features/s390x-te-linux64.c: Re-generated.
10567         * features/s390x-tevx-linux64.c: Re-generated.
10568         * features/s390x-vx-linux64.c: Re-generated.
10569         * features/sparc/sparc32-solaris.c: Re-generated.
10570         * features/sparc/sparc64-solaris.c: Re-generated.
10571         * features/tic6x-c62x.c: Re-generated.
10572         * features/tic6x-c62x-linux.c: Re-generated.
10573         * features/tic6x-c64x.c: Re-generated.
10574         * features/tic6x-c64x-linux.c: Re-generated.
10575         * features/tic6x-c64xp.c: Re-generated.
10576         * features/tic6x-c64xp-linux.c: Re-generated.
10577
10578 2017-07-26  Yao Qi  <yao.qi@linaro.org>
10579
10580         * i386-linux-tdep.c (i386_linux_read_description): New function.
10581         (i386_linux_core_read_description): Call
10582         i386_linux_read_description.
10583         * i386-linux-tdep.h (i386_linux_read_description): Declare.
10584         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
10585         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
10586         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
10587         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
10588         * x86-linux-nat.c (x86_linux_read_description): Call
10589         i386_linux_read_description.
10590
10591 2017-07-26  Yao Qi  <yao.qi@linaro.org>
10592
10593         * NEWS: Mention it.
10594         * features/Makefile (%.c: %.xml): Pass the xml file name to
10595         command "maint print c-tdesc".
10596         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
10597         name from 'arg'.
10598
10599 2017-07-26  Yao Qi  <yao.qi@linaro.org>
10600
10601         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
10602         in-class initialization.
10603         (tdesc_create_feature): Call new instead of XCNEW.
10604         (free_target_description): Ue delete.
10605
10606 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
10607
10608         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
10609
10610 2017-07-25  Yao Qi  <yao.qi@linaro.org>
10611
10612         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
10613         constant.
10614         (amd64_x32_init_abi): Likewise.
10615         * amd64-tdep.h (amd64_init_abi): Update declaration.
10616         (amd64_x32_init_abi): Likewise.
10617
10618 2017-07-25  Yao Qi  <yao.qi@linaro.org>
10619
10620         PR tdep/21717
10621         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
10622         condition for FPSCR.
10623         (arm_linux_store_inferior_registers): Likewise.
10624
10625 2017-07-22  Tom Tromey  <tom@tromey.com>
10626
10627         * break-catch-syscall.c (struct catch_syscall_inferior_data)
10628         <syscalls_counts>: Now a std::vector.
10629         (get_catch_syscall_inferior_data): Use "new".
10630         (catch_syscall_inferior_data_cleanup): Use "delete".
10631         (insert_catch_syscall, remove_catch_syscall)
10632         (clear_syscall_counts): Update.
10633
10634 2017-07-22  Tom Tromey  <tom@tromey.com>
10635
10636         * break-catch-syscall.c (syscall_catchpoint)
10637         <syscalls_to_be_caught>: Now a std::vector<int>
10638         (~syscall_catchpoint): Remove.
10639         (insert_catch_syscall, remove_catch_syscall)
10640         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
10641         (print_mention_catch_syscall, print_recreate_catch_syscall):
10642         Update.
10643         (create_syscall_event_catchpoint): Change type of "filter"
10644         parameter.
10645         (catch_syscall_split_args): Return a std::vector.
10646         (catch_syscall_command_1, catching_syscall_number_1): Update.
10647
10648 2017-07-22  Tom Tromey  <tom@tromey.com>
10649
10650         * break-catch-throw.c (struct exception_catchpoint)
10651         <exception_rx>: Now a std::string.
10652         (~exception_catchpoint): Remove.
10653         (print_one_detail_exception_catchpoint): Update.
10654         (handle_gnu_v3_exceptions): Change type of except_rx.
10655         (extract_exception_regexp): Return a std::string.
10656         (catch_exception_command_1): Update.
10657
10658 2017-07-22  Tom Tromey  <tom@tromey.com>
10659
10660         * break-catch-sig.c (gdb_signal_type): Remove typedef.
10661         (struct signal_catchpoint) <signals_to_be_caught>: Now a
10662         std::vector.
10663         <catch_all>: Now a bool.
10664         (~signal_catchpoint): Remove.
10665         (signal_catchpoint_insert_location)
10666         (signal_catchpoint_remove_location)
10667         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
10668         (signal_catchpoint_print_mention)
10669         (signal_catchpoint_print_recreate)
10670         (signal_catchpoint_explains_signal): Update.
10671         (create_signal_catchpoint): Change type of "filter" and
10672         "catch_all".
10673         (catch_signal_split_args): Return a std::vector.  Change type of
10674         "catch_all".
10675         (catch_signal_command): Update.
10676
10677 2017-07-20  Pedro Alves  <palves@redhat.com>
10678
10679         * ada-lang.c (ada_language_defn): Make extern.
10680         (_initialize_ada_language): Remove add_language call.
10681         * c-lang.c (c_language_defn, cplus_language_defn)
10682         (asm_language_defn, minimal_language_defn): Make extern.
10683         (_initialize_c_language): Delete.
10684         * completer.c (compare_cstrings): Delete, moved to utils.h.
10685         * d-lang.c (d_language_defn): Make extern.
10686         (_initialize_d_language): Remove add_language calls.
10687         * defs.h (enum language): Add comment.
10688         * f-lang.c (f_language_defn): Make extern.
10689         (_initialize_f_language): Remove add_language call.
10690         * go-lang.c (go_language_defn): Make extern.
10691         (_initialize_go_language): Remove add_language call.
10692         * language.c: Include <algorithm>.
10693         (languages): Redefine as const array.
10694         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
10695         (set_language_command): Handle "local".  Use for-range loop.
10696         (set_language): Remove loop.
10697         (language_enum): Rewrite.
10698         (language_def, language_str): Remove loops.
10699         (add_language): Delete.
10700         (add_set_language_command): New, based on add_languages.
10701         (skip_language_trampoline): Adjust.
10702         (local_language_defn): Delete.
10703         (language_gdbarch_post_init): Adjust.
10704         (_initialize_language): Remove add_language calls.  Call
10705         add_set_language_command.
10706         * language.h (add_language): Delete.
10707         (auto_language_defn)
10708         (unknown_language_defn, minimal_language_defn, ada_language_defn)
10709         (asm_language_defn, c_language_defn, cplus_language_defn)
10710         (d_language_defn, f_language_defn, go_language_defn)
10711         (m2_language_defn, objc_language_defn, opencl_language_defn)
10712         (pascal_language_defn, rust_language_defn): Declare.
10713         * m2-lang.c (m2_language_defn): Make extern.
10714         (_initialize_m2_language): Remove add_language call.
10715         * objc-lang.c (objc_language_defn): Make extern.
10716         (_initialize_objc_language): Remove add_language call.
10717         * opencl-lang.c (opencl_language_defn): Make extern.
10718         (_initialize_opencl_language): Remove add_language call.
10719         * p-lang.c (pascal_language_defn): Make extern.
10720         (_initialize_pascal_language): Delete.
10721         * rust-lang.c (rust_language_defn): Make extern.
10722         (_initialize_rust_language): Delete.
10723         * utils.h (compare_cstrings): New static inline function.
10724
10725 2017-07-20  Pedro Alves  <palves@redhat.com>
10726
10727         * ada-lang.c (ada_to_fixed_type_1): Adjust.
10728         (get_var_value): Constify parameters.
10729         (get_int_var_value): Change prototype.
10730         (to_fixed_range_type): Adjust.
10731         * ada-lang.h (get_int_var_value): Change prototype.
10732
10733 2017-07-20  Pedro Alves  <palves@redhat.com>
10734
10735         * dwarf2read.c (dw2_lookup_symbol): Use
10736         SYMBOL_MATCHES_SEARCH_NAME.
10737         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
10738
10739 2017-07-20  Pedro Alves  <palves@redhat.com>
10740
10741         * block.c (block_iter_name_step, block_iter_name_first)
10742         (block_iter_name_next): Delete.
10743         (block_lookup_symbol_primary): Adjust to use
10744         dict_iter_match_first/dict_iter_match_next.
10745         * block.h (block_iter_name_first, block_iter_name_next): Delete
10746         declarations.
10747         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
10748         dict_iter_match_first/dict_iter_match_next.
10749
10750 2017-07-20  Pedro Alves  <palves@redhat.com>
10751
10752         * cp-support.c (cp_find_first_component_aux): Add missing case for
10753         end of string.
10754
10755 2017-07-18  David Blaikie  <dblaikie@gmail.com>
10756
10757         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
10758         of dwo_cu's dwo_file.
10759
10760 2017-07-18  Yao Qi  <yao.qi@linaro.org>
10761
10762         * remote.c (store_registers_using_G): Remove one line comment.
10763
10764 2017-07-18  Yao Qi  <yao.qi@linaro.org>
10765
10766         * regcache.c (regcache_cpy): Simplify it.
10767         (regcache::cpy_no_passthrough): Remove it.
10768         * regcache.h (cpy_no_passthrough): Remove it.
10769         (regcache_dup, regcache_cpy): Update comments.
10770
10771 2017-07-18  Pedro Alves  <palves@redhat.com>
10772
10773         * remote-sim.c (sim_command_completer): Adjust to work with a
10774         completion_tracker instead of a VEC.
10775
10776 2017-07-17  Pedro Alves  <palves@redhat.com>
10777
10778         * completer.c (complete_source_filenames): New function.
10779         (complete_address_and_linespec_locations): New function.
10780         (location_completer): Use complete_address_and_linespec_locations.
10781         (completion_tracker::build_completion_result): Honor the tracker's
10782         request to suppress append.
10783         * completer.h (completion_tracker::suppress_append_ws)
10784         (completion_tracker::set_suppress_append_ws): New methods.
10785         (completion_tracker::m_suppress_append_ws): New field.
10786         (complete_source_filenames): New declaration.
10787         * linespec.c (linespec_complete_what): New.
10788         (struct ls_parser) <complete_what, completion_word,
10789         completion_quote_char, completion_quote_end, completion_tracker>:
10790         New fields.
10791         (string_find_incomplete_keyword_at_end): New.
10792         (linespec_lexer_lex_string): Record quote char.  If in completion
10793         mode, don't throw.
10794         (linespec_lexer_consume_token): Advance the completion word point.
10795         (linespec_lexer_peek_token): Save/restore completion info.
10796         (save_stream_and_consume_token): New.
10797         (set_completion_after_number): New.
10798         (linespec_parse_basic): Set what to complete next depending on
10799         token.  Handle function and label completions specially.
10800         (parse_linespec): Disable objc shortcut in completion mode.  Set
10801         what to complete next depending on token type.  Skip keyword if in
10802         completion mode.
10803         (complete_linespec_component, linespec_complete): New.
10804         * linespec.h (linespec_complete): Declare.
10805
10806 2017-07-17  Pedro Alves  <palves@redhat.com>
10807
10808         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
10809         Handle 'operator<' / 'operator<<'.
10810
10811 2017-07-17  Pedro Alves  <palves@redhat.com>
10812
10813         * completer.c (collect_explicit_location_matches): Handle
10814         MATCH_LABEL.
10815         (convert_explicit_location_to_linespec): New, factored out from
10816         ...
10817         (convert_explicit_location_to_sals): ... this.
10818         (complete_label): New.
10819         (linespec_complete_label, find_label_symbols_in_block): New.
10820         (find_label_symbols): Add completion_mode parameter and adjust to
10821         call find_label_symbols_in_block.
10822         * linespec.h (linespec_complete_label): Declare.
10823
10824 2017-07-17  Pedro Alves  <palves@redhat.com>
10825
10826         * ada-lang.c (ada_collect_symbol_completion_matches): Add
10827         complete_symbol_mode parameter.
10828         * cli/cli-cmds.c (complete_command): Get the completion result out
10829         of the handle_brkchars tracker if used a custom word point.
10830         * completer.c: Include "linespec.h".
10831         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
10832         (advance_to_expression_complete_word_point): New.
10833         (completion_tracker::completes_to_completion_word): New.
10834         (complete_files_symbols): Pass down
10835         complete_symbol_mode::EXPRESSION.
10836         (explicit_options, probe_options): New.
10837         (collect_explicit_location_matches): Complete on the
10838         explictit_loc->foo instead of word.  Use
10839         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
10840         keyword and options completions.
10841         (backup_text_ptr): Delete.
10842         (skip_keyword): New.
10843         (complete_explicit_location): Remove 'word' parameter.  Add
10844         language, quoted_arg_start and quoted_arg_end parameters.
10845         Rewrite, parsing left to right.
10846         (location_completer): Rewrite.
10847         (location_completer_handle_brkchars): New function.
10848         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
10849         (enum complete_line_internal_reason): Adjust comments.
10850         (completion_tracker::discard_completions): New.
10851         (completer_handle_brkchars_func_for_completer): Handle
10852         location_completer.
10853         (gdb_custom_word_point_brkchars)
10854         (gdb_org_rl_basic_quote_characters): New.
10855         (gdb_completion_word_break_characters_throw)
10856         (completion_find_completion_word): Handle trackers that use a
10857         custom word point.
10858         (completion_tracker::advance_custom_word_point_by): New.
10859         (completion_tracker::build_completion_result): Don't rely on
10860         readline appending the quote char.
10861         (gdb_rl_attempted_completion_function_throw): Handle trackers that
10862         use a custom word point.
10863         (gdb_rl_attempted_completion_function): Restore
10864         rl_basic_quote_characters.
10865         * completer.h (class completion_tracker): Extend intro comment.
10866         (completion_tracker::set_quote_char)
10867         (completion_tracker::quote_char)
10868         (completion_tracker::set_use_custom_word_point)
10869         (completion_tracker::use_custom_word_point)
10870         (completion_tracker::custom_word_point)
10871         (completion_tracker::set_custom_word_point)
10872         (completion_tracker::advance_custom_word_point_by)
10873         (completion_tracker::completes_to_completion_word)
10874         (completion_tracker::discard_completions): New methods.
10875         (completion_tracker::m_quote_char)
10876         (completion_tracker::m_use_custom_word_point)
10877         (completion_tracker::m_custom_word_point): New fields.
10878         (advance_to_expression_complete_word_point): Declare.
10879         * f-lang.c (f_collect_symbol_completion_matches): Add
10880         complete_symbol_mode parameter.
10881         * language.h (struct language_defn)
10882         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
10883         parameter.
10884         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
10885         (linespec_complete_function): New function.
10886         (linespec_lexer_lex_keyword): Adjust.
10887         * linespec.h (linespec_keywords, linespec_complete_function): New
10888         declarations.
10889         * location.c (find_end_quote): New function.
10890         (explicit_location_lex_one): Add explicit_completion_info
10891         parameter.  Save quoting info.  Don't throw if being called for
10892         completion.  Don't handle Ada operators here.
10893         (is_cp_operator, skip_op_false_positives, first_of)
10894         (explicit_location_lex_one_function): New function.
10895         (string_to_explicit_location): Replace 'dont_throw' parameter with
10896         an explicit_completion_info pointer parameter.  Handle it.  Don't
10897         use explicit_location_lex_one to lex function names.  Use
10898         explicit_location_lex_one_function instead.
10899         * location.h (struct explicit_completion_info): New.
10900         (string_to_explicit_location): Replace 'dont_throw' parameter with
10901         an explicit_completion_info pointer parameter.
10902         * symtab.c (default_collect_symbol_completion_matches_break_on):
10903         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
10904         (default_collect_symbol_completion_matches)
10905         (collect_symbol_completion_matches): Add complete_symbol_mode
10906         parameter.
10907         (collect_symbol_completion_matches_type): Pass down
10908         complete_symbol_mode::EXPRESSION.
10909         (collect_file_symbol_completion_matches): Add complete_symbol_mode
10910         parameter.  Handle LINESPEC mode.
10911         * symtab.h (complete_symbol_mode): New.
10912         (default_collect_symbol_completion_matches_break_on)
10913         (default_collect_symbol_completion_matches)
10914         (collect_symbol_completion_matches)
10915         (collect_file_symbol_completion_matches): Add complete_symbol_mode
10916         parameter.
10917
10918 2017-07-17  Pedro Alves  <palves@redhat.com>
10919
10920         * utils.c (enum class strncmp_iw_mode): New.
10921         (strcmp_iw): Rename to ...
10922         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
10923         parameters.  Handle them.
10924         (strncmp_iw): New.
10925         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
10926         * utils.h (strncmp_iw): Declare.
10927         (strcmp_iw): Move describing comments here.
10928
10929 2017-07-17  Pedro Alves  <palves@redhat.com>
10930
10931         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
10932         CP_OPERATOR_STR.
10933         * c-typeprint.c (is_type_conversion_operator): Use
10934         CP_OPERATOR_STR.
10935         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
10936         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
10937         CP_OPERATOR_LEN.
10938         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
10939         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
10940         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
10941         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
10942         CP_OPERATOR_STR.
10943         * location.c: Include "cp-support.h".
10944         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
10945         CP_OPERATOR_STR.
10946         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
10947         CP_OPERATOR_LEN.
10948
10949 2017-07-17  Pedro Alves  <palves@redhat.com>
10950
10951         * cli/cli-cmds.c (complete_command): Use a completion tracker
10952         along with completion_find_completion_word for handle_brkchars
10953         phase.
10954         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
10955         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
10956         (struct gdb_rl_completion_word_info): New.
10957         (gdb_rl_find_completion_word): New.
10958         (completion_find_completion_word): New.
10959         * completer.h (completion_find_completion_word): Declare.
10960
10961 2017-07-17  Pedro Alves  <palves@redhat.com>
10962
10963         * ada-lang.c (symbol_completion_match): Adjust comments.
10964         (symbol_completion_add): Replace vector parameter with
10965         completion_tracker parameter.  Use it.
10966         (ada_make_symbol_completion_list): Rename to...
10967         (ada_collect_symbol_completion_matches): ... this.  Add
10968         completion_tracker parameter and use it.
10969         (ada_language_defn): Adjust.
10970         * break-catch-syscall.c (catch_syscall_completer): Adjust
10971         prototype and work with completion_tracker instead of VEC.
10972         * breakpoint.c (condition_completer): Adjust prototype and work
10973         with completion_tracker instead of VEC.
10974         * c-lang.c (c_language_defn, cplus_language_defn)
10975         (asm_language_defn, minimal_language_defn): Adjust to renames.
10976         * cli/cli-cmds.c (complete_command): Rework using
10977         completion_tracker.  Catch exceptions when completing.
10978         * cli/cli-decode.c (integer_unlimited_completer)
10979         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
10980         with completion_tracker instead of VEC.
10981         * command.h (struct completion_tracker): Forward declare.
10982         (completer_ftype, completer_handle_brkchars_ftype): Change
10983         types.
10984         (complete_on_cmdlist, complete_on_enum): Adjust.
10985         * completer.c: Include <algorithm>.
10986         (struct gdb_completer_state): New.
10987         (current_completion): New global.
10988         (readline_line_completion_function): Delete.
10989         (noop_completer, filename_completer)
10990         (filename_completer_handle_brkchars, complete_files_symbols)
10991         (linespec_location_completer): Adjust to work with a
10992         completion_tracker instead of a VEC.
10993         (string_or_empty): New.
10994         (collect_explicit_location_matches): Adjust to work with a
10995         completion_tracker instead of a VEC.
10996         (explicit_location_completer): Rename to ...
10997         (complete_explicit_location): ... this and adjust to work with a
10998         completion_tracker instead of a VEC.
10999         (location_completer): Adjust to work with a completion_tracker
11000         instead of a VEC.
11001         (add_struct_fields): Adjust to work with a completion_list instead
11002         of VEC.
11003         (expression_completer): Rename to ...
11004         (complete_expression): ... this and adjust to work with a
11005         completion_tracker instead of a VEC.  Use complete_files_symbols.
11006         (expression_completer): Reimplement on top of complete_expression.
11007         (symbol_completer): Adjust to work with a completion_tracker
11008         instead of a VEC.
11009         (enum complete_line_internal_reason): Add describing comments.
11010         (complete_line_internal_normal_command): Adjust to work with a
11011         completion_tracker instead of a VEC.
11012         (complete_line_internal): Rename to ...
11013         (complete_line_internal_1): ... this and adjust to work with a
11014         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
11015         handle_brkchars phase.
11016         (new_completion_tracker): Delete.
11017         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
11018         complete_line_internal_1.
11019         (free_completion_tracker): Delete.
11020         (INITIAL_COMPLETION_HTAB_SIZE): New.
11021         (completion_tracker::completion_tracker)
11022         (completion_tracker::~completion_tracker): New.
11023         (maybe_add_completion): Delete.
11024         (completion_tracker::maybe_add_completion)
11025         (completion_tracker::add_completion)
11026         (completion_tracker::add_completions): New.
11027         (throw_max_completions_reached_error): Delete.
11028         (complete_line): Adjust to work with a completion_tracker instead
11029         of a VEC.  Don't create a completion_tracker_t or check for max
11030         completions here.
11031         (command_completer, command_completer_handle_brkchars)
11032         (signal_completer, reg_or_group_completer_1)
11033         (reg_or_group_completer, default_completer_handle_brkchars):
11034         Adjust to work with a completion_tracker.
11035         (gdb_completion_word_break_characters_throw): New.
11036         (gdb_completion_word_break_characters): Reimplement.
11037         (line_completion_function): Delete.
11038         (completion_tracker::recompute_lowest_common_denominator)
11039         (expand_preserving_ws)
11040         (completion_tracker::build_completion_result)
11041         (completion_result::completion_result)
11042         (completion_result::completion_result)
11043         (completion_result::~completion_result)
11044         (completion_result::completion_result)
11045         (completion_result::release_match_list, compare_cstrings)
11046         (completion_result::sort_match_list)
11047         (completion_result::reset_match_list)
11048         (gdb_rl_attempted_completion_function_throw)
11049         (gdb_rl_attempted_completion_function): New.
11050         * completer.h (completion_list, struct completion_result)
11051         (class completion_tracker): New.
11052         (complete_line): Add completion_tracker parameter.
11053         (readline_line_completion_function): Delete.
11054         (gdb_rl_attempted_completion_function): New.
11055         (noop_completer, filename_completer, expression_completer)
11056         (location_completer, symbol_completer, command_completer)
11057         (signal_completer, reg_or_group_completer): Update prototypes.
11058         (completion_tracker_t, new_completion_tracker)
11059         (make_cleanup_free_completion_tracker): Delete.
11060         (enum maybe_add_completion_enum): Delete.
11061         (maybe_add_completion): Delete.
11062         (throw_max_completions_reached_error): Delete.
11063         * corefile.c (complete_set_gnutarget): Adjust to work with a
11064         completion_tracker instead of a VEC.
11065         * cp-abi.c (cp_abi_completer): Adjust to work with a
11066         completion_tracker instead of a VEC.
11067         * d-lang.c (d_language_defn): Adjust.
11068         * disasm.c (disassembler_options_completer): Adjust to work with a
11069         completion_tracker instead of a VEC.
11070         * f-lang.c (f_make_symbol_completion_list): Rename to ...
11071         (f_collect_symbol_completion_matches): ... this.  Adjust to work
11072         with a completion_tracker instead of a VEC.
11073         (f_language_defn): Adjust.
11074         * go-lang.c (go_language_defn): Adjust.
11075         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
11076         Adjust to work with a completion_tracker instead of a VEC.
11077         * infrun.c (handle_completer): Likewise.
11078         * interps.c (interpreter_completer): Likewise.
11079         * interps.h (interpreter_completer): Likewise.
11080         * language.c (unknown_language_defn, auto_language_defn)
11081         (local_language_defn): Adjust.
11082         * language.h (language_defn::la_make_symbol_completion_list):
11083         Rename to ...
11084         (language_defn::la_collect_symbol_completion_matches): ... this
11085         and adjust to work with a completion_tracker instead of a VEC.
11086         * m2-lang.c (m2_language_defn): Adjust.
11087         * objc-lang.c (objc_language_defn): Adjust.
11088         * opencl-lang.c (opencl_language_defn): Adjust.
11089         * p-lang.c (pascal_language_defn): Adjust.
11090         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
11091         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
11092         with a completion_tracker.
11093         * rust-lang.c (rust_language_defn): Adjust.
11094         * symtab.c (free_completion_list, do_free_completion_list)
11095         (return_val, completion_tracker): Delete.
11096         (completion_list_add_name, completion_list_add_symbol)
11097         (completion_list_add_msymbol, completion_list_objc_symbol)
11098         (completion_list_add_fields, add_symtab_completions): Add
11099         completion_tracker parameter and use it.
11100         (default_make_symbol_completion_list_break_on_1): Rename to...
11101         (default_collect_symbol_completion_matches_break_on): ... this.
11102         Add completion_tracker parameter and use it instead of allocating
11103         a completion tracker here.
11104         (default_make_symbol_completion_list_break_on): Delete old
11105         implementation.
11106         (default_make_symbol_completion_list): Delete.
11107         (default_collect_symbol_completion_matches): New.
11108         (make_symbol_completion_list): Delete.
11109         (collect_symbol_completion_matches): New.
11110         (make_symbol_completion_type): Rename to ...
11111         (collect_symbol_completion_matches_type): ... this.  Add
11112         completion_tracker parameter and use it instead of VEC.
11113         (make_file_symbol_completion_list_1): Rename to...
11114         (collect_file_symbol_completion_matches): ... this.  Add
11115         completion_tracker parameter and use it instead of VEC.
11116         (make_file_symbol_completion_list): Delete.
11117         (add_filename_to_list): Use completion_list instead of a VEC.
11118         (add_partial_filename_data::list): Now a completion_list.
11119         (make_source_files_completion_list): Work with a completion_list
11120         instead of a VEC.
11121         * symtab.h: Include "completer.h".
11122         (default_make_symbol_completion_list_break_on)
11123         (default_make_symbol_completion_list, make_symbol_completion_list)
11124         (make_symbol_completion_type, make_file_symbol_completion_list)
11125         (make_source_files_completion_list): Delete.
11126         (default_collect_symbol_completion_matches_break_on)
11127         (default_collect_symbol_completion_matches)
11128         (collect_symbol_completion_matches)
11129         (collect_symbol_completion_matches_type)
11130         (collect_file_symbol_completion_matches)
11131         (make_source_files_completion_list): New.
11132         * top.c (init_main): Don't install a rl_completion_entry_function
11133         hook.  Install a rl_attempted_completion_function hook instead.
11134         * tui/tui-layout.c (layout_completer): Adjust to work with a
11135         completion_tracker.
11136         * tui/tui-regs.c (tui_reggroup_completer):
11137         * tui/tui-win.c (window_name_completer, focus_completer)
11138         (winheight_completer): Adjust to work with a completion_tracker.
11139         * value.c: Include "completer.h".
11140         (complete_internalvar): Adjust to work with a completion_tracker.
11141         * value.h (complete_internalvar): Likewise.
11142
11143 2017-07-17  Pedro Alves  <palves@redhat.com>
11144
11145         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
11146         renames.
11147         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
11148         comments to completer_ftype's declaration.
11149         <completer_handle_brkchars>: Change type to
11150         completer_handle_brkchars_ftype.
11151         * command.h (completer_ftype): Add describing comment and give
11152         names to parameters.
11153         (completer_ftype_void): Rename to ...
11154         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
11155         (set_cmd_completer_handle_brkchars): Adjust.
11156         * completer.c (filename_completer_handle_brkchars): New function.
11157         (complete_line_internal_normal_command): New function, factored
11158         out from ...
11159         (complete_line_internal): ... here.
11160         (command_completer_handle_brkchars)
11161         (default_completer_handle_brkchars)
11162         (completer_handle_brkchars_func_for_completer): New functions.
11163         * completer.h (set_gdb_completion_word_break_characters): Delete
11164         declaration.
11165         (completer_handle_brkchars_func_for_completer): New declaration.
11166         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
11167         completer_handle_brkchars_func_for_completer.
11168
11169 2017-07-17  Pedro Alves  <palves@redhat.com>
11170
11171         * completer.c (symbol_completer): New function, based on
11172         make_symbol_completion_list_fn.
11173         * completer.h (symbol_completer): New declaration.
11174         * guile/scm-cmd.c (cmdscm_completers): Adjust.
11175         * python/py-cmd.c (completers): Adjust.
11176         * symtab.c (make_symbol_completion_list_fn): Delete.
11177         * symtab.h (make_symbol_completion_list_fn): Delete.
11178         * cli/cli-decode.c (add_cmd): Adjust.
11179
11180 2017-07-17  Pedro Alves  <palves@redhat.com>
11181
11182         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
11183         * dwarf2read.c: Include "filename-seen-cache.h".
11184         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
11185         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
11186         * filename-seen-cache.c: New file.
11187         * filename-seen-cache.h: New file.
11188         * symtab.c: Include "filename-seen-cache.h".
11189         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
11190         (create_filename_seen_cache, clear_filename_seen_cache)
11191         (delete_filename_seen_cache, filename_seen): Delete, parts moved
11192         to filename-seen-cache.h/filename-seen-cache.c.
11193         (output_source_filename, sources_info)
11194         (maybe_add_partial_symtab_filename)
11195         (make_source_files_completion_list): Adjust to use
11196         filename_seen_cache.
11197
11198 2017-07-17  Pedro Alves  <palves@redhat.com>
11199
11200         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
11201         fields.
11202         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
11203         dwarf2_debug_sections*)): New.
11204         (dwarf2_per_objfile::dwarf2_per_objfile(const
11205         dwarf2_per_objfile&)): Declare as deleted.
11206         (dwarf2_per_objfile::operator=): Declare as deleted.
11207         (dwarf2_per_objfile::dwarf2_per_objfile)
11208         (dwarf2_per_objfile::~dwarf2_per_objfile)
11209         (dwarf2_per_objfile::free_cached_comp_units): New.
11210         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
11211         ctor.  Call dwarf2_per_objfile's ctor manually.
11212         (dwarf2_locate_sections): Deleted/refactored as ...
11213         (dwarf2_per_objfile::locate_sections): ... this new method.
11214         (free_cached_comp_units): Defer to
11215         dwarf2_per_objfile::free_cached_comp_units.
11216         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
11217
11218 2017-07-14  Tom Tromey  <tom@tromey.com>
11219
11220         PR rust/21764:
11221         * rust-exp.y (convert_ast_to_expression): Add "want_type"
11222         parameter.
11223         <UNOP_SIZEOF>: Split into separate case.
11224         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
11225
11226 2017-07-14  Tom Tromey  <tom@tromey.com>
11227
11228         PR rust/21763:
11229         * symtab.c (symbol_matches_domain): Add language_rust to special
11230         case.
11231         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
11232         treat LOC_TYPEDEF symbols as variables.
11233
11234 2017-07-14  Pedro Alves  <palves@redhat.com>
11235
11236         * symtab.c (make_file_symbol_completion_list_1): Iterate over
11237         symtabs matching all symtabs with SRCFILE as file name instead of
11238         only considering the first hit, with lookup_symtab.
11239
11240 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
11241
11242         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
11243         operator_name parameters.
11244         (gen_expr): Update function call.
11245
11246 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
11247
11248         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
11249         parameter.
11250         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
11251         Likewise.
11252         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
11253         parameter, use agent_expr::gdbarch instead, update function
11254         calls.
11255         (locexpr_tracepoint_var_ref): Likewise.
11256         (loclist_tracepoint_var_ref): Likewise.
11257         * ax-gdb.c (gen_trace_static_fields): Likewise.
11258         (gen_traced_pop): Likewise.
11259         (gen_frame_args_address): Likewise.
11260         (gen_frame_locals_address): Likewise.
11261         (gen_var_ref): Likewise.
11262         (gen_struct_ref_recursive): Likewise.
11263         (gen_static_field): Likewise.
11264         (gen_maybe_namespace_elt): Likewise.
11265         (gen_expr): Likewise.
11266         (gen_trace_for_var): Likewise.
11267         (gen_trace_for_expr): Likewise.
11268         (gen_trace_for_return_address): Likewise.
11269
11270 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
11271
11272         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
11273         parameter.
11274         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
11275
11276 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
11277
11278         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
11279         from ax, update calls.
11280         (gen_usual_arithmetic): Likewise.
11281         (gen_integral_promotions): Likewise.
11282         (gen_bitfield_ref): Likewise.
11283         (gen_primitive_field): Likewise.
11284         (gen_struct_ref_recursive): Likewise.
11285         (gen_struct_ref): Likewise.
11286         (gen_maybe_namespace_elt): Likewise.
11287         (gen_struct_elt_for_reference): Likewise.
11288         (gen_namespace_elt): Likewise.
11289         (gen_aggregate_elt_ref): Likewise.
11290         (gen_expr): Get gdbarch from ax, update calls.
11291         (gen_expr_binop_rest): Likewise.
11292
11293 2017-07-13  Pedro Alves  <palves@redhat.com>
11294
11295         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
11296         as default tdesc.
11297         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
11298         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
11299         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
11300         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
11301         tdep.
11302         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
11303         Get final tdesc from the tdep.
11304         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
11305         default tdesc.
11306         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
11307         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
11308         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
11309         Use it as default tdesc.
11310         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
11311         down to amd_init_abi.  No longer handle fallback tdesc here.
11312         * amd64-tdep.h (tdesc_x32): Declare.
11313         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
11314         parameter.
11315         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
11316         as default tdesc.
11317
11318 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11319
11320         * s390-linux-tdep.c (s390_process_record): Add support for
11321         instructions new in arch12.
11322
11323 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
11324
11325         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
11326         PT_GETFSBASE and PT_GETGSBASE.
11327         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
11328         PT_SETGSBASE.
11329
11330 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
11331
11332         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
11333         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
11334         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
11335         those rules.
11336         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
11337         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
11338         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
11339         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
11340         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
11341         * features/i386/amd64.xml: Add 64bit-segments.xml.
11342         * features/i386/amd64-avx-avx512.c: Regenerated.
11343         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
11344         * features/i386/amd64-avx-mpx.c: Regenerated.
11345         * features/i386/amd64-avx.c: Regenerated.
11346         * features/i386/amd64-mpx.c: Regenerated.
11347         * features/i386/amd64.c: Regenerated.
11348         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
11349         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
11350         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
11351         * regformats/i386/amd64-avx.dat: Regenerated.
11352         * regformats/i386/amd64-mpx.dat: Regenerated.
11353         * regformats/i386/amd64.dat: Regenerated.
11354
11355 2017-07-10  Yao Qi  <yao.qi@linaro.org>
11356
11357         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
11358         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
11359
11360 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
11361
11362         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
11363         unsetenv.
11364         * gnulib/aclocal.m4: Regenerate.
11365         * gnulib/config.in: Regenerate.
11366         * gnulib/configure: Regenerate.
11367         * gnulib/import/Makefile.am: Regenerate.
11368         * gnulib/import/Makefile.in: Regenerate.
11369         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
11370         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
11371         * gnulib/import/m4/environ.m4: New file.
11372         * gnulib/import/m4/setenv.m4: New file.
11373         * gnulib/import/setenv.c: New file.
11374         * gnulib/import/unsetenv.c: New file.
11375
11376 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
11377
11378         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
11379         address when op is DW_OP_addr.
11380
11381 2017-07-09  Tom Tromey  <tom@tromey.com>
11382
11383         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
11384         check and apply to outer type.
11385
11386 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
11387
11388         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
11389         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
11390         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
11391         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
11392
11393 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
11394
11395         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
11396
11397 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
11398
11399         * corelow.c (get_core_siginfo): Remove.
11400         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
11401         instead of get_core_siginfo.
11402         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
11403         * gdbarch.h: Re-generate.
11404         * gdbarch.c: Re-generate.
11405         * linux-tdep.c (linux_core_xfer_siginfo): New.
11406         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
11407
11408 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
11409
11410         * corelow.c (thread_section_name): Move to ...
11411         * gdbcore.h (thread_section_name): ... here.
11412
11413 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
11414
11415         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
11416         (struct siginfo32): New.
11417         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
11418         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
11419         via ptrace(PT_LWPINFO).
11420
11421 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
11422
11423         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
11424         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
11425         (fbsd_get_siginfo_type): New.
11426         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
11427         (_initialize_fbsd_tdep): New.
11428
11429 2017-07-06  David Blaikie  <dblaikie@gmail.com>
11430
11431         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
11432         a singular dwo_unit*) to support multiple CUs in the same way that
11433         multiple TUs are supported.
11434         (create_cus_hash_table): Replace create_dwo_cu with a function for
11435         parsing multiple CUs from a DWO file.
11436         (open_and_init_dwo_file): Use create_cus_hash_table rather than
11437         create_dwo_cu.
11438         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
11439         htab_find, rather than comparing the signature to a singleton CU in
11440         the dwo_file.
11441
11442 2017-07-06  Pedro Alves  <palves@redhat.com>
11443
11444         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
11445
11446 2017-07-04  Pedro Alves  <palves@redhat.com>
11447
11448         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
11449         * gdbtypes.h (TYPE_STATIC): Delete.
11450         (struct fn_field) <is_public, is_abstract, is_static, is_final,
11451         is_synchronized, is_native>: Delete.
11452         <dummy>: Bump.
11453         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
11454         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
11455         (TYPE_FN_FIELD_ABSTRACT): Delete.
11456
11457 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
11458
11459         * buffer.h (buffer_finish): Fix spelling mistakes.
11460
11461 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
11462
11463         * .dir-locals.el: Automatically switch to C-style comments in
11464         versions of Emacs that support the feature.
11465
11466 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
11467             Pedro Alves  <palves@redhat.com>
11468
11469         PR cli/21688
11470         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
11471         (process_next_line): New variable 'inline_cmd'.
11472         Adjust 'if' clauses for "python", "compile" and "guile" to use
11473         'command_name_equals' and check for '!inline_cmd'.
11474
11475 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
11476
11477         PR cli/21688
11478         * cli/cli-script.c (command_name_equals_not_inline): New function.
11479         (process_next_line): Adjust 'if' clauses for "python", "compile"
11480         and "guile" to use command_name_equals_not_inline.
11481
11482 2017-06-29  Pedro Alves  <palves@redhat.com>
11483
11484         * completer.c (expression_completer): Call
11485         linespec_location_completer instead of location_completer.
11486
11487 2017-06-29  Pedro Alves  <palves@redhat.com>
11488
11489         * completer.c (expression_completer): Remove code that recomputes
11490         'text' from 'word'.
11491
11492 2017-06-29  Yao Qi  <yao.qi@linaro.org>
11493
11494         * regformats/regdat.sh: Generate code with
11495         "ifndef IN_PROCESS_AGENT".
11496
11497 2017-06-28  Pedro Alves  <palves@redhat.com>
11498
11499         * command.h: Include "common/scoped_restore.h".
11500
11501 2017-06-28  Yao Qi  <yao.qi@linaro.org>
11502
11503         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
11504         instead of obstack_grow.
11505
11506 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
11507
11508         PR gdb/21337
11509         * symfile.c (reread_symbols): Call objfiles_changed just before
11510         read_symbols.
11511
11512 2017-06-27  Pedro Alves  <palves@redhat.com>
11513
11514         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
11515         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
11516         (completion_list_add_symbol, completion_list_add_msymbol):
11517         ... these new functions.
11518         (add_symtab_completions)
11519         (default_make_symbol_completion_list_break_on_1): Adjust.
11520
11521 2017-06-27  Pedro Alves  <palves@redhat.com>
11522
11523         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
11524         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
11525         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
11526         dtor.
11527         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
11528         'storage_obstack' field an auto_obstack.  In-class initialize all
11529         non-bitfield fields.  Make minsyms_read bool.
11530         * symfile.c (read_symbols): Adjust.
11531
11532 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
11533
11534         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
11535         (gdbsim_store_register): Likewise.
11536
11537 2017-06-27  Pedro Alves  <palves@redhat.com>
11538
11539         * c-exp.y (name_obstack): Now an auto_obstack.
11540         (yylex): Use auto_obstack::clear.
11541         (c_parse): Use auto_obstack::clear instead of reinitializing and
11542         freeing the obstack.
11543         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
11544         * d-exp.y (name_obstack): Now an auto_obstack.
11545         (yylex): Use auto_obstack::clear.
11546         (d_parse): Use auto_obstack::clear instead of reinitializing and
11547         freeing the obstack.
11548         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
11549         auto_obstack.
11550         * dwarf2read.c (create_addrmap_from_index)
11551         (dwarf2_build_psymtabs_hard)
11552         (update_enumeration_type_from_children): Likewise.
11553         * gdb_obstack.h (auto_obstack): New type.
11554         * go-exp.y (name_obstack): Now an auto_obstack.
11555         (build_packaged_name): Use auto_obstack::clear.
11556         (go_parse): Use auto_obstack::clear instead of reinitializing and
11557         freeing the obstack.
11558         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
11559         auto_obstack.
11560         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
11561         * rust-exp.y (work_obstack): Now an auto_obstack.
11562         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
11563         reinitializing and freeing the obstack.
11564         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
11565         (host_char_to_target): Use auto_obstack.
11566         * utils.h (make_cleanup_obstack_free): Delete declaration.
11567         * valprint.c (generic_emit_char, generic_printstr): Use
11568         auto_obstack.
11569
11570 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
11571
11572         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
11573         thread.
11574         (darwin_init_thread_list): Don't update dummy thread.
11575         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
11576
11577 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
11578
11579         * record-full.c (netorder16): Remove.
11580
11581 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
11582
11583         * common/diagnostics.h: Define macros for GCC.
11584         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
11585         * common/vec.h: Include diagnostics.h.
11586         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
11587         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
11588         warning.
11589
11590 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
11591
11592         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
11593         New macro.
11594         * ada-lex.l: Ignore deprecated register warnings.
11595
11596 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
11597
11598         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
11599         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
11600
11601 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
11602
11603         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
11604         its own line.
11605
11606 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
11607
11608         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
11609
11610 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
11611
11612         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
11613         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
11614         (xtensa_register_read_masked): Likewise.
11615
11616 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
11617
11618         * common/environ.c (gdb_environ::unset): Update comment.
11619
11620 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
11621
11622         * python/py-unwind.c (pyuw_sniffer): Allocate space for
11623         registers.
11624
11625 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
11626
11627         * record-full.c (record_full_exec_insn): Use byte_vector.
11628
11629 2017-06-22  Yao Qi  <yao.qi@linaro.org>
11630
11631         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
11632         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
11633
11634 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
11635
11636         * remote.c (cached_reg): Move from here...
11637         * regcache.h (cached_reg): ...to here.
11638         * python/py-unwind.c (struct reg_info): Remove.
11639         (cached_frame_info): Use cached_reg_t.
11640         (pyuw_prev_register): Likewise.
11641         (pyuw_sniffer): Use cached_reg_t and allocate registers.
11642         (pyuw_dealloc_cache): Free all registers.
11643
11644 2017-06-22  Pedro Alves  <palves@redhat.com>
11645             Simon Marchi  <simon.marchi@ericsson.com>
11646
11647         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
11648         warning.
11649         * common/diagnostics.h: New file.
11650
11651 2017-06-22  Pedro Alves  <palves@redhat.com>
11652
11653         * common/agent.h: Add include guards.
11654
11655 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
11656
11657         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
11658         talk about addressable units instead of bytes.
11659
11660 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
11661
11662         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
11663         of '::const_iterator'.
11664
11665 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
11666
11667         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11668         'unittests/environ-selftests.c'.
11669         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
11670         * charset.c (find_charset_names): Declare object 'iconv_env'.
11671         Update code to use 'iconv_env' object.  Remove call to
11672         'free_environ'.
11673         * common/environ.c: Include <utility>.
11674         (make_environ): Delete function.
11675         (free_environ): Delete function.
11676         (gdb_environ::clear): New function.
11677         (gdb_environ::operator=): New function.
11678         (gdb_environ::get): Likewise.
11679         (environ_vector): Delete function.
11680         (set_in_environ): Delete function.
11681         (gdb_environ::set): New function.
11682         (unset_in_environ): Delete function.
11683         (gdb_environ::unset): New function.
11684         (gdb_environ::envp): Likewise.
11685         * common/environ.h: Include <vector>.
11686         (struct gdb_environ): Delete; transform into...
11687         (class gdb_environ): ... this class.
11688         (free_environ): Delete prototype.
11689         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
11690         environ_vector): Likewise.
11691         * infcmd.c (run_command_1): Update code to call
11692         'envp' from 'gdb_environ' class.
11693         (environment_info): Update code to call methods from 'gdb_environ'
11694         class.
11695         (unset_environment_command): Likewise.
11696         (path_info): Likewise.
11697         (path_command): Likewise.
11698         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
11699         (inferior::inferior): Initialize 'environment' using the host's
11700         information.
11701         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
11702         Include "environ.h".
11703         (class inferior) <environment>: Change type from 'struct
11704         gdb_environ' to 'gdb_environ'.
11705         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
11706         methods from 'gdb_environ' class.
11707         * solib.c (solib_find_1): Likewise
11708         * unittests/environ-selftests.c: New file.
11709
11710 2017-06-20  Yao Qi  <yao.qi@linaro.org>
11711
11712         * features/i386/i386-linux.xml: Exchange the order of including
11713         32bit-linux.xml and 32bit-sse.xml.
11714         * features/i386/i386-linux.c: Regenerated.
11715
11716 2017-06-20  Yao Qi  <yao.qi@linaro.org>
11717
11718         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
11719         Delete copy ctor and assignment operator.
11720         (tdesc_type): Likewise.
11721         (tdesc_feature): Likewise.
11722         (tdesc_free_reg): Remove.
11723         (tdesc_create_reg): Use new.
11724         (tdesc_free_type): Remove.
11725         (tdesc_create_vector): Use new.
11726         (tdesc_create_union): Likewise.
11727         (tdesc_create_flags): Likewise.
11728         (tdesc_create_enum): Likewise.
11729         (tdesc_free_feature): Delete.
11730         (free_target_description): Use delete.
11731
11732 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
11733
11734         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
11735         registers.
11736
11737 2017-06-19  Pedro Alves  <palves@redhat.com>
11738
11739         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
11740         after gdb::unlinker.
11741
11742 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
11743
11744         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
11745         gdb_environ to access an environment variable.
11746
11747 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
11748
11749         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
11750         gdb_byte*.
11751
11752 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
11753
11754         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
11755
11756 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
11757
11758         * configure: Re-generate.
11759         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
11760
11761 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
11762
11763         * configure: Re-generate.
11764         * warning.m4: Pass -Werror to compiler when checking for
11765         supported warning flags.
11766
11767 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
11768
11769         * Makefile.in (COMPILE.pre): Add "-x c++".
11770
11771 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
11772             Pedro Alves  <palves@redhat.com>
11773             Yao Qi  <yao.qi@linaro.org>
11774
11775         * defs.h (RequireLongest): New.
11776         (extract_integer): Declare function template.
11777         (extract_signed_integer): Remove the declaration, but define it
11778         static inline.
11779         (extract_unsigned_integer): Likewise.
11780         (store_integer): Declare function template.
11781         (store_signed_integer): Remove the declaration, but define it
11782         static inline.
11783         (store_unsigned_integer): Likewise.
11784         * findvar.c (extract_integer): New function template.
11785         (extract_signed_integer): Remove.
11786         (extract_unsigned_integer): Remove.
11787         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
11788         instantiations.
11789         (store_integer): New function template.
11790         (store_signed_integer): Remove.
11791         (store_unsigned_integer): Remove.
11792         (store_integer): Explicit instantiations.
11793         * regcache.c (regcache_raw_read_signed): Update.
11794         (regcache::raw_read): New function.
11795         (regcache::raw_read_signed): Remove.
11796         (regcache::raw_read_unsigned): Remove.
11797         (regcache_raw_read_unsigned): Update.
11798         (regcache_raw_write_unsigned): Update.
11799         (regcache::raw_write_signed): Remove.
11800         (regcache::raw_write): New function.
11801         (regcache_cooked_read_signed): Update.
11802         (regcache::raw_write_unsigned): Remove.
11803         (regcache::cooked_read_signed): Remove.
11804         (regcache_cooked_read_unsigned): Update.
11805         (regcache::cooked_read_unsigned): Remove.
11806         (regcache_cooked_write_signed): Update.
11807         (regcache_cooked_write_unsigned): Update.
11808         * regcache.h (regcache) <raw_read_signed>: Remove.
11809         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
11810         <raw_read, raw_write>: New.
11811         <cooked_read_signed, cooked_write_signed>: Remove.
11812         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
11813         <cooked_read, cooked_write>: New.
11814         * sh64-tdep.c (sh64_pseudo_register_read): Update.
11815         (sh64_pseudo_register_write): Update.
11816
11817 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
11818
11819         * arc-tdep.c (arc_disassembler_options): New variable.
11820         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
11821         of default_print_insn.
11822         (arc_delayed_print_insn): Set info->section when needed,
11823         use default_print_insn to retrieve a disassembler.
11824
11825 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
11826
11827         PR gdb/21574
11828         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
11829         to mention $SHELL and startup-with-shell.
11830
11831 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
11832
11833         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
11834
11835 2017-06-14  Yao Qi  <yao.qi@linaro.org>
11836
11837         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
11838         default_print_insn instead of print_insn_aarch64.
11839         * arm-tdep.c (gdb_print_insn_arm): Call
11840         default_print_insn instead of print_insn_big_arm
11841         and print_insn_little_arm.
11842         * i386-tdep.c (i386_print_insn): Call default_print_insn
11843         instead of print_insn_i386.
11844         * ia64-tdep.c (ia64_print_insn): Call
11845         default_print_insn instead of print_insn_ia64.
11846         * mips-tdep.c (gdb_print_insn_mips): Call
11847         default_print_insn instead of print_insn_big_mips
11848         and print_insn_little_mips.
11849         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
11850         instead of print_insn_spu.
11851
11852 2017-06-14  Pedro Alves  <palves@redhat.com>
11853
11854         * ada-lang.c: Include "common/byte-vector.h".
11855         (ada_value_primitive_packed_val): Use gdb::byte_vector.
11856         * charset.c (wchar_iterator::iterate): Resize the vector instead
11857         of reserving it.
11858         * common/byte-vector.h: Include "common/def-vector.h".
11859         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
11860         * cli/cli-dump.c: Include "common/byte-vector.h".
11861         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
11862         * common/byte-vector.h: New file.
11863         * common/def-vector.h: New file.
11864         * common/default-init-alloc.h: New file.
11865         * dwarf2loc.c: Include "common/byte-vector.h".
11866         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
11867         instead of reserving it.
11868         * dwarf2read.c: Include "common/byte-vector.h".
11869         (data_buf::m_vec): Now a gdb::byte_vector.
11870         * gdb_regex.c: Include "common/def-vector.h".
11871         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
11872         * mi/mi-main.c: Include "common/byte-vector.h".
11873         (mi_cmd_data_read_memory): Use gdb::byte_vector.
11874         * printcmd.c: Include "common/byte-vector.h".
11875         (print_scalar_formatted): Use gdb::byte_vector.
11876         * valprint.c: Include "common/byte-vector.h".
11877         (maybe_negate_by_bytes, print_decimal_chars): Use
11878         gdb::byte_vector.
11879
11880 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
11881
11882         * darwin-nat.c: Include "nat/fork-inferior.h".
11883
11884 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
11885
11886         * configure.nat: Factor out Darwin bits that are not
11887         architecture-specific.  Add fork-inferior.o.
11888
11889 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
11890
11891         * configure.nat: Factor out AIX bits that are not
11892         architecture-specific.  Add fork-inferior.o.
11893
11894 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11895
11896         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
11897         (read_pieced_value, write_pieced_value): ...here.  Reduce to
11898         wrappers that just call rw_pieced_value.
11899
11900 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11901
11902         * dwarf2loc.c (write_pieced_value): When writing the data for a
11903         memory piece, use write_memory_with_notification instead of
11904         write_memory.
11905
11906 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11907
11908         * valops.c (read_value_memory): Change embedded_offset to
11909         represent a bit offset instead of a byte offset.
11910         * value.h (read_value_memory): Adjust comment.
11911
11912 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11913
11914         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
11915         dest_offset_bits and source_offset_bits.
11916         (write_pieced_value): Likewise.
11917
11918 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11919
11920         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
11921         given by DW_OP_bit_piece.
11922         (write_pieced_value): Likewise.
11923
11924 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11925
11926         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
11927         some other preparations to the places where sufficient information
11928         is available.
11929         (write_pieced_value): Likewise.
11930
11931 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11932
11933         * dwarf2loc.c (bits_to_bytes): New function.
11934         (read_pieced_value): Fix offset calculations for register pieces
11935         on big-endian targets.
11936         (write_pieced_value): Likewise.
11937
11938 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11939
11940         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
11941         (write_pieced_value): Likewise.
11942
11943 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11944
11945         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
11946         transfer the source value's least significant bits, instead of its
11947         lowest-addressed ones.  Rename type_len to max_offset.
11948         (read_pieced_value): Mirror above changes to write_pieced_value as
11949         applicable.
11950
11951 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11952
11953         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
11954         truncate full bytes from dest_offset_bits before using it as an
11955         offset into the buffer.
11956
11957 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11958
11959         * dwarf2loc.c (write_pieced_value): Include transfer size in
11960         byte-wise check.
11961
11962 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11963
11964         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
11965         calculation of this_size.
11966
11967 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11968
11969         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
11970         when targeting a bit-field.
11971         (write_pieced_value): Likewise.
11972
11973 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11974
11975         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
11976         (allocate_piece_closure): Drop addr_size parameter.
11977         (dwarf2_evaluate_loc_desc_full): Adjust call to
11978         allocate_piece_closure.
11979
11980 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11981
11982         PR gdb/21226
11983         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
11984         the LSB end, independent of endianness.
11985
11986 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11987
11988         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
11989         size capping.
11990
11991 2017-06-13  Yao Qi  <yao.qi@linaro.org>
11992
11993         * mips-linux-nat.c: Move include features/mips*-linux.c to
11994         mips-linux-tdep.c.
11995         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
11996         to mips-linux-tdep.c.
11997         * mips-linux-tdep.c: Include features/mips*-linux.c
11998         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
11999         functions.
12000         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
12001         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
12002         (tdesc_mips64_dsp_linux): Declare.
12003
12004 2017-06-12  Tom Tromey  <tom@tromey.com>
12005
12006         * valprint.h (val_print_type_code_int): Remove.
12007         * valprint.c (generic_val_print_int): Always call
12008         val_print_scalar_formatted.
12009         (val_print_type_code_int): Remove.
12010         * printcmd.c (print_scalar_formatted): Handle options->format==0.
12011         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
12012         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
12013         * ada-valprint.c (ada_val_print_num): Use
12014         val_print_scalar_formatted.
12015
12016 2017-06-12  Tom Tromey  <tom@tromey.com>
12017
12018         * printcmd.c (print_scalar_formatted): Unify the two switches.
12019         Don't convert scalars to LONGEST.
12020
12021 2017-06-12  Tom Tromey  <tom@tromey.com>
12022
12023         PR exp/16225:
12024         * valprint.h (print_decimal_chars): Update.
12025         * valprint.c (maybe_negate_by_bytes): New function.
12026         (print_decimal_chars): Add "is_signed" argument.
12027         * printcmd.c (print_scalar_formatted): Update.
12028
12029 2017-06-12  Tom Tromey  <tom@tromey.com>
12030
12031         PR exp/16225:
12032         * valprint.h (print_binary_chars, print_hex_chars): Update.
12033         * valprint.c (val_print_type_code_int): Update.
12034         (print_binary_chars): Add "zero_pad" argument.
12035         (emit_octal_digit): New function.
12036         (print_octal_chars): Don't zero-pad.
12037         (print_decimal_chars): Likewise.
12038         (print_hex_chars): Add "zero_pad" argument.
12039         * sh64-tdep.c (sh64_do_fp_register): Update.
12040         * regcache.c (regcache::dump): Update.
12041         * printcmd.c (print_scalar_formatted): Update.
12042         * infcmd.c (default_print_one_register_info): Update.
12043
12044 2017-06-12  Pedro Alves  <palves@redhat.com>
12045             Alan Hayward  <alan.hayward@arm.com>
12046
12047         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
12048         (mips_eabi_push_dummy_call): Rename local 'regsize' to
12049         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
12050         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
12051         Assert that abi_regsize bytes fit in 'ref_valbuf'.
12052
12053 2017-06-12  Pedro Alves  <palves@redhat.com>
12054
12055         * dwarf2read.c (mapped_symtab::data): Now a vector of
12056         symtab_index_entry instead of vector of
12057         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
12058         whether an element's name is NULL instead of checking whether the
12059         element itself is NULL.
12060         (find_slot): Change return type.  Adjust.
12061         (hash_expand, , add_index_entry, uniquify_cu_indices)
12062         (write_hash_table): Adjust.
12063
12064 2017-06-12  Pedro Alves  <palves@redhat.com>
12065
12066         * dwarf2read.c (recursively_count_psymbols): New function.
12067         (write_psymtabs_to_index): Call it to compute number of psyms and
12068         pass estimate size of psyms_seen to unordered_set's ctor.
12069
12070 2017-06-12  Pedro Alves  <palves@redhat.com>
12071
12072         * dwarf2read.c (write_hash_table): Check if key already exists
12073         before emplacing.
12074
12075 2017-06-12  Pedro Alves  <palves@redhat.com>
12076
12077         * dwarf2read.c (data_buf::append_space): Rename to...
12078         (data_buf::grow): ... this, and make private.  Adjust all callers.
12079         (data_buf::append_uint): New method.
12080         (add_address_entry, write_one_signatured_type)
12081         (write_psymtabs_to_index): Use it.
12082
12083 2017-06-12  Pedro Alves  <palves@redhat.com>
12084
12085         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
12086         (file_write (FILE *, const std::vector<Elem>&)): Delete.
12087         (data_buf::file_write): Call ::fwrite directly.
12088
12089 2017-06-12  Pedro Alves  <palves@redhat.com>
12090
12091         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
12092         std::vector::erase.
12093
12094 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
12095
12096         Code cleanup: C++ify .gdb_index producer.
12097         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
12098         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
12099         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
12100         (create_strtab, add_string): Remove.
12101         (file_write, data_buf): New.
12102         (struct symtab_index_entry): Use std::vector for cu_indices.
12103         (struct mapped_symtab): Use std::vector for data.
12104         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
12105         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
12106         Remove.
12107         (find_slot): Change return type.  Update it to the new data structures.
12108         (hash_expand, add_index_entry): Update it to the new data structures.
12109         (offset_type_compare): Remove.
12110         (uniquify_cu_indices): Update it to the new data structures.
12111         (c_str_view, c_str_view_hasher, vector_hasher): New.
12112         (add_indices_to_cpool): Remove.
12113         (write_hash_table): Update it to the new data structures.
12114         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
12115         (eq_psymtab_cu_index): Remove.
12116         (psym_index_map): New typedef.
12117         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
12118         reference and std::unordered_map for cu_index_htab.
12119         (add_address_entry, add_address_entry_worker, write_address_map)
12120         (write_psymbols): Update it to the new data structures.
12121         (write_obstack): Remove.
12122         (struct signatured_type_index_data): Change types_list to a data_buf
12123         reference and psyms_seen to a std::unordered_set reference.
12124         (write_one_signatured_type, recursively_write_psymbols)
12125         (write_psymtabs_to_index): Update it to the new data structures.
12126
12127 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
12128
12129         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
12130         separate-debug-file commands.
12131         * symfile.h (separate_debug_file_debug): New global.
12132         * symfile.c (separate_debug_file_debug): New global.
12133         (separate_debug_file_exists, find_separate_debug_file): Add
12134         debug output.
12135         (_initialize_symfile): Add "set debug separate-debug-file"
12136         command.
12137         * build-id.c (build_id_to_debug_bfd,
12138         find_separate_debug_file_by_buildid): Add debug output.
12139
12140 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
12141
12142         * gdbarch.sh (displaced_step_free_closure): Remove.
12143         * gdbarch.h, gdbarch.c: Re-generate.
12144         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
12145         displaced_step_free_closure.
12146         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
12147         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
12148         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
12149         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
12150         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
12151         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
12152         * arch-utils.h (simple_displaced_step_free_closure): Remove.
12153         * arch-utils.c (simple_displaced_step_free_closure): Remove.
12154         * infrun.c (displaced_step_clear): Call xfree instead of
12155         gdbarch_displaced_step_free_closure.
12156
12157 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
12158
12159         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
12160         NULL".
12161
12162 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
12163
12164         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
12165         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
12166         (mn10300_push_dummy_call): Likewise.
12167
12168 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
12169
12170         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
12171
12172 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
12173
12174         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
12175
12176 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
12177
12178         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
12179         able to start inferiors using a shell.
12180         (New remote packets): Announce new packet "QStartupWithShell".
12181         * remote.c: Add PACKET_QStartupWithShell.
12182         (extended_remote_create_inferior): Handle new
12183         PACKET_QStartupWithShell.
12184         (remote_protocol_features) <QStartupWithShell>: New entry for
12185         PACKET_QStartupWithShell.
12186         (_initialize_remote): Call "add_packet_config_cmd" for
12187         QStartupShell.
12188
12189 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
12190             Pedro Alves  <palves@redhat.com>
12191
12192         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
12193         and "nat/fork-inferior.h".
12194         * common/common-inferior.h: New file, with contents from
12195         "gdb/inferior.h".
12196         * commom/common-utils.c: Include "common-utils.h".
12197         (stringify_argv): New function.
12198         * common/common-utils.h (stringify_argv): New prototype.
12199         * configure.nat: Add "fork-inferior.o" as a dependency for
12200         "*linux*", "fbsd*" and "nbsd*" hosts.
12201         * corefile.c (get_exec_file): Update comment.
12202         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
12203         instead of "startup_inferior".
12204         (darwin_create_inferior): Call "add_thread_silent" after
12205         "fork_inferior".
12206         * fork-child.c: Cleanup unnecessary includes.
12207         (SHELL_FILE): Move to "common/common-fork-child.c".
12208         (environ): Likewise.
12209         (exec_wrapper): Initialize.
12210         (get_exec_wrapper): New function.
12211         (breakup_args): Move to "common/common-fork-child.c"; rename to
12212         "breakup_args_for_exec".
12213         (escape_bang_in_quoted_argument): Move to
12214         "common/common-fork-child.c".
12215         (saved_ui): New variable.
12216         (prefork_hook): New function.
12217         (postfork_hook): Likewise.
12218         (postfork_child_hook): Likewise.
12219         (gdb_startup_inferior): Likewise.
12220         (fork_inferior): Move to "common/common-fork-child.c".  Update
12221         function to support gdbserver.
12222         (startup_inferior): Likewise.
12223         * gdbcore.h (get_exec_file): Remove declaration.
12224         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
12225         instead of "startup_inferior".  Call "add_thread_silent" after
12226         "fork_inferior".
12227         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
12228         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
12229         instead of "startup_inferior".  Call "add_thread_silent" after
12230         "fork_inferior".
12231         * inferior.h: Include "common-inferior.h".
12232         (trace_start_error): Move to "common/common-utils.h".
12233         (trace_start_error_with_name): Likewise.
12234         (fork_inferior): Move prototype to "nat/fork-inferior.h".
12235         (startup_inferior): Likewise.
12236         (gdb_startup_inferior): New prototype.
12237         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
12238         * nat/fork-inferior.h: New file.
12239         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
12240         instead of "startup_inferior".  Call "add_thread_silent" after
12241         "fork_inferior".
12242         * target.h (target_terminal_init): Move prototype to
12243         "target/target.h".
12244         (target_terminal_inferior): Likewise.
12245         (target_terminal_ours): Likewise.
12246         * target/target.h (target_terminal_init): New prototype, moved
12247         from "target.h".
12248         (target_terminal_inferior): Likewise.
12249         (target_terminal_ours): Likewise.
12250         * utils.c (gdb_flush_out_err): New function.
12251
12252 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
12253
12254         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
12255         * common/common-gdbthread.h: New file, with parts from
12256         "gdb/gdbthread.h".
12257         * gdbthread.h: Include "common-gdbthread.h".
12258         (switch_to_thread): Moved to "common/common-gdbthread.h".
12259
12260 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
12261
12262         * Makefile.in (SFILES): Add "common/job-control.c".
12263         (HFILES_NO_SRCDIR): Add "common/job-control.h".
12264         (COMMON_OBS): Add "job-control.o".
12265         * common/job-control.c: New file, with contents from
12266         "gdb/inflow.c".
12267         * common/job-control.h: New file, with contents from "terminal.h".
12268         * fork-child.c: Include "job-control.h".
12269         * inflow.c: Include "job-control.h".
12270         (gdb_setpgid): Move to "common/common-inflow.c".
12271         (_initialize_inflow): Move setting of "job_control" to
12272         "handle_job_control".
12273         * terminal.h (job_control): Moved to "common/common-terminal.h".
12274         (gdb_setpgid): Likewise.
12275         * top.c: Include "job_control.h".
12276         * utils.c: Likewise.
12277         (job_control): Moved to "job-control.c".
12278
12279 2017-06-07  Pedro Alves  <palves@redhat.com>
12280
12281         * Makefile.in (SFILES): Add gdb_regex.c.
12282         (COMMON_OBS): Add gdb_regex.o.
12283         * ada-lang.c (ada_add_standard_exceptions)
12284         (ada_add_exceptions_from_frame, name_matches_regex)
12285         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
12286         parameter type to compiled_regex.  Adjust.
12287         (ada_exceptions_list): Use compiled_regex.
12288         * break-catch-throw.c (exception_catchpoint::pattern): Now a
12289         std::unique_ptr<compiled_regex>.
12290         (exception_catchpoint::~exception_catchpoint): Remove regfree
12291         call.
12292         (check_status_exception_catchpoint): Adjust to use compiled_regex.
12293         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
12294         * breakpoint.c (solib_catchpoint::compiled): Now a
12295         std::unique_ptr<compiled_regex>.
12296         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
12297         (check_status_catch_solib): Adjust to use compiled_regex.
12298         (add_solib_catchpoint): Adjust to use compiled_regex.
12299         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
12300         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
12301         compiled_regex reference.  Adjust to use it.
12302         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
12303         declaration.  Include "gdb_regex.h".
12304         (apropos_cmd): Change regex parameter to compiled_regex reference.
12305         * gdb_regex.c: New file.
12306         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
12307         declarations.
12308         (class compiled_regex): New.
12309         * linux-tdep.c: Include "common/gdb_optional.h".
12310         (struct mapping_regexes): New, factored out from
12311         mapping_is_anonymous_p, and adjusted to use compiled_regex.
12312         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
12313         gdb::optional and remove cleanups.  Adjust to compiled_regex.
12314         * probe.c: Include "common/gdb_optional.h".
12315         (collect_probes): Use compiled_regex and gdb::optional and remove
12316         cleanups.
12317         * skip.c: Include "common/gdb_optional.h".
12318         (skiplist_entry::compiled_function_regexp): Now a
12319         gdb::optional<compiled_regex>.
12320         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
12321         (free_skiplist_entry): Remove regfree call.
12322         (compile_skip_regexp, skip_rfunction_p): Adjust to use
12323         compiled_regex and gdb::optional.
12324         * symtab.c: Include "common/gdb_optional.h".
12325         (search_symbols): Use compiled_regex and gdb::optional.
12326         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
12327         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
12328         to gdb_regex.c.
12329
12330 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
12331
12332         * regcache.c (regcache::save): Avoid buffer use.
12333         (regcache::dump): Likewise.
12334
12335 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
12336
12337         * sh-tdep.c (sh_pseudo_register_read): Remove
12338         MAX_REGISTER_SIZE.
12339         (sh_pseudo_register_write): Likewise.
12340         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
12341         (sh64_pseudo_register_write): Likewise
12342
12343 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
12344
12345         * aarch64-tdep.c (aarch64_store_return_value): Use
12346         V_REGISTER_SIZE.
12347         (aarch64_pseudo_read_value): Likewise.
12348         (aarch64_pseudo_write): Likewise.
12349
12350 2017-06-06  Yao Qi  <yao.qi@linaro.org>
12351
12352         * regformats/regdef.h (set_register_cache): Remove the
12353         declaration.
12354
12355 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
12356
12357         * frame.c (frame_unwind_register_signed): Use
12358         frame_unwind_register_value.
12359
12360 2017-06-06  Pedro Alves  <palves@redhat.com>
12361
12362         PR breakpoints/21553
12363         * breakpoint.c (create_breakpoints_sal_default)
12364         (init_breakpoint_sal, create_breakpoint_sal): Use
12365         gdb::unique_xmalloc_ptr for string parameters.
12366         (create_breakpoint): Constify 'extra_string' and 'cond_string'
12367         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
12368         (base_breakpoint_create_breakpoints_sal)
12369         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
12370         (strace_marker_create_breakpoints_sal)
12371         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
12372         string parameters.
12373         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
12374         gdb::unique_xmalloc_ptr for string parameters.
12375         (create_breakpoint): Constify 'extra_string' and 'cond_string'
12376         parameters.
12377
12378 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
12379
12380         * alpha-tdep.c (alpha_register_to_value): Use
12381         get_frame_register_value.
12382         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
12383
12384 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
12385
12386         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
12387         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
12388         (ia64_value_to_register): Likewise.
12389         (ia64_extract_return_value): Likewise.
12390         (ia64_store_return_value): Likewise.
12391         (ia64_push_dummy_call): Likewise.
12392
12393 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
12394
12395         GDB 8.0 released.
12396
12397 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
12398
12399         * x86-linux-nat.c (struct arch_lwp_info): Remove.
12400
12401 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
12402
12403         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
12404         parameter.
12405         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
12406
12407 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
12408
12409         * event-loop.c (poll_timers): Unallocate timer using delete
12410         instead of xfree.
12411
12412 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
12413
12414         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
12415         (struct breakpoint) <~breakpoint>: New.
12416         (struct watchpoint): Inherit from breakpoint.
12417         <~watchpoint>: New.
12418         <base>: Remove.
12419         (struct tracepoint): Inherit from breakpoint.
12420         <base>: Remove.
12421         * breakpoint.c (longjmp_breakpoint_ops): Remove.
12422         (struct longjmp_breakpoint): Inherit from breakpoint.
12423         <~longjmp_breakpoint>: New.
12424         <base>: Remove.
12425         (new_breakpoint_from_type): Remove casts.
12426         (watchpoint_in_thread_scope): Remove reference to base field.
12427         (watchpoint_del_at_next_stop): Likewise.
12428         (update_watchpoint): Likewise.
12429         (watchpoint_check): Likewise.
12430         (bpstat_check_watchpoint): Likewise.
12431         (set_longjmp_breakpoint): Likewise.
12432         (struct fork_catchpoint): Inherit from breakpoint.
12433         <base>: Remove.
12434         (struct solib_catchpoint): Inherit from breakpoint.
12435         <~solib_catchpoint>: New.
12436         <base>: Remove.
12437         (dtor_catch_solib): Change to ...
12438         (solib_catchpoint::~solib_catchpoint): ... this.
12439         (breakpoint_hit_catch_solib): Remove reference to base field.
12440         (add_solib_catchpoint): Likewise.
12441         (create_fork_vfork_event_catchpoint): Likewise.
12442         (struct exec_catchpoint): Inherit from breakpoint.
12443         <~exec_catchpoint>: New.
12444         <base>: Remove.
12445         (dtor_catch_exec): Change to ...
12446         (exec_catchpoint::~exec_catchpoint): ... this.
12447         (dtor_watchpoint): Change to ...
12448         (watchpoint::~watchpoint): ... this.
12449         (watch_command_1): Remove reference to base field.
12450         (catch_exec_command_1): Likewise.
12451         (base_breakpoint_dtor): Change to ...
12452         (breakpoint::~breakpoint): ... this.
12453         (base_breakpoint_ops): Remove dtor field value.
12454         (longjmp_bkpt_dtor): Change to ...
12455         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
12456         (strace_marker_create_breakpoints_sal): Remove reference to base
12457         field.
12458         (delete_breakpoint): Don't manually call breakpoint destructor.
12459         (create_tracepoint_from_upload): Remove reference to base field.
12460         (trace_pass_set_count): Likewise.
12461         (initialize_breakpoint_ops): Don't initialize
12462         momentary_breakpoint_ops, don't set dtors.
12463         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
12464         <~ada_catchpoint>: New.
12465         <base>: Remove.
12466         (create_excep_cond_exprs): Remove reference to base field.
12467         (dtor_exception): Change to ...
12468         (ada_catchpoint::~ada_catchpoint): ... this.
12469         (dtor_catch_exception): Remove.
12470         (dtor_catch_exception_unhandled): Remove.
12471         (dtor_catch_assert): Remove.
12472         (create_ada_exception_catchpoint): Remove reference to base
12473         field.
12474         (initialize_ada_catchpoint_ops): Don't set dtors.
12475         * break-catch-sig.c (struct signal_catchpoint): Inherit from
12476         breakpoint.
12477         <~signal_catchpoint>: New.
12478         <base>: Remove.
12479         (signal_catchpoint_dtor): Change to ...
12480         (signal_catchpoint::~signal_catchpoint): ... this.
12481         (create_signal_catchpoint): Remove reference to base field.
12482         (initialize_signal_catchpoint_ops): Don't set dtor.
12483         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
12484         from breakpoint.
12485         <~syscall_catchpoint>: New.
12486         <base>: Remove.
12487         (dtor_catch_syscall): Change to ...
12488         (syscall_catchpoint::~syscall_catchpoint): ... this.
12489         (create_syscall_event_catchpoint): Remove reference to base
12490         field.
12491         (initialize_syscall_catchpoint_ops): Don't set dtor.
12492         * break-catch-throw.c (struct exception_catchpoint): Inherit
12493         from breakpoint.
12494         <~exception_catchpoint>: New.
12495         <base>: Remove.
12496         (dtor_exception_catchpoint): Change to ...
12497         (exception_catchpoint::~exception_catchpoint): ... this.
12498         (handle_gnu_v3_exceptions): Remove reference to base field.
12499         (initialize_throw_catchpoint_ops): Don't set dtor.
12500         * ctf.c (ctf_get_traceframe_address): Remove reference to base
12501         field.
12502         * remote.c (remote_get_tracepoint_status): Likewise.
12503         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
12504         * tracefile.c (tracefile_fetch_registers): Likewise.
12505         * tracepoint.c (actions_command): Likewise.
12506         (validate_actionline): Likewise.
12507         (tfind_1): Likewise.
12508         (get_traceframe_location): Likewise.
12509         (find_matching_tracepoint_location): Likewise.
12510         (parse_tracepoint_status): Likewise.
12511         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
12512
12513 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
12514
12515         * breakpoint.c (struct longjmp_breakpoint): New struct.
12516         (is_tracepoint_type): Change return type to bool.
12517         (is_longjmp_type): New function.
12518         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
12519         (set_raw_breakpoint_without_location): Use
12520         new_breakpoint_from_type.
12521         (set_raw_breakpoint): Likewise.
12522
12523 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
12524
12525         * breakpoint.c (new_breakpoint_from_type): New function.
12526         (create_breakpoint_sal): Use new_breakpoint_from_type and
12527         unique_ptr.
12528         (create_breakpoint): Likewise.
12529
12530 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
12531
12532         * memattr.c (mem_info_command): Rename to ...
12533         (info_mem_command): ... this.
12534         (mem_enable_command): Rename to ...
12535         (enable_mem_command): ... this.
12536         (mem_disable_command): Rename to ...
12537         (disable_mem_command): ... this.
12538         (mem_delete_command): Rename to ...
12539         (delete_mem_command): ... this.
12540         (_initialize_mem): Adjust function names.
12541
12542 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
12543
12544         * btrace.c (handle_pt_insn_events): New.
12545         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
12546         STATUS.  Split into this and ...
12547         (handle_pt_insn_event_flags): ... this.
12548
12549 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
12550
12551         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
12552         and struct pt_insn.resynced.
12553         * configure: Regenerated.
12554         * config.in: Regenerated.
12555
12556 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
12557
12558         * btrace.c (ftrace_find_call_by_number): New function.
12559         (ftrace_new_function): Store objects, not pointers.
12560         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
12561         ftrace_new_gap, ftrace_update_function,
12562         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
12563         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
12564         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
12565         btrace_ends_with_single_insn, btrace_call_get): Account for
12566         btrace_thread_info::functions now storing objects.
12567         * btrace.h (struct btrace_thread_info): Add constructor.
12568         (struct btrace_thread_info) <functions>: Make std::vector.
12569         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
12570         Initialize with default values.
12571         * record-btrace.c (record_btrace_frame_sniffer): Account for
12572         btrace_thread_info::functions now storing objects.
12573
12574 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
12575
12576         * btrace.c: Remove typedef bfun_s.
12577         (ftrace_new_gap): Directly add gaps to the list of gaps.
12578         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
12579         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
12580         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
12581         instead of gdb VEC.
12582
12583 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
12584
12585         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
12586         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
12587         with btrace_thread_info::next_segment and
12588         btrace_thread_info::prev_segment.
12589         * btrace.h: Remove struct btrace_func_link.
12590         (struct btrace_function): Replace pair of function segment pointers
12591         with pair of indices.
12592         * python/py-record-btrace.c (btpy_call_prev_sibling,
12593         btpy_call_next_sibling): Replace references to
12594         btrace_thread_info::segment with btrace_thread_info::next_segment and
12595         btrace_thread_info::prev_segment.
12596         * record-btrace.c (record_btrace_frame_this_id): Use
12597         btrace_find_call_by_number.
12598
12599 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
12600
12601         * btrace.c (ftrace_new_function, ftrace_fixup_level,
12602         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
12603         btrace_insn_next, btrace_insn_prev): Remove references to
12604         btrace_thread_info::flow.
12605         * btrace.h (struct btrace_function): Remove FLOW.
12606
12607 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
12608
12609         * btrace.c (ftrace_find_call_by_number): New function.
12610         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
12611         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
12612         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
12613         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
12614         index.
12615         * btrace.h (struct btrace_function): Turn UP into an index.
12616         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
12617         as an index.
12618         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
12619         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
12620         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
12621
12622 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
12623
12624         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
12625         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
12626         ftrace_update_function, ftrace_compute_global_level_offset,
12627         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
12628         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
12629         btrace_insn_end, btrace_is_empty): Remove references to
12630         btrace_thread_info::begin and btrace_thread_info::end.
12631         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
12632         (struct btrace_thread_info) <functions>: Adjust comment.
12633         * record-btrace.c (record_btrace_start_replaying): Remove reference to
12634         btrace_thread_info::begin.
12635
12636 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
12637
12638         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
12639         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
12640         ftrace_update_function): Remove arguments that implicitly were always
12641         BTINFO->END.
12642         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
12643         Don't pass BTINFO->END.
12644
12645 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
12646
12647         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
12648         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
12649         btrace_find_insn_by_number): Replace function segment pointer with
12650         index.
12651         (btrace_insn_cmp): Simplify.
12652         * btrace.h: (struct btrace_insn_iterator) Rename index to
12653         insn_index.  Replace function segment pointer with index into function
12654         segment vector.
12655         * record-btrace.c (record_btrace_call_history): Replace function
12656         segment pointer use with index.
12657         (record_btrace_frame_sniffer): Retrieve function call segment through
12658         vector.
12659         (record_btrace_set_replay): Remove defunc't safety check.
12660
12661 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
12662
12663         * btrace.c (btrace_ends_with_single_insn): New function.
12664         (btrace_call_get, btrace_call_number, btrace_call_begin,
12665         btrace_call_end, btrace_call_next, btrace_call_prev,
12666         btrace_find_call_by_number): Use index into call segment vector
12667         instead of pointer.
12668         (btrace_call_cmp): Simplify.
12669         * btrace.h (struct btrace_call_iterator): Replace function call segment
12670         pointer with index into vector.
12671         * record-btrace.c (record_btrace_call_history): Use index instead of
12672         pointer.
12673
12674 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
12675
12676         * btrace.c (btrace_insn_begin, btrace_insn_end,
12677         btrace_find_insn_by_number): Add btinfo to iterator.
12678         * btrace.h (struct btrace_insn_iterator): Add btinfo.
12679
12680 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
12681
12682         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
12683         and save pointers directly.
12684         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
12685         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
12686         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
12687         changed signature of functions.
12688         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
12689         (btrace_fetch): Remove code that adds btrace_function pointers to
12690         vector of btrace_functions.
12691         (btrace_clear): Simplify freeing vector of btrace_functions.
12692
12693 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
12694
12695         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
12696         Replace VEC_* with std::vector functions.
12697         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
12698         (struct btrace_thread_info)<functions>: Change type to std::vector.
12699
12700 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
12701
12702         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
12703         "Removed targets and native configurations" up.  Merge duplicate
12704         "New commands" sub-sections.  Add "New options" sub-sections.
12705
12706 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
12707
12708         * defs.h (copy_integer_to_size): New declaration.
12709         * findvar.c (copy_integer_to_size): New function.
12710         (do_cint_test): New selftest function.
12711         (copy_integer_to_size_test): Likewise.
12712         (_initialize_findvar): Likewise.
12713         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
12714         (mips_fbsd_collect_reg): Use raw_collect_integer.
12715         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
12716         (mips64_fill_gregset): Use raw_collect_integer
12717         (mips64_fill_fpregset): Use raw_supply_integer.
12718         * regcache.c (regcache::raw_supply_integer): New function.
12719         (regcache::raw_collect_integer): Likewise.
12720         * regcache.h: (regcache::raw_supply_integer): New declaration.
12721         (regcache::raw_collect_integer): Likewise.
12722
12723 2017-05-24  Yao Qi  <yao.qi@linaro.org>
12724
12725         * Makefile.in (SFILES): Add gdbarch-selftests.c.
12726         (COMMON_OBS): Add gdbarch-selftests.o.
12727         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
12728         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
12729         * gdbarch-selftests.c: New file.
12730         * regcache.h (regcache) <~regcache>: Mark it virtual if
12731         GDB_SELF_TEST.
12732         <raw_write>: Likewise.
12733
12734 2017-05-24  Yao Qi  <yao.qi@linaro.org>
12735
12736         * regcache.c (current_regcache): Change it to
12737         regcache::current_regcache.
12738         (regcache_observer_target_changed): Update.
12739         (regcache_thread_ptid_changed): Make it a regcache static
12740         method.
12741         (regcache_thread_ptid_changed): Update.
12742         (class regcache_access): New.
12743         (current_regcache_test): Update.
12744         (_initialize_regcache): Update.
12745         * regcache.h: Include forward_list.
12746         (regcache): Declare regcache_thread_ptid_changed and declare
12747         registers_changed_ptid as friend.
12748
12749 2017-05-24  Yao Qi  <yao.qi@linaro.org>
12750
12751         * i387-tdep.c (i387_register_to_value): Use register_size
12752         instead of TYPE_LENGTH.
12753         * m68k-tdep.c (m68k_register_to_value): Likewise.
12754
12755 2017-05-24  Yao Qi  <yao.qi@linaro.org>
12756
12757         * i387-tdep.c (i387_convert_register_p): Return false if type
12758         code isn't TYPE_CODE_FLT.
12759
12760 2017-05-24  Yao Qi  <yao.qi@linaro.org>
12761
12762         * alpha-tdep.c (alpha_convert_register_p): Return true if type
12763         length is 4.
12764         (alpha_register_to_value): Remove type length check.
12765         (alpha_value_to_register): Likewise.
12766
12767 2017-05-24  Yao Qi  <yao.qi@linaro.org>
12768
12769         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
12770         TYPE_CODE_FLT.
12771
12772 2017-05-24  Yao Qi  <yao.qi@linaro.org>
12773
12774         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
12775         TYPE_CODE_FLT or not.
12776
12777 2017-05-24  Yao Qi  <yao.qi@linaro.org>
12778
12779         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
12780         * avr-tdep.c (avr_gdbarch_init): Likewise.
12781         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
12782         * cris-tdep.c (cris_gdbarch_init): Likewise.
12783         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
12784         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
12785         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
12786         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
12787         * mep-tdep.c (mep_gdbarch_init): Likewise.
12788         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
12789         * mips-tdep.c (mips_gdbarch_init): Likewise.
12790         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
12791         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
12792         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
12793         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
12794         * v850-tdep.c (v850_gdbarch_init): Likewise.
12795
12796 2017-05-24  Yao Qi  <yao.qi@linaro.org>
12797
12798         * selftest-arch.c (tests_with_arch): Call registers_changed
12799         and reinit_frame_cache.
12800         * selftest.c (run_self_tests): Likewise.
12801
12802 2017-05-24  Yao Qi  <yao.qi@linaro.org>
12803
12804         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
12805         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
12806
12807 2017-05-24  Yao Qi  <yao.qi@linaro.org>
12808
12809         * rl78-tdep.c (rl78_gdbarch_init): Don't call
12810         set_gdbarch_print_insn.
12811
12812 2017-05-24  Yao Qi  <yao.qi@linaro.org>
12813
12814         * h8300-tdep.c (h8300_gdbarch_init): Don't call
12815         set_gdbarch_print_insn.
12816
12817 2017-05-24  Yao Qi  <yao.qi@linaro.org>
12818
12819         * alpha-tdep.c (alpha_gdbarch_init): Don't call
12820         set_gdbarch_print_insn.
12821         * arc-tdep.c (arc_gdbarch_init): Likewise.
12822         * arch-utils.c: include dis-asm.h.
12823         (default_print_insn): New function.
12824         * arch-utils.h (default_print_insn): Declare.
12825         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
12826         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
12827         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
12828         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
12829         * frv-tdep.c (frv_gdbarch_init): Likewise.
12830         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
12831         * gdbarch.sh (print_insn): Use default_print_insn.
12832         * gdbarch.c: Regenerated.
12833         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
12834         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
12835         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
12836         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
12837         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
12838         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
12839         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
12840         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
12841         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
12842         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
12843         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
12844         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
12845         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
12846         * mt-tdep.c (mt_gdbarch_init): Likewise.
12847         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
12848         * nios2-tdep.c (nios2_print_insn): Remove.
12849         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
12850         * rx-tdep.c (rx_gdbarch_init): Likewise.
12851         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
12852         * score-tdep.c (score_print_insn): Remove.
12853         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
12854         * sh-tdep.c (sh_gdbarch_init): Likewise.
12855         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
12856         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
12857         * tic6x-tdep.c (tic6x_print_insn): Remove.
12858         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
12859         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
12860         * v850-tdep.c (v850_gdbarch_init): Likewise.
12861         * vax-tdep.c (vax_gdbarch_init): Likewise.
12862         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
12863         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
12864
12865 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
12866
12867         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
12868         (MIPS_FP0_REGNUM): Remove.
12869         (MIPS_FSR_REGNUM): Remove.
12870         (mips_fbsd_supply_fpregs): Use mips_regnum.
12871         (mips_fbsd_supply_gregs): Likewise.
12872         (mips_fbsd_collect_fpregs): Likewise.
12873         (mips_fbsd_collect_gregs): Likewise.
12874
12875 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
12876
12877         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
12878         (getpfpregs_supplies): New function.
12879         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
12880         getfpregs_supplies.
12881         (mips_fbsd_store_inferior_registers): Likewise.
12882
12883 2017-05-22  Pedro Alves <palves@redhat.com>
12884
12885         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
12886         maintainer.
12887
12888 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
12889
12890         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
12891         (store_register): Likewise.
12892         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
12893         (get_decimal_float_return_value): Likewise.
12894         (do_ppc_sysv_return_value): Likewise.
12895         (ppc64_sysv_abi_push_integer): Likewise.
12896         (ppc64_sysv_abi_push_freg): Likewise.
12897         (ppc64_sysv_abi_return_value_base): Likewise.
12898         (ppc64_sysv_abi_return_value): Likewise.
12899         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
12900         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
12901         * rs6000-nat.c: Likewise.
12902         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
12903         (rs6000_value_to_register): Likewise.
12904         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
12905
12906 2017-05-21  Tom Tromey  <tom@tromey.com>
12907
12908         PR rust/21466:
12909         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
12910         arrays as "[T]", not "[T; ]".
12911
12912 2017-05-19  Tom Tromey  <tom@tromey.com>
12913
12914         PR rust/21484:
12915         * rust-lang.c (exp_descriptor_rust): New function.
12916         (rust_language_defn): Use it.
12917         * p-lang.c (pascal_language_defn): Update.
12918         * opencl-lang.c (opencl_language_defn): Update.
12919         * objc-lang.c (objc_language_defn): Update.
12920         * m2-lang.c (m2_language_defn): Update.
12921         * language.h (struct language_defn)
12922         <la_watch_location_expression>: New member.
12923         * language.c (unknown_language_defn, auto_language_defn)
12924         (local_language_defn): Update.
12925         * go-lang.c (go_language_defn): Update.
12926         * f-lang.c (f_language_defn): Update.
12927         * d-lang.c (d_language_defn): Update.
12928         * c-lang.h (c_watch_location_expression): Declare.
12929         * c-lang.c (c_watch_location_expression): New function.
12930         (c_language_defn, cplus_language_defn, asm_language_defn)
12931         (minimal_language_defn): Use it.
12932         * breakpoint.c (watch_command_1): Call
12933         la_watch_location_expression.
12934         * ada-lang.c (ada_language_defn): Update.
12935
12936 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12937
12938         PR tui/21482
12939         * gdb_curses.h (NOMACROS): Define.
12940         (NCURSES_NOMACROS): Define.
12941
12942 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12943
12944         PR tui/21482
12945         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
12946         arg to char *.
12947         * tui/tui-wingeneral.c (box_win): Likewise.
12948         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
12949         (tui_show_source_line): Likewise.
12950         (tui_show_exec_info_content): Likewise.
12951
12952 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
12953
12954         * sparc-tdep.c (sparc_structure_return_p)
12955         (sparc_arg_on_registers_p): New functions.
12956         (sparc32_store_arguments): Use them.
12957         * sparc64-tdep.c (sparc64_16_byte_align_p)
12958         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
12959         Handle TYPE_CODE_ARRAY.
12960
12961 2017-05-17  Yao Qi  <yao.qi@linaro.org>
12962
12963         * cli/cli-decode.c (add_alias_cmd): New function.
12964         * command.h (add_alias_cmd): Declare.
12965         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
12966         instead call add_alias_cmd.
12967
12968 2017-05-17  Pedro Alves  <palves@redhat.com>
12969
12970         * Makefile.in (nat_extra_makefile_frag): Rename to ...
12971         (nat_makefile_frag): ... this.  All references updated.
12972         * configure.ac: Likewise.
12973         * configure.nat: Likewise.  Enhance comments.
12974         * configure: Regenerate.
12975
12976 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12977
12978         * procfs.c (procfs_create_inferior): Change prototype to match
12979         definition.
12980
12981 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
12982
12983         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
12984         C++ compiler warning.
12985
12986 2017-05-12  Tom Tromey  <tom@tromey.com>
12987
12988         PR rust/21483:
12989         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
12990         recurse, just call value_struct_elt directly.
12991
12992 2017-05-12  Tom Tromey  <tom@tromey.com>
12993
12994         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
12995         OP_RUST_ARRAY>: Fix.
12996
12997 2017-05-12  Tom Tromey  <tom@tromey.com>
12998
12999         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
13000
13001 2017-05-09  Yao Qi  <yao.qi@linaro.org>
13002
13003         * regcache.c: Include <forward_list>.
13004         (struct regcache_list): Remove.
13005         (current_regcache): Update.
13006         (get_thread_arch_aspace_regcache): Update for std::forward_list.
13007         (regcache_thread_ptid_changed): Likewise.
13008         (registers_changed_ptid): Likewise.
13009         (current_regcache_size): Likewise.
13010
13011 2017-05-09  Yao Qi  <yao.qi@linaro.org>
13012
13013         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
13014         (current_regcache_size): New function.
13015         (current_regcache_test): New function.
13016         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
13017
13018 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
13019
13020         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
13021         (print_gp_register_row): Use get_frame_register_value.
13022
13023 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
13024
13025         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
13026         (mips_supply_fpregset): Likewise.
13027         (mips64_supply_gregset): Likewise.
13028
13029 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
13030
13031         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
13032         regcache->raw_supply_zeroed.
13033
13034 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
13035
13036         * configure.nat: Rearrange 'case' statements to match
13037         host before cpu.
13038
13039 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
13040
13041         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
13042         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
13043         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
13044         "@nat_extra_makefile_frag@".
13045         (Makefile): Remove dependency on "@frags@".
13046         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
13047         (data-directory/Makefile): Likewise.
13048         * config/aarch64/linux.mh: Deleted; moved contents to
13049         "gdb/configure.nat".
13050         * config/alpha/alpha-linux.mh: Likewise.
13051         * config/alpha/nbsd.mh: Likewise.
13052         * config/arm/linux.mh: Likewise.
13053         * config/arm/nbsdelf.mh: Likewise.
13054         * config/i386/cygwin.mh: Likewise.
13055         * config/i386/cygwin64.mh: Likewise.
13056         * config/i386/darwin.mh: Likewise.
13057         * config/i386/fbsd.mh: Likewise.
13058         * config/i386/fbsd64.mh: Likewise.
13059         * config/i386/go32.mh: Likewise.
13060         * config/i386/i386gnu.mh: Likewise.
13061         * config/i386/i386sol2.mh: Likewise.
13062         * config/i386/linux.mh: Likewise.
13063         * config/i386/linux64.mh: Likewise.
13064         * config/i386/mingw.mh: Likewise.
13065         * config/i386/mingw64.mh: Likewise.
13066         * config/i386/nbsd64.mh: Likewise.
13067         * config/i386/nbsdelf.mh: Likewise.
13068         * config/i386/nto.mh: Likewise.
13069         * config/i386/obsd.mh: Likewise.
13070         * config/i386/obsd64.mh: Likewise.
13071         * config/i386/sol2-64.mh: Likewise.
13072         * config/ia64/linux.mh: Likewise.
13073         * config/m32r/linux.mh: Likewise.
13074         * config/m68k/linux.mh: Likewise.
13075         * config/m68k/nbsdelf.mh: Likewise.
13076         * config/m68k/obsd.mh: Likewise.
13077         * config/m88k/obsd.mh: Likewise.
13078         * config/mips/fbsd.mh: Likewise.
13079         * config/mips/linux.mh: Likewise.
13080         * config/mips/nbsd.mh: Likewise.
13081         * config/mips/obsd64.mh: Likewise.
13082         * config/pa/linux.mh: Likewise.
13083         * config/pa/nbsd.mh: Likewise.
13084         * config/pa/obsd.mh: Likewise.
13085         * config/powerpc/aix.mh: Likewise.
13086         * config/powerpc/fbsd.mh: Likewise.
13087         * config/powerpc/linux.mh: Likewise.
13088         * config/powerpc/nbsd.mh: Likewise.
13089         * config/powerpc/obsd.mh: Likewise.
13090         * config/powerpc/ppc64-linux.mh: Likewise.
13091         * config/powerpc/spu-linux.mh: Likewise.
13092         * config/s390/linux.mh: Likewise.
13093         * config/sh/nbsd.mh: Likewise.
13094         * config/sparc/fbsd.mh: Likewise.
13095         * config/sparc/linux.mh: Likewise.
13096         * config/sparc/linux64.mh: Likewise.
13097         * config/sparc/nbsd64.mh: Likewise.
13098         * config/sparc/nbsdelf.mh: Likewise.
13099         * config/sparc/obsd64.mh: Likewise.
13100         * config/sparc/sol2.mh: Likewise.
13101         * config/tilegx/linux.mh: Likewise.
13102         * config/vax/nbsdelf.mh: Likewise.
13103         * config/vax/obsd.mh: Likewise.
13104         * config/xtensa/linux.mh: Likewise.
13105         * config/i386/i386gnu.mn: New file, with excerpts from
13106         "config/i386/i386gnu.mh".
13107         * configure: Regenerate.
13108         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
13109         *.mh files under "gdb/config".
13110         * configure.nat: New file, with contents from the
13111         "gdb/config/*/*.mh" files.
13112
13113 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
13114
13115         * btrace.c (btrace_clear): Free insn vector.
13116
13117 2017-05-05  Pedro Alves  <palves@redhat.com>
13118
13119         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
13120         * configure: Regenerate.
13121
13122 2017-05-04  Pedro Alves  <palves@redhat.com>
13123
13124         * Makefile.in (SFILES): Add progspace-and-thread.c.
13125         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
13126         (COMMON_OBS): Add progspace-and-thread.o.
13127         * breakpoint.c: Include "progspace-and-thread.h".
13128         (update_inserted_breakpoint_locations)
13129         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
13130         Use scoped_restore_current_pspace_and_thread.
13131         (create_std_terminate_master_breakpoint): Use
13132         scoped_restore_current_program_space.
13133         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
13134         (print_breakpoint_location): Use
13135         scoped_restore_current_program_space.
13136         (bp_loc_is_permanent): Use
13137         scoped_restore_current_pspace_and_thread.
13138         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
13139         (download_tracepoint_locations): Use
13140         scoped_restore_current_pspace_and_thread.
13141         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
13142         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
13143         (enum step_over_calls_kind): Moved from inferior.h.
13144         (class scoped_restore_current_thread): New class.
13145         * gdbthread.h (make_cleanup_restore_current_thread): Delete
13146         declaration.
13147         (scoped_restore_current_thread): New class.
13148         * infcmd.c: Include "common/gdb_optional.h".
13149         (continue_1, proceed_after_attach): Use
13150         scoped_restore_current_thread.
13151         (notice_new_inferior): Use scoped_restore_current_thread.
13152         * inferior.c: Include "progspace-and-thread.h".
13153         (restore_inferior, save_current_inferior): Delete.
13154         (add_inferior_command, clone_inferior_command): Use
13155         scoped_restore_current_pspace_and_thread.
13156         * inferior.h (scoped_restore_current_inferior): New class.
13157         * infrun.c: Include "progspace-and-thread.h" and
13158         "common/gdb_optional.h".
13159         (follow_fork_inferior): Use
13160         scoped_restore_current_pspace_and_thread.
13161         (scoped_restore_exited_inferior): New class.
13162         (handle_vfork_child_exec_or_exit): Use
13163         scoped_restore_exited_inferior,
13164         scoped_restore_current_pspace_and_thread,
13165         scoped_restore_current_thread and scoped_restore.
13166         (fetch_inferior_event): Use scoped_restore_current_thread.
13167         * linespec.c (decode_line_full, decode_line_1): Use
13168         scoped_restore_current_program_space.
13169         * mi/mi-main.c: Include "progspace-and-thread.h".
13170         (exec_continue): Use scoped_restore_current_thread.
13171         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
13172         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
13173         * proc-service.c (ps_pglobal_lookup): Use
13174         scoped_restore_current_program_space.
13175         * progspace-and-thread.c: New file.
13176         * progspace-and-thread.h: New file.
13177         * progspace.c (release_program_space, clone_program_space): Use
13178         scoped_restore_current_program_space.
13179         (restore_program_space, save_current_program_space)
13180         (save_current_space_and_thread): Delete.
13181         (switch_to_program_space_and_thread): Moved to
13182         progspace-and-thread.c.
13183         * progspace.h (save_current_program_space)
13184         (save_current_space_and_thread): Delete declarations.
13185         (scoped_restore_current_program_space): New class.
13186         * remote.c (remote_btrace_maybe_reopen): Use
13187         scoped_restore_current_thread.
13188         * symtab.c: Include "progspace-and-thread.h".
13189         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
13190         * thread.c (print_thread_info_1): Use
13191         scoped_restore_current_thread.
13192         (struct current_thread_cleanup): Delete.
13193         (do_restore_current_thread_cleanup)
13194         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
13195         (scoped_restore_current_thread::~scoped_restore_current_thread):
13196         ... this new dtor.
13197         (make_cleanup_restore_current_thread): Rename/convert to ...
13198         (scoped_restore_current_thread::scoped_restore_current_thread):
13199         ... this new ctor.
13200         (thread_apply_all_command): Use scoped_restore_current_thread.
13201         (thread_apply_command): Use scoped_restore_current_thread.
13202         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
13203         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
13204
13205 2017-05-04  Pedro Alves  <palves@redhat.com>
13206
13207         * thread.c (make_cleanup_restore_current_thread): Move
13208         find_thread_ptid call before the is_stopped call.  Assert that the
13209         thread is found.  Replace is_stopped call by checking the thread's
13210         state directly.  Remove unnecessary NULL-thread check.
13211
13212 2017-05-04  Pedro Alves  <palves@redhat.com>
13213
13214         * corelow.c (thread_section_name): New class.
13215         (get_core_register_section, get_core_siginfo): Use it.
13216
13217 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
13218
13219         * corelow.c (sniff_core_bfd): Remove extra semicolon.
13220         (get_core_register_section): Remove xfree of NULL pointer.
13221
13222 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
13223
13224         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
13225         * regcache.c (regcache::raw_supply_zeroed): New function.
13226         * regcache.h (regcache::raw_supply_zeroed): New declaration.
13227
13228 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
13229
13230         * gdbarch.sh: Remove commented out definition of
13231         TARGET_CHAR_BIT.
13232         * gdbarch.h: Re-generate.
13233
13234 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
13235
13236         * configure: Regenerate.
13237
13238 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
13239
13240         * solib-target.c (solib_target_relocate_section_addresses):
13241         Remove num_section_bases, num_bases, segment_bases variables.
13242
13243 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
13244
13245         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
13246
13247 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
13248
13249         * solib-target.c: Include <vector>
13250         (struct lm_info_target) <~lm_info_target>: Remove.
13251         <segment_bases, section_bases>: Change type to
13252         std::vector<CORE_ADDR>.
13253         (library_list_start_segment, library_list_start_section,
13254         library_list_end_library,
13255         solib_target_relocate_section_addresses): Adjust.
13256
13257 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
13258
13259         * gdbarch.sh (software_single_step): Change return type to
13260         std::vector<CORE_ADDR>.
13261         * gdbarch.c, gdbarch.h: Re-generate.
13262         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
13263         Adjust.
13264         (arm_deal_with_atomic_sequence_raw): Adjust.
13265         (thumb_get_next_pcs_raw): Adjust.
13266         (arm_get_next_pcs_raw): Adjust.
13267         (arm_get_next_pcs): Adjust.
13268         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
13269         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
13270         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
13271         (alpha_software_single_step): Adjust.
13272         * alpha-tdep.h (alpha_software_single_step): Adjust.
13273         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
13274         * arm-tdep.c (arm_software_single_step): Adjust.
13275         (arm_breakpoint_kind_from_current_state): Adjust.
13276         * arm-tdep.h (arm_software_single_step): Adjust.
13277         * breakpoint.c (insert_single_step_breakpoint): Adjust.
13278         * cris-tdep.c (cris_software_single_step): Adjust.
13279         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
13280         (micromips_deal_with_atomic_sequence): Adjust.
13281         (deal_with_atomic_sequence): Adjust.
13282         (mips_software_single_step): Adjust.
13283         * mips-tdep.h (mips_software_single_step): Adjust.
13284         * moxie-tdep.c (moxie_software_single_step): Adjust.
13285         * nios2-tdep.c (nios2_software_single_step): Adjust.
13286         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
13287         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
13288         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
13289         * s390-linux-tdep.c (s390_software_single_step): Adjust.
13290         * sparc-tdep.c (sparc_software_single_step): Adjust.
13291         * spu-tdep.c (spu_software_single_step): Adjust.
13292         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
13293
13294 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
13295
13296         * gdbarch.sh: Use semi-colon as field separator instead of colon.
13297         * gdbarch.h: Re-generate.
13298
13299 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
13300
13301         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
13302         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
13303         * python/py-instruction.c, python/py-instruction.h: New file.
13304         * python/py-record.c: Add py-instruction.h include.
13305         (gdbpy_initialize_record): Make gdb.Instruction a super class of
13306         gdb.RecordInstruction.
13307         * python/python-internal.h: Add gdbpy_initialize_instruction
13308         declaration.
13309         * python/python.c (do_start_initialization): Add
13310         gdbpy_initialize_instruction.
13311
13312 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
13313
13314         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
13315         Remove.
13316         (btrace_func_from_recpy_func): New function.
13317         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
13318         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
13319         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
13320         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
13321         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
13322         Also, use new helper functions.
13323         (btpy_list_item): Use new helper functions.
13324         (recpy_bt_function_call_history): Use new type name.
13325         (btpy_call_getset): Remove.
13326         (gdbpy_initialize_btrace): Remove code to initialize
13327         gdb.BtraceFunctionCall.
13328         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
13329         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
13330         recpy_bt_func_prev, recpy_bt_func_next): New export.
13331         * python/py-record.c (recpy_func_type): New static object.
13332         (recpy_func_new, recpy_func_level, recpy_func_symbol,
13333         recpy_func_instructions, recpy_func_up, recpy_func_prev,
13334         recpy_func_next): New function.
13335         (recpy_element_hash, recpy_element_richcompare): Updated comment.
13336         (recpy_func_getset): New static object.
13337         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
13338         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
13339
13340 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
13341
13342         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
13343         (btpy_object, btpy_insn_type, btpy_new): Remove.
13344         (btpy_list_object): Use gdb.RecordInstruction type instead of
13345         gdb.BtraceInstruction type.
13346         (btrace_insn_from_recpy_insn): New function.
13347         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
13348         btpy_new.
13349         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
13350         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
13351         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
13352         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
13353         instead of btpy_object.
13354         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
13355         btpy_insn_data, btpy_insn_decode): Rename to ...
13356         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
13357         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
13358         recpy_bt_insn_decode): This.  Also, use new helper functions.
13359         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
13360         recpy_insn_type.
13361         (btpy_insn_getset): Remove.
13362         (gdbpy_initialize_btrace): Remove code to initialize
13363         gdb.BtraceInstruction.  Use recpy_element_object.
13364         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
13365         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
13366         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
13367         * python/py-record.c (recpy_insn_type): New static object.
13368         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
13369         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
13370         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
13371         New function.
13372         (recpy_insn_getset): New static object.
13373         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
13374         * python/py-record.h (recpy_element_object): New typedef.
13375         (recpy_insn_type, recpy_insn_new): New export.
13376
13377 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
13378
13379         * py-record-btrace.c (btpy_insn_new): Removed.
13380         (btpy_insn_or_gap_new): New function.
13381         (btpy_insn_error): Removed.
13382         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
13383         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
13384         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
13385         btpy_insn_or_gap_new instead of btpy_insn_new.
13386         (btpy_insn_getset): Remove btpy_insn_error.
13387         * py-record.c (recpy_gap_type): New static object.
13388         (recpy_gap_object): New typedef.
13389         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
13390         recpy_gap_reason_string): New function.
13391         (recpy_gap_getset): New static object.
13392         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
13393         * py-record.h (recpy_gap_new): New export.
13394
13395 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
13396
13397         * python/py-record.c (recpy_ptid): Remove.
13398         (recpy_record_getset): Remove recpy_ptid.
13399
13400 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
13401
13402         * btrace.c (btrace_fetch): Set inferior_ptid.
13403         * python/py-record-btrace.c: Add "py-record.h" include.
13404         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
13405         recpy_bt_end, recpy_bt_instruction_history,
13406         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
13407         in gdb.Record object instead of current ptid.
13408         * python/py-record.c: Include new "py-record.h" file.
13409         (recpy_record_object): Moved to py-record.h.
13410         * python/py-record.h: New file.
13411
13412 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
13413
13414         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
13415         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
13416         indentation.
13417
13418 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
13419
13420         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
13421         the past maintainers section.
13422
13423 2017-04-28  Yao Qi  <yao.qi@linaro.org>
13424
13425         * infcmd.c (get_return_value): Use regcache ctor, and remove
13426         cleanup.
13427
13428 2017-04-28  Yao Qi  <yao.qi@linaro.org>
13429             Pedro Alves  <palves@redhat.com>
13430
13431         * regcache.c (regcache::regcache): New tag dispatch ctor.
13432         (do_cooked_read): Moved above.
13433         (regcache_dup): Use the tag dispatch ctor..
13434         * regcache.h (regcache): Declare ctor, delete copy ctor and
13435         assignment operator, remove friend regcache_dup.
13436
13437 2017-04-28  Yao Qi  <yao.qi@linaro.org>
13438
13439         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
13440         call method save instead of regcache_cpy.
13441         * regcache.h (struct regcache): Make regcache_dup a friend.
13442
13443 2017-04-28  Yao Qi  <yao.qi@linaro.org>
13444
13445         * regcache.c (struct regcache): Move to regcache.h
13446         (regcache::arch): New method.
13447         (regcache_get_ptid): Update.
13448         (get_regcache_arch): Call arch method.
13449         (get_regcache_aspace): Call method aspace.
13450         (register_buffer): Change it to method.
13451         (regcache_save): Change it to regcache::save.
13452         (regcache_restore): Likewise.
13453         (regcache_cpy_no_passthrough): Remove the declaration.
13454         (regcache_cpy): Call methods restore and cpy_no_passthrough.
13455         (regcache_cpy_no_passthrough): Change it to method
13456         cpy_no_passthrough.
13457         (regcache_register_status): Change it to method
13458         get_register_status.
13459         (regcache_invalidate): Change it to method invalidate.
13460         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
13461         (regcache_raw_update): Change it to method raw_update.
13462         (regcache_raw_read): Likewise.
13463         (regcache_raw_read_signed): Likewise.
13464         (regcache_raw_read_unsigned): Likewise.
13465         (regcache_raw_write_signed): Likewise.
13466         (regcache_raw_write_unsigned): Likewise.
13467         (regcache_cooked_read): Likewise.
13468         (regcache_cooked_read_value): Likewise.
13469         (regcache_cooked_read_signed): Likewise.
13470         (regcache_cooked_read_unsigned): Likewise.
13471         (regcache_cooked_write_signed): Likewise.
13472         (regcache_cooked_write_unsigned): Likewise.
13473         (regcache_raw_set_cached_value): Likewise.
13474         (regcache_raw_write): Likewise.
13475         (regcache_cooked_write): Likewise.
13476         (regcache_xfer_part): Likewise.
13477         (regcache_raw_read_part): Likewise.
13478         (regcache_raw_write_part): Likewise.
13479         (regcache_cooked_read_part): Likewise.
13480         (regcache_cooked_write_part): Likewise.
13481         (regcache_raw_supply): Likewise.
13482         (regcache_raw_collect): Likewise.
13483         (regcache_transfer_regset): Likewise.
13484         (regcache_supply_regset): Likewise.
13485         (regcache_collect_regset): Likewise.
13486         (regcache_debug_print_register): Likewise.
13487         (enum regcache_dump_what): Move it to regcache.h.
13488         (regcache_dump): Change it to method dump.
13489         * regcache.h (enum regcache_dump_what): New.
13490         (class regcache): New.
13491         * target.c (target_fetch_registers): Call method
13492         debug_print_register.
13493         (target_store_registers): Likewise.
13494
13495 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
13496
13497         * windows-nat.c (struct lm_info_windows): Initialize field.
13498         (windows_make_so): Allocate lm_info_windows with new.
13499         (windows_free_so): Free lm_info_windows with delete.
13500
13501 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
13502
13503         * solib-darwin.c (struct lm_info_darwin): Initialize field.
13504         (darwin_current_sos): Allocate lm_info_darwin with new, remove
13505         cleanup.
13506         (darwin_free_so): Free lm_info_darwin with delete.
13507
13508 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
13509
13510         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
13511         <l_addr_p>: Change type to bool.
13512         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
13513         (svr4_free_so): Free lm_info_svr4 with delete.
13514         (svr4_copy_library_list): Replace memcpy with call to copy
13515         constructor.
13516         (library_list_start_library, svr4_default_sos): Allocate
13517         lm_info_svr4 with new.
13518
13519 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
13520
13521         * solib-target.c (struct lm_info_target): Add destructor,
13522         initialize fields.
13523         <name>: Change type to std::string.
13524         (library_list_start_library): Allocate lm_info_target with new.
13525         (solib_target_free_library_list): Free lm_info_target with
13526         delete.
13527         (solib_target_current_sos): Adapt to std::string.
13528         (solib_target_free_so): Free lm_info_target with delete.
13529
13530 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
13531
13532         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
13533         fields.
13534         (frv_current_sos): Allocate lm_info_frv with new.
13535         (frv_relocate_main_executable): Free lm_info_frv with delete,
13536         allocate with new.
13537         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
13538
13539 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
13540
13541         * solib-frv.c (struct lm_info_frv): Fix indentation.
13542
13543 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
13544
13545         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
13546         map field.
13547         (dsbt_current_sos): Allocate lm_info_dsbt with new.
13548         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
13549         and allocate with new.
13550         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
13551
13552 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
13553
13554         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
13555         <filename, member_name>: Change type to std::string.
13556         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
13557         (library_list_start_library): Allocate lm_info_aix with new.
13558         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
13559         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
13560         with copy constructor.
13561
13562 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
13563
13564         * solist.h (struct lm_info): Remove.
13565         (struct lm_info_base): New class.
13566         (struct so_list) <lm_info>: Change type to lm_info_base *.
13567         * nto-tdep.c (struct lm_info): Remove.
13568         (lm_addr): Adjust.
13569         * solib-aix.c (struct lm_info): Rename to ...
13570         (struct lm_info_aix): ... this.  Extend lm_info_base.
13571         (lm_info_p): Rename to ...
13572         (lm_info_aix_p): ... this, and adjust.
13573         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
13574         solib_aix_parse_libraries, library_list_start_library,
13575         solib_aix_free_library_list, solib_aix_parse_libraries,
13576         solib_aix_get_library_list,
13577         solib_aix_relocate_section_addresses, solib_aix_free_so,
13578         solib_aix_get_section_offsets,
13579         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
13580         Adjust.
13581         (struct solib_aix_inferior_data) <library_list>: Adjust.
13582         * solib-darwin.c (struct lm_info): Rename to ...
13583         (struct lm_info_darwin): ... this.  Extend lm_info_base.
13584         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
13585         * solib-dsbt.c (struct lm_info): Rename to ...
13586         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
13587         (struct dsbt_info) <main_executable_lm_info): Adjust.
13588         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
13589         dsbt_relocate_section_addresses): Adjust.
13590         * solib-frv.c (struct lm_info): Rename to ...
13591         (struct lm_info_frv): ... this.  Extend lm_info_base.
13592         (main_executable_lm_info): Adjust.
13593         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
13594         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
13595         find_canonical_descriptor_in_load_object,
13596         frv_fdpic_find_canonical_descriptor): Adjust.
13597         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
13598         to lm_info_svr4.
13599         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
13600         svr4_clear_so, svr4_copy_library_list,
13601         library_list_start_library, svr4_default_sos, svr4_read_so_list,
13602         svr4_current_sos, svr4_fetch_objfile_link_map,
13603         solist_update_incremental): Adjust.
13604         * solib-svr4.h (struct lm_info_svr4): Move here from
13605         solib-svr4.c.
13606         * solib-target.c (struct lm_info): Rename to ...
13607         (struct lm_info_target): ... this.  Extend lm_info_base.
13608         (lm_info_p): Rename to ...
13609         (lm_info_target_p): ... this.
13610         (solib_target_parse_libraries, library_list_start_segment,
13611         library_list_start_section, library_list_start_library,
13612         library_list_end_library, solib_target_free_library_list,
13613         solib_target_current_sos, solib_target_free_so,
13614         solib_target_relocate_section_addresses): Adjust.
13615         * windows-nat.c (struct lm_info): Rename to ...
13616         (struct lm_info_windows): ... this.  Extend lm_info_base.
13617         (windows_make_so, handle_load_dll, handle_unload_dll,
13618         windows_xfer_shared_libraries): Adjust.
13619
13620 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
13621
13622         * solib-darwin.c (struct darwin_so_list): Remove.
13623         (darwin_current_sos): Allocate an so_list object instead of a
13624         darwin_so_list, separately allocate an lm_info object.
13625         (darwin_free_so): Free lm_info.
13626
13627 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
13628
13629         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
13630         with fprintf_filtered.
13631
13632 2017-04-28  Yao Qi  <yao.qi@linaro.org>
13633
13634         * regcache.c (regcache::regcache): New function.
13635         (regcache::~regcache): New function.
13636         (regcache_xmalloc_1): Remove.
13637         (regcache_xmalloc): Call new regcache.
13638         (regcache_xfree): Call delete regcache.
13639         (get_thread_arch_aspace_regcache): Call new regcache.
13640
13641 2017-04-28  Yao Qi  <yao.qi@linaro.org>
13642
13643         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
13644         lwp instead of ptid_get_lwp.
13645
13646 2017-04-28  Yao Qi  <yao.qi@linaro.org>
13647
13648         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
13649         lwp_info instead of getting from inferior_ptid.
13650
13651 2017-04-27  Keith Seitz  <keiths@redhat.com>
13652
13653         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
13654         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
13655         (CV_CONVERSION_BADNESS): Define.
13656         (rank_one_type): Remove overly restrictive rvalue reference
13657         rank checks.
13658         Add cv-qualifier checks and subranks for type equality.
13659         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
13660         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
13661         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
13662
13663 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
13664
13665         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
13666         count when creating the object.
13667
13668 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
13669             Ulrich Weigand  <uweigand@de.ibm.com>
13670
13671         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
13672         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
13673         is used in AIX.
13674         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
13675         (process_xcoff_symbol): Likewise.
13676         (scan_xcoff_symtab): Likewise.
13677
13678 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
13679
13680         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
13681         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
13682         (ia64_access_reg): Use get_frame_register_unsigned.
13683         (ia64_access_rse_reg): Likewise.
13684         (ia64_libunwind_frame_prev_register): Likewise.
13685
13686 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
13687
13688         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
13689         * gdbarch.c: Regenerated.
13690         * gdbarch.h: Regenerated.
13691         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
13692         visibility external.
13693         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
13694         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
13695         (enum cfa_how_kind): Move to ...
13696         (struct dwarf2_frame_state_reg_info): Likewise.
13697         (struct dwarf2_frame_state): Likewise.
13698         * dwarf2-frame.h: ... here.
13699         (dwarf2_frame_state_alloc_regs): New declaration.
13700         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
13701         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
13702
13703 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
13704
13705         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
13706         regcache_raw_read_unsigned.
13707         (xtensa_pseudo_register_write): Likewise.
13708
13709 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
13710
13711         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
13712         (nds32_pseudo_register_write): Likewise.
13713
13714 2017-04-25  Yao Qi  <yao.qi@linaro.org>
13715
13716         * regcache.c (struct regcache) <readonly_p>: Change its type
13717         to bool.
13718         (regcache_xmalloc_1): Update parameter type and callers update.
13719
13720 2017-04-25  Yao Qi  <yao.qi@linaro.org>
13721
13722         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
13723         set_gdbarch_wchar_bit.
13724         * arm-tdep.c (arm_gdbarch_init): Likewise.
13725
13726 2017-04-25  Pedro Alves  <palves@redhat.com>
13727
13728         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
13729         (BothAreRelocatable, memcopy, memmove): Don't define.
13730         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
13731         macros.
13732
13733 2017-04-25  Pedro Alves  <palves@redhat.com>
13734
13735         * common/common-defs.h: Include "common/poison.h".
13736         * common/function-view.h: (Not, Or, Requires): Move to traits.h
13737         and adjust.
13738         * common/poison.h: New file.
13739         * common/traits.h: Include <type_traits>.
13740         (Not, Or, Requires): New, moved from common/function-view.h.
13741
13742 2017-04-25  Pedro Alves  <palves@redhat.com>
13743
13744         * breakpoint.h (struct breakpoint): In-class initialize all
13745         fields.  Make boolean fields "bool".
13746         * breakpoint.c (init_raw_breakpoint_without_location): Remove
13747         memset call and initializations no longer necessary.
13748
13749 2017-04-25  Pedro Alves  <palves@redhat.com>
13750
13751         * btrace.c (pt_btrace_insn_flags): Change parameter type to
13752         reference.
13753         (pt_btrace_insn): New function.
13754         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
13755
13756 2017-04-25  Pedro Alves  <palves@redhat.com>
13757
13758         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
13759         "base" field and inherit from "bp_location" instead.  Add
13760         non-default ctor.
13761         (allocate_location_exception): Use new non-default ctor.
13762         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
13763         (init_bp_location): Convert to ...
13764         (bp_location::bp_location): ... this new ctor, and remove memset
13765         call.
13766         (base_breakpoint_allocate_location): Use the new non-default ctor.
13767         * breakpoint.h (bp_location): Now a class.  Declare default and
13768         non-default ctors.  In-class initialize all members.
13769         (init_bp_location): Remove declaration.
13770
13771 2017-04-25  Pedro Alves  <palves@redhat.com>
13772
13773         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
13774         assignment operator.
13775
13776 2017-04-24  Yao Qi  <yao.qi@linaro.org>
13777
13778         * doublest.c (convert_doublest_to_floatformat): Call
13779         floatformat_totalsize_bytes.
13780
13781 2017-04-22  Tom Tromey  <tom@tromey.com>
13782
13783         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
13784         ui_out_emit_list.
13785         * stack.c (print_frame): Use ui_out_emit_list.
13786         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
13787         ui_out_emit_list.
13788         * mi/mi-main.c (print_one_inferior)
13789         (mi_cmd_data_list_register_names)
13790         (mi_cmd_data_list_register_values, mi_cmd_list_features)
13791         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
13792         ui_out_emit_list.
13793         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
13794         (mi_output_solib_attribs): Use ui_out_emit_list,
13795         ui_out_emit_tuple.
13796         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
13797         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
13798         (mi_cmd_stack_list_args, list_args_or_locals): Use
13799         ui_out_emit_list.
13800         * disasm.c (do_assembly_only): Use ui_out_emit_list.
13801         * breakpoint.c (print_solib_event, output_thread_groups): Use
13802         ui_out_emit_list.
13803
13804 2017-04-22  Tom Tromey  <tom@tromey.com>
13805
13806         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
13807         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
13808         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
13809
13810 2017-04-22  Tom Tromey  <tom@tromey.com>
13811
13812         * tracepoint.c (tvariables_info_1)
13813         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
13814
13815 2017-04-22  Tom Tromey  <tom@tromey.com>
13816
13817         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
13818         annotate_arg_emitter.
13819         * breakpoint.c (print_mention_watchpoint)
13820         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
13821         * annotate.h (struct annotate_arg_emitter): New.
13822
13823 2017-04-22  Tom Tromey  <tom@tromey.com>
13824
13825         * record-btrace.c (record_btrace_insn_history)
13826         (record_btrace_insn_history_range, record_btrace_call_history)
13827         (record_btrace_call_history_range): Use ui_out_emit_tuple.
13828         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
13829         ui_out_emit_tuple.
13830         * stack.c (print_frame_info): Use ui_out_emit_tuple.
13831         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
13832         * skip.c (skip_info): Use ui_out_emit_tuple.
13833         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
13834         * progspace.c (print_program_space): Use ui_out_emit_tuple.
13835         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
13836         * osdata.c (info_osdata): Use ui_out_emit_tuple.
13837         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
13838         ui_out_emit_tuple.
13839         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
13840         (output_register, mi_cmd_data_read_memory)
13841         (mi_cmd_data_read_memory_bytes, mi_load_progress)
13842         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
13843         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
13844         Use ui_out_emit_tuple.
13845         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
13846         ui_out_emit_tuple.
13847         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
13848         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
13849         * linux-thread-db.c (info_auto_load_libthread_db): Use
13850         ui_out_emit_tuple.
13851         * inferior.c (print_inferior): Use ui_out_emit_tuple.
13852         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
13853         * disasm.c (do_mixed_source_and_assembly_deprecated)
13854         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
13855         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
13856         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
13857         * breakpoint.c (print_one_breakpoint_location)
13858         (print_one_breakpoint): Use ui_out_emit_tuple.
13859         * auto-load.c (print_script, info_auto_load_cmd): Use
13860         ui_out_emit_tuple.
13861         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
13862
13863 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
13864
13865         * thread.c (print_thread_info_1): Remove dead code.
13866
13867 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
13868
13869         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
13870         GDB_SELF_TEST.
13871         * arm-tdep.c (selftests::arm_record_test): Likewise.
13872
13873 2017-04-21  Yao Qi  <yao.qi@linaro.org>
13874
13875         * regcache.c (regcache_restore): Remove argument 2.  Replace
13876         argument 3 with regcache.  Get register status from
13877         src->register_status and get register contents from
13878         register_buffer (src, regnum).
13879         (regcache_cpy): Update.
13880
13881 2017-04-19  Pedro Alves  <palves@redhat.com>
13882
13883         * gdbthread.h (thread): Add missing closing parenthesis in
13884         comment.
13885
13886 2017-04-19  Pedro Alves  <palves@redhat.com>
13887
13888         * common/refcounted-object.h: New file.
13889         * gdbthread.h: Include "common/refcounted-object.h".
13890         (thread_info): Inherit from refcounted_object and add comments.
13891         (thread_info::incref, thread_info::decref)
13892         (thread_info::m_refcount): Delete.
13893         (thread_info::deletable): Use the refcounted_object::refcount()
13894         method.
13895         * inferior.c (current_inferior_): Add comment.
13896         (set_current_inferior): Increment/decrement refcounts.
13897         (prune_inferiors, remove_inferior_command): Skip inferiors marked
13898         not-deletable instead of comparing with the current inferior.
13899         (initialize_inferiors): Increment the initial inferior's refcount.
13900         * inferior.h (struct inferior): Forward declare.
13901         Include "common/refcounted-object.h".
13902         (current_inferior, set_current_inferior): Move declaration to
13903         before struct inferior's definition, and fix comment.
13904         (inferior): Inherit from refcounted_object.  Add comments.
13905         * thread.c (switch_to_thread_no_regs): Reference the thread's
13906         inferior pointer directly instead of doing a ptid lookup.
13907         (switch_to_no_thread): New function.
13908         (switch_to_thread(thread_info *)): New function, factored out
13909         from ...
13910         (switch_to_thread(ptid_t)): ... this.
13911         (restore_current_thread): Delete.
13912         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
13913         fields, and add 'inf' field.
13914         (do_restore_current_thread_cleanup): Check whether old->inf is
13915         alive instead of looking up an inferior by ptid.  Use
13916         switch_to_thread and switch_to_no_thread.
13917         (restore_current_thread_cleanup_dtor): Use old->inf directly
13918         instead of lookup up an inferior by id.  Decref the inferior.
13919         Don't restore 'removable'.
13920         (make_cleanup_restore_current_thread): Same the inferior pointer
13921         in old, instead of the inferior number.  Incref the inferior.
13922         Don't save/clear 'removable'.
13923
13924 2017-04-19  Pedro Alves  <palves@redhat.com>
13925
13926         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13927         unittests/scoped_restore-selftests.c.
13928         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
13929         * common/scoped_restore.h (scoped_restore_base): Make "class".
13930         (scoped_restore_base::release): New public method.
13931         (scoped_restore_base::scoped_restore_base): New protected ctor.
13932         (scoped_restore_base::m_saved_var): New protected field.
13933         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
13934         scoped_restore_base base class instead of m_saved_var directly.
13935         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
13936         (scoped_restore_tmpl::scoped_restore_tmpl(const
13937         scoped_restore_tmpl<T>&)): Likewise.
13938         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
13939         method.
13940         (scoped_restore_tmpl::saved_var): New method.
13941         (scoped_restore_tmpl::m_saved_var): Delete.
13942         * inferior.h (inferior::detaching): Now a bool.
13943         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
13944         cleanup.
13945         * unittests/scoped_restore-selftests.c: New file.
13946
13947 2017-04-19  Pedro Alves  <palves@redhat.com>
13948
13949         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
13950         Re-sort in alphabetic order.
13951
13952 2017-04-18  Pedro Alves  <palves@redhat.com>
13953
13954         * xml-support.c (obstack_xml_printf): Delete.
13955         * xml-support.h (obstack_xml_printf): Delete.
13956
13957 2017-04-18  Pedro Alves  <palves@redhat.com>
13958
13959         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
13960         vdebug, verror, body_text, start_element, end_element, name,
13961         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
13962         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
13963         is_xinclude>: Make private and add m_ prefix.
13964         (gdb_xml_parser::body_text): New method, based on ...
13965         (gdb_xml_body_text): ... this.  Adjust.
13966         (gdb_xml_parser::vdebug): New method, based on ...
13967         (gdb_xml_debug): ... this.  Adjust.
13968         (gdb_xml_parser::verror): New method, based on ...
13969         (gdb_xml_error): ... this.  Adjust.
13970         (gdb_xml_parser::start_element): New method, based on ...
13971         (gdb_xml_start_element): ... this.  Adjust.
13972         (gdb_xml_start_element_wrapper): Defer to
13973         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
13974         (gdb_xml_parser::end_element): New method, based on ...
13975         (gdb_xml_end_element_wrapper): ... this.  Adjust.
13976         (gdb_xml_parser::~gdb_xml_parser): Adjust.
13977         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
13978         (gdb_xml_parser::use_dtd): New method, based on ...
13979         (gdb_xml_use_dtd): ... this.  Adjust.
13980         (gdb_xml_parser::parse): New method, based on ...
13981         (gdb_xml_parse): ... this.  Adjust.
13982         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
13983         (xinclude_start_include): Adjust to call the parser's name method.
13984         (xml_xinclude_default, xml_xinclude_start_doctype)
13985         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
13986         method.
13987         (xml_process_xincludes): Adjust to call parser methods.
13988         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
13989         declarations.
13990
13991 2017-04-18  Pedro Alves  <palves@redhat.com>
13992
13993         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
13994         gdb::optional<std::string>.
13995         * xml-support.c: Include <string>.
13996         (scope_level::scope_level(scope_level &&))
13997         (scope_level::~scope_level): Delete.
13998         (scope_level::body): Now a std::string.
13999         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
14000         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
14001         parameter.
14002         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
14003         (xinclude_parsing_data::output): Now a std::string reference.
14004         (xinclude_start_include): Adjust.
14005         (xml_xinclude_default): Adjust.
14006         (xml_process_xincludes): Add 'output' parameter, and return bool.
14007         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
14008         and return bool.
14009         * xml-tdesc.c: Include <unordered_map> and <string>.
14010         (tdesc_xml_cache): Delete.
14011         (tdesc_xml_cache_s): Delete.
14012         (xml_cache): Now an std::unordered_map.
14013         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
14014         (target_fetch_description_xml): Change return type to
14015         gdb::optional<std::string>, and adjust.
14016         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
14017         (target_fetch_description_xml): Change return type to
14018         gdb::optional<std::string>.
14019
14020 2017-04-18  Pedro Alves  <palves@redhat.com>
14021
14022         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14023         unittests/optional-selftests.c.
14024         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
14025         * unittests/optional-selftests.c: New file.
14026         * unittests/optional/assignment/1.cc: New file.
14027         * unittests/optional/assignment/2.cc: New file.
14028         * unittests/optional/assignment/3.cc: New file.
14029         * unittests/optional/assignment/4.cc: New file.
14030         * unittests/optional/assignment/5.cc: New file.
14031         * unittests/optional/assignment/6.cc: New file.
14032         * unittests/optional/assignment/7.cc: New file.
14033         * unittests/optional/cons/copy.cc: New file.
14034         * unittests/optional/cons/default.cc: New file.
14035         * unittests/optional/cons/move.cc: New file.
14036         * unittests/optional/cons/value.cc: New file.
14037         * unittests/optional/in_place.cc: New file.
14038         * unittests/optional/observers/1.cc: New file.
14039         * unittests/optional/observers/2.cc: New file.
14040
14041 2017-04-18  Pedro Alves  <palves@redhat.com>
14042
14043         * common/gdb_optional.h: Include common/traits.h.
14044         (in_place_t): New type.
14045         (in_place): New constexpr variable.
14046         (optional::optional): Remove member initialization of
14047         m_instantiated.
14048         (optional::optional(in_place_t...)): New constructor.
14049         (optional::~optional): Use reset.
14050         (optional::optional(const optional&)): New.
14051         (optional::optional(const optional&&)): New.
14052         (optional::optional(T &)): New.
14053         (optional::optional(T &&)): New.
14054         (operator::operator=(const optional &)): New.
14055         (operator::operator=(optional &&)): New.
14056         (operator::operator= (const T &))
14057         (operator::operator= (T &&))
14058         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
14059         (operator::reset): New.
14060         (operator::m_instantiated):: Add in-class initializer.
14061         * common/traits.h: Include <type_traits>.
14062         (struct And): New types.
14063
14064 2017-04-18  Pedro Alves  <palves@redhat.com>
14065
14066         * xml-support.c: Include <vector>.
14067         (scope_level::scope_level(const gdb_xml_element *))
14068         (scope_level::scope_level(scope_level&&)): New.
14069         (scope_level::~scope_level): New.
14070         (scope_level_s): Delete.
14071         (gdb_xml_parser::scopes): Now a std::vector.
14072         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
14073         Use std::vector.
14074         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
14075         scope cleanup code.
14076         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
14077         of the scopes member.  Use std::vector::emplace_back.
14078
14079 2017-04-18  Pedro Alves  <palves@redhat.com>
14080
14081         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
14082         a bool.
14083         (gdb_xml_end_element): Change type of first parameter.
14084         (gdb_xml_cleanup): Rename to ...
14085         (gdb_xml_parser::~gdb_xml_parser): ... this.
14086         (gdb_xml_create_parser_and_cleanup): Delete with ...
14087         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
14088         to this new ctor.
14089         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
14090         using gdb_xml_create_parser_and_cleanup.
14091         (xinclude_parsing_data): Add ctor/dtor.
14092         (xml_xinclude_cleanup): Delete.
14093         (xml_process_xincludes): Create a local xinclude_parsing_data
14094         instead of heap-allocating one.  Create a local gdb_xml_parser
14095         instead of heap-allocating one with
14096         gdb_xml_create_parser_and_cleanup.
14097
14098 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
14099
14100         PR threads/20743
14101         * fbsd-nat.c (resume_one_thread_cb): Remove.
14102         (resume_all_threads_cb): Remove.
14103         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
14104         iterate_over_threads.
14105
14106 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
14107
14108         * NEWS: Create a new section for the next release branch.
14109         Rename the section of the current branch, now that it has
14110         been cut.
14111
14112 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
14113
14114         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
14115         * version.in: Bump version to 8.0.50.DATE-git.
14116
14117 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
14118
14119         PR gdb/21385
14120         * windows-nat.c (windows_create_inferior): Declare 'allargs'
14121         independently of the host, and fix build breakage on Cygwin.
14122
14123 2017-04-13  Pedro Alves  <palves@redhat.com>
14124
14125         * inferior.c (free_inferior): Convert to ...
14126         (inferior::~inferior): ... this dtor.
14127         (inferior::inferior): New ctor, factored out from ...
14128         (add_inferior_silent): ... here.  Allocate the inferior with a new
14129         expression.
14130         (delete_inferior): Call delete instead of free_inferior.
14131         * inferior.h (gdb_environ, continuation): Forward declare.
14132         (inferior): Now a class.  Add in-class initialization to all
14133         members.  Make boolean fields bool, except 'detaching'.
14134         (inferior::inferior): New explicit ctor.
14135         (inferior::~inferior): New.
14136
14137 2017-04-13  Pedro Alves  <palves@redhat.com>
14138
14139         * inferior.c (init_inferior_list): Delete.
14140         * inferior.h (init_inferior_list): Delete.
14141
14142 2017-04-13  Pedro Alves  <palves@redhat.com>
14143
14144         PR threads/13217
14145         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
14146         (top level): Call it twice, with different thread sets.
14147
14148 2017-04-13  Pedro Alves  <palves@redhat.com>
14149
14150         * thread.c: Include <algorithm>.
14151         (thread_array_cleanup): Delete.
14152         (scoped_inc_dec_ref): New class.
14153         (live_threads_count): New function.
14154         (set_thread_refcount): Delete.
14155         (tp_array_compar_ascending): Now a bool.
14156         (tp_array_compar): Convert to a std::sort comparison function.
14157         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
14158         and live_threads_count.
14159
14160 2017-04-13  Pedro Alves  <palves@redhat.com>
14161
14162         * infrun.c (follow_fork_inferior): Also switch the current
14163         inferior.
14164
14165 2017-04-13  Pedro Alves  <palves@redhat.com>
14166
14167         * breakpoint.c (watch_command_1): Save watchpoint-frame info
14168         before calling create_internal_breakpoint.
14169
14170 2017-04-13  Pedro Alves  <palves@redhat.com>
14171
14172         * fork-child.c (execv_argv): New class.
14173         (breakup_args): Refactored as ...
14174         (execv_argv::init_for_no_shell): .. this method of execv_argv.
14175         Copy arguments to storage and replace separators with NULL
14176         terminators in place.
14177         (escape_bang_in_quoted_argument): Adjust to return bool.
14178         (execv_argv::execv_argv): New ctor.
14179         (execv_argv::init_for_shell): New method, factored out from
14180         fork_inferior.  Don't strdup strings into the vector.
14181         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
14182         Remove free_vector_argv call.
14183
14184 2017-04-13  Yao Qi  <yao.qi@linaro.org>
14185
14186         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
14187         tdep->rx_psw_type.
14188
14189 2017-04-13  Yao Qi  <yao.qi@linaro.org>
14190
14191         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
14192         * rx-tdep.c (rx_gdbarch_init): Likewise.
14193
14194 2017-04-13  Pedro Alves  <palves@redhat.com>
14195
14196         * breakpoint.h (struct breakpoint): Reindent.
14197
14198 2017-04-13  Pedro Alves  <palves@redhat.com>
14199
14200         * breakpoint.c (bp_location): Rename to ...
14201         (bp_locations): ... this.  All references updated.
14202         (bp_location_count): Rename to ...
14203         (bp_locations_count): ... this.  All references updated.
14204         (bp_location_placed_address_before_address_max): Rename to ...
14205         (bp_locations_placed_address_before_address_max): ... this.  All
14206         references updated.
14207         (bp_location_shadow_len_after_address_max): Rename to ...
14208         (bp_locations_shadow_len_after_address_max): ... this.  All
14209         references updated.
14210         (bp_location_compare_addrs): Rename to ...
14211         (bp_locations_compare_addrs): ... this.  All references updated.
14212         (bp_location_compare):Rename to ...
14213         (bp_locations_compare): ... this.  All references updated.
14214         (bp_location_target_extensions_update): Rename to ...
14215         (bp_locations_target_extensions_update): ... this.  All references
14216         updated.
14217
14218 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
14219
14220         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
14221         * common/common.m4: Check headers 'termios.h', 'termio.h' and
14222         'sgtty.h'.
14223         * common/gdb_termios.h: New file, with parts of "terminal.h".
14224         * inflow.c: Include "gdb_termios.h".
14225         * ser-unix.c: Include "gdb_termios.h".
14226         * terminal.h: Move terminal-related defines to
14227         "common/gdb_termios.h".
14228
14229 2017-04-12  Tom Tromey  <tom@tromey.com>
14230
14231         * probe.c (parse_probes): Update.
14232         * location.h (delete_event_location): Don't declare.
14233         (event_location_deleter::operator()): Update.
14234         * location.c (event_location_deleter::operator()): Rename from
14235         delete_event_location.
14236         * linespec.h (linespec_result) <location>: Change type to
14237         event_location_up.
14238         * linespec.c (canonicalize_linespec, event_location_to_sals)
14239         (decode_objc): Update.
14240         (linespec_result): Don't call delete_event_location.
14241         * breakpoint.c (create_breakpoints_sal)
14242         (bkpt_probe_create_sals_from_location)
14243         (strace_marker_create_sals_from_location): Update.
14244
14245 2017-04-12  Tom Tromey  <tom@tromey.com>
14246
14247         * linespec.h (struct linespec_result): Add constructor and
14248         destructor.
14249         (init_linespec_result, destroy_linespec_result)
14250         (make_cleanup_destroy_linespec_result): Don't declare.
14251         * linespec.c (init_linespec_result): Remove.
14252         (linespec_result::~linespec_result): Rename from
14253         destroy_linespec_result.  Update.
14254         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
14255         Remove.
14256         * breakpoint.c (create_breakpoint, break_range_command)
14257         (decode_location_default): Update.
14258         * ax-gdb.c (agent_command_1): Update.
14259
14260 2017-04-12  Tom Tromey  <tom@tromey.com>
14261
14262         * remote.c (remote_download_tracepoint): Update.
14263         * python/py-breakpoint.c (bppy_get_location): Update.
14264         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
14265         (gdbscm_breakpoint_location): Update.
14266         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
14267         * breakpoint.h (struct breakpoint) <location, location_range_end>:
14268         Change type to event_location_up.
14269         * breakpoint.c (create_overlay_event_breakpoint)
14270         (create_longjmp_master_breakpoint)
14271         (create_std_terminate_master_breakpoint)
14272         (create_exception_master_breakpoint)
14273         (breakpoint_event_location_empty_p, print_breakpoint_location)
14274         (print_one_breakpoint_location, create_thread_event_breakpoint)
14275         (init_breakpoint_sal, create_breakpoint)
14276         (print_recreate_ranged_breakpoint, break_range_command)
14277         (init_ada_exception_breakpoint, say_where): Update.
14278         (base_breakpoint_dtor): Don't call delete_event_location.
14279         (bkpt_print_recreate, tracepoint_print_recreate)
14280         (dprintf_print_recreate, update_static_tracepoint)
14281         (breakpoint_re_set_default): Update.
14282
14283 2017-04-12  Tom Tromey  <tom@tromey.com>
14284
14285         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
14286         type of "to_do".  Update.
14287         (compute_stack_depth): Use std::vector.
14288
14289 2017-04-12  Tom Tromey  <tom@tromey.com>
14290
14291         * printcmd.c (find_instruction_backward): Use std::vector.
14292
14293 2017-04-12  Tom Tromey  <tom@tromey.com>
14294
14295         * symfile.c (objfilep): Remove typedef.
14296         (reread_symbols): Use a std::vector.
14297
14298 2017-04-12  Tom Tromey  <tom@tromey.com>
14299
14300         * mi/mi-main.c (exec_direction_forward): Remove.
14301         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
14302         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
14303         scoped_restore.
14304         * guile/guile.c (guile_repl_command, guile_command)
14305         (gdbscm_execute_gdb_command): Use scoped_restore.
14306         * go-exp.y (go_parse): Use scoped_restore.
14307         * d-exp.y (d_parse): Use scoped_restore.
14308         * cli/cli-decode.c (cmd_func): Use scoped_restore.
14309         * c-exp.y (c_parse): Use scoped_restore.
14310
14311 2017-04-12  Tom Tromey  <tom@tromey.com>
14312
14313         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
14314         (mi_parse): Update return type.
14315         (mi_parse_free): Remove.
14316         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
14317         (mi_parse::~mi_parse): Rename from mi_parse_free.
14318         (mi_parse_cleanup): Remove.
14319         (mi_parse): Return a unique_ptr.  Use new.
14320         * mi/mi-main.c (mi_execute_command): Update.
14321
14322 2017-04-12  Tom Tromey  <tom@tromey.com>
14323
14324         * location.c (explicit_location_lex_one): Return a
14325         unique_xmalloc_ptr.
14326         (string_to_explicit_location): Update.  Remove cleanups.
14327
14328 2017-04-12  Tom Tromey  <tom@tromey.com>
14329
14330         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
14331         (compare_value_and_voffset): Change type.  Update.
14332         (compute_vtable_size): Change type of "offset_vec".
14333         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
14334         (gnuv3_get_typeid): Remove extraneous declaration.
14335
14336 2017-04-12  Tom Tromey  <tom@tromey.com>
14337
14338         * charset.h (wchar_iterator): Fix comment.
14339
14340 2017-04-12  Tom Tromey  <tom@tromey.com>
14341
14342         * charset.c (iconv_wrapper): New class.
14343         (cleanup_iconv): Remove.
14344         (convert_between_encodings): Use it.
14345
14346 2017-04-12  Tom Tromey  <tom@tromey.com>
14347
14348         * symfile.h (increment_reading_symtab): Update type.
14349         * symfile.c (decrement_reading_symtab): Remove.
14350         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
14351         * psymtab.c (psymtab_to_symtab): Update.
14352         * dwarf2read.c (dw2_instantiate_symtab): Update.
14353
14354 2017-04-12  Tom Tromey  <tom@tromey.com>
14355
14356         * jit.c (struct jit_reader): Declare separately.  Add constructor
14357         and destructor.  Change type of "handle".
14358         (loaded_jit_reader): Define separately.
14359         (jit_reader_load): Update.  New "new".
14360         (jit_reader_unload_command): Use "delete".
14361         * gdb-dlfcn.h (struct dlclose_deleter): New.
14362         (gdb_dlhandle_up): New typedef.
14363         (gdb_dlopen, gdb_dlsym): Update types.
14364         (gdb_dlclose): Remove.
14365         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
14366         (gdb_dlsym): Change type of "handle".
14367         (make_cleanup_dlclose): Remove.
14368         (dlclose_deleter::operator()): Rename from gdb_dlclose.
14369         * compile/compile-c-support.c (load_libcc): Update.
14370
14371 2017-04-12  Tom Tromey  <tom@tromey.com>
14372
14373         * symtab.h (find_pcs_for_symtab_line): Change return type.
14374         * symtab.c (find_pcs_for_symtab_line): Change return type.
14375         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
14376         type of "vec".  Update.
14377         (ltpy_get_pcs_for_line): Update.
14378         * linespec.c (decode_digits_ordinary): Update.
14379
14380 2017-04-12  Tom Tromey  <tom@tromey.com>
14381
14382         * tracepoint.c (actions_command): Update.
14383         * python/python.c (python_command, python_interactive_command):
14384         Update.
14385         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
14386         * guile/guile.c (guile_command): Update.
14387         * defs.h (read_command_lines, read_command_lines_1): Return
14388         command_line_up.
14389         (command_lines_deleter): New struct.
14390         (command_line_up): New typedef.
14391         * compile/compile.c (compile_code_command)
14392         (compile_print_command): Update.
14393         * cli/cli-script.h (get_command_line, copy_command_lines): Return
14394         command_line_up.
14395         (make_cleanup_free_command_lines): Remove.
14396         * cli/cli-script.c (get_command_line, read_command_lines_1)
14397         (copy_command_lines): Return command_line_up.
14398         (while_command, if_command, read_command_lines, define_command)
14399         (document_command): Update.
14400         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
14401         Remove.
14402         * breakpoint.h (breakpoint_set_commands): Change type of
14403         "commands".
14404         * breakpoint.c (breakpoint_set_commands): Change type of
14405         "commands".  Update.
14406         (do_map_commands_command, update_dprintf_command_list)
14407         (create_tracepoint_from_upload): Update.
14408
14409 2017-04-12  Tom Tromey  <tom@tromey.com>
14410
14411         * tracepoint.c (scope_info): Update.
14412         * spu-tdep.c (spu_catch_start): Update.
14413         * python/python.c (gdbpy_decode_line): Update.
14414         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
14415         * python/py-breakpoint.c (bppy_init): Update.
14416         * probe.c (parse_probes): Update.
14417         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
14418         * location.h (event_location_deleter): New struct.
14419         (event_location_up): New typedef.
14420         (new_linespec_location, new_address_location, new_probe_location)
14421         (new_explicit_location, copy_event_location)
14422         (string_to_event_location, string_to_event_location_basic)
14423         (string_to_explicit_location): Update return type.
14424         (make_cleanup_delete_event_location): Remove.
14425         * location.c (new_linespec_location, new_address_location)
14426         (new_probe_location, new_explicit_location, copy_event_location):
14427         Return event_location_up.
14428         (delete_event_location_cleanup)
14429         (make_cleanup_delete_event_location): Remove.
14430         (string_to_explicit_location, string_to_event_location_basic)
14431         (string_to_event_location): Return event_location_up.
14432         * linespec.c (canonicalize_linespec, event_location_to_sals)
14433         (decode_line_with_current_source)
14434         (decode_line_with_last_displayed, decode_objc): Update.
14435         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
14436         * completer.c (location_completer): Update.
14437         * cli/cli-cmds.c (edit_command, list_command): Update.
14438         * breakpoint.c (create_overlay_event_breakpoint)
14439         (create_longjmp_master_breakpoint)
14440         (create_std_terminate_master_breakpoint)
14441         (create_exception_master_breakpoint)
14442         (create_thread_event_breakpoint): Update.
14443         (init_breakpoint_sal): Update.  Remove some dead code.
14444         (create_breakpoint_sal): Change type of "location".  Update.
14445         (create_breakpoints_sal, create_breakpoint, break_command_1)
14446         (dprintf_command, break_range_command, until_break_command)
14447         (init_ada_exception_breakpoint)
14448         (strace_marker_create_sals_from_location)
14449         (update_static_tracepoint, trace_command, ftrace_command)
14450         (strace_command, create_tracepoint_from_upload): Update.
14451         * break-catch-throw.c (re_set_exception_catchpoint): Update.
14452         * ax-gdb.c (agent_command_1): Update.
14453
14454 2017-04-12  Pedro Alves  <palves@redhat.com>
14455
14456         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
14457         * configure.tgt: Handle i[34567]86-*-go32* and
14458         i[34567]86-*-msdosdjgpp*.
14459         * i386-tdep.c (i386_svr4_reg_to_regnum):
14460         Make extern.
14461         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
14462         i386-go32-tdep.c.
14463         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
14464         * i386-go32-tdep.c: New file.
14465         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
14466         declarations.
14467
14468 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
14469
14470         * aix-thread.c (pd_status2str): Change return type to const char *.
14471
14472 2017-04-12  Pedro Alves  <palves@redhat.com>
14473
14474         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
14475         calls to set_gdbarch_gnu_triplet_regexp.
14476
14477 2017-04-12  Pedro Alves  <palves@redhat.com>
14478
14479         PR gdb/21323
14480         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
14481         New enum value.
14482         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
14483         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
14484         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
14485         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
14486         * gdbarch.h, gdbarch.c: Regenerate.
14487         * aarch64-tdep.c (aarch64_gdbarch_init): Override
14488         gdbarch_wchar_bit and gdbarch_wchar_signed.
14489         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
14490         * arm-tdep.c (arm_gdbarch_init): Likewise.
14491         * avr-tdep.c (avr_gdbarch_init): Likewise.
14492         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
14493         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
14494         * i386-tdep.c (i386_go32_init_abi): Likewise.
14495         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
14496         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
14497         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
14498         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
14499         * sh-tdep.c (sh_gdbarch_init): Likewise.
14500         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
14501         * sparc64-tdep.c (sparc64_init_abi): Likewise.
14502         * windows-tdep.c (windows_init_abi): Likewise.
14503         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
14504
14505 2017-04-12  Pedro Alves  <palves@redhat.com>
14506
14507         PR c++/21323
14508         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
14509         cplus_primitive_type_char32_t>: New enum values.
14510         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
14511         and cplus_primitive_type_char32_t.
14512         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
14513         32, use the archtecture's built-in type for char16_t and char32_t,
14514         respectively.  Otherwise, fallback to init_integer_type as before,
14515         but make the type unsigned, and issue a complaint.
14516         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
14517
14518 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
14519
14520         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
14521         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
14522
14523 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
14524
14525         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
14526         'const char *'.
14527
14528 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
14529
14530         * common/common-utils.c (free_vector_argv): New function.
14531         * common/common-utils.h: Include <vector>.
14532         (free_vector_argv): New prototype.
14533         * darwin-nat.c (darwin_create_inferior): Rewrite function
14534         prototype in order to constify "exec_file" and accept a
14535         "std::string" for "allargs".
14536         * fork-child.c: Include <vector>.
14537         (breakup_args): Rewrite function, using C++.
14538         (fork_inferior): Rewrite function header, constify "exec_file_arg"
14539         and accept "std::string" for "allargs".  Update the code to
14540         calculate "argv" based on "allargs".  Update calls to "exec_fun"
14541         and "execvp".
14542         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
14543         order to constify "exec_file" and accept a "std::string" for
14544         "allargs".
14545         * go32-nat.c (go32_create_inferior): Likewise.
14546         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
14547         * infcmd.c (run_command_1): Constify "exec_file".  Use
14548         "std::string" for inferior arguments.
14549         * inferior.h (fork_inferior): Update prototype.
14550         * linux-nat.c (linux_nat_create_inferior): Rewrite function
14551         prototype in order to constify "exec_file" and accept a
14552         "std::string" for "allargs".
14553         * nto-procfs.c (procfs_create_inferior): Likewise.
14554         * procfs.c (procfs_create_inferior): Likewise.
14555         * remote-sim.c (gdbsim_create_inferior): Likewise.
14556         * remote.c (extended_remote_run): Update code to accept
14557         "std::string" as argument.
14558         (extended_remote_create_inferior): Rewrite function prototype in
14559         order to constify "exec_file" and accept a "std::string" for
14560         "allargs".
14561         * rs6000-nat.c (super_create_inferior): Likewise.
14562         (rs6000_create_inferior): Likewise.
14563         * target.h (struct target_ops) <to_create_inferior>: Likewise.
14564         * windows-nat.c (windows_create_inferior): Likewise.
14565
14566 2017-04-11  Pedro Alves  <palves@redhat.com>
14567
14568         * thread.c: Fix whitespace throughout.
14569
14570 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14571
14572         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
14573
14574 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
14575
14576         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
14577
14578 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
14579
14580         PR gdb/21364
14581         * osdata.c (info_osdata): Check if 'type' is an empty string
14582         instead of NULL.
14583
14584 2017-04-10  Pedro Alves  <palves@redhat.com>
14585
14586         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
14587         (ptid_to_global_thread_id, in_thread_list)
14588         (do_captured_list_thread_ids, set_resumed, set_running)
14589         (set_executing, set_stop_requested, finish_thread_state)
14590         (validate_registers_access, can_access_registers_ptid)
14591         (print_thread_info_1, switch_to_thread)
14592         (do_restore_current_thread_cleanup)
14593         (make_cleanup_restore_current_thread, thread_command)
14594         (thread_name_command): Use operator== instead of ptid_equal.
14595
14596 2017-04-10  Pedro Alves  <palves@redhat.com>
14597
14598         * thread.c (struct current_thread_cleanup) <next>: Delete field.
14599         (current_thread_cleanup_chain): Delete.
14600         (restore_current_thread_cleanup_dtor)
14601         (make_cleanup_restore_current_thread): Remove references to
14602         current_thread_cleanup_chain.
14603
14604 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
14605
14606         * msp430-tdep.c (msp430_pseudo_register_read): Never return
14607         REG_UNKNOWN.
14608
14609 2017-04-10  Yao Qi  <yao.qi@linaro.org>
14610
14611         PR gdb/19942
14612         * gdbthread.h (thread_info::deletable): New method.
14613         (thread_info::incref): New method.
14614         (thread_info::decref): New method.
14615         (thread_info::refcount): Move it to private.
14616         * infrun.c (save_stop_context): Call inc_refcount.
14617         (release_stop_context_cleanup): Likewise.
14618         * thread.c (set_thread_exited): New function.
14619         (init_thread_list): Delete "tp" only it is deletable, otherwise
14620         call set_thread_exited.
14621         (delete_thread_1): Call set_thread_exited.
14622         (current_thread_cleanup) <inferior_pid>: Remove.
14623         <thread>: New field.
14624         (restore_current_thread_ptid_changed): Removed.
14625         (do_restore_current_thread_cleanup): Adjust.
14626         (restore_current_thread_cleanup_dtor): Don't call
14627         find_thread_ptid.
14628         (set_thread_refcount): Use dec_refcount.
14629         (make_cleanup_restore_current_thread): Adjust.
14630         (thread_apply_all_command): Call inc_refcount.
14631         (_initialize_thread): Don't call
14632         observer_attach_thread_ptid_changed.
14633
14634 2017-04-10  Yao Qi  <yao.qi@linaro.org>
14635
14636         * thread.c (delete_thread_1): Hoist code on marking thread as
14637         exited.
14638
14639 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
14640
14641         * windows-nat.c (windows_detach): Initialize ptid with
14642         minus_one_ptid.
14643
14644 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
14645
14646         * unittests/ptid-selftests.c: Fix erroneous assert messages.
14647
14648 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
14649
14650         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
14651         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
14652         (bfin_pseudo_register_write): Likewise
14653
14654 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
14655
14656         * common/ptid.h (struct ptid): Change to...
14657         (class ptid_t): ... this.
14658         <ptid_t>: New constructors.
14659         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
14660         matches>: New methods.
14661         <make_null, make_minus_one>: New static methods.
14662         <pid>: Rename to...
14663         <m_pid>: ...this.
14664         <lwp>: Rename to...
14665         <m_lwp>: ...this.
14666         <tid>: Rename to...
14667         <m_tid>: ...this.
14668         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
14669         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
14670         as references, move comment to class ptid_t.
14671         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
14672         ptid_t static methods.
14673         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
14674         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
14675         Take ptid arguments as references, implement using ptid_t methods.
14676         * unittests/ptid-selftests.c: New file.
14677         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14678         unittests/ptid-selftests.c.
14679         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
14680
14681 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
14682
14683         * python/python.c (python_run_simple_file): Cast mode literal to
14684         non-const char pointer as expected by PyFile_FromString.
14685
14686 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
14687
14688         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
14689         minus_one_ptid and null_ptid.
14690
14691 2017-04-05  Pedro Alves  <palves@redhat.com>
14692
14693         * warning.m4 (build_warnings): Remove -Wno-write-strings.
14694         * configure: Regenerate.
14695
14696 2017-04-05  Pedro Alves  <palves@redhat.com>
14697
14698         * ada-exp.y (yyerror): Constify.
14699         * ada-lang.c (bound_name, get_selections)
14700         (ada_variant_discrim_type)
14701         (ada_variant_discrim_name, ada_value_struct_elt)
14702         (ada_lookup_struct_elt_type, is_unchecked_variant)
14703         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
14704         (catch_ada_exception_command_split)
14705         (catch_ada_assert_command_split, catch_assert_command)
14706         (ada_op_name): Constify.
14707         * ada-lang.h (ada_yyerror, get_selections)
14708         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
14709         * arc-tdep.c (arc_print_frame_cache): Constify.
14710         * arm-tdep.c (arm_skip_stub): Constify.
14711         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
14712         (gen_aggregate_elt_ref): Constify.
14713         * bcache.c (print_bcache_statistics): Constify.
14714         * bcache.h (print_bcache_statistics): Constify.
14715         * break-catch-throw.c (catch_exception_command_1):
14716         * breakpoint.c (struct ep_type_description::description):
14717         Constify.
14718         (add_solib_catchpoint): Constify.
14719         (catch_fork_command_1): Add cast.
14720         (add_catch_command): Constify.
14721         * breakpoint.h (add_catch_command, add_solib_catchpoint):
14722         Constify.
14723         * bsd-uthread.c (bsd_uthread_state): Constify.
14724         * buildsym.c (patch_subfile_names): Constify.
14725         * buildsym.h (next_symbol_text_func, patch_subfile_names):
14726         Constify.
14727         * c-exp.y (yyerror): Constify.
14728         (token::oper): Constify.
14729         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
14730         * c-varobj.c (cplus_describe_child): Constify.
14731         * charset.c (find_charset_names): Add cast.
14732         (find_charset_names): Constify array and add const_cast.
14733         * cli/cli-cmds.c (complete_command, cd_command): Constify.
14734         (edit_command): Constify.
14735         * cli/cli-decode.c (lookup_cmd): Constify.
14736         * cli/cli-dump.c (dump_memory_command, dump_value_command):
14737         Constify.
14738         (struct dump_context): Constify.
14739         (add_dump_command, restore_command): Constify.
14740         * cli/cli-script.c (get_command_line): Constify.
14741         * cli/cli-script.h (get_command_line): Constify.
14742         * cli/cli-utils.c (check_for_argument): Constify.
14743         * cli/cli-utils.h (check_for_argument): Constify.
14744         * coff-pe-read.c (struct read_pe_section_data): Constify.
14745         * command.h (lookup_cmd): Constify.
14746         * common/print-utils.c (decimal2str): Constify.
14747         * completer.c (gdb_print_filename): Constify.
14748         * corefile.c (set_gnutarget): Constify.
14749         * cp-name-parser.y (yyerror): Constify.
14750         * cp-valprint.c (cp_print_class_member): Constify.
14751         * cris-tdep.c (cris_register_name, crisv32_register_name):
14752         Constify.
14753         * d-exp.y (yyerror): Constify.
14754         (struct token::oper): Constify.
14755         * d-lang.h (d_yyerror): Constify.
14756         * dbxread.c (struct header_file_location::name): Constify.
14757         (add_old_header_file, add_new_header_file, last_function_name)
14758         (dbx_next_symbol_text, add_bincl_to_list)
14759         (find_corresponding_bincl_psymtab, set_namestring)
14760         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
14761         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
14762         * defs.h (command_line_input, print_address_symbolic)
14763         (deprecated_readline_begin_hook): Constify.
14764         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
14765         Constify.
14766         * event-top.c (handle_line_of_input): Constify and add cast.
14767         * exceptions.c (catch_errors): Constify.
14768         * exceptions.h (catch_errors): Constify.
14769         * expprint.c (print_subexp_standard, op_string, op_name)
14770         (op_name_standard, dump_raw_expression, dump_raw_expression):
14771         * expression.h (op_name, op_string, dump_raw_expression):
14772         Constify.
14773         * f-exp.y (yyerror): Constify.
14774         (struct token::oper): Constify.
14775         (struct f77_boolean_val::name): Constify.
14776         * f-lang.c (f_word_break_characters): Constify.
14777         * f-lang.h (f_yyerror): Constify.
14778         * fork-child.c (fork_inferior): Add cast.
14779         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
14780         (new_variant): Constify.
14781         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
14782         * gdbarch.c: Regenerate.
14783         * gdbcore.h (set_gnutarget): Constify.
14784         * go-exp.y (yyerror): Constify.
14785         (token::oper): Constify.
14786         * go-lang.h (go_yyerror): Constify.
14787         * go32-nat.c (go32_sysinfo): Constify.
14788         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
14789         * guile/scm-cmd.c (cmdscm_function): Constify.
14790         * guile/scm-param.c (pascm_param_value): Constify.
14791         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
14792         (h8300sx_register_name): Constify.
14793         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
14794         Constify.
14795         * ia64-tdep.c (ia64_register_names): Constify.
14796         * infcmd.c (construct_inferior_arguments): Constify.
14797         (path_command, attach_post_wait): Constify.
14798         * language.c (show_range_command, show_case_command)
14799         (unk_lang_error): Constify.
14800         * language.h (language_defn::la_error)
14801         (language_defn::la_name_of_this): Constify.
14802         * linespec.c (decode_line_2): Constify.
14803         * linux-thread-db.c (thread_db_err_str): Constify.
14804         * lm32-tdep.c (lm32_register_name): Constify.
14805         * m2-exp.y (yyerror): Constify.
14806         * m2-lang.h (m2_yyerror): Constify.
14807         * m32r-tdep.c (m32r_register_names): Constify and make static.
14808         * m68hc11-tdep.c (m68hc11_register_names): Constify.
14809         * m88k-tdep.c (m88k_register_name): Constify.
14810         * macroexp.c (appendmem): Constify.
14811         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
14812         (upgrade_type, parse_external, parse_partial_symbols)
14813         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
14814         (new_symbol): Constify.
14815         * memattr.c (mem_info_command): Constify.
14816         * mep-tdep.c (register_name_from_keyword): Constify.
14817         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
14818         Constify.
14819         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
14820         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
14821         * mi/mi-main.c (captured_mi_execute_command): Constify and add
14822         cast.
14823         (mi_execute_async_cli_command): Constify.
14824         * mips-tdep.c (mips_register_name): Constify.
14825         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
14826         (am33_register_name, am33_2_register_name)
14827         * moxie-tdep.c (moxie_register_names): Constify.
14828         * nat/linux-osdata.c (osdata_type): Constify fields.
14829         * nto-tdep.c (nto_parse_redirection): Constify.
14830         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
14831         (lookup_child_selector): Constify.
14832         (objc_methcall::name): Constify.
14833         * objc-lang.h (lookup_objc_class, lookup_child_selector)
14834         (lookup_struct_typedef): Constify.
14835         * objfiles.c (pc_in_section): Constify.
14836         * objfiles.h (pc_in_section): Constify.
14837         * p-exp.y (struct token::oper): Constify.
14838         (yyerror): Constify.
14839         * p-lang.h (pascal_yyerror): Constify.
14840         * parser-defs.h (op_name_standard): Constify.
14841         (op_print::string): Constify.
14842         (exp_descriptor::op_name): Constify.
14843         * printcmd.c (print_address_symbolic): Constify.
14844         * psymtab.c (print_partial_symbols): Constify.
14845         * python/py-breakpoint.c (stop_func): Constify.
14846         (bppy_get_expression): Constify.
14847         * python/py-cmd.c (cmdpy_completer::name): Constify.
14848         (cmdpy_function): Constify.
14849         * python/py-event.c (evpy_add_attribute)
14850         (gdbpy_initialize_event_generic): Constify.
14851         * python/py-event.h (evpy_add_attribute)
14852         (gdbpy_initialize_event_generic): Constify.
14853         * python/py-evts.c (add_new_registry): Constify.
14854         * python/py-finishbreakpoint.c (outofscope_func): Constify.
14855         * python/py-framefilter.c (get_py_iter_from_func): Constify.
14856         * python/py-inferior.c (get_buffer): Add cast.
14857         * python/py-param.c (parm_constant::name): Constify.
14858         * python/py-unwind.c (fprint_frame_id): Constify.
14859         * python/python.c (gdbpy_parameter_value): Constify.
14860         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
14861         * remote.c (memory_packet_config::name): Constify.
14862         (show_packet_config_cmd, remote_write_bytes)
14863         (remote_buffer_add_string):
14864         * reverse.c (exec_reverse_once): Constify.
14865         * rs6000-tdep.c (variant::name, variant::description): Constify.
14866         * rust-exp.y (rustyyerror): Constify.
14867         * rust-lang.c (rust_op_name): Constify.
14868         * rust-lang.h (rustyyerror): Constify.
14869         * serial.h (serial_ops::name): Constify.
14870         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
14871         (sh_sh3e_register_name, sh_sh2e_register_name)
14872         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
14873         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
14874         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
14875         (sh_sh4al_dsp_register_name): Constify.
14876         * sh64-tdep.c (sh64_register_name): Constify.
14877         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
14878         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
14879         * stabsread.c (patch_block_stabs, read_type_number)
14880         (ref_map::stabs, ref_add, process_reference)
14881         (symbol_reference_defined, define_symbol, define_symbol)
14882         (error_type, read_type, read_member_functions, read_cpp_abbrev)
14883         (read_one_struct_field, read_struct_fields, read_baseclasses)
14884         (read_tilde_fields, read_struct_type, read_array_type)
14885         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
14886         (read_huge_number, read_range_type, read_args, common_block_start)
14887         (find_name_end): Constify.
14888         * stabsread.h (common_block_start, define_symbol)
14889         (process_one_symbol, symbol_reference_defined, ref_add):
14890         * symfile.c (get_section_index, add_symbol_file_command):
14891         * symfile.h (get_section_index): Constify.
14892         * target-descriptions.c (tdesc_type::name): Constify.
14893         (tdesc_free_type): Add cast.
14894         * target.c (find_default_run_target):
14895         (add_deprecated_target_alias, find_default_run_target)
14896         (target_announce_detach): Constify.
14897         (do_option): Constify.
14898         * target.h (add_deprecated_target_alias): Constify.
14899         * thread.c (print_thread_info_1): Constify.
14900         * top.c (deprecated_readline_begin_hook, command_line_input):
14901         Constify.
14902         (init_main): Add casts.
14903         * top.h (handle_line_of_input): Constify.
14904         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
14905         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
14906         (tfind_command): Rename to ...
14907         (tfind_command_1): ... this and constify.
14908         (tfind_command): New function.
14909         (tfind_end_command, tfind_start_command): Adjust.
14910         (encode_source_string): Constify.
14911         * tracepoint.h (encode_source_string): Constify.
14912         * tui/tui-data.c (tui_partial_win_by_name): Constify.
14913         * tui/tui-data.h (tui_partial_win_by_name): Constify.
14914         * tui/tui-source.c (tui_set_source_content_nil): Constify.
14915         * tui/tui-source.h (tui_set_source_content_nil): Constify.
14916         * tui/tui-win.c (parse_scrolling_args): Constify.
14917         * tui/tui-windata.c (tui_erase_data_content): Constify.
14918         * tui/tui-windata.h (tui_erase_data_content): Constify.
14919         * tui/tui-winsource.c (tui_erase_source_content): Constify.
14920         * tui/tui.c (tui_enable): Add cast.
14921         * utils.c (defaulted_query): Constify.
14922         (init_page_info): Add cast.
14923         (puts_debug, subset_compare): Constify.
14924         * utils.h (subset_compare): Constify.
14925         * varobj.c (varobj_format_string): Constify.
14926         * varobj.h (varobj_format_string): Constify.
14927         * vax-tdep.c (vax_register_name): Constify.
14928         * windows-nat.c (windows_detach): Constify.
14929         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
14930         * xml-support.c (gdb_xml_end_element): Constify.
14931         * xml-tdesc.c (tdesc_start_reg): Constify.
14932         * xstormy16-tdep.c (xstormy16_register_name): Constify.
14933         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
14934         * xtensa-tdep.h (xtensa_register_t::name): Constify.
14935
14936 2017-04-05  Pedro Alves  <palves@redhat.com>
14937
14938         * proc-api.c (struct trans): Constify.
14939         (procfs_note): Constify.
14940         * proc-events.c (struct trans, syscall_table):
14941         * proc-flags.c (struct trans): Constify.
14942         * proc-utils.h (procfs_note): Constify.
14943         * proc-why.c (struct trans): Constify.
14944         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
14945         (procfs_detach): Constify.
14946         * sol-thread.c (struct string_map): Constify.
14947         (td_err_string, td_state_string): Constify.
14948
14949 2017-04-05  Pedro Alves  <palves@redhat.com>
14950
14951         * proc-api.c (procfs_filename): Don't initialize
14952         procfs_filename.
14953         (prepare_to_trace): Assume procfs_filename is non-NULL.
14954         (_initialize_proc_api): Give procfs_filename a default value here.
14955
14956 2017-04-05  Pedro Alves  <palves@redhat.com>
14957
14958         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
14959         'cond_string' parameter.
14960         (extract_exception_regexp): Constify 'string' parameter.
14961         (catch_exception_command_1): Constify.
14962         * breakpoint.c (init_catchpoint)
14963         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
14964         parameter.
14965         (ep_parse_optional_if_clause, catch_fork_command_1)
14966         (catch_exec_command_1): Constify.
14967         * breakpoint.h (init_catchpoint): Constify 'cond_string'
14968         parameter.
14969         (ep_parse_optional_if_clause): Constify.
14970         * cli/cli-utils.c (remove_trailing_whitespace)
14971         (check_for_argument): Constify.
14972         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
14973         non-const overload.
14974         (check_for_argument): Likewise.
14975
14976 2017-04-05  Pedro Alves  <palves@redhat.com>
14977
14978         * event-top.c (command_line_handler): Add cast to execute_command
14979         call.
14980         * record-btrace.c (cmd_record_btrace_bts_start)
14981         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
14982         (cmd_record_btrace_start): Add cast to execute_command call.
14983         * record-full.c (record_full_goto_insn):
14984         * record.c (record_start, record_stop): Add cast to
14985         execute_command_to_string calls.
14986         (cmd_record_start): Add cast to execute_command calls.
14987
14988 2017-04-05  Pedro Alves  <palves@redhat.com>
14989
14990         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
14991         static inline function.
14992         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
14993         array and use gdb_PyArg_ParseTupleAndKeywords.
14994         * python/py-cmd.c (cmdpy_init): Likewise.
14995         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
14996         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
14997         (infpy_search_memory): Likewise.
14998         * python/py-objfile.c (objfpy_add_separate_debug_file)
14999         (gdbpy_lookup_objfile): Likewise.
15000         * python/py-symbol.c (gdbpy_lookup_symbol)
15001         (gdbpy_lookup_global_symbol): Likewise.
15002         * python/py-type.c (gdbpy_lookup_type): Likewise.
15003         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
15004         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
15005         Likewise.
15006
15007 2017-04-05  Pedro Alves  <palves@redhat.com>
15008
15009         * python/python-internal.h (gdb_PyGetSetDef): New type.
15010         * python/py-block.c (block_object_getset)
15011         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
15012         * python/py-event.c (event_object_getset)
15013         (finish_breakpoint_object_getset): Likewise.
15014         * python/py-inferior.c (inferior_object_getset): Likewise.
15015         * python/py-infthread.c (thread_object_getset): Likewise.
15016         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
15017         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
15018         * python/py-objfile.c (objfile_getset): Likewise.
15019         * python/py-progspace.c (pspace_getset): Likewise.
15020         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
15021         Likewise.
15022         * python/py-record.c (recpy_record_getset): Likewise.
15023         * python/py-symbol.c (symbol_object_getset): Likewise.
15024         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
15025         Likewise.
15026         * python/py-type.c (type_object_getset, field_object_getset):
15027         Likewise.
15028         * python/py-value.c (value_object_getset): Likewise.
15029
15030 2017-04-05  Pedro Alves  <palves@redhat.com>
15031
15032         * python/python-internal.h (gdb_PyObject_CallMethod)
15033         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
15034         New functions.
15035         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
15036         (PySys_GetObject, PySys_SetPath): New macros.
15037
15038 2017-04-05  Pedro Alves  <palves@redhat.com>
15039
15040         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
15041         info_osdata_command.
15042         * osdata.c (info_osdata_command): Rename to ...
15043         (info_osdata): ... this.  Constify 'type' parameter, and remove
15044         the 'from_tty' parameter.  Accept NULL TYPE.
15045         (info_osdata_command): New function.
15046         * osdata.h (info_osdata_command): Remove declaration.
15047         (info_osdata): New declaration.
15048
15049 2017-04-05  Pedro Alves  <palves@redhat.com>
15050
15051         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
15052         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
15053         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
15054         parameter.
15055         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
15056         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
15057         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
15058         parameter.
15059         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
15060         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
15061         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
15062         (mi_cmd_file_list_exec_source_files)
15063         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
15064         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
15065         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
15066         parameter.
15067         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
15068         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
15069         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
15070         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
15071         (mi_cmd_stack_info_frame): Constify 'command' parameter.
15072         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
15073         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
15074         'command' parameter.
15075         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
15076         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
15077         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
15078         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
15079         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
15080         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
15081         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
15082         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
15083         (mi_cmd_var_set_update_range): Constify 'command' parameter.
15084         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
15085         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
15086         parameter.
15087         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
15088         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
15089         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
15090         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
15091         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
15092         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
15093         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
15094         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
15095         (mi_cmd_data_list_changed_registers)
15096         (mi_cmd_data_write_register_values)
15097         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
15098         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
15099         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
15100         (mi_cmd_list_features, mi_cmd_list_target_features)
15101         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
15102         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
15103         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
15104         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
15105         (mi_cmd_trace_frame_collected): Constify 'command'
15106         parameter.
15107         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
15108         'command' parameter.
15109
15110 2017-04-05  Pedro Alves  <palves@redhat.com>
15111
15112         * ada-lang.c (ada_completer_word_break_characters): Now a const
15113         array.
15114         (ada_get_gdb_completer_word_break_characters): Constify.
15115         * completer.c (gdb_completer_command_word_break_characters)
15116         (gdb_completer_file_name_break_characters)
15117         (gdb_completer_quote_characters): Now const arrays.
15118         (get_gdb_completer_quote_characters): Constify.
15119         (set_rl_completer_word_break_characters): New function.
15120         (set_gdb_completion_word_break_characters)
15121         (complete_line_internal): Use it.
15122         * completer.h (get_gdb_completer_quote_characters): Constify.
15123         (set_rl_completer_word_break_characters): Declare.
15124         * f-lang.c (f_word_break_characters): Constify.
15125         * language.c (default_word_break_characters): Constify.
15126         * language.h (language_defn::la_word_break_characters): Constify.
15127         (default_word_break_characters): Constify.
15128         * top.c (init_main): Use set_rl_completer_word_break_characters.
15129
15130 2017-04-05  Pedro Alves  <palves@redhat.com>
15131
15132         * aix-thread.c (aix_thread_pid_to_str)
15133         (aix_thread_extra_thread_info): Constify.
15134         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
15135         * bsd-uthread.c (bsd_uthread_extra_thread_info)
15136         (bsd_uthread_pid_to_str): Constify.
15137         * corelow.c (core_pid_to_str): Constify.
15138         * darwin-nat.c (darwin_pid_to_str): Constify.
15139         * fbsd-nat.c (fbsd_pid_to_str): Constify.
15140         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
15141         Constify.
15142         * gnu-nat.c (gnu_pid_to_str): Constify.
15143         * go32-nat.c (go32_pid_to_str): Constify.
15144         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
15145         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
15146         * inferior.c (inferior_pid_to_str): Constify.
15147         * linux-nat.c (linux_nat_pid_to_str): Constify.
15148         * linux-tdep.c (linux_core_pid_to_str): Constify.
15149         * linux-thread-db.c (thread_db_pid_to_str)
15150         (thread_db_extra_thread_info): Constify.
15151         * nto-tdep.c (nto_extra_thread_info): Constify.
15152         * nto-tdep.h (nto_extra_thread_info): Constify.
15153         * obsd-nat.c (obsd_pid_to_str): Constify.
15154         * procfs.c (procfs_pid_to_str): Constify.
15155         * ravenscar-thread.c (ravenscar_extra_thread_info)
15156         (ravenscar_pid_to_str): Constify.
15157         * remote-sim.c (gdbsim_pid_to_str): Constify.
15158         * remote.c (remote_threads_extra_info, remote_pid_to_str):
15159         Constify.
15160         * sol-thread.c (solaris_pid_to_str): Constify.
15161         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
15162         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
15163         * target.c (default_pid_to_str, target_pid_to_str)
15164         (normal_pid_to_str, default_pid_to_str): Constify.
15165         * target.h (target_ops::to_pid_to_str)
15166         (target_ops::to_extra_thread_info): Constify.
15167         (target_pid_to_str, normal_pid_to_str): Constify.
15168         * windows-nat.c (windows_pid_to_str): Constify.
15169         * gdbarch.sh (core_pid_to_str): Constify.
15170         * target-delegates.c: Regenerate.
15171         * gdbarch.h, gdbarch.c: Regenerate.
15172
15173 2017-04-05  Pedro Alves  <palves@redhat.com>
15174
15175         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
15176         the memory of the temporary warning_pre_print override.
15177         * utils.c (warning_pre_print): Constify.
15178         * utils.h (warning_pre_print): Constify.
15179
15180 2017-04-05  Pedro Alves  <palves@redhat.com>
15181
15182         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
15183         (shell_command): New function.
15184         (make_command): Use std::string.
15185         (init_cli_cmds): Register shell_command instead of shell_escape.
15186
15187 2017-04-05  Pedro Alves  <palves@redhat.com>
15188
15189         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
15190         * tracepoint.c (default_collect): Don't initialize.
15191
15192 2017-04-05  Pedro Alves  <palves@redhat.com>
15193
15194         * macroexp.c (macro_buffer::shared): Now a bool.
15195         (init_buffer): Update.
15196         (init_shared_buffer): Constify 'addr' parameter.
15197         (substitute_args, expand, macro_expand, macro_expand_next): Remove
15198         casts.
15199
15200 2017-04-05  Pedro Alves  <palves@redhat.com>
15201
15202         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
15203         * disasm.c (set_disassembler_options): Constify local.
15204         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
15205
15206 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
15207
15208         PR gdb/21352
15209         * tracefile.c (tsave_command): Fix argument parsing for '-r'
15210         option.
15211
15212 2017-04-05  Yao Qi  <yao.qi@linaro.org>
15213
15214         * frame.c (frame_unwind_register_unsigned): Call
15215         frame_unwind_register_value.
15216
15217 2017-04-05  Yao Qi  <yao.qi@linaro.org>
15218
15219         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
15220         Use gdb_test_multiple, and don't match anchor.
15221
15222 2017-04-05  Pedro Alves  <palves@redhat.com>
15223
15224         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
15225         (Write After Approval): Remove Simon Marchi.
15226
15227 2017-04-05  Pedro Alves  <palves@redhat.com>
15228
15229         * common/gdb_optional.h (optional::optional): Make constexpr and
15230         initialize m_dummy.
15231
15232 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
15233
15234         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
15235         (amd64fbsd_jmp_buf_reg_offset): Remove.
15236         (amd64fbsd_supply_uthread): Remove function.
15237         (amd64fbsd_collect_uthread): Remove function.
15238         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
15239         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
15240         (x86_64-*-freebsd*): Remove bsd-uthread.o.
15241         (fbsd-nat.c): Update comment.
15242         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
15243         (i386fbsd_jmp_buf_reg_offset): Remove.
15244         (i386fbsd_supply_uthread): Remove function.
15245         (i386fbsd_collect_uthread): Remove function.
15246         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
15247
15248 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
15249
15250         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
15251         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
15252         * NEWS: Mention that support for FreeBSD/alpha was removed.
15253         * alpha-fbsd-tdep.c: Delete file.
15254         * config/alpha/fbsd.mh: Delete file.
15255         * configure.host: Delete alpha*-*-freebsd* and
15256         alpha*-*-kfreebsd*-gnu.
15257         * configure.tgt: Delete alpha*-*-freebsd* and
15258         alpha*-*-kfreebsd*-gnu.
15259
15260 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
15261
15262         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
15263         amd64bsd_store_inferior_registers): Use ptid from regcache.
15264
15265 2017-04-04  Pedro Alves  <palves@redhat.com>
15266
15267         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
15268         data fields, make them private and add "m_" prefixes.
15269         (lnp_state_machine::lnp_state_machine): New ctor.
15270         (record_line, check_line_address, handle_set_discriminator)
15271         (handle_set_address, handle_advance_pc, handle_special_opcode)
15272         (handle_advance_line, handle_set_file, handle_negate_stmt)
15273         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
15274         (end_sequence, advance_line): New methods.
15275         (m_gdbarch, m_record_lines_p): New fields.
15276         (lnp_reader_state): Delete.
15277         (dwarf_record_line): Rename to ...
15278         (lnp_state_machine::record_line): ... adjust.
15279         (init_lnp_state_machine): Delete.
15280         (lnp_state_machine::lnp_state_machine): New.
15281         (check_line_address): Rename to ...
15282         (lnp_state_machine::check_line_address): This.
15283         (dwarf_decode_lines_1): Remove reference to "reader_state".
15284         Adjust lnp_state_machine having a non-default ctor.  Use bool.
15285         State machine internal state manipulation moved to
15286         lnp_state_machine methods.
15287
15288 2017-04-04  Pedro Alves  <palves@redhat.com>
15289
15290         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
15291         unittests/offset-type-selftests.c.
15292         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
15293         * common/offset-type.h: New file.
15294         * common/preprocessor.h: New file.
15295         * common/traits.h: New file.
15296         * common/valid-expr.h: New file.
15297         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
15298         sect_offset and cu_offset strong typedefs throughout.
15299         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
15300         typedefs throughout.
15301         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
15302         sect_offset and cu_offset strong typedefs throughout.
15303         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
15304         typedefs throughout.
15305         * gdbtypes.h: Include "common/offset-type.h".
15306         (cu_offset): Now an offset type (strong typedef) instead of a
15307         struct.
15308         (sect_offset): Likewise.
15309         (union call_site_parameter_u): Rename "param_offset" field to
15310         "param_cu_off".
15311         * unittests/offset-type-selftests.c: New file.
15312
15313 2017-04-04  Pedro Alves  <palves@redhat.com>
15314
15315         * common/underlying.h: New file.
15316         * dwarf2read.c: Include "common/gdb_optional.h" and
15317         "common/underlying.h".
15318         (dir_index, file_name_index): New types.
15319         (file_entry): Use them.
15320         (file_entry::include): Use to_underlying.
15321         (line_header::add_file_name): Use dir_index.
15322         (read_formatted_entries): Use gdb::optional.  Read form before
15323         writting to file_entry.
15324         (dwarf_decode_line_header): Use dir_index.
15325         (lnp_state_machine::current_file): Use to_underlying.
15326         (lnp_state_machine::file): Change type to file_name_index.
15327         (dwarf_record_line): Use to_underlying.
15328         (init_lnp_state_machine): Use file_name_index.
15329         (dwarf_decode_lines_1): Use dir_index and file_name_index.
15330
15331 2017-04-04  Pedro Alves  <palves@redhat.com>
15332
15333         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
15334         operator bool, has_value and get methods.
15335
15336 2017-04-04  Pedro Alves  <palves@redhat.com>
15337
15338         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
15339         fields.
15340         (line_header): Initialize all data fields.  Change type of
15341         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
15342         Change type of include_dirs to std::vector<const char *>.  Remove
15343         num_include_dirs, include_dirs_size.  Change type of file_names to
15344         std::vector<file_entry>.  Remove num_file_names, file_names_size.
15345         (line_header::line_header): New.
15346         (line_header::add_include_dir, line_header::add_file_name): New
15347         methods.
15348         (line_header::include_dir_at): Remove NULL check.
15349         (line_header::file_name_at): Add const overload.
15350         (line_header_up): New unique_ptr typedef.
15351         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
15352         std::vector.  Remove free_line_header call.
15353         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
15354         free_line_header call.
15355         (free_cu_line_header): Delete.
15356         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
15357         (setup_type_unit_groups): Use line_header_up instead of cleanups.
15358         Adjust to use std::vector.
15359         (free_line_header): Delete.
15360         (free_line_header_voidp): Use delete.
15361         (add_include_dir): Replace with ...
15362         (line_header::add_include_dir): ... this method.  Use std::vector.
15363         (add_file_name): Replace with ...
15364         (line_header::add_file_name): ... this method.  Use std::vector.
15365         (add_include_dir_stub): Delete.
15366         (read_formatted_entries): Remove memset.
15367         (dwarf_decode_line_header): Return a line_header_up instead of a
15368         raw pointer.  Remove cleanup handling.  Pass lambdas to
15369         read_formatted_entries.  Adjust to use line_header methods.
15370         (dwarf_decode_lines_1): Adjust to use line_header methods.
15371         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
15372         use std::vector.
15373
15374 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
15375
15376         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
15377         instead of struct ptid.
15378
15379 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
15380
15381         * frame.c (get_frame_register_bytes): Unwind using value.
15382         (put_frame_register_bytes): Likewise.
15383
15384 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
15385
15386         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
15387         aggregate-like.
15388
15389 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
15390
15391         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
15392
15393 2017-03-29  Yao Qi  <yao.qi@linaro.org>
15394
15395         * gdbthread.h (struct thread_info): Declare constructor and
15396         destructor.  Add some in-class member initializers.
15397         * thread.c (free_thread): Remove.
15398         (init_thread_list): Call delete instead of free_thread.
15399         (new_thread): Call thread_info constructor.
15400         (thread_info::thread_info): New function.
15401         (thread_info::~thread_info): New function.
15402         (delete_thread_1): Call delete instead of free_thread.
15403         (make_cleanup_restore_current_thread): Move tp and frame to
15404         inner block.
15405
15406 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
15407
15408         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
15409         (arc_skip_prologue): Likewise.
15410         (arc_make_frame_cache): Likewise.
15411         (arc_pv_get_operand): New function.
15412         (arc_is_in_prologue): Likewise.
15413         (arc_analyze_prologue): Likewise.
15414         (arc_print_frame_cache): Likewise.
15415         (MAX_PROLOGUE_LENGTH): New constant.
15416
15417 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
15418
15419         * configure.tgt: Add arc-insn.o.
15420         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
15421         (dump_arc_instruction_command): New function.
15422         (arc_fprintf_disasm): Likewise.
15423         (arc_disassemble_info): Likewise.
15424         (arc_insn_get_operand_value): Likewise.
15425         (arc_insn_get_operand_value_signed): Likewise.
15426         (arc_insn_get_memory_base_reg): Likewise.
15427         (arc_insn_get_memory_offset): Likewise.
15428         (arc_insn_get_branch_target): Likewise.
15429         (arc_insn_dump): Likewise.
15430         (arc_insn_get_linear_next_pc): Likewise.
15431         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
15432         (arc_disassemble_info): Likewise.
15433         (arc_insn_get_branch_target): Likewise.
15434         (arc_insn_get_linear_next_pc): Likewise.
15435         * NEWS: Mention new "maint print arc arc-instruction".
15436
15437 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
15438
15439         * arc-tdep (maintenance_print_arc_list): New variable.
15440         (maintenance_print_arc_command): New function.
15441
15442 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
15443
15444         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
15445         Add "limm" and "reserved".
15446         (arc_cannot_fetch_register, arc_cannot_store_register): Add
15447         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
15448         * arc-tdep.h (arc_regnum): Likewise.
15449
15450 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
15451
15452         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
15453         for THREADPTR register.
15454         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
15455         register.
15456         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
15457         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
15458         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
15459
15460 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
15461
15462         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
15463         registers above gdbarch_num_regs (gdbarch) as privileged in
15464         call0 ABI.
15465
15466 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
15467
15468         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
15469         for a single specified register or for all registers in
15470         a0_base..a0_base + C0_NREGS range.
15471         (supply_gregset_reg): Call regcache_raw_supply for a single
15472         specified register or for all registers in a0_base..a0_base +
15473         C0_NREGS range.
15474
15475 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
15476
15477         * arch/xtensa.h (C0_NREGS): Add definition.
15478         * xtensa-tdep.c (C0_NREGS): Remove definition.
15479
15480 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
15481
15482         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
15483         Drop xtensa_default_isa initialization.
15484         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
15485
15486 2017-03-27  Pedro Alves  <palves@redhat.com>
15487
15488         * dwarf2read.c (file_entry) <dir_index>: Add comment.
15489         (file_entry::include_dir): New method.
15490         (line_header::include_dir_at, line_header::file_name_at): New
15491         methods.
15492         (setup_type_unit_groups, setup_type_unit_groups)
15493         (psymtab_include_file_name): Simplify using the new methods.
15494         (lnp_state_machine) <the_line_header>: New field.
15495         <file>: Add comment.
15496         (lnp_state_machine::current_file): New method.
15497         (dwarf_record_line): Simplify using the new methods.
15498         (init_lnp_state_machine): Initialize the "the_line_header" field.
15499         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
15500         Simplify using the new methods.
15501
15502 2017-03-27  Pedro Alves  <palves@redhat.com>
15503
15504         * cp-name-parser.y (make_empty): Delete.
15505         (demangler_special, nested_name, ptr_operator, array_indicator)
15506         (direct_declarator, declarator_1): Use fill_comp instead of
15507         make_empty.
15508
15509 2017-03-27  Pedro Alves  <palves@redhat.com>
15510
15511         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
15512         to ATTRIBUTE_PRINTF.
15513         * solib-target.c (library_list_start_list): Print "string" not
15514         "version".
15515         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
15516         gdb_xml_error call.
15517
15518 2017-03-27  Pedro Alves  <palves@redhat.com>
15519
15520         * dwarf2read.c (struct file_and_directory): New.
15521         (dwarf2_get_dwz_file): Adjust to use std::string.
15522         (dw2_get_file_names_reader): Adjust to use file_and_directory.
15523         (find_file_and_directory): Adjust to return a file_and_directory
15524         object.
15525         (read_file_scope): Adjust to use file_and_directory.  Remove
15526         make_cleanup/do_cleanups calls.
15527         (open_and_init_dwp_file): Adjust to use std::string.  Remove
15528         make_cleanup/do_cleanups calls.
15529         * python/python.c (do_start_initialization): Adjust to ldirname
15530         returning a std::string.
15531         * utils.c (ldirname): Now returns a std::string.
15532         * utils.h (ldirname): Change return type to std::string.
15533         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
15534         returning a std::string.
15535         * xml-tdesc.c (file_read_description_xml): Likewise.
15536
15537 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
15538
15539         * regcache.c (regcache_debug_print_register): New function.
15540         * regcache.h (regcache_debug_print_register): New declaration.
15541         * target.c (debug_print_register): Remove.
15542         (target_fetch_registers): Call regcache_debug_print_register.
15543         (target_store_registers): Likewise.
15544
15545 2017-03-24  Pádraig Brady  <pbrady@fb.com>
15546
15547         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
15548         reference beyond the 'lh->include_dirs' array before accessing to
15549         it.
15550         (psymtab_include_file_name): Likewise.
15551         (dwarf_decode_lines_1): Likewise.
15552         (dwarf_decode_lines): Likewise.
15553         (file_file_name): Likewise.
15554
15555 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
15556
15557         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
15558         inferior_ptid.
15559         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
15560         ps_lsetfpregs): Likewise.
15561         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
15562         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
15563         ps_lsetfpregs): Likewise.
15564         * target.c (target_fetch_registers, target_store_registers):
15565         Remove asserts.
15566
15567 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
15568
15569         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
15570
15571 2017-03-23  Yao Qi  <yao.qi@linaro.org>
15572
15573         * aarch64-tdep.c (aarch64_process_record_test): Declare.
15574         (_initialize_aarch64_tdep): Register it.
15575         (aarch64_record_load_store): Handle PRFM instruction.
15576         (aarch64_process_record_test): New function.
15577
15578 2017-03-23  Yao Qi  <yao.qi@linaro.org>
15579
15580         * aarch64-tdep.c (aarch64_record_load_store): Fix code
15581         indentation.
15582
15583 2017-03-23  Yao Qi  <yao.qi@linaro.org>
15584
15585         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
15586
15587 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15588
15589         python/python.c (do_start_initialization): Fix memory leak.
15590
15591 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
15592
15593         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
15594         using get_ptrace_pid.
15595         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
15596         inferior_ptid.
15597         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
15598         inferior_ptid instead of pid.
15599
15600 2017-03-22  Yao Qi  <yao.qi@linaro.org>
15601
15602         * aarch64-tdep.c: Wrap locally used classes in anonymous
15603         namespace.
15604         * arm-tdep.c: Likewise.
15605         * linespec.c: Likewise.
15606         * ui-out.c: Likewise.
15607
15608 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
15609
15610         PR gdb/19637
15611         * python/lib/gdb/printer/bound_registers.py: Import sys.
15612
15613 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
15614
15615         * windows-nat.c (do_windows_fetch_inferior_registers): Add
15616         windows_thread_info parameter and use it instead of
15617         current_thread.
15618         (windows_fetch_inferior_registers): Don't set current_thread,
15619         pass the thread to do_windows_fetch_inferior_registers.  Use
15620         ptid from regcache instead of inferior_ptid.
15621         (do_windows_store_inferior_registers): Add windows_thread_info
15622         parameter and use it instead of current_thread.
15623         (windows_store_inferior_registers): Don't set current_thread,
15624         pass the thread to do_windows_store_inferior_registers.  Use
15625         ptid from regcache instead of inferior_ptid.
15626
15627 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
15628
15629         * ser-mingw.c (ser_windows_raw): Remove reference to
15630         struct serial::current_timeout.
15631
15632 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
15633
15634         PR tdep/20928
15635         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
15636         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
15637         (sparc64_fsr_type): Fix %fsr decoding.
15638
15639 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
15640
15641         * python/py-record-btrace.c (btpy_insn_data): Change return type
15642         for Python 2.
15643
15644 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
15645
15646         * spu-linux-nat.c (spu_fetch_inferior_registers,
15647         spu_store_inferior_registers): Use ptid from regcache, set and
15648         restore inferior_ptid.
15649         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
15650         Likewise.
15651
15652 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
15653
15654         * i386-linux-nat.c (fetch_register, store_register,
15655         i386_linux_fetch_inferior_registers,
15656         i386_linux_store_inferior_registers): Use ptid from regcache.
15657         * ia64-linux-nat.c (ia64_linux_fetch_register,
15658         ia64_linux_store_register): Likewise.
15659         * inf-ptrace.c (inf_ptrace_fetch_register,
15660         inf_ptrace_store_register): Likewise.
15661         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
15662         m32r_linux_store_inferior_registers): Likewise.
15663         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
15664         m68kbsd_store_inferior_registers): Likewise.
15665         * m68k-linux-nat.c (fetch_register, store_register,
15666         m68k_linux_fetch_inferior_registers,
15667         m68k_linux_store_inferior_registers): Likewise.
15668         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
15669         m88kbsd_store_inferior_registers): Likewise.
15670         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
15671         mips_fbsd_store_inferior_registers): Likewise.
15672         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
15673         mips64_linux_regsets_store_registers): Likewise.
15674         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
15675         mipsnbsd_store_inferior_registers): Likewise.
15676         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
15677         mips64obsd_store_inferior_registers): Likewise.
15678         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
15679         Likewise.
15680         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
15681         ppcfbsd_store_inferior_registers): Likewise.
15682         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
15683         ppc_linux_store_inferior_registers): Likewise.
15684         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
15685         ppcnbsd_store_inferior_registers): Likewise.
15686         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
15687         ppcobsd_store_registers): Likewise.
15688         * procfs.c (procfs_fetch_registers, procfs_store_registers):
15689         Likewise.
15690         * ravenscar-thread.c (ravenscar_fetch_registers,
15691         ravenscar_store_registers, ravenscar_prepare_to_store):
15692         Likewise.
15693         * record-btrace.c (record_btrace_fetch_registers,
15694         record_btrace_store_registers, record_btrace_prepare_to_store):
15695         Likewise.
15696         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
15697         Lookup inferior using ptid from regcache, instead of
15698         current_inferior.
15699         * remote.c (remote_fetch_registers, remote_store_registers): Use
15700         ptid from regcache.
15701         * rs6000-nat.c (fetch_register, store_register): Likewise.
15702         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
15703         s390_linux_store_inferior_registers): Likewise.
15704         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
15705         shnbsd_store_inferior_registers): Likewise.
15706         * sol-thread.c (sol_thread_fetch_registers,
15707         sol_thread_store_registers): Likewise.
15708         * sparc-nat.c (sparc_fetch_inferior_registers,
15709         sparc_store_inferior_registers): Likewise.
15710         * tilegx-linux-nat.c (fetch_inferior_registers,
15711         store_inferior_registers): Likewise.
15712         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
15713         vaxbsd_store_inferior_registers): Likewise.
15714         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
15715         store_xtregs): Likewise.
15716
15717 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
15718
15719         PR gdb/14441
15720         * NEWS: Mention support for rvalue references in GDB and python.
15721         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
15722         supports both lvalue and rvalue references.
15723
15724 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
15725
15726         PR gdb/14441
15727         * gdbtypes.c (rank_one_type): Implement overloading
15728         resolution rules regarding rvalue references.
15729
15730 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
15731
15732         PR gdb/14441
15733         * aarch64-tdep.c (aarch64_type_align)
15734         (aarch64_extract_return_value, aarch64_store_return_value): Change
15735         lvalue reference type checks to general reference type checks.
15736         * amd64-tdep.c (amd64_classify): Likewise.
15737         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
15738         Likewise.
15739         * arm-tdep.c (arm_type_align, arm_extract_return_value)
15740         (arm_store_return_value): Likewise.
15741         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
15742         * c-typeprint.c (c_print_type): Likewise.
15743         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
15744         (cplus_number_of_children, cplus_describe_child): Likewise.
15745         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
15746         * completer.c (expression_completer): Likewise.
15747         * cp-support.c (make_symbol_overload_list_adl_namespace):
15748         Likewise.
15749         * darwin-nat-info.c (info_mach_region_command): Likewise.
15750         * dwarf2loc.c (entry_data_value_coerce_ref)
15751         (value_of_dwarf_reg_entry): Likewise.
15752         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
15753         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
15754         Likewise.
15755         * findvar.c (extract_typed_address, store_typed_address):
15756         Likewise.
15757         * gdbtypes.c (rank_one_type): Likewise.
15758         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
15759         * infcall.c (value_arg_coerce): Likewise.
15760         * language.c (pointer_type): Likewise.
15761         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
15762         Likewise.
15763         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
15764         * mn10300-tdep.c (mn10300_type_align): Likewise.
15765         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
15766         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
15767         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
15768         Likewise.
15769         * printcmd.c (print_formatted, x_command): Likewise.
15770         * python/py-type.c (typy_get_composite, typy_template_argument):
15771         Likewise.
15772         * python/py-value.c (valpy_referenced_value)
15773         (valpy_get_dynamic_type, value_has_field): Likewise.
15774         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
15775         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
15776         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
15777         * spu-tdep.c (spu_scalar_value_p): Likewise.
15778         * symtab.c (lookup_symbol_aux): Likewise.
15779         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
15780         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
15781         Likewise.
15782         * valops.c (value_cast_pointers, value_cast)
15783         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
15784         (value_struct_elt, value_struct_elt_bitpos)
15785         (value_find_oload_method_list, find_overload_match)
15786         (value_rtti_indirect_type): Likewise.
15787         * valprint.c (val_print_scalar_type_p, generic_val_print):
15788         Likewise.
15789         * value.c (value_actual_type, value_as_address, unpack_long)
15790         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
15791         (coerce_ref): Likewise.
15792         * varobj.c (varobj_get_value_type): Likewise.
15793
15794 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
15795
15796         PR gdb/14441
15797         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
15798         table of constants.
15799         * python/lib/gdb/command/explore.py: Support exploring values
15800         of rvalue reference types.
15801         * python/lib/gdb/types.py: Implement get_basic_type() for
15802         rvalue reference types.
15803         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
15804         constant.
15805         * python/py-value.c (valpy_getitem): Add an rvalue reference
15806         check.
15807         (valpy_reference_value): Add new parameter "refcode".
15808         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
15809         New wrappers for valpy_reference_value().
15810         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
15811         (gdbpy_invoke_xmethod): Likewise.
15812
15813 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
15814
15815         PR gdb/14441
15816         * dwarf2read.c (process_die, read_type_die_1): Handle the
15817         DW_TAG_rvalue_reference_type DIE.
15818         (read_tag_reference_type): Add new parameter "refcode".
15819
15820 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
15821
15822         PR gdb/14441
15823         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
15824         (c_type_print_modifier, c_type_print_varspec_suffix)
15825         (c_type_print_base): Support printing rvalue reference types.
15826         * c-valprint.c (c_val_print, c_value_print): Support printing
15827         rvalue reference values.
15828
15829 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
15830
15831         PR gdb/14441
15832         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
15833         typename.
15834         * cp-support.c (replace_typedefs): Handle
15835         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
15836         * python/py-type.c (typy_lookup_type): Likewise.
15837
15838 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
15839
15840         PR gdb/14441
15841         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
15842         * parse.c (insert_type): Change assert statement.
15843         (follow_types): Handle rvalue reference types.
15844         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
15845         constant.
15846
15847 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
15848
15849         PR gdb/14441
15850         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
15851         value_ref() interface.
15852         * c-valprint.c (c_value_print): Likewise.
15853         * infcall.c (value_arg_coerce): Likewise.
15854         * python/py-value.c (valpy_reference_value): Likewise.
15855         * valops.c (value_cast, value_reinterpret_cast)
15856         (value_dynamic_cast, typecmp): Likewise.
15857         (value_ref): Parameterize by kind of return value reference type.
15858         * value.h (value_ref): Add new parameter "refcode".
15859
15860 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
15861
15862         PR gdb/14441
15863         * dwarf2read.c (read_tag_reference_type): Use
15864         lookup_lvalue_reference_type() instead of lookup_reference_type().
15865         * eval.c (evaluate_subexp_standard): Likewise.
15866         * f-exp.y: Likewise.
15867         * gdbtypes.c (make_reference_type, lookup_reference_type):
15868         Generalize with rvalue reference types.
15869         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
15870         convenience wrappers for lookup_reference_type().
15871         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
15872         reference kind parameter.
15873         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
15874         wrappers for lookup_reference_type().
15875         * guile/scm-type.c (gdbscm_type_reference): Use
15876         lookup_lvalue_reference_type() instead of lookup_reference_type().
15877         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
15878         * parse.c (follow_types): Likewise.
15879         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
15880         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
15881         Likewise.
15882         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
15883         (gdbpy_invoke_xmethod): Likewise.
15884         * stabsread.c: Provide extra argument to make_reference_type()
15885         call.
15886         * valops.c (value_ref, value_rtti_indirect_type): Use
15887         lookup_lvalue_reference_type() instead of lookup_reference_type().
15888
15889 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
15890
15891         PR gdb/14441
15892         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
15893         (TYPE_IS_REFERENCE): New macro.
15894         (struct type): Add rvalue_reference_type field.
15895         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
15896
15897 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
15898
15899         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
15900         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
15901         New function definition.
15902         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
15903         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
15904         New function declaration.
15905         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
15906         * mi/mi-interp.h: New file.
15907         * solib.c (info_sharedlibrary_command): Replace for loop with
15908         ALL_SO_LIBS macro
15909         * solib.h (update_solib_list): New function declaration.
15910         (so_list_head): Move macro.
15911         * solist.h (ALL_SO_LIBS): New macro.
15912
15913 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
15914
15915         * infcmd.c (post_create_inferior): Remove unused argument in
15916         call to solib_add.
15917         * remote.c (remote_start_remote): Likewise.
15918         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
15919         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
15920         (enable_break): Likewise.
15921         * solib.c (update_solib_list): Remove unused target argument
15922         and its documentation.
15923         (solib_add): Remove unused target argument.  Remove unused
15924         argument in call to update_solib_list.
15925         (info_sharedlibrary_command): Remove unused argument in call
15926         to update_solib_list.
15927         (sharedlibrary_command): Remove unused argument in call to
15928         solib_add.
15929         (handle_solib_event): Likewise.
15930         (reload_shared_libraries): Likewise.
15931         * solib.h (solib_add): Remove unused target argument.
15932
15933 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
15934
15935         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
15936         (s390_displaced_step_fixup): Cover relative branches with the
15937         default fixup handling.  This fixes lack of support for some
15938         relative branch instructions.
15939
15940 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
15941
15942         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
15943         ptid from regcache.
15944
15945 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
15946
15947         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
15948         i386_darwin_store_inferior_registers): Use ptid from regcache.
15949
15950 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
15951
15952         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
15953         i386bsd_store_inferior_registers): Use ptid from regcache.
15954
15955 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
15956
15957         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
15958         hppaobsd_store_registers): Use ptid from regcache.
15959
15960 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
15961
15962         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
15963         hppanbsd_store_registers): Use ptid from regcache.
15964
15965 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
15966
15967         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
15968         from regcache.  Use get_ptrace_pid.
15969
15970 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
15971
15972         * corelow.c (get_core_register_section): Use ptid from regcache,
15973         update doc.
15974
15975 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
15976
15977         * bsd-uthread.c (bsd_uthread_fetch_registers,
15978         bsd_uthread_store_registers): Use ptid from regcache, set and
15979         restore inferior_ptid.
15980
15981 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
15982
15983         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
15984         fetch_fp_regs, store_register, store_regs, store_fp_register,
15985         store_fp_regs): Use ptid from regcache.
15986
15987 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
15988
15989         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
15990         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
15991         store_vfp_regs): Use ptid from regcache.
15992
15993 2017-03-17  Pedro Alves  <palves@redhat.com>
15994
15995         PR remote/21188
15996         * ser-base.c (ser_base_wait_for): Add comment.
15997         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
15998         version.
15999         * ser-unix.c (hardwire_raw): Remove reference to
16000         scb->current_timeout.
16001         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
16002         (hardwire_ops): Install ser_base_readchar instead of
16003         hardwire_readchar.
16004         * serial.h (struct serial) <current_timeout, timeout_remaining>:
16005         Remove fields.
16006
16007 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
16008
16009         PR gdb/19637
16010         * python/lib/gdb/printer/bound_registers.py: Add support for
16011         Python 3.
16012
16013 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
16014
16015         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
16016         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
16017         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
16018         byte_offset to subobj_byte_offset.  Fix the handling of
16019         DWARF_VALUE_STACK on big-endian targets when coming via an
16020         implicit pointer.
16021         (dwarf2_evaluate_loc_desc): Adjust call to
16022         dwarf2_evaluate_loc_desc_full.
16023         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
16024         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
16025
16026 2017-03-16  Yao Qi  <yao.qi@linaro.org>
16027
16028         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
16029         and REVSH instructions.
16030
16031 2017-03-16  Yao Qi  <yao.qi@linaro.org>
16032
16033         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
16034         (arm_record_test): Declare.
16035         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
16036         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
16037         align with the manual.
16038         (thumb_record_misc): Adjust the code order to align with the
16039         manual.
16040         (thumb2_record_decode_insn_handler): Fix instruction matching.
16041         (instruction_reader_thumb): New class.
16042         (arm_record_test): New function.
16043
16044 2017-03-16  Yao Qi  <yao.qi@linaro.org>
16045
16046         * arm-tdep.c (abstract_memory_reader): New class.
16047         (instruction_reader): New class.
16048         (extract_arm_insn): Add argument 'reader'.  Callers updated.
16049         (decode_insn): Likewise.
16050
16051 2017-03-16  Doug Evans  <dje@google.com>
16052
16053         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
16054         member.  Change type of TYPE member to SCM.  All uses updated.
16055         (lsscm_make_lazy_string_smob): Add assert.
16056         (lsscm_make_lazy_string): Flag bad length values.
16057         (lsscm_elt_type): New function.
16058         (gdbscm_lazy_string_to_value): Rewrite to use
16059         lsscm_safe_lazy_string_to_value.
16060         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
16061         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
16062         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
16063         in incoming type.
16064         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
16065         * guile/scm-type.c (tyscm_scm_to_type): New function.
16066
16067 2017-03-15  Doug Evans  <dje@google.com>
16068
16069         PR python/17728, python/18439, python/18779
16070         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
16071         member.  Change type of TYPE member to PyObject *.  All uses updated.
16072         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
16073         (gdbpy_create_lazy_string_object): Flag bad length values.
16074         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
16075         Handle typedefs in incoming type.
16076         (stpy_lazy_string_elt_type): New function.
16077         (gdbpy_extract_lazy_string): Call it.
16078         * python/py-value.c (valpy_lazy_string): Flag bad length values.
16079         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
16080         typedefs in incoming type.
16081
16082 2017-03-16  Doug Evans  <dje@google.com>
16083
16084         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
16085         * guile/scm-type.c (tyscm_scm_to_type): New function.
16086
16087 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
16088
16089         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
16090         "ULONGEST" for "skip".
16091
16092 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
16093
16094         PR gdb/21220
16095         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
16096         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
16097         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
16098         over ptrace peek/poke until end of buffer or error.
16099
16100 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
16101
16102         * parse.c (length_of_subexp): Make static.
16103         * parser-defs.h (length_of_subexp): Remove.
16104
16105 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
16106
16107         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
16108         as well.
16109
16110 2017-03-14  Pedro Alves  <palves@redhat.com>
16111
16112         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
16113         (main): Use std::unique_ptr.  Remove calls to
16114         cp_demangled_name_parse_free.
16115
16116 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
16117
16118         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
16119         alphabsd_store_inferior_registers): Use regcache->ptid instead
16120         of inferior_ptid.
16121
16122 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
16123
16124         * aix-thread.c (aix_thread_fetch_registers,
16125         aix_thread_store_registers): Use regcache->ptid instead of
16126         inferior_ptid.
16127
16128 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
16129
16130         * aarch64-linux-nat.c (fetch_gregs_from_thread,
16131         store_gregs_to_thread, fetch_fpregs_from_thread,
16132         store_fpregs_to_thread): Use regcache->ptid instead of
16133         inferior_ptid.
16134
16135 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
16136
16137         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
16138         amd64_linux_fetch_inferior_registers): Use regcache->ptid
16139         instead of inferior_ptid.
16140
16141 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
16142
16143         * target.c (target_fetch_registers, target_store_registers): Add
16144         assert.
16145
16146 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
16147
16148         * regcache.h (regcache_get_ptid): New function.
16149         * regcache.c (regcache_get_ptid): New function.
16150
16151 2017-03-13  Mark Wielaard  <mark@klomp.org>
16152
16153         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
16154
16155 2017-03-10  Keith Seitz  <keiths@redhat.com>
16156
16157         PR c++/8218
16158         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
16159
16160 2017-03-08  Pedro Alves  <palves@redhat.com>
16161
16162         PR gdb/18360
16163         * infrun.c (start_step_over, do_target_resume, resume)
16164         (restart_threads): Assert we're not resuming a thread that is
16165         meant to be stopped.
16166         (infrun_thread_stop_requested_callback): Delete.
16167         (infrun_thread_stop_requested): If the thread is internally
16168         stopped, queue a pending stop event and clear the thread's
16169         inline-frame state.
16170         (handle_stop_requested): New function.
16171         (handle_syscall_event, handle_inferior_event_1): Use
16172         handle_stop_requested.
16173         (handle_stop_requested): New function.
16174         (handle_signal_stop): Set the thread's stop_signal here instead of
16175         at caller.
16176         (finish_step_over): Clear step over info unconditionally.
16177         (handle_signal_stop): If the user had interrupted the event
16178         thread, consider the stop a random signal.
16179         (handle_signal_stop) <signal arrived while stepping over
16180         breakpoint>: Don't restart threads here.
16181         (stop_waiting): Don't clear step-over info here.
16182
16183 2017-03-08  Pedro Alves  <palves@redhat.com>
16184
16185         PR 21206
16186         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
16187         goes to argument 2, not 1.
16188
16189 2017-03-08  Pedro Alves  <palves@redhat.com>
16190
16191         PR cli/21218
16192         * top.c (gdb_readline_wrapper): Avoid passing NULL to
16193         display_gdb_prompt.
16194         (command_line_input): Add comment.
16195
16196 2017-03-08  Pedro Alves  <palves@redhat.com>
16197
16198         PR tui/21216
16199         * tui/tui-file.c (tui_file::write): New.
16200         * tui/tui-file.h (tui_file): Override "write".
16201         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
16202         factored out from ...
16203         (tui_puts): ... here.
16204         (tui_putc): Use them.
16205         (tui_write): New function.
16206         * tui/tui-io.h (tui_write): Declare.
16207
16208 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
16209
16210         * Makefile.in (SFILES): Replace "environ.c" with
16211         "common/environ.c".
16212         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
16213         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
16214         to...
16215         * common/environ.c: ... here.
16216         * environ.h: Moved to...
16217         * common/environ.h: ... here.
16218
16219 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
16220
16221         * gdbarch.sh (pstring_ptr): New static function.
16222         (gdbarch_disassembler_options): Use it.
16223         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
16224         not valid_disassembler_option->name.
16225         * gdbarch.c: Regenerate.
16226
16227 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
16228
16229         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
16230
16231 2017-03-07  Pedro Alves  <palves@redhat.com>
16232
16233         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
16234
16235 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
16236
16237         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
16238         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
16239         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
16240         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
16241
16242 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
16243
16244         * xtensa-linux-nat.c (fetch_gregs): Remove const.
16245
16246 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
16247
16248         * remote.c (remote_add_target_side_commands): Use range-based
16249         for loop.
16250
16251 2017-03-03  Yao Qi  <yao.qi@linaro.org>
16252
16253         PR gdb/21165
16254         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
16255         value is lazy.
16256         * valprint.c (common_val_print): Likewise.
16257
16258 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
16259
16260         * NEWS: Mention new set/show disassembler-options commands.
16261         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
16262         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
16263         (prospective_options): New static variable.
16264         (gdb_disassembler::gdb_disassembler): Initialize
16265         m_di.disassembler_options.
16266         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
16267         (get_disassembler_options): New function.
16268         (set_disassembler_options): Likewise.
16269         (set_disassembler_options_sfunc): Likewise.
16270         (show_disassembler_options_sfunc): Likewise.
16271         (disassembler_options_completer): Likewise.
16272         (_initialize_disasm): Likewise.
16273         * disasm.h (get_disassembler_options): New prototype.
16274         (set_disassembler_options): Likewise.
16275         * gdbarch.sh (gdbarch_disassembler_options): New variable.
16276         (gdbarch_verify_disassembler_options): Likewise.
16277         * gdbarch.c: Regenerate.
16278         * gdbarch.h: Likewise.
16279         * arm-tdep.c (num_disassembly_options): Delete.
16280         (set_disassembly_style): Likewise.
16281         (arm_disassembler_options): New static variable.
16282         (set_disassembly_style_sfunc): Convert short style name into long
16283         option name.  Call set_disassembler_options.
16284         (show_disassembly_style_sfunc): New function.
16285         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
16286         set_gdbarch_verify_disassembler_options.
16287         (_initialize_arm_tdep): Delete regnames variable and update callers.
16288         (arm_disassembler_options): Initialize.
16289         (disasm_options): New variable.
16290         (num_disassembly_options): Rename from this...
16291         (num_disassembly_styles): ...to this.  Compute by scanning through
16292         disasm_options.
16293         (valid_disassembly_styles): Initialize using disasm_options.
16294         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
16295         set_arm_regname_option.
16296         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
16297         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
16298         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
16299         set_gdbarch_verify_disassembler_options.
16300         * s390-tdep.c (s390_disassembler_options): New static variable.
16301         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
16302         set_gdbarch_verify_disassembler_options.
16303
16304 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
16305
16306         * remote.c (remote_add_target_side_condition): Remove "struct"
16307         keyword from range-based for loop.
16308
16309 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
16310
16311         * remote.c (remote_add_target_side_condition): Use range-based
16312         for loop.  Update comment.
16313
16314 2017-02-27  Yao Qi  <yao.qi@linaro.org>
16315
16316         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
16317
16318 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
16319
16320         * regcache.c (regcache_raw_update): New function.
16321         (regcache_raw_read): Move code to regcache_raw_update.
16322         * regcache.h (regcache_raw_update): New declaration.
16323         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
16324
16325 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
16326
16327         * dwarf2read.c (create_debug_type_hash_table): Initialize
16328         header.signature and header.type_offset_in_tu.
16329
16330 2017-02-24  Pedro Alves  <palves@redhat.com>
16331
16332         * symtab.c (make_file_symbol_completion_list_1): Use
16333         add_symtab_completions.
16334
16335 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
16336
16337         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
16338
16339 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
16340
16341         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
16342         I386_MAX_REGISTER_SIZE.
16343         (i386_pseudo_register_write): Likewise.
16344         (i386_process_record): Likewise.
16345         * i387-tdep.c (i387_supply_xsave): Likewise.
16346         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
16347         (store_register): Likewise.
16348
16349 2017-02-23  Pedro Alves  <palves@redhat.com>
16350
16351         * ada-lang.c: Include "common/function-view.h".
16352         (ada_iterate_over_symbols): Adjust to use function_view as
16353         callback type.
16354         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
16355         (ada_make_symbol_completion_list): Use a lambda.
16356         (ada_exc_search_name_matches): Delete.
16357         (name_matches_regex): New.
16358         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
16359         * compile/compile-c-support.c: Include "common/function-view.h".
16360         (print_one_macro): Change prototype to accept a ui_file pointer.
16361         (write_macro_definitions): Use a lambda.
16362         * dwarf2read.c: Include "common/function-view.h".
16363         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
16364         (dw2_expand_symtabs_matching): Adjust to use function_view as
16365         callback type.
16366         * language.h: Include "common/function-view.h".
16367         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
16368         function_view as callback type.
16369         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
16370         * linespec.c: Include "common/function-view.h".
16371         (collect_info::add_symbol): New method.
16372         (struct symbol_and_data_callback, iterate_inline_only, struct
16373         symbol_matcher_data, iterate_name_matcher): Delete.
16374         (iterate_over_all_matching_symtabs): Adjust to use function_view
16375         as callback type and lambdas.
16376         (iterate_over_file_blocks): Adjust to use function_view as
16377         callback type.
16378         (decode_compound_collector): Now a class with private fields.
16379         (decode_compound_collector::release_symbols): New method.
16380         (collect_one_symbol): Rename to...
16381         (decode_compound_collector::operator()): ... this and adjust.
16382         (lookup_prefix_sym): decode_compound_collector construction bits
16383         move to decode_compound_collector ctor.  Pass the
16384         decode_compound_collector object directly as callback.  Remove
16385         cleanups and use decode_compound_collector::release_symbols
16386         instead.
16387         (symtab_collector): Now a class with private fields.
16388         (symtab_collector::release_symtabs): New method.
16389         (add_symtabs_to_list): Rename to...
16390         (symtab_collector::operator()): ... this and adjust.
16391         (collect_symtabs_from_filename): symtab_collector construction
16392         bits move to symtab_collector ctor.  Pass the symtab_collector
16393         object directly as callback.  Remove cleanups and use
16394         symtab_collector::release_symtabs instead.
16395         (collect_symbols): Delete.
16396         (add_matching_symbols_to_info): Use lambdas.
16397         * macrocmd.c (print_macro_callback): Delete.
16398         (info_macro_command): Use a lambda.
16399         (info_macros_command): Pass print_macro_definition as callable
16400         directly.
16401         (print_one_macro): Remove 'ignore' parameter.
16402         (macro_list_command): Adjust.
16403         * macrotab.c (macro_for_each_data::fn): Now a function_view.
16404         (macro_for_each_data::user_data): Delete field.
16405         (foreach_macro): Adjust to call the function_view.
16406         (macro_for_each): Adjust to use function_view as callback type.
16407         (foreach_macro_in_scope): Adjust to call the function_view.
16408         (macro_for_each_in_scope): Adjust to use function_view as callback
16409         type.
16410         * macrotab.h: Include "common/function-view.h".
16411         (macro_callback_fn): Declare a prototype instead of a pointer.
16412         Remove "user_data" parameter.
16413         (macro_for_each, macro_for_each_in_scope): Adjust to use
16414         function_view as callback type.
16415         * psymtab.c (partial_map_expand_apply)
16416         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
16417         Adjust to use function_view as callback type and to return bool.
16418         (psym_expand_symtabs_matching): Adjust to use function_view as
16419         callback types.
16420         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
16421         to use function_view as callback type and to return bool.
16422         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
16423         callback types.
16424         * symfile.c (expand_symtabs_matching): Adjust to use function_view
16425         as callback types.
16426         * symfile.h: Include "common/function-view.h".
16427         (expand_symtabs_file_matcher_ftype)
16428         (expand_symtabs_symbol_matcher_ftype)
16429         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
16430         return bool.
16431         (quick_symbol_functions::map_symtabs_matching_filename)
16432         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
16433         function_view as callback type and return bool.
16434         (expand_symtabs_matching): Adjust to use function_view as callback
16435         type.
16436         (maintenance_expand_name_matcher)
16437         (maintenance_expand_file_matcher): Delete.
16438         (maintenance_expand_symtabs): Use lambdas.
16439         * symtab.c (iterate_over_some_symtabs): Adjust to use
16440         function_view as callback types and return bool.
16441         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
16442         of a cleanup.
16443         (lookup_symtab_callback): Delete.
16444         (lookup_symtab): Use a lambda.
16445         (iterate_over_symbols): Adjust to use function_view as callback
16446         type.
16447         (struct search_symbols_data, search_symbols_file_matches)
16448         (search_symbols_name_matches): Delete.
16449         (search_symbols): Use a pair of lambdas.
16450         (struct add_name_data, add_macro_name, symbol_completion_matcher)
16451         (symtab_expansion_callback): Delete.
16452         (default_make_symbol_completion_list_break_on_1): Use lambdas.
16453         * symtab.h: Include "common/function-view.h".
16454         (iterate_over_some_symtabs): Adjust to use function_view as
16455         callback type and return bool.
16456         (iterate_over_symtabs): Adjust to use function_view as callback
16457         type.
16458         (symbol_found_callback_ftype): Remove 'data' parameter and return
16459         bool.
16460         (iterate_over_symbols): Adjust to use function_view as callback
16461         type.
16462
16463 2017-02-23  Pedro Alves  <palves@redhat.com>
16464
16465         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
16466         (%.o) <unittests/%.c>: New pattern.
16467         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
16468         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
16469         * common/function-view.h: New file.
16470         * unittests/function-view-selftests.c: New file.
16471         * configure: Regenerate.
16472
16473 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
16474
16475         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
16476         inferior_ptid.
16477         * go32-nat.c (go32_thread_alive): Likewise.
16478
16479 2017-02-23  Yao Qi  <yao.qi@linaro.org>
16480
16481         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
16482         delete.
16483
16484 2017-02-23  Yao Qi  <yao.qi@linaro.org>
16485
16486         * varobj.c (varobj_clear_saved_item): Use delete instead of
16487         xfree.
16488         (update_dynamic_varobj_children): Likewise.
16489
16490 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
16491
16492         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
16493
16494 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
16495
16496         * common/enum-flags.h (enum_flags::enum_flags): Initialize
16497         m_enum_value to 0 in default constructor.
16498
16499 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
16500
16501         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
16502         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
16503         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
16504         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
16505         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
16506         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
16507         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
16508         IS_STORE_CONDITIONAL_INSN.
16509
16510 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
16511
16512         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
16513
16514 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
16515
16516         * NEWS (Changes since GDB 7.12): Add DWARF-5.
16517
16518 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
16519
16520         * dwarf2read.c (skip_one_die, read_attribute_value)
16521         (dwarf2_const_value_attr, dump_die_shallow)
16522         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
16523         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
16524
16525 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
16526
16527         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
16528         (dwarf_parse_macro_header): Accept DWARF version 5.
16529         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
16530
16531 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
16532
16533         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
16534         DW_AT_GNU_*.
16535         * common/common-exceptions.h (enum errors): Likewise.
16536         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
16537         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
16538         (dwarf_expr_context::execute_stack_op): Likewise.
16539         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
16540         Likewise.
16541         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
16542         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
16543         (show_entry_values_debug, call_site_to_target_addr)
16544         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
16545         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
16546         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
16547         (value_of_dwarf_block_entry, indirect_pieced_value)
16548         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
16549         (disassemble_dwarf_expression): Likewise.
16550         * dwarf2read.c (process_die, inherit_abstract_dies)
16551         (read_call_site_scope): Likewise.
16552         * gdbtypes.h (struct func_type, struct call_site_parameter)
16553         (struct call_site): Likewise.
16554         * stack.c (read_frame_arg): Likewise.
16555         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
16556
16557 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
16558
16559         * defs.h (read_unsigned_leb128): New declaration.
16560         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
16561         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
16562         (dwarf2_find_location_expression): Call also
16563         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
16564         * dwarf2loc.h (dwarf2_version): New declaration.
16565         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
16566         rnglists.
16567         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
16568         .debug_rnglists.
16569         (struct dwop_section_names): Add loclists_dwo.
16570         (dwop_section_names): Add .debug_loclists.dwo.
16571         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
16572         (struct dwarf2_per_cu_data): Add dwarf_version.
16573         (struct dwo_sections): Add loclists.
16574         (struct attr_abbrev): Add implicit_const.
16575         (read_indirect_line_string): New declaration.
16576         (read_unsigned_leb128): Delete declaration.
16577         (rcuh_kind): New definition.
16578         (read_and_check_comp_unit_head): Change parameter
16579         is_debug_types_section to section_kind.
16580         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
16581         (read_comp_unit_head): Change parameter abfd to section, add parameter
16582         section_kind.  Handle DWARF-5.
16583         (error_check_comp_unit_head): Accept also DWARF version 5.
16584         (read_and_check_comp_unit_head): Change parameter
16585         is_debug_types_section to section_kind.
16586         (read_and_check_type_unit_head): Delete function.
16587         (read_abbrev_offset): Handle DWARF-5.
16588         (create_debug_type_hash_table): Add parameter section_kind.  Process
16589         only DW_UT_type.  Use signature and type_offset_in_tu from struct
16590         comp_unit_head.
16591         (create_debug_types_hash_table): Update create_debug_type_hash_table
16592         caller.
16593         (create_all_type_units): Call create_debug_type_hash_table.
16594         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
16595         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
16596         caller.
16597         (skip_one_die): Handle DW_FORM_implicit_const.
16598         (dwarf2_rnglists_process): New function.
16599         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
16600         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
16601         (read_attribute_value): Handle DW_FORM_implicit_const,
16602         DW_FORM_line_strp.
16603         (read_attribute): Handle DW_FORM_implicit_const.
16604         (read_indirect_string_at_offset_from): New function from
16605         read_indirect_string_at_offset.
16606         (read_indirect_string_at_offset): Call
16607         read_indirect_string_at_offset_from.
16608         (read_indirect_line_string_at_offset): New function.
16609         (read_indirect_string): New function comment.
16610         (read_indirect_line_string): New function.
16611         (read_unsigned_leb128): Make it global.
16612         (dwarf2_string_attr): Handle DWARF-5.
16613         (add_include_dir_stub, read_formatted_entries): New functions.
16614         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
16615         Handle DWARF-5.
16616         (per_cu_header_read_in): Update read_comp_unit_head caller.
16617         (dwarf2_version): New function.
16618         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
16619         rnglists.
16620         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
16621         fields.
16622
16623 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
16624
16625         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
16626
16627 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
16628
16629         * dwarf2read.c (dwarf2_ranges_process): New function from
16630         dwarf2_ranges_read.
16631         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
16632         dwarf2_ranges_process.
16633
16634 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
16635
16636         * dwarf2read.c (create_debug_type_hash_table): New function from
16637         create_debug_types_hash_table.
16638         (create_debug_types_hash_table): Call create_debug_type_hash_table.
16639         (create_all_type_units, open_and_init_dwo_file): Update
16640         create_debug_types_hash_table callers.
16641
16642 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
16643
16644         PR gdb/16188
16645         * fork-child.c (trace_start_error): Fix thinko.  va_end should
16646         refer to 'ap', not 'args'.
16647
16648 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
16649             Pedro Alves  <palves@redhat.com>
16650
16651         PR gdb/16188
16652         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
16653         calls succeeded.
16654         * fork-child.c (trace_start_error): New function.
16655         (trace_start_error_with_name): Likewise.
16656         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
16657         * inf-ptrace.c (inf_ptrace_me): Likewise.
16658         * inferior.h (trace_start_error): New prototype.
16659         (trace_start_error_with_name): Likewise.
16660
16661 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
16662
16663         PR gdb/21164
16664         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
16665         NULL before using it.
16666         * symmisc.c (maintenance_print_symbols): Likewise.
16667         (maintenance_print_msymbols): Likewise.
16668
16669 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
16670
16671         * NEWS: Add record Python bindings entry.
16672
16673 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
16674
16675         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
16676         py-record-full.o.
16677         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
16678         * python/py-record-btrace.c, python/py-record-btrace.h,
16679         python/py-record-full.c, python/py-record-full.h: New file.
16680         * python/py-record.c: Add include for py-record-btrace.h and
16681         py-record-full.h.
16682         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
16683         recpy_instruction_history, recpy_function_call_history, recpy_begin,
16684         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
16685         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
16686         New definition.
16687         (gdbpy_initialize_btrace): New export.
16688         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
16689
16690 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
16691
16692         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
16693         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
16694         * python/py-record.c: New file.
16695         * python/python-internal.h (gdbpy_start_recording,
16696         gdbpy_current_recording, gdpy_stop_recording,
16697         gdbpy_initialize_record): New export.
16698         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
16699         (python_GdbMethods): Add gdbpy_start_recording,
16700         gdbpy_current_recording and gdbpy_stop_recording.
16701
16702 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
16703
16704         * record-btrace.c (record_btrace_record_method): New function.
16705         (init_record_btrace_ops): Initialize to_record_method.
16706         * record-full.c (record_full_record_method): New function.
16707         (init_record_full_ops, init_record_full_core_ops): Add
16708         record_full_record_method.
16709         * record.h (enum record_method): New enum.
16710         * target-debug.h (target_debug_print_enum_record_method: New define.
16711         * target-delegates.c: Regenerate.
16712         * target.c (target_record_method): New function.
16713         * target.h: Include record.h.
16714         (struct target_ops) <to_record_method>: New field.
16715         (target_record_method): New export.
16716
16717 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
16718
16719         * record.h (record_start, record_stop): New export.
16720         * record.c (record_start, record_stop): New function.
16721
16722 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
16723
16724         * btrace.c (btrace_fetch): Copy function call segments pointer
16725         into a vector.
16726         (btrace_clear): Clear the vector.
16727         (btrace_find_insn_by_number): Use binary search to find the correct
16728         function call segment.
16729         * btrace.h (brace_fun_p): New typedef.
16730         (struct btrace_thread_info) <functions>: New field.
16731
16732 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
16733
16734         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
16735         * btrace.c (btrace_decode_error): ... here.  New function.
16736         * btrace.h (btrace_decode_error): New export.
16737
16738 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
16739
16740         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
16741         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
16742         btrace_find_insn_by_number): Remove special case for gaps.
16743         * btrace.h (btrace_insn_get_error): New export.
16744         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
16745         * record-btrace.c (btrace_insn_history): Print number for gaps.
16746         (record_btrace_info, record_btrace_goto): Handle gaps.
16747
16748 2017-02-14  Tom Tromey  <tom@tromey.com>
16749
16750         PR python/13598:
16751         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
16752         event.
16753         * python/py-evts.c (gdbpy_initialize_py_events): Add
16754         before_prompt registry.
16755         * python/py-events.h (events_object) <before_prompt>: New field.
16756
16757 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
16758
16759         * btrace.c (ftrace_new_switch): Preserve up link and flags.
16760
16761 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
16762
16763         * symfile (_initialize_symfile): Add usage text to the load command's
16764         help text.
16765
16766 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
16767
16768         * utils.c (defaulted_query): Don't query on secondary UIs.
16769
16770 2017-02-10  Tom Tromey  <tom@tromey.com>
16771
16772         * rust-lang.c (rust_get_disr_info): Remove unused variable.
16773
16774 2017-02-10  Tom Tromey  <tom@tromey.com>
16775
16776         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
16777         "cleanup" local.
16778         * python/py-type.c (typy_legacy_template_argument): Remove
16779         unnecessary "cleanup" local.
16780
16781 2017-02-10  Tom Tromey  <tom@tromey.com>
16782
16783         * python/python.c (do_start_initialization): New function, from
16784         _initialize_python.
16785         (_initialize_python): Call do_start_initialization.
16786         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
16787         goto.
16788
16789 2017-02-10  Tom Tromey  <tom@tromey.com>
16790
16791         * python/py-prettyprint.c (pretty_print_one_value): Use
16792         gdbpy_ref.
16793
16794 2017-02-10  Tom Tromey  <tom@tromey.com>
16795
16796         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
16797         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
16798         gdbpy_ref.
16799         * python/py-type.c (field_new): Use gdbpy_ref.
16800         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
16801         gdbpy_ref.
16802         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
16803         (py_free_pspace): Likewise.
16804         (pspace_to_pspace_object): Likewise.
16805         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
16806         (py_free_objfile): Likewise.
16807         (objfile_to_objfile_object): Likewise.
16808         * python/py-inferior.c (delete_thread_object): Use
16809         gdbpy_ref.
16810         (infpy_read_memory): Likewise.
16811         (py_free_inferior): Likewise.
16812         * python/py-evtregistry.c (create_eventregistry_object): Use
16813         gdbpy_ref.
16814         * python/py-event.c (create_event_object): Use gdbpy_ref.
16815
16816 2017-02-10  Tom Tromey  <tom@tromey.com>
16817
16818         * python/py-ref.h (gdbpy_ref_policy): Now a template.
16819         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
16820         used.
16821         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
16822         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
16823         python/py-exitedevent.c, python/py-finishbreakpoint.c,
16824         python/py-framefilter.c, python/py-function.c,
16825         python/py-inferior.c, python/py-infevents.c,
16826         python/py-linetable.c, python/py-newobjfileevent.c,
16827         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
16828         python/py-signalevent.c, python/py-stopevent.c,
16829         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
16830         python/py-unwind.c, python/py-utils.c, python/py-value.c,
16831         python/py-varobj.c, python/py-xmethods.c, python/python.c,
16832         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
16833
16834 2017-02-10  Tom Tromey  <tom@tromey.com>
16835
16836         * ui-out.h (ui_out_emit_type): New class.
16837         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
16838         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
16839         and ui_out_emit_tuple.
16840         (enumerate_locals): Likewise.
16841         (py_mi_print_variables, py_print_locals, py_print_args): Use
16842         ui_out_emit_list.
16843         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
16844         ui_out_emit_list.
16845         * common/gdb_optional.h: New file.
16846
16847 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
16848
16849         * MAINTAINERS (Write After Approval): Update my e-mail address.
16850
16851 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
16852
16853         PR gdb/21122
16854         * breakpoint.c (_initialize_breakpoint): Update the help description
16855         of the 'commands' command to indicate that it takes a list argument.
16856
16857 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
16858
16859         * interps.c (current_interp_set_logging): Remove "return".
16860
16861 2017-02-09  Gary Benson  <gbenson@redhat.com>
16862
16863         * symtab.c (add_symtab_completions): Prevent NULL pointer
16864         dereference.
16865
16866 2017-02-08  Pedro Alves  <palves@redhat.com>
16867
16868         * interps.c (interp::interp): Remove reference to quiet_p.
16869         (interp_set): Make static.  Remove dead "Switching to" output
16870         code.
16871         (interp_quiet_p, interp_set_quiet): Delete.
16872         (interpreter_exec_cmd): Don't set the interpreter quiet.
16873         * interps.h (interp_quiet_p): Make static.
16874         (class interp) <quiet_p>: Remove field
16875
16876 2017-02-08  Jerome Guitton  <guitton@adacore.com>
16877
16878         * cli/cli-decode.c (find_command_name_length): Make it extern.
16879         * cli/cli-decode.h (find_command_name_length): Declare.
16880         * cli/cli-script.c (command_name_equals, line_first_arg):
16881         New functions.
16882         (process_next_line): Use cli-decode to parse command names.
16883         (build_command_line): Make args a constant pointer.
16884
16885 2017-02-08  Jerome Guitton  <guitton@adacore.com>
16886
16887         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
16888         Remove case-insensitive search.
16889
16890 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
16891
16892         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
16893         at the end of the line.  Avoids an ARI warning.
16894
16895 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
16896
16897         * NEWS: Mention support for record/replay of Intel 64 rdrand and
16898         rdseed instructions.
16899         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
16900
16901 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
16902
16903         PR tdep/20936
16904         Provide and use sparc32 and sparc64 target description XML files.
16905         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
16906         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
16907         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
16908         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
16909         * features/sparc/sparc32-solaris.xml: New file.
16910         * features/sparc/sparc64-solaris.xml: New file.
16911         * features/sparc/sparc32-solaris.c: Generated.
16912         * features/sparc/sparc64-solaris.c: Generated.
16913         * sparc-tdep.h: Account for differences in target descriptions.
16914         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
16915         (sparc32_register_type): Use target provided registers.
16916         (validate_tdesc_registers): New function.
16917         (sparc32_gdbarch_init): Use tdesc_has_registers.
16918         Set pseudoregister functions.
16919         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
16920         (sparc64_register_type): Use target provided registers.
16921         (sparc64_init_abi): Set pseudoregister functions.
16922
16923 2017-02-03  Tom Tromey  <tom@tromey.com>
16924
16925         PR rust/21097:
16926         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
16927         with a single member.
16928
16929 2017-02-03  Pedro Alves  <palves@redhat.com>
16930
16931         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
16932         (cli_interp_base::~cli_interp_base): New.
16933         (cli_interp): New struct.
16934         (as_cli_interp): Cast the interp itself to cli_interp.
16935         (cli_interpreter_pre_command_loop): Rename to ...
16936         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
16937         parameter.
16938         (cli_interpreter_init): Rename to ...
16939         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
16940         boolean.  Make extern.
16941         (cli_interpreter_resume): Rename to ...
16942         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
16943         extern.
16944         (cli_interpreter_suspend): Rename to ...
16945         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
16946         extern.
16947         (cli_interpreter_exec): Rename to ...
16948         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
16949         extern.
16950         (cli_interpreter_supports_command_editing): Rename to ...
16951         (cli_interp_base::supports_command_editing): ... this.  Remove
16952         'interp' parameter.  Make extern.
16953         (cli_ui_out): Rename to ...
16954         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
16955         Make extern.
16956         (cli_set_logging): Rename to ...
16957         (cli_interp_base::set_logging): ... this.  Remove 'interp'
16958         parameter.  Make extern.
16959         (cli_interp_procs): Delete.
16960         (cli_interp_factory): Adjust to use "new".
16961         * cli/cli-interp.h: Include "interps.h".
16962         (struct cli_interp_base): New struct.
16963         * interps.c (struct interp): Delete.  Fields moved to interps.h.
16964         (interp_new): Delete.
16965         (interp::interp, interp::~interp): New.
16966         (interp_set): Use bool, and return void.  Assume the interpreter
16967         has suspend, init and resume methods, and that the all return
16968         void.
16969         (set_top_level_interpreter): interp_set returns void.
16970         (interp_ui_out): Adapt.
16971         (current_interp_set_logging): Adapt.
16972         (interp_data): Delete.
16973         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
16974         (interp_exec): Adapt.
16975         (top_level_interpreter_data): Delete.
16976         * interps.h (interp_init_ftype, interp_resume_ftype)
16977         (interp_suspend_ftype, interp_exec_ftype)
16978         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
16979         (class interp): New.
16980         (interp_new): Delete.
16981         (interp_set): Now returns void.  Use bool.
16982         (interp_data, top_level_interpreter_data): Delete.
16983         * mi/mi-common.h: Include interps.h.
16984         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
16985         init, resume, suspect, exec, interp_ui_out, set_logging and
16986         pre_command_loop methods.
16987         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
16988         (mi_interpreter_init): Rename to ...
16989         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
16990         bool, return void and make extern.  Adjust.
16991         (mi_interpreter_resume): ... Rename to ...
16992         (mi_interp::resume): ... this.  Remove the 'data' parameter,
16993         return void and make extern.  Adjust.
16994         (mi_interpreter_suspend): ... Rename to ...
16995         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
16996         return void and make extern.  Adjust.
16997         (mi_interpreter_exec): ... Rename to ...
16998         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
16999         extern.  Adjust.
17000         (mi_interpreter_pre_command_loop): ... Rename to ...
17001         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
17002         parameter and make extern.
17003         (mi_on_normal_stop_1): Adjust.
17004         (mi_ui_out): Rename to ...
17005         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
17006         parameter and make extern.  Adjust.
17007         (mi_set_logging): Rename to ...
17008         (mi_interp::set_logging): ... this.  Remove the 'interp'
17009         parameter and make extern.  Adjust.
17010         (mi_interp_procs): Delete.
17011         (mi_interp_factory): Adjust to use 'new'.
17012         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
17013         (mi_print_exception, mi_execute_command, mi_load_progress):
17014         Adjust.
17015         * tui/tui-interp.c (tui_interp): New class.
17016         (as_tui_interp): Return a tui_interp pointer.
17017         (tui_on_normal_stop, tui_on_signal_received)
17018         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
17019         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
17020         to use interp::interp_ui_out.
17021         (tui_init): Rename to ...
17022         (tui_interp::init): ... this.  Remove the 'self' parameter, use
17023         bool, return void and make extern.  Adjust.
17024         (tui_resume): Rename to ...
17025         (tui_interp::resume): ... this.  Remove the 'data' parameter,
17026         return void and make extern.  Adjust.
17027         (tui_suspend): Rename to ...
17028         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
17029         return void and make extern.  Adjust.
17030         (tui_ui_out): Rename to ...
17031         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
17032         parameter, and make extern.  Adjust.
17033         (tui_exec): Rename to ...
17034         (tui_interp::exec): ... this.  Remove the 'data' parameter and
17035         make extern.
17036         (tui_interp_procs): Delete.
17037         (tui_interp_factory): Use "new".
17038
17039 2017-02-02  Tom Tromey  <tom@tromey.com>
17040
17041         * rust-exp.y (ends_raw_string, space_then_number)
17042         (rust_identifier_start_p): Return bool.
17043         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
17044         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
17045         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
17046         (rust_chartype_p): Return bool.
17047         (val_print_struct, rust_print_struct_def, rust_print_type):
17048         Update.
17049         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
17050         Return bool.
17051
17052 2017-02-02  Tom Tromey  <tom@tromey.com>
17053
17054         * rust-lang.c: Reindent.
17055
17056 2017-02-02  Tom Tromey  <tom@tromey.com>
17057
17058         * rust-lang.h (rust_crate_for_block): Update.
17059         * rust-lang.c (rust_crate_for_block): Return std::string.
17060         (rust_get_disr_info): Use std:;string, not
17061         gdb::unique_xmalloc_ptr.
17062         * rust-exp.y (crate_name): Update.
17063
17064 2017-02-02  Pedro Alves  <palves@redhat.com>
17065
17066         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
17067         field out of gdb_disassembler_test and make it static.
17068
17069 2017-02-02  Pedro Alves  <palves@redhat.com>
17070
17071         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
17072         mi1_interp and mi_interp fields.
17073
17074 2017-02-02  Pedro Alves  <palves@redhat.com>
17075
17076         * cli/cli-interp.c (struct saved_output_files, saved_output):
17077         Moved from cli/cli-logging.c.
17078         (cli_set_logging): New function.
17079         (cli_interp_procs): Install cli_set_logging.
17080         * cli/cli-interp.h (make_logging_output, cli_set_logging):
17081         Declare.
17082         * cli/cli-logging.c (struct saved_output_files, saved_output):
17083         Moved to cli/cli-interp.c.
17084         (pop_output_files): Don't save outputs here.
17085         (make_logging_output): New function.
17086         (handle_redirections): Don't build tee nor save previous outputs
17087         here.
17088         * interps.c (current_interp_set_logging): Change prototype.
17089         Assume there's always a set_logging_proc method installed.
17090         * interps.h (interp_set_logging_ftype): Change prototype.
17091         (current_interp_set_logging): Change prototype and adjust comment.
17092         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
17093         use make_logging_output.
17094         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
17095 2017-02-02  Pedro Alves  <palves@redhat.com>
17096
17097         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
17098         from ...
17099         (set_logging_overwrite): ... here.
17100         (logging_no_redirect_file): Delete.
17101         (set_logging_redirect): Don't handle redirection on the fly.
17102         Instead warn that "logging off" / "logging on" is necessary.
17103         (pop_output_files): Delete references to logging_no_redirect_file.
17104         (show_logging_command): Always speak in terms of what will happen
17105         once logging is reenabled.
17106
17107 2017-02-02  Pedro Alves  <palves@redhat.com>
17108
17109         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
17110
17111 2017-02-02  Pedro Alves  <palves@redhat.com>
17112
17113         * disasm.c (gdb_pretty_print_insn): Rename to ...
17114         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
17115         Remove gdbarch parameter.  Adapt to clear the object's buffers
17116         instead of allocating new buffers, and to print using the object's
17117         gdb_disassembler instead of calling gdb_print_insn.
17118         (dump_insns): Use gdb_pretty_print_disassembler.
17119         * disasm.h (gdb_pretty_print_insn): Delete declaration.
17120         (gdb_pretty_print_disassembler): New class.
17121         * record-btrace.c (btrace_insn_history): Use
17122         gdb_pretty_print_disassembler.
17123
17124 2017-02-02  Pedro Alves  <palves@redhat.com>
17125
17126         * ada-lang.c (type_as_string): Use string_file.
17127         * ada-valprint.c (ada_print_floating): Use string_file.
17128         * ada-varobj.c (ada_varobj_scalar_image)
17129         (ada_varobj_get_value_image): Use string_file.
17130         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
17131         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
17132         * breakpoint.c (update_inserted_breakpoint_locations)
17133         (insert_breakpoint_locations, reattach_breakpoints)
17134         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
17135         (print_it_watchpoint): Use string_file.
17136         (save_breakpoints): Use stdio_file.
17137         * c-exp.y (oper): Use string_file.
17138         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
17139         tee_file.
17140         (pop_output_files): Use delete.
17141         (handle_redirections): Use stdio_file and tee_file.
17142         * cli/cli-setshow.c (do_show_command): Use string_file.
17143         * compile/compile-c-support.c (c_compute_program): Use
17144         string_file.
17145         * compile/compile-c-symbols.c (generate_vla_size): Take a
17146         'string_file &' instead of a 'ui_file *'.
17147         (generate_c_for_for_one_variable): Take a 'string_file &' instead
17148         of a 'ui_file *'.  Use string_file.
17149         (generate_c_for_variable_locations): Take a 'string_file &'
17150         instead of a 'ui_file *'.
17151         * compile/compile-internal.h (generate_c_for_for_one_variable):
17152         Take a 'string_file &' instead of a 'ui_file *'.
17153         * compile/compile-loc2c.c (push, pushf, unary, binary)
17154         (print_label, pushf_register_address, pushf_register)
17155         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
17156         'ui_file *'.  Adjust.
17157         * compile/compile.c (compile_to_object): Use string_file.
17158         * compile/compile.h (compile_dwarf_expr_to_c)
17159         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
17160         'ui_file *'.
17161         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
17162         (replace_typedefs_qualified_name): Use string_file and
17163         obstack_copy0.
17164         * disasm.c (gdb_pretty_print_insn): Use string_file.
17165         (gdb_disassembly): Adjust reference the null_stream global.
17166         (do_ui_file_delete): Delete.
17167         (gdb_insn_length): Use null_stream.
17168         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
17169         * dwarf2loc.c (dwarf2_compile_property_to_c)
17170         (locexpr_generate_c_location, loclist_generate_c_location): Take a
17171         'string_file &' instead of a 'ui_file *'.
17172         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
17173         * dwarf2read.c (do_ui_file_peek_last): Delete.
17174         (dwarf2_compute_name): Use string_file.
17175         * event-top.c (gdb_setup_readline): Use stdio_file.
17176         * gdbarch.sh (verify_gdbarch): Use string_file.
17177         * gdbtypes.c (safe_parse_type): Use null_stream.
17178         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
17179         string_file.
17180         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
17181         'string_file *' instead of a 'ui_file *'.
17182         (gdbscm_arch_disassemble): Use string_file.
17183         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
17184         * guile/scm-ports.c (class ioscm_file_port): Now a class that
17185         inherits from ui_file.
17186         (ioscm_file_port_delete, ioscm_file_port_rewind)
17187         (ioscm_file_port_put): Delete.
17188         (ioscm_file_port_write): Rename to ...
17189         (ioscm_file_port::write): ... this.  Remove file_port_magic
17190         checks.
17191         (ioscm_file_port_new): Delete.
17192         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
17193         ui_file_up.
17194         * guile/scm-type.c (tyscm_type_name): Use string_file.
17195         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
17196         Use string_file.
17197         * infcmd.c (print_return_value_1): Use string_file.
17198         * infrun.c (print_target_wait_results): Use string_file.
17199         * language.c (add_language): Use string_file.
17200         * location.c (explicit_to_string_internal): Use string_file.
17201         * main.c (captured_main_1): Use null_file.
17202         * maint.c (maintenance_print_architecture): Use stdio_file.
17203         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
17204         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
17205         event_channel>: Change type to mi_console_file pointer.
17206         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
17207         (mi_console_file_delete): Delete.
17208         (struct mi_console_file): Delete.
17209         (mi_console_file_magic): Delete.
17210         (mi_console_file_new): Delete.
17211         (mi_console_file::mi_console_file): New.
17212         (mi_console_file_delete): Delete.
17213         (mi_console_file_fputs): Delete.
17214         (mi_console_file::write): New.
17215         (mi_console_raw_packet): Delete.
17216         (mi_console_file::flush): New.
17217         (mi_console_file_flush): Delete.
17218         (mi_console_set_raw): Rename to ...
17219         (mi_console_file::set_raw): ... this.
17220         * mi/mi-console.h (class mi_console_file): New class.
17221         (mi_console_file_new, mi_console_set_raw): Delete.
17222         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
17223         (mi_set_logging): Use delete and tee_file.  Adjust.
17224         * mi/mi-main.c (output_register): Use string_file.
17225         (mi_cmd_data_evaluate_expression): Use string_file.
17226         (mi_cmd_data_read_memory): Use string_file.
17227         (mi_cmd_execute, print_variable_or_computed): Use string_file.
17228         * mi/mi-out.c (mi_ui_out::main_stream): New.
17229         (mi_ui_out::rewind): Use main_stream and
17230         string_file.
17231         (mi_ui_out::put): Use main_stream and string_file.
17232         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
17233         Allocate a 'string_file' instead.
17234         (mi_out_new): Don't allocate a mem_fileopen stream here.
17235         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
17236         (mi_ui_out::main_stream): Declare method.
17237         * printcmd.c (eval_command): Use string_file.
17238         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
17239         * python/py-arch.c (archpy_disassemble): Use string_file.
17240         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
17241         * python/py-frame.c (frapy_str): Use string_file.
17242         * python/py-framefilter.c (py_print_type, py_print_single_arg):
17243         Use string_file.
17244         * python/py-type.c (typy_str): Use string_file.
17245         * python/py-unwind.c (unwind_infopy_str): Use string_file.
17246         * python/py-value.c (valpy_str): Use string_file.
17247         * record-btrace.c (btrace_insn_history): Use string_file.
17248         * regcache.c (regcache_print): Use stdio_file.
17249         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
17250         * remote.c (escape_buffer): Use string_file.
17251         * rust-lang.c (rust_get_disr_info): Use string_file.
17252         * serial.c (serial_open_ops_1): Use stdio_file.
17253         (do_serial_close): Use delete.
17254         * stack.c (print_frame_arg): Use string_file.
17255         (print_frame_args): Remove local mem_fileopen stream, not used.
17256         (print_frame): Use string_file.
17257         * symmisc.c (maintenance_print_symbols): Use stdio_file.
17258         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
17259         Take a 'string_file *' instead of a 'ui_file *'.
17260         * top.c (new_ui): Use stdio_file and stderr_file.
17261         (free_ui): Use delete.
17262         (execute_command_to_string): Use string_file.
17263         (quit_confirm): Use string_file.
17264         * tracepoint.c (collection_list::append_exp): Use string_file.
17265         * tui/tui-disasm.c (tui_disassemble): Use string_file.
17266         * tui/tui-file.c: Don't include "ui-file.h".
17267         (enum streamtype, struct tui_stream): Delete.
17268         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
17269         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
17270         (tui_file::tui_file): New method.
17271         (tui_file_fputs): Delete.
17272         (tui_file_get_strbuf): Delete.
17273         (tui_file::puts): New method.
17274         (tui_file_adjust_strbuf): Delete.
17275         (tui_file_flush): Delete.
17276         (tui_file::flush): New method.
17277         * tui/tui-file.h: Tweak intro comment.
17278         Include ui-file.h.
17279         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
17280         (tui_file_adjust_strbuf): Delete declarations.
17281         (class tui_file): New class.
17282         * tui/tui-io.c (tui_initialize_io): Use tui_file.
17283         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
17284         (tui_register_format): Use string_stream.
17285         * tui/tui-stack.c (tui_make_status_line): Use string_file.
17286         (tui_get_function_from_frame): Use string_file.
17287         * typeprint.c (type_to_string): Use string_file.
17288         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
17289         (null_stream): New global.
17290         (ui_file_delete): Delete.
17291         (ui_file::ui_file): New.
17292         (null_file_isatty): Delete.
17293         (ui_file::~ui_file): New.
17294         (null_file_rewind): Delete.
17295         (ui_file::printf): New.
17296         (null_file_put): Delete.
17297         (null_file_flush): Delete.
17298         (ui_file::putstr): New.
17299         (null_file_write): Delete.
17300         (ui_file::putstrn): New.
17301         (null_file_read): Delete.
17302         (ui_file::putc): New.
17303         (null_file_fputs): Delete.
17304         (null_file_write_async_safe): Delete.
17305         (ui_file::vprintf): New.
17306         (null_file_delete): Delete.
17307         (null_file::write): New.
17308         (null_file_fseek): Delete.
17309         (null_file::puts): New.
17310         (ui_file_data): Delete.
17311         (null_file::write_async_safe): New.
17312         (gdb_flush, ui_file_isatty): Adjust.
17313         (ui_file_put, ui_file_rewind): Delete.
17314         (ui_file_write): Adjust.
17315         (ui_file_write_for_put): Delete.
17316         (ui_file_write_async_safe, ui_file_read): Adjust.
17317         (ui_file_fseek): Delete.
17318         (fputs_unfiltered): Adjust.
17319         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
17320         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
17321         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
17322         (set_ui_file_data): Delete.
17323         (string_file::~string_file, string_file::write)
17324         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
17325         (do_ui_file_as_string, ui_file_as_string): Delete.
17326         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
17327         (struct mem_file): Delete.
17328         (mem_file_new): Delete.
17329         (stdio_file::stdio_file): New.
17330         (mem_file_delete): Delete.
17331         (stdio_file::stdio_file): New.
17332         (mem_fileopen): Delete.
17333         (stdio_file::~stdio_file): New.
17334         (mem_file_rewind): Delete.
17335         (stdio_file::set_stream): New.
17336         (mem_file_put): Delete.
17337         (stdio_file::open): New.
17338         (mem_file_write): Delete.
17339         (stdio_file_magic, struct stdio_file): Delete.
17340         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
17341         (stdio_file::flush): New.
17342         (stdio_file_read): Rename to ...
17343         (stdio_file::read): ... this.  Adjust.
17344         (stdio_file_write): Rename to ...
17345         (stdio_file::write): ... this.  Adjust.
17346         (stdio_file_write_async_safe): Rename to ...
17347         (stdio_file::write_async_safe) ... this.  Adjust.
17348         (stdio_file_fputs): Rename to ...
17349         (stdio_file::puts) ... this.  Adjust.
17350         (stdio_file_isatty): Delete.
17351         (stdio_file_fseek): Delete.
17352         (stdio_file::isatty): New.
17353         (stderr_file_write): Rename to ...
17354         (stderr_file::write) ... this.  Adjust.
17355         (stderr_file_fputs): Rename to ...
17356         (stderr_file::puts) ... this.  Adjust.
17357         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
17358         (stderr_file::stderr_file): New.
17359         (tee_file_magic): Delete.
17360         (struct tee_file): Delete.
17361         (tee_file::tee_file): New.
17362         (tee_file_new): Delete.
17363         (tee_file::~tee_file): New.
17364         (tee_file_delete): Delete.
17365         (tee_file_flush): Rename to ...
17366         (tee_file::flush): ... this.  Adjust.
17367         (tee_file_write): Rename to ...
17368         (tee_file::write): ... this.  Adjust.
17369         (tee_file::write_async_safe): New.
17370         (tee_file_fputs): Rename to ...
17371         (tee_file::puts): ... this.  Adjust.
17372         (tee_file_isatty): Rename to ...
17373         (tee_file::isatty): ... this.  Adjust.
17374         * ui-file.h (struct obstack, struct ui_file): Don't
17375         forward-declare.
17376         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
17377         (ui_file_write_ftype)
17378         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
17379         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
17380         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
17381         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
17382         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
17383         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
17384         (set_ui_file_fseek): Delete.
17385         (ui_file_data, ui_file_delete, ui_file_rewind)
17386         (struct ui_file): New.
17387         (ui_file_up): New.
17388         (class null_file): New.
17389         (null_stream): Declare.
17390         (ui_file_write_for_put, ui_file_put): Delete.
17391         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
17392         Delete.
17393         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
17394         (gdb_fopen, tee_file_new): Delete.
17395         (struct string_file): New.
17396         (struct stdio_file): New.
17397         (stdio_file_up): New.
17398         (struct stderr_file): New.
17399         (class tee_file): New.
17400         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
17401         of a 'ui_file *'.  Adjust.
17402         * ui-out.h (class ui_out) <field_stream>: Likewise.
17403         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
17404         (null_stream): Delete.
17405         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
17406         Adjust.
17407         * utils.h (struct ui_file): Delete forward declaration..
17408         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
17409         (error_stream): Take a 'string_file &' instead of a
17410         'ui_file *'.
17411         * varobj.c (varobj_value_get_print_value): Use string_file.
17412         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
17413         * gdbarch.c: Regenerate.
17414
17415 2017-02-02  Pedro Alves  <palves@redhat.com>
17416
17417         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
17418         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
17419         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
17420         Adjust to call gdb_print_insn instead of
17421         gdb_disassembler::print_insn.
17422         (dump_insns, do_mixed_source_and_assembly_deprecated)
17423         (do_mixed_source_and_assembly, do_assembly_only): Add back a
17424         'gdbarch' parameter.  Remove gdb_disassembler parameter.
17425         (gdb_disassembly): Don't allocate a gdb_disassembler here.
17426         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
17427         declaration.
17428         (gdb_pretty_print_insn): Re-add declaration.
17429         * record-btrace.c (btrace_insn_history): Don't allocate a
17430         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
17431
17432 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
17433
17434         * disasm.h (gdb_disassembly): Remove file_string parameter.
17435         * disasm.c (gdb_disassembly): Likewise.
17436         * cli/cli-cmds.c (print_disassembly): Adapt.
17437         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
17438         * stack.c (do_gdb_disassembly): Likewise.
17439
17440 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
17441
17442         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
17443         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
17444         targets.  And if the implicit value is longer than needed, extract
17445         the first bytes instead of the "least significant" ones.
17446
17447 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
17448
17449         * btrace.c (btrace_enable): Do not call btrace_add_pc for
17450         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
17451         (btrace_fetch): Assert can_access_registers_ptid.
17452         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
17453         validate_registers_access.
17454
17455 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
17456
17457         * gdbthread.h (can_access_registers_ptid): New.
17458         * thread.c (can_access_registers_ptid): New.
17459
17460 2017-02-01  Pedro Alves  <palves@redhat.com>
17461
17462         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
17463
17464 2017-01-31  Pedro Alves  <palves@redhat.com>
17465
17466         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
17467         Fix typos.
17468
17469 2017-01-31  Pedro Alves  <palves@redhat.com>
17470
17471         * stack.c (print_frame_args): Remove local mem_fileopen stream,
17472         not used.
17473
17474 2017-01-31  Pedro Alves  <palves@redhat.com>
17475
17476         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
17477
17478 2017-01-31  Pedro Alves  <palves@redhat.com>
17479
17480         * common/scoped_restore.h
17481         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
17482         change the value's parameter type to T2.
17483         (make_scoped_restore): Likewise.
17484
17485 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
17486             Richard Henderson  <rth@redhat.com>
17487
17488         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
17489         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
17490         GS_BASE for older kernels.
17491         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
17492         GS_BASE for older kernels.
17493         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
17494         and GS_BASE to the offset table.
17495         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
17496         system register group.
17497         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
17498         for older kernels.
17499         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
17500         amd64 ABI.
17501         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
17502         AMD64_GSBASE_REGNUM.
17503         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
17504         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
17505         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
17506         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
17507         i386/64bit-segments.xml in those rules.
17508         * features/i386/64bit-segments.xml: New file.
17509         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
17510         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
17511         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
17512         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
17513         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
17514         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
17515         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
17516         * features/i386/amd64-avx-linux.c: Regenerated.
17517         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
17518         * features/i386/amd64-avx-mpx.c: Regenerated.
17519         * features/i386/amd64-avx512-linux.c: Regenerated.
17520         * features/i386/amd64-linux.c: Regenerated.
17521         * features/i386/amd64-mpx-linux.c: Regenerated.
17522         * features/i386/i386-avx-mpx-linux.c: Regenerated.
17523         * features/i386/i386-avx-mpx.c: Regenerated.
17524         * features/i386/x32-avx-linux.c: Regenerated.
17525         * features/i386/x32-avx512-linux.c: Regenerated.
17526         * regformats/i386/amd64-avx-linux.dat: Regenerated.
17527         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
17528         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
17529         * regformats/i386/amd64-linux.dat: Regenerated.
17530         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
17531         * regformats/i386/x32-avx-linux.dat: Regenerated.
17532         * regformats/i386/x32-avx512-linux.dat: Regenerated.
17533         * regformats/i386/x32-linux.dat: Regenerated.
17534
17535 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
17536
17537         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
17538         Set to AMD64_NUM_REGS.
17539
17540 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
17541
17542         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
17543         that checks validity of a register number.
17544
17545 2017-01-27  Kees Cook  <keescook@google.com>
17546
17547         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
17548         fetch_fpregs if target has fpa registers.
17549         (arm_linux_store_inferior_registers): Call store_fpregs if target
17550         has fpa registers.
17551
17552 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
17553
17554         * cris-tdep.c (cris_gdbarch_init): Remove check for
17555         info.byte_order and force it to BFD_ENDIAN_LITTLE.
17556
17557 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
17558
17559         * corelow.c (get_core_register_section): Check for regset
17560         existence before checking for REGSET_VARIABLE_SIZE.
17561
17562 2017-01-26  Yao Qi  <yao.qi@linaro.org>
17563             Pedro Alves  <palves@redhat.com>
17564
17565         PR gdb/20939
17566         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
17567         call memory_error, save memaddr instead.
17568         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
17569         negative, cal memory_error.
17570         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
17571
17572 2017-01-26  Yao Qi  <yao.qi@linaro.org>
17573
17574         * disasm-selftests.c (memory_error_test): New function.
17575         (_initialize_disasm_selftests): Register memory_error_test.
17576
17577 2017-01-26  Yao Qi  <yao.qi@linaro.org>
17578
17579         * Makefile.in (SFILES): Add disasm-selftests.c and
17580         selftest-arch.c.
17581         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
17582         * disasm-selftests.c: New file.
17583         * selftest-arch.c: New file.
17584         * selftest-arch.h: New file.
17585
17586 2017-01-26  Yao Qi  <yao.qi@linaro.org>
17587
17588         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
17589         to bfd_arch_mep.  Don't return 0 if section is not
17590         found.  Call print_insn_mep.
17591
17592 2017-01-26  Pedro Alves  <palves@redhat.com>
17593             Yao Qi  <yao.qi@linaro.org>
17594
17595         * arm-tdep.c: Include "disasm.h".
17596         (gdb_print_insn_arm): Update code to get gdbarch.
17597         * disasm.c (dis_asm_read_memory): Change it to
17598         gdb_disassembler::dis_asm_read_memory.
17599         (dis_asm_memory_error): Likewise.
17600         (dis_asm_print_address): Likewise.
17601         (gdb_pretty_print_insn): Change it to
17602         gdb_disassembler::pretty_print_insn.
17603         (dump_insns): Add one argument gdb_disassemlber.  All
17604         callers updated.
17605         (do_mixed_source_and_assembly_deprecated): Likewise.
17606         (do_mixed_source_and_assembly): Likewise.
17607         (do_assembly_only): Likewise.
17608         (gdb_disassembler::gdb_disassembler): New.
17609         (gdb_disassembler::print_insn): New.
17610         * disasm.h (class gdb_disassembler): New.
17611         (gdb_pretty_print_insn): Remove declaration.
17612         (gdb_disassemble_info): Likewise.
17613         * guile/scm-disasm.c (class gdbscm_disassembler): New.
17614         (gdbscm_disasm_read_memory_worker): Update.
17615         (gdbscm_disasm_read_memory): Update.
17616         (gdbscm_disasm_memory_error): Remove.
17617         (gdbscm_disasm_print_address): Remove.
17618         (gdbscm_disassembler::gdbscm_disassembler): New.
17619         (gdbscm_print_insn_from_port): Update.
17620         * mips-tdep.c: Include disasm.h.
17621         (gdb_print_insn_mips): Update code to get gdbarch.
17622         * record-btrace.c (btrace_insn_history): Update.
17623         * spu-tdep.c: Include disasm.h.
17624         (struct spu_dis_asm_data): Remove.
17625         (struct spu_dis_asm_info): New.
17626         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
17627         SPU id.
17628         (gdb_print_insn_spu): Cast disassemble_info to
17629         spu_dis_asm_info.
17630
17631 2017-01-26  Yao Qi  <yao.qi@linaro.org>
17632
17633         * disasm.c (do_ui_file_delete): Delete.
17634         (gdb_insn_length): Move code creating stream to ...
17635         * utils.c (null_stream): ... here.  New function.
17636         * utils.h (null_stream): Declare.
17637
17638 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
17639
17640         * python/py-inferior.c (find_thread_object): Return directly
17641         from the loop.  Remove "found" variable.
17642
17643 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
17644
17645         GDB 7.12.1 released.
17646
17647 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
17648
17649         * python/py-function.c (fnpy_call): Reorder declarations to have
17650         the gdbpy_enter object declared first.
17651         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
17652
17653 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
17654
17655         PR python/21068
17656         * python/python-internal.h (PyMem_RawMalloc): Define for
17657         Python < 3.4.
17658         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
17659         PyMem_RawMalloc instead of PyMem_Malloc.
17660
17661 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
17662             Luis Machado  <lgustavo@codesourcery.com>
17663
17664         * NEWS (New commands): Mention flash-erase.
17665         (New MI commands): Mention target-flash-erase.
17666         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
17667         command.
17668         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
17669         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
17670         * target.c (flash_erase_command): New function.
17671         (initialize_targets): Add new flash-erase command.
17672         * target.h (flash_erase_command): New declaration.
17673
17674 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
17675
17676         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
17677         HAVE_SYS_PROCFS_H is defined.
17678
17679 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
17680
17681         * remote.c (struct cached_reg): Change data into a pointer.
17682         * (stop_reply_dtr): Free data pointers before deleting vector.
17683         (process_stop_reply): Likewise.
17684         (remote_parse_stop_reply): Allocate space for data
17685
17686 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
17687
17688         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
17689         MAX_REGISTER_SIZE.
17690         (amd64_pseudo_register_read_value): Likewise.
17691         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
17692         (store_register_using_P): Likewise.
17693         * regcache.c (regcache_xfer_part): Likewise.
17694
17695 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
17696
17697         Split real and pseudo registers.
17698         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
17699         (sparc32_pseudo_regnum): New enum.
17700         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
17701         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
17702         (SPARC32_CP0_REGISTERS): New macro.
17703         (sparc32_pseudo_register_name): New function.
17704         (sparc32_register_name): Use sparc32_pseudo_register_name.
17705         (sparc32_pseudo_register_type): New function.
17706         (sparc32_register_type): Use sparc32_pseudo_register_type.
17707         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
17708         pseudo register numbers.
17709         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
17710         (SPARC64_CP0_REGISTERS): New macro.
17711         (sparc64_pseudo_register_name): New function.
17712         (sparc64_register_name): Use sparc64_pseudo_register_name.
17713         (sparc64_pseudo_register_type): New function.
17714         (sparc64_register_type): Use sparc64_pseudo_register_type.
17715         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
17716         pseudo register numbers.
17717         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
17718         sparc64_store_arguments): Handle pseudo register numbers.
17719
17720 2017-01-13  Yao Qi  <yao.qi@linaro.org>
17721
17722         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
17723         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
17724         output.
17725         (getpkt_or_notif_sane_1): Likewise.
17726
17727 2017-01-13  Yao Qi  <yao.qi@linaro.org>
17728
17729         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
17730         of CC.  Pass "-x c++-header" instead of "-x c".
17731
17732 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
17733
17734         * remote.c (remote_can_async_p): Update comment.
17735
17736 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
17737
17738         * linux-nat.c (linux_nat_can_async_p): Update comment.
17739
17740 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
17741
17742         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
17743
17744 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
17745
17746         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
17747
17748 2017-01-10  Tom Tromey  <tom@tromey.com>
17749
17750         * python/py-type.c (typy_legacy_template_argument): Update.
17751         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
17752         ~demangle_parse_info): Declare new members.
17753         (cp_demangled_name_to_comp): Return unique_ptr.
17754         (cp_demangled_name_parse_free)
17755         (make_cleanup_cp_demangled_name_parse_free)
17756         (cp_new_demangle_parse_info): Remove.
17757         * cp-support.c (do_demangled_name_parse_free_cleanup)
17758         (make_cleanup_cp_demangled_name_parse_free): Remove.
17759         (inspect_type, cp_canonicalize_string_full)
17760         (cp_canonicalize_string): Update.
17761         (mangled_name_to_comp): Change return type.
17762         (cp_class_name_from_physname, method_name_from_physname)
17763         (cp_func_name, cp_remove_params): Update.
17764         * cp-name-parser.y (demangle_parse_info): New constructor, from
17765         cp_new_demangle_parse_info.
17766         (~demangle_parse_info): New destructor, from
17767         cp_demangled_name_parse_free.
17768         (cp_merge_demangle_parse_infos): Update.
17769         (cp_demangled_name_to_comp): Change return type.
17770
17771 2017-01-10  Tom Tromey  <tom@tromey.com>
17772
17773         * top.c (prevent_dont_repeat): Change return type.
17774         * python/python.c (execute_gdb_command): Use std::string.
17775         Update.
17776         * guile/guile.c (gdbscm_execute_gdb_command): Update.
17777         * command.h (prevent_dont_repeat): Change return type.
17778         * breakpoint.c (bpstat_do_actions_1): Update.
17779
17780 2017-01-10  Tom Tromey  <tom@tromey.com>
17781
17782         * value.h (scoped_value_mark::~scoped_value_mark): Call
17783         free_to_mark.
17784         (scoped_value_mark::free_to_mark): New method.
17785         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
17786         scoped_value_mark.
17787
17788 2017-01-10  Tom Tromey  <tom@tromey.com>
17789
17790         * python/py-value.c (valpy_dereference, valpy_referenced_value)
17791         (valpy_reference_value, valpy_const_value, valpy_get_address)
17792         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
17793         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
17794         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
17795         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
17796         scoped_value_mark.
17797         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
17798         * value.h (scoped_value_mark): New class.
17799
17800 2017-01-10  Tom Tromey  <tom@tromey.com>
17801
17802         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
17803         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
17804         * psymtab.c (discard_psymtabs_upto): Remove.
17805         (make_cleanup_discard_psymtabs): Remove.
17806         (struct psymtab_state): Remove.
17807
17808 2017-01-10  Tom Tromey  <tom@tromey.com>
17809
17810         * record-full.c (record_full_save_cleanups): Remove.
17811         (record_full_save): Use gdb::unlinker.
17812         * gcore.c (do_bfd_delete_cleanup): Remove.
17813         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
17814         cleanups.
17815         * dwarf2read.c (unlink_if_set): Remove.
17816         (write_psymtabs_to_index): Use gdb::unlinker.
17817         * common/gdb_unlinker.h: New file.
17818
17819 2017-01-10  Tom Tromey  <tom@tromey.com>
17820
17821         * windows-tdep.c (windows_xfer_shared_library): Update.
17822         * windows-nat.c (windows_make_so): Update.
17823         * utils.h (make_cleanup_bfd_unref): Remove.
17824         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
17825         * symfile.h (symfile_bfd_open)
17826         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
17827         * symfile.c (read_symbols, symbol_file_add)
17828         (separate_debug_file_exists): Update.
17829         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
17830         (generic_load, reread_symbols): Update.
17831         * symfile-mem.c (symbol_file_add_from_memory): Update.
17832         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
17833         (spu_symbol_file_add_from_memory): Update.
17834         * solist.h (struct target_so_ops) <bfd_open>: Return
17835         gdb_bfd_ref_ptr.
17836         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
17837         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
17838         gdb_bfd_ref_ptr.
17839         (solib_map_sections, reload_shared_libraries_1): Update.
17840         * solib-svr4.c (enable_break): Update.
17841         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
17842         * solib-frv.c (enable_break2): Update.
17843         * solib-dsbt.c (enable_break): Update.
17844         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
17845         gdb_bfd_ref_ptr.
17846         (darwin_solib_get_all_image_info_addr_at_init): Update.
17847         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
17848         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
17849         * record-full.c (record_full_save): Update.
17850         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
17851         * procfs.c (insert_dbx_link_bpt_in_file): Update.
17852         * minidebug.c (find_separate_debug_file_in_section): Return
17853         gdb_bfd_ref_ptr.
17854         * machoread.c (macho_add_oso_symfile): Change abfd to
17855         gdb_bfd_ref_ptr.
17856         (macho_symfile_read_all_oso): Update.
17857         (macho_check_dsym): Return gdb_bfd_ref_ptr.
17858         (macho_symfile_read): Update.
17859         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
17860         (jit_bfd_try_read_symtab): Update.
17861         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
17862         (gdb_bfd_openw, gdb_bfd_openr_iovec)
17863         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
17864         gdb_bfd_ref_ptr.
17865         (gdb_bfd_ref_policy): New struct.
17866         (gdb_bfd_ref_ptr): New typedef.
17867         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
17868         (gdb_bfd_openw, gdb_bfd_openr_iovec)
17869         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
17870         gdb_bfd_ref_ptr.
17871         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
17872         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
17873         (gcore_command): Update.
17874         * exec.c (exec_file_attach): Update.
17875         * elfread.c (elf_symfile_read): Update.
17876         * dwarf2read.c (dwarf2_get_dwz_file): Update.
17877         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
17878         (open_and_init_dwo_file): Update.
17879         (open_dwp_file): Return gdb_bfd_ref_ptr.
17880         (open_and_init_dwp_file): Update.
17881         * corelow.c (core_open): Update.
17882         * compile/compile-object-load.c (compile_object_load): Update.
17883         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
17884         * coffread.c (coff_symfile_read): Update.
17885         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
17886         gdb_bfd_ref_ptr.  Rename.
17887         (dump_bfd_file, restore_command): Update.
17888         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
17889         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
17890         (find_separate_debug_file_by_buildid): Update.
17891
17892 2017-01-10  Tom Tromey  <tom@tromey.com>
17893
17894         * common/gdb_ref_ptr.h: New file.
17895         * python/py-ref.h (struct gdbpy_ref_policy): New.
17896         (gdbpy_ref): Now a typedef.
17897
17898 2017-01-10  Tom Tromey  <tom@tromey.com>
17899
17900         * utils.h (make_cleanup_htab_delete): Don't declare.
17901         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
17902         Remove.
17903         * linespec.c (decode_compound_collector): Add constructor,
17904         destructor.
17905         (lookup_prefix_sym): Remove cleanup.
17906         (symtab_collector): Add constructor, destructor.
17907         (collect_symtabs_from_filename): Remove cleanup.
17908         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
17909         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
17910         Use htab_up.
17911         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
17912         * dwarf2read.c (dw2_expand_symtabs_matching)
17913         (dw2_map_symbol_filenames, dwarf_decode_macros)
17914         (write_psymtabs_to_index): Use htab_up.
17915         * dwarf2loc.c (func_verify_no_selftailcall)
17916         (call_site_find_chain_1, func_verify_no_selftailcall)
17917         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
17918         std::vector, gdb::unique_xmalloc_ptr.
17919         (call_sitep): Remove typedef.
17920         (dwarf2_locexpr_baton_eval): Remove unused variable.
17921
17922 2017-01-10  Tom Tromey  <tom@tromey.com>
17923
17924         * python/python-internal.h (make_cleanup_py_decref)
17925         (make_cleanup_py_xdecref): Don't declare.
17926         * python/py-utils.c (py_decref, make_cleanup_py_decref)
17927         (py_xdecref, make_cleanup_py_xdecref): Remove.
17928
17929 2017-01-10  Tom Tromey  <tom@tromey.com>
17930
17931         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
17932         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
17933
17934 2017-01-10  Tom Tromey  <tom@tromey.com>
17935
17936         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
17937
17938 2017-01-10  Tom Tromey  <tom@tromey.com>
17939
17940         * python/py-utils.c (unicode_to_encoded_string)
17941         (python_string_to_target_string)
17942         (python_string_to_target_python_string)
17943         (python_string_to_host_string, gdbpy_obj_to_string)
17944         (get_addr_from_python): Use gdbpy_ref.
17945
17946 2017-01-10  Tom Tromey  <tom@tromey.com>
17947
17948         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
17949         gdbpy_ref.
17950
17951 2017-01-10  Tom Tromey  <tom@tromey.com>
17952
17953         * python/python.c (eval_python_command, gdbpy_decode_line)
17954         (gdbpy_run_events, gdbpy_start_type_printers)
17955         (gdbpy_apply_type_printers): Use gdbpy_ref.
17956
17957 2017-01-10  Tom Tromey  <tom@tromey.com>
17958
17959         * python/py-param.c (get_doc_string, compute_enum_values): Use
17960         gdbpy_ref.
17961
17962 2017-01-10  Tom Tromey  <tom@tromey.com>
17963
17964         * python/py-inferior.c (find_thread_object, build_inferior_list):
17965         Use gdbpy_ref.
17966
17967 2017-01-10  Tom Tromey  <tom@tromey.com>
17968
17969         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
17970
17971 2017-01-10  Tom Tromey  <tom@tromey.com>
17972
17973         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
17974         gdbpy_ref.
17975
17976 2017-01-10  Tom Tromey  <tom@tromey.com>
17977
17978         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
17979         extra incref.
17980         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
17981         Use gdbpy_ref.
17982
17983 2017-01-10  Tom Tromey  <tom@tromey.com>
17984
17985         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
17986         gdbpy_ref.
17987
17988 2017-01-10  Tom Tromey  <tom@tromey.com>
17989
17990         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
17991         decref results of PyArg_ParseTupleAndKeywords.
17992
17993 2017-01-10  Tom Tromey  <tom@tromey.com>
17994
17995         * python/python.c (python_run_simple_file): Use
17996         unique_xmalloc_ptr, gdbpy_ref.
17997
17998 2017-01-10  Tom Tromey  <tom@tromey.com>
17999
18000         * python/py-prettyprint.c (print_stack_unless_memory_error)
18001         (print_string_repr, print_children): Use gdbpy_ref.
18002         (dummy_python_frame): New class.
18003         (dummy_python_frame::dummy_python_frame): Rename from
18004         push_dummy_python_frame.
18005         (py_restore_tstate): Remove.
18006
18007 2017-01-10  Tom Tromey  <tom@tromey.com>
18008
18009         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
18010
18011 2017-01-10  Tom Tromey  <tom@tromey.com>
18012
18013         * python/python.c (ensure_python_env, restore_python_env):
18014         Remove.
18015         * python/python-internal.h (ensure_python_env): Don't declare.
18016         * varobj.h (varobj_ensure_python_env): Don't declare.
18017         * varobj.c (varobj_ensure_python_env): Remove.
18018
18019 2017-01-10  Tom Tromey  <tom@tromey.com>
18020
18021         * varobj.c (varobj_value_get_print_value): Use
18022         gdbpy_enter_varobj.
18023
18024 2017-01-10  Tom Tromey  <tom@tromey.com>
18025
18026         * python/py-prettyprint.c (print_string_repr, print_children):
18027         Update.
18028         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
18029         of "encoding".
18030         * varobj.c (varobj_value_get_print_value): Update.
18031         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
18032
18033 2017-01-10  Tom Tromey  <tom@tromey.com>
18034
18035         * varobj.c (varobj_get_display_hint)
18036         (dynamic_varobj_has_child_method, install_new_value_visualizer)
18037         (varobj_set_visualizer, free_variable): Use
18038         gdbpy_enter_varobj.
18039
18040 2017-01-10  Tom Tromey  <tom@tromey.com>
18041
18042         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
18043         (do_finish_initialization): New function.  Use gdbpy_ref.
18044         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
18045         do_finish_initialization.
18046
18047 2017-01-10  Tom Tromey  <tom@tromey.com>
18048
18049         * python/py-param.c (get_set_value, get_show_value): Use
18050         gdbpy_enter, gdbpy_ref.
18051
18052 2017-01-10  Tom Tromey  <tom@tromey.com>
18053
18054         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
18055
18056 2017-01-10  Tom Tromey  <tom@tromey.com>
18057
18058         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
18059
18060 2017-01-10  Tom Tromey  <tom@tromey.com>
18061
18062         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
18063         Use gdbpy_enter_varobj.
18064
18065 2017-01-10  Tom Tromey  <tom@tromey.com>
18066
18067         * varobj.c (gdbpy_enter_varobj): New constructor.
18068         * python/python-internal.h (gdbpy_enter_varobj): New class.
18069         * python/py-varobj.c (py_varobj_get_iterator): Use
18070         gdbpy_enter_varobj.
18071
18072 2017-01-10  Tom Tromey  <tom@tromey.com>
18073
18074         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
18075         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
18076         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
18077         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
18078         unique_xmalloc_ptr.
18079         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
18080
18081 2017-01-10  Tom Tromey  <tom@tromey.com>
18082
18083         * python/py-xmethods.c (invoke_match_method): Use
18084         gdbpy_ref.
18085
18086 2017-01-10  Tom Tromey  <tom@tromey.com>
18087
18088         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
18089         gdbpy_enter, gdbpy_ref.
18090
18091 2017-01-10  Tom Tromey  <tom@tromey.com>
18092
18093         * python/python.c (python_interactive_command): Use gdbpy_enter.
18094
18095 2017-01-10  Tom Tromey  <tom@tromey.com>
18096
18097         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
18098         gdbpy_ref.
18099
18100 2017-01-10  Tom Tromey  <tom@tromey.com>
18101
18102         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
18103         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
18104
18105 2017-01-10  Tom Tromey  <tom@tromey.com>
18106
18107         * utils.h (htab_deleter): New struct.
18108         (htab_up): New typedef.
18109         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
18110         gdbpy_enter, gdbpy_ref, htab_up.
18111
18112 2017-01-10  Tom Tromey  <tom@tromey.com>
18113
18114         * python/py-unwind.c (pending_frame_invalidate): Remove.
18115         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
18116
18117 2017-01-10  Tom Tromey  <tom@tromey.com>
18118
18119         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
18120         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
18121
18122 2017-01-10  Tom Tromey  <tom@tromey.com>
18123
18124         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
18125
18126 2017-01-10  Tom Tromey  <tom@tromey.com>
18127
18128         * python/python.c (gdbpy_eval_from_control_command)
18129         (gdbpy_source_script, gdbpy_run_events)
18130         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
18131         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
18132         gdbpy_enter.
18133
18134 2017-01-10  Tom Tromey  <tom@tromey.com>
18135
18136         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
18137
18138 2017-01-10  Tom Tromey  <tom@tromey.com>
18139
18140         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
18141
18142 2017-01-10  Tom Tromey  <tom@tromey.com>
18143
18144         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
18145         (python_on_inferior_call_pre, python_on_inferior_call_post)
18146         (python_on_memory_change, python_on_register_change)
18147         (python_inferior_exit, python_new_objfile, add_thread_object)
18148         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
18149
18150 2017-01-10  Tom Tromey  <tom@tromey.com>
18151
18152         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
18153         (bpfinishpy_handle_exit): Use gdbpy_enter.
18154
18155 2017-01-10  Tom Tromey  <tom@tromey.com>
18156
18157         * python/py-cmd.c (cmdpy_destroyer)
18158         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
18159         gdbpy_enter.
18160
18161 2017-01-10  Tom Tromey  <tom@tromey.com>
18162
18163         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
18164         gdbpy_enter.
18165         (gdbpy_breakpoint_has_cond): Likewise.
18166
18167 2017-01-10  Tom Tromey  <tom@tromey.com>
18168
18169         * python/python.c (gdbpy_enter): New constructor.
18170         (~gdbpy_enter): New destructor.
18171         (restore_python_env, ensure_python_env): Rewrite.
18172         * python/python-internal.h (gdbpy_enter): New class.
18173
18174 2017-01-10  Tom Tromey  <tom@tromey.com>
18175
18176         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
18177
18178 2017-01-10  Tom Tromey  <tom@tromey.com>
18179
18180         * python/py-value.c (value_has_field, get_field_flag)
18181         (get_field_type, valpy_getitem, convert_value_from_python): Use
18182         gdbpy_ref.
18183
18184 2017-01-10  Tom Tromey  <tom@tromey.com>
18185
18186         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
18187         gdbpy_ref.
18188
18189 2017-01-10  Tom Tromey  <tom@tromey.com>
18190
18191         * python/py-prettyprint.c (search_pp_list)
18192         (find_pretty_printer_from_objfiles)
18193         (find_pretty_printer_from_progspace)
18194         (find_pretty_printer_from_gdb, find_pretty_printer)
18195         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
18196         gdbpy_ref.
18197
18198 2017-01-10  Tom Tromey  <tom@tromey.com>
18199
18200         * python/py-param.c (call_doc_function): Use gdbpy_ref.
18201
18202 2017-01-10  Tom Tromey  <tom@tromey.com>
18203
18204         * python/py-linetable.c (build_line_table_tuple_from_pcs)
18205         (ltpy_get_all_source_lines): Use gdbpy_ref.
18206
18207 2017-01-10  Tom Tromey  <tom@tromey.com>
18208
18209         * python/py-framefilter.c (extract_sym, extract_value)
18210         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
18211         gdbpy_ref.
18212
18213 2017-01-10  Tom Tromey  <tom@tromey.com>
18214
18215         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
18216
18217 2017-01-10  Tom Tromey  <tom@tromey.com>
18218
18219         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
18220
18221 2017-01-10  Tom Tromey  <tom@tromey.com>
18222
18223         * python/py-function.c (convert_values_to_python, fnpy_init): Use
18224         gdbpy_ref.
18225
18226 2017-01-10  Tom Tromey  <tom@tromey.com>
18227
18228         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
18229
18230 2017-01-10  Tom Tromey  <tom@tromey.com>
18231
18232         * python/py-type.c (convert_field, make_fielditem, typy_fields)
18233         (typy_range): Use gdbpy_ref.
18234
18235 2017-01-10  Tom Tromey  <tom@tromey.com>
18236
18237         * python/py-threadevent.c (create_thread_event_object): Use
18238         gdbpy_ref.
18239         * python/py-stopevent.c (create_stop_event_object): Simplify.
18240         (emit_stop_event): Use gdbpy_ref.
18241         * python/py-signalevent.c (create_signal_event_object): Use
18242         gdbpy_ref.
18243         * python/py-newobjfileevent.c (create_new_objfile_event_object)
18244         (emit_new_objfile_event, create_clear_objfiles_event_object)
18245         (emit_clear_objfiles_event): Use gdbpy_ref.
18246         * python/py-infevents.c (create_inferior_call_event_object)
18247         (create_register_changed_event_object)
18248         (create_memory_changed_event_object, emit_inferior_call_event)
18249         (emit_memory_changed_event, emit_register_changed_event): Use
18250         gdbpy_ref.
18251         * python/py-exitedevent.c (create_exited_event_object)
18252         (emit_exited_event): Use gdbpy_ref.
18253         * python/py-event.h (evpy_emit_event): Remove
18254         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
18255         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
18256         * python/py-continueevent.c (emit_continue_event): Use
18257         gdbpy_ref.
18258         * python/py-breakpoint.c (gdbpy_breakpoint_created)
18259         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
18260         gdbpy_ref.
18261         * python/py-bpevent.c (create_breakpoint_event_object): Use
18262         gdbpy_ref.
18263
18264 2017-01-10  Tom Tromey  <tom@tromey.com>
18265
18266         * python/py-ref.h: New file.
18267
18268 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
18269
18270         * cli-out.c (cli_ui_out::do_redirect): Change return type to
18271         void.
18272         * cli-out.h (cli_ui_out::do_redirect): Likewise.
18273         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
18274         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
18275         * ui-out.c (ui_out::redirect): Likewise.
18276         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
18277         * cli/cli-logging.c (set_logging_redirect): Update call site of
18278         ui_out::redirect.
18279         (handle_redirections): Likewise.
18280         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
18281         * top.c (execute_command_to_string): Likewise.
18282         * utils.c (do_ui_out_redirect_pop): Likewise.
18283
18284 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
18285
18286         * stack.c (_initialize_stack): Update "frame" command help message.
18287
18288 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
18289
18290         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
18291
18292 2017-01-06  Yao Qi  <yao.qi@linaro.org>
18293
18294         * x86-linux-nat.h: Include gdb_proc_service.h.
18295
18296 2017-01-06  Yao Qi  <yao.qi@linaro.org>
18297
18298         * ser-base.h: Include serial.h.
18299
18300 2017-01-06  Yao Qi  <yao.qi@linaro.org>
18301
18302         * ppc-linux-tdep.h: Include ppc-tdep.h.
18303
18304 2017-01-06  Yao Qi  <yao.qi@linaro.org>
18305
18306         * nat/amd64-linux-siginfo.h: Include signal.h.
18307
18308 2017-01-06  Yao Qi  <yao.qi@linaro.org>
18309
18310         * nat/aarch64-linux-hw-point.h: Include break-common.h.
18311
18312 2017-01-06  Yao Qi  <yao.qi@linaro.org>
18313
18314         * mi/mi-parse.h: Include mi-cmds.h.
18315
18316 2017-01-06  Yao Qi  <yao.qi@linaro.org>
18317
18318         * inf-loop.c: Don't include "target.h".
18319         * inf-loop.h: Include it here.
18320
18321 2017-01-06  Yao Qi  <yao.qi@linaro.org>
18322
18323         * dfp.h: Include "dboulest.h" and "expression.h".
18324
18325 2017-01-06  Yao Qi  <yao.qi@linaro.org>
18326
18327         * ax-gdb.h: Include "ax.h".
18328
18329 2017-01-06  Yao Qi  <yao.qi@linaro.org>
18330
18331         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
18332         with nat/gdb_ptrace.h.
18333
18334 2017-01-05  Yao Qi  <yao.qi@linaro.org>
18335
18336         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
18337         new line.
18338         (mips64_fbsd_sigframe_init): Likewise.
18339
18340 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
18341
18342         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
18343         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
18344
18345 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
18346
18347         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
18348         * NEWS: Mention new FreeBSD/mips native configuration.
18349         * config/mips/fbsd.mh: New file.
18350         * configure.host: Add mips*-*-freebsd*.
18351         * mips-fbsd-nat.c: New file.
18352
18353 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
18354
18355         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
18356         (ALLDEPFILES): Add mips-fbsd-tdep.c.
18357         * NEWS: Mention new FreeBSD/mips target.
18358         * configure.tgt: Add mips*-*-freebsd*.
18359         * mips-fbsd-tdep.c: New file.
18360         * mips-fbsd-tdep.h: New file.
18361
18362 2017-01-04  Yao Qi  <yao.qi@linaro.org>
18363
18364         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
18365         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
18366
18367 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
18368
18369         Update copyright year range in all GDB files.
18370
18371 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
18372
18373         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
18374
18375 For older changes see ChangeLog-2016.
18376 \f
18377 Local Variables:
18378 mode: change-log
18379 left-margin: 8
18380 fill-column: 74
18381 version-control: never
18382 coding: utf-8
18383 End: