gdb: Add OpenRISC or1k and or1knd target support
[external/binutils.git] / gdb / ChangeLog
1 2017-12-12  Stafford Horne  <shorne@gmail.com>
2             Stefan Wallentowitz  <stefan@wallentowitz.de>
3             Stefan Kristiansson  <stefan.kristiansson@saunalahti.fi>
4             Franck Jullien  <franck.jullien@gmail.com>
5             Jeremy Bennett  <jeremy.bennett@embecosm.com>
6
7         * configure.tgt: Add targets for or1k and or1knd.
8         * or1k-tdep.c: New file.
9         * or1k-tdep.h: New file.
10         * features/Makefile: Add or1k.xml to build.
11         * features/or1k.xml: New file.
12         * features/or1k-core.xml: New file.
13         * features/or1k.c: Generated.
14
15 2017-12-12  Alan Modra  <amodra@gmail.com>
16
17         PR tdep/22576
18         * ppc64-tdep.c (ppc64_plt_entry_point): Rewrite to take TOC-relative
19         PLT offset, and retrieve r2 from stack when executing in reverse.
20         (ppc64_standard_linkage1_target): Drop pc param.  Calculate offset
21         rather than PLT address.
22         (ppc64_standard_linkage2_target): Likewise.
23         (ppc64_standard_linkage3_target): Likewise.
24         (ppc64_standard_linkage4_target): Likewise.
25         (ppc64_skip_trampoline_code_1): Adjust to suit.
26
27 2017-12-11  Simon Marchi  <simon.marchi@ericsson.com>
28
29         PR gdb/22556
30         * remote.c (remote_thread_name): Return NULL if name is empty.
31         (remote_threads_extra_info): Return NULL if extra info is empty.
32
33 2017-12-11  Pedro Alves  <palves@redhat.com>
34
35         * defs.h (elf_sym_fns_lazy_psyms, elf_sym_fns_gdb_index)
36         (elf_sym_fns_debug_names): Move to elfread.c.
37         * dwarf2read.c (dwarf2_initialize_objfile): Return a boolean
38         instead of a sym_fns and add 'index_kind' output parameter.  Fill
39         the latter in with the index variant kind if using an index.
40         (enum dw_index_kind): Moved to symfile.h.
41         * elfread.c (elf_sym_fns_gdb_index, elf_sym_fns_debug_names)
42         (elf_sym_fns_lazy_psyms): Move from defs.h.
43         (elf_symfile_read): Adjust to new dwarf2_initialize_objfile
44         interface.
45         * symfile.h (enum class dw_index_kind): New, moved from
46         dwarf2read.c.
47         (dwarf2_initialize_objfile): Change prototype.
48
49 2017-12-11  Ulrich Weigand  <uweigand@de.ibm.com>
50
51         * target-float.c (mpfr_float_ops::from_target): Use mpfr_set_ui
52         instead of mpfr_set_si to convert mantissa bits.
53
54 2017-12-11  Xavier Roirand <roirand@adacore.com>
55             Joel Brobecker  <brobecker@adacore.com>
56
57         * ada-lang.c (ada_tag_value_at_base_address): Change the way
58         tagged type base address is computed.
59         (enum ada_primitive_types) <ada_primitive_type_storage_offset>:
60         New enumerate.
61         (ada_language_arch_info): Set the ada_primitive_type_storage_offset
62         element of lai->primitive_type_vector.
63
64 2017-12-08  Pedro Alves  <palves@redhat.com>
65
66         * dwarf2read.c (mock_mapped_index): Reimplement as an extension of
67         mapped_index_base.
68         (check_match): Adjust to use mock_index directly.
69         (check_find_bounds_finds)
70         (test_mapped_index_find_name_component_bounds): Adjust to work
71         with a mapped_index_base.
72
73 2017-12-08  Pedro Alves  <palves@redhat.com>
74
75         * dwarf2read.c (struct mapped_index_base): New, partially factored
76         out from ...
77         (struct mapped_index): ... this.  Inherit mapped_index_base.
78         (mapped_index::symbol_name_slot_invalid):
79         (mapped_index::symbol_name_at): Add override marker.
80         (mapped_index::symbol_name_count): New.
81         (struct mapped_debug_names): Inherit mapped_index_base.
82         (mapped_debug_names::symbol_name_at): New.
83         (mapped_debug_names::symbol_name_count): New.
84         (mapped_index::find_name_components_bounds): Rename to ...
85         (mapped_index_base::find_name_components_bounds): ... this.
86         (mapped_index::build_name_components): Rename to ...
87         (mapped_index_base::build_name_components): ... this.  Adjust to
88         use mapped_index_base::symbol_name_count and
89         mapped_index_base::symbol_name_slot_invalid.
90         (dw2_expand_symtabs_matching_symbol): Take a mapped_index_base
91         instead of a mapped_index.  Use
92         dw2_expand_symtabs_matching_symbol.
93
94 2017-12-08  Pedro Alves  <palves@redhat.com>
95
96         * dwarf2read.c (mapped_index::symbol_table_slot): New.
97         (mapped_index::address_table): Now a gdb::array_view of const
98         gdb_byte.
99         (mapped_index::symbol_table): Now a gdb::array_view of
100         symbol_table_slot.
101         (mapped_index::address_table_size)
102         (mapped_index::symbol_table_slots): Delete.
103         (create_addrmap_from_index): Adjust.
104         (find_slot_in_mapped_hash): Adjust.
105         (read_index_from_section): Adjust.
106         (dwarf2_read_index): Adjust.
107
108 2017-12-08  Jan Kratochvil  <jan.kratochvil@redhat.com>
109             Pedro Alves  <palves@redhat.com>
110
111         * defs.h (elf_sym_fns_debug_names): New declaration.
112         * dwarf2read.c: Include "hash_enum.h".
113         (mapped_debug_names): New.
114         (struct dwarf2_per_objfile): Add debug_names, debug_aranges and
115         debug_names_table.
116         (dwarf2_elf_names): Add ".debug_names" and ".debug_aranges".
117         (struct dwz_file): Add debug_names.
118         (dwarf2_per_objfile::locate_sections): Handle debug_names and
119         debug_aranges.
120         (locate_dwz_sections): Handle debug_names.
121         (create_signatured_type_table_from_debug_names)
122         (create_addrmap_from_aranges): New.
123         (dwarf2_read_index): Update function comment.
124         (dwarf5_augmentation): Moved up.
125         (read_debug_names_from_section, create_cus_from_debug_names_list)
126         (create_cus_from_debug_names, dwarf2_read_debug_names): New.
127         (dwarf5_djb_hash): Moved up.
128         (dw2_debug_names_iterator): New.
129         (read_indirect_string_at_offset): New declaration.
130         (mapped_debug_names::namei_to_name)
131         (dw2_debug_names_iterator::find_vec_in_debug_names)
132         (dw2_debug_names_iterator::next, dw2_debug_names_lookup_symbol)
133         (dw2_debug_names_dump, dw2_debug_names_expand_symtabs_for_function)
134         (dw2_debug_names_expand_symtabs_matching, dwarf2_debug_names_functions):
135         New.
136         (dwarf2_initialize_objfile): Return also elf_sym_fns_debug_names.
137         (debug_names::djb_hash): Rename it to dwarf5_djb_hash.
138         (debug_names::build): Update djb_hash caller.
139         (write_debug_names): Move out and rename augmentation to
140         dwarf5_augmentation.
141         * elfread.c (elf_sym_fns_debug_names): New.
142         * psymtab.h (dwarf2_debug_names_functions): New declaration.
143         * symfile.h (struct dwarf2_debug_sections): Add debug_names and
144         debug_aranges.
145         * xcoffread.c (dwarf2_xcoff_names): Add debug_names and debug_aranges.
146
147 2017-12-08  Pedro Alves  <palves@redhat.com>
148
149         * common/hash_enum.h: New file.
150
151 2017-12-08  Jan Kratochvil  <jan.kratochvil@redhat.com>
152
153         * dwarf2read.c (create_cu_from_index_list): New from ...
154         (create_cus_from_index_list): ... this function, use it.
155         (dw_expand_symtabs_matching_file_matcher)
156         (dw2_expand_symtabs_matching_one): New from ...
157         (dw2_expand_symtabs_matching): ... this function, use them.
158
159 2017-12-08  Jan Kratochvil  <jan.kratochvil@redhat.com>
160
161         * defs.h (elf_sym_fns_lazy_psyms, elf_sym_fns_gdb_index): Move here
162         declarations from elfread.c.
163         (dwarf2_initialize_objfile): Change return value.
164         * elfread.c (elf_sym_fns_lazy_psyms, elf_sym_fns_gdb_index): Move these
165         declarations to defs.h.
166         (elf_symfile_read): Adjust dwarf2_initialize_objfile caller.
167         * symfile.h (dwarf2_initialize_objfile): Change return type.
168
169 2017-12-08  Jan Kratochvil  <jan.kratochvil@redhat.com>
170             Pedro Alves  <palves@redhat.com>
171
172         * contrib/gdb-add-index.sh (index): Rename to ...
173         (index4): ... here.
174         (index5, debugstr, debugstrmerge, debugstrerr): New variables.
175         Support also .debug_names and .debug_str.
176         * dwarf2read.c: Include cmath, set, list.
177         (INDEX_SUFFIX): Rename to ...
178         (INDEX4_SUFFIX): ... here.
179         (INDEX5_SUFFIX, DEBUG_STR_SUFFIX): New.
180         (file_write(FILE *, const void *, size_t)): New.
181         (file_write(FILE *, const std::vector<Elem, Alloc> &)): New.
182         (data_buf::append_unsigned_leb128, data_buf::empty): New.
183         (data_buf::file_write): Use ::file_write.
184         (data_buf::c_str, dwarf5_djb_hash, debug_names)
185         (check_dwarf64_offsets): New.
186         (psyms_seen_size, write_gdbindex): New from
187         write_psymtabs_to_index code.
188         (dwarf5_gdb_augmentation, write_debug_names, assert_file_size)
189         (enum dw_index_kind): New.
190         (write_psymtabs_to_index): New parameter index_kind.  Support
191         filename_str and out_file_str.  Move code to write_gdbindex,
192         possibly call write_debug_names.
193         (save_gdb_index_command): New parameter -dwarf-5.
194         (_initialize_dwarf2_read): Document the new parameter -dwarf-5.
195
196 2017-12-08  Jan Kratochvil  <jan.kratochvil@redhat.com>
197             Pedro Alves  <palves@redhat.com>
198
199         * contrib/cc-with-tweaks.sh: Change interpreter to bash, incl. initial
200         comment.
201         (GDB_ADD_INDEX): New variable.
202         <$want_index>: Call $GDB_ADD_INDEX.
203
204 2017-12-08  Sergio Durigan Junior  <sergiodj@redhat.com>
205
206         * dtrace-probe.c (dtrace_process_dof_probe): Do not declare a new
207         "expression_up" inside the TRY block.
208
209 2017-12-08  Yao Qi  <yao.qi@linaro.org>
210
211         * breakpoint.c (update_watchpoint): Call
212         address_significant.
213
214 2017-12-08  Yao Qi  <yao.qi@linaro.org>
215
216         * breakpoint.c (adjust_breakpoint_address): Call
217         address_significant.
218
219 2017-12-08  Yao Qi  <yao.qi@linaro.org>
220
221         * aarch64-tdep.c (aarch64_gdbarch_init): Install gdbarch
222         significant_addr_bit.
223         * gdbarch.sh (significant_addr_bit): New.
224         * gdbarch.c, gdbarch.h: Re-generated.
225         * target.c (memory_xfer_partial): Call address_significant.
226         * utils.c (address_significant): New function.
227         * utils.h (address_significant): Declare.
228
229 2017-12-08  Tom Tromey  <tom@tromey.com>
230
231         * printcmd.c (ui_printf): Update.  Use std::vector.
232         * common/format.h (struct format_piece): Add constructor.
233         <string>: Now const.
234         (class format_pieces): New class.
235         (parse_format_string, free_format_pieces)
236         (free_format_pieces_cleanup): Remove.
237         * common/format.c (format_pieces::format_pieces): Rename from
238         parse_format_string.  Update.
239         (free_format_pieces, free_format_pieces_cleanup): Remove.
240         * breakpoint.c (parse_cmd_to_aexpr): Update.  Use std::vector.
241         * ax-gdb.h (gen_printf): Remove argument.
242         * ax-gdb.c (gen_printf): Remove "frags" argument.
243         (maint_agent_printf_command): Update.  Use std::vector.
244
245 2017-12-08  Yao Qi  <yao.qi@linaro.org>
246
247         PR breakpionts/22567
248         * linespec.c (minsym_found): Set sal.section.
249
250 2017-12-08  Andreas Arnez  <arnez@linux.vnet.ibm.com>
251
252         * configure.tgt (s390*-*-linux*): Add symfile-mem.o.
253
254 2017-12-07  Keith Seitz  <keiths@redhat.com>
255
256         PR breakpoints/22569
257         * location.c (string_to_explicit_location): When terminating
258         parsing early, break out of enclosing loop instead of returning.
259
260 2017-12-07  Keith Seitz  <keiths@redhat.com>
261
262         * NEWS (New commands): Mention set/show print type nested-type-limit.
263         * c-typeprint.c (c_type_print_base): Print out nested types.
264         * dwarf2read.c (struct typedef_field_list): Rename to ...
265         (struct decl_field_list): ... this.  Change all uses.
266         (struct field_info) <nested_types_list, nested_types_list_count>:
267         New fields.
268         (add_partial_symbol): Look for nested type definitions in C++, too.
269         (dwarf2_add_typedef): Rename to ...
270         (dwarf2_add_type_defn): ... this.
271         (type_can_define_types): New function.
272         Update assertion to use type_can_define_types.
273         Permit NULL for a field's name.
274         (process_structure_scope): Handle child DIEs of types that can
275         define types.
276         Copy the list of nested types into the type struct.
277         * gdbtypes.h (struct typedef_field): Rename to ...
278         (struct decl_field): ... this.  Change all uses.
279         [is_protected, is_private]: New fields.
280         (struct cplus_struct_type) <nested_types, nested_types_count>: New
281         fields.
282         (TYPE_NESTED_TYPES_ARRAY, TYPE_NESTED_TYPES_FIELD)
283         (TYPE_NESTED_TYPES_FIELD_NAME, TYPE_NESTED_TYPES_FIELD_TYPE)
284         (TYPE_NESTED_TYPES_COUNT, TYPE_NESTED_TYPES_FIELD_PROTECTED)
285         (TYPE_NESTED_TYPES_FIELD_PRIVATE): New macros.
286         * typeprint.c (type_print_raw_options, default_ptype_flags): Add
287         default value for print_nested_type_limit.
288         (print_nested_type_limit): New static variable.
289         (set_print_type_nested_types, show_print_type_nested_types): New
290         functions.
291         (_initialize_typeprint): Register new commands for set/show
292         `print-nested-type-limit'.
293         * typeprint.h (struct type_print_options) [print_nested_type_limit]:
294         New field.
295
296 2017-12-07  Tom Tromey  <tom@tromey.com>
297
298         PR breakpoints/22511:
299         * breakpoint.c (commands_command_1): Don't throw an exception when
300         no commands have been read.
301
302 2017-12-07  Adam Stylinski  <adam.stylinski@etegent.com>
303
304         PR c++/21222
305         * target-descriptions.c (print_c_tdesc::visit_pre): Change type of
306         range-for variable.
307
308 2017-12-07  Simon Marchi  <simon.marchi@ericsson.com>
309
310         * common/selftest.h (struct selftest): Add virtual destructor.
311
312 2017-12-07  Phil Muldoon  <pmuldoon@redhat.com>
313
314         * python/py-breakpoint.c (bppy_init): Use string_to_event_location
315         over basic location code. Implement explicit location keywords.
316         (bppy_init_validate_args): New function.
317         * NEWS: Document Python explicit breakpoint locations.
318
319 2017-12-07  Joel Brobecker  <brobecker@adacore.com>
320
321         * MAINTAINERS: Restore target entries for m68hc11-elf,
322         score-elf and xstormy16-elf, incorrectly removed in a previous
323         patch meant to only update the list of active maintainers.
324
325 2017-12-06  Pedro Alves  <palves@redhat.com>
326
327         * break-catch-syscall.c (insert_catch_syscall)
328         (remove_catch_syscall): Adjust to pass reference to
329         inf_data->syscalls_counts directly via gdb::array_view.
330         * fbsd-nat.c (fbsd_set_syscall_catchpoint): Adjust to use bool
331         and gdb::array_view.
332         * linux-nat.c (linux_child_set_syscall_catchpoint): Likewise.
333         * remote.c (remote_set_syscall_catchpoint): Likewise.
334         * target-debug.h (target_debug_print_bool): New.
335         (define target_debug_print_gdb_array_view_const_int): New.
336         * target-delegates.c: Regenerate.
337         * target.h (target_ops) <to_set_syscall_catchpoint>: Use
338         gdb::array_view and bool.
339         (target_set_syscall_catchpoint): Likewise.
340
341 2017-12-06  Simon Marchi  <simon.marchi@ericsson.com>
342
343         * break-catch-syscall.c (catch_syscall_completer): Get pointers
344         to syscall group strings after building the string vector.
345
346 2017-12-06  Pedro Alves  <palves@redhat.com>
347
348         * remote.c (remote_query_supported): Don't send "xmlRegisters=" if
349         "qXfer:features:read"" is disabled.
350         (remote_write_qxfer, remote_read_qxfer, remote_search_memory):
351         Check packet_config_support instead of packet->support directly.
352
353 2017-12-05  Simon Marchi  <simon.marchi@ericsson.com>
354
355         * target-descriptions.c (struct tdesc_feature) <registers>: Use
356         tdesc_reg_up typedef.
357         (struct target_desc) <features>: Use tdesc_feature_up typedef.
358
359 2017-12-05  Simon Marchi  <simon.marchi@polymtl.ca>
360
361         * target-descriptions.c (struct tdesc_type): Use default
362         destructor.
363         <u>: Remove.
364         <accept>: Remove.
365         (struct tdesc_type_builtin): New.
366         (struct tdesc_type_vector): New.
367         (struct tdesc_type_with_fields): New.
368         (tdesc_predefined_types): Change type to tdesc_type_builtin[].
369         (tdesc_gdb_type): Remove.
370         (tdesc_register_type): Adjust.
371         (tdesc_create_vector): Create tdesc_type_vector.
372         (tdesc_create_struct): Create tdesc_type_with_fields.
373         (tdesc_set_struct_size): Change parameter type.
374         (tdesc_create_union): Create tdesc_type_with_fields.
375         (tdesc_create_flags): Likewise.
376         (tdesc_create_enum): Likewise.
377         (tdesc_add_field): Change parameter type.
378         (tdesc_add_typed_bitfield): Likewise.
379         (tdesc_add_bitfield): Likewise.
380         (tdesc_add_flag): Likewise.
381         (tdesc_add_enum_value): Likewise.
382         (print_c_tdesc) <visit>: Remove overload with tdesc_type
383         parameter, add overloads for tdesc_type_builtin,
384         tdesc_type_with_fields and tdesc_type_vector.
385         <m_printed_type>: Remove.
386         <m_printed_element_type, m_printed_type_with_fields>: Add.
387         * target-descriptions.h (tdesc_create_enum): Change return type.
388         (tdesc_add_typed_bitfield): Change parameter type.
389         (tdesc_add_enum_value): Change parameter type.
390         * xml-tdesc.c (struct tdesc_parsing_data) <current_type>: Change
391         type to tdesc_type_with_fields.
392         (tdesc_start_struct): Adjust.
393         (tdesc_start_flags): Adjust.
394         (tdesc_start_enum): Adjust.
395         (tdesc_start_field): Adjust.
396         * arch/tdesc.h (struct tdesc_type_builtin): Forward-declare.
397         (struct tdesc_type_vector): Forward-declare.
398         (struct tdesc_type_with_fields): Forward-declare.
399         (tdesc_create_struct): Change return type.
400         (tdesc_create_union): Likewise.
401         (tdesc_create_flags): Likewise.
402         (tdesc_add_field): Change parameter type.
403         (tdesc_set_struct_size): Likewise.
404         (tdesc_add_bitfield): Likewise.
405         (tdesc_add_flag): Likewise.
406         * features: Re-generate C files.
407
408 2017-12-05  Simon Marchi  <simon.marchi@polymtl.ca>
409
410         * target-descriptions.c (tdesc_arch_reg): Remove typedef.
411         (struct tdesc_arch_reg): Add constructor.
412         (DEF_VEC_O (tdesc_arch_reg)): Remove.
413         (struct tdesc_arch_data): Initialize fields.
414         <arch_regs>: Change type to std::vector.
415         (target_find_description): Adjust.
416         (tdesc_find_type): Adjust.
417         (tdesc_data_init): Call tdesc_arch_data constructor.
418         (tdesc_data_alloc): Allocate tdesc_arch_data with new.
419         (tdesc_data_cleanup): Free data with delete.
420         (tdesc_numbered_register): Adjust.
421         (tdesc_find_arch_register): Adjust.
422         (tdesc_use_registers): Adjust.
423
424 2017-12-05  Simon Marchi  <simon.marchi@polymtl.ca>
425
426         * target-descriptions.c (tdesc_type_field): Remove typedef.
427         (DEF_VEC_O (tdesc_type_field)): Remove.
428         (struct tdesc_type_field): Add constructor.
429         <name>: Change type to std::string.
430         (struct tdesc_type) <tdesc_type>: Instantiate vector if the type
431         kind uses it.
432         <~tdesc_type>: Destroy vector if the type kind uses it.
433         <u::u::fields>: Change type to std::vector.
434         (tdesc_gdb_type): Adjust.
435         (tdesc_add_field): Adjust.
436         (tdesc_add_typed_bitfield): Adjust.
437         (tdesc_add_field): Adjust.
438         (tdesc_add_enum_value): Adjust.
439         (class print_c_tdesc) <visit>: Adjust.
440
441 2017-12-05  Simon Marchi  <simon.marchi@polymtl.ca>
442
443         * target-descriptions.c (struct tdesc_type) <name>: Change type
444         to std::string.
445         <~tdesc_type>: Don't manually free name.
446         <operator==>: Adjust.
447         (tdesc_named_type): Adjust.
448         (tdesc_find_type): Adjust.
449         (tdesc_gdb_type): Adjust.
450         (class print_c_tdesc) <visit>: Adjust.
451
452 2017-12-05  Simon Marchi  <simon.marchi@polymtl.ca>
453
454         * target-descriptions.c (tdesc_type_p): Remove typedef.
455         (DEF_VEC_P (tdesc_type_p)): Remove.
456         (struct tdesc_feature) <types>: Change type to std::vector.
457         <~tdesc_feature>: Replace with default implementation.
458         <accept>: Adjust.
459         (tdesc_named_type): Adjust.
460         (tdesc_create_vector): Adjust.
461         (tdesc_create_struct): Adjust.
462         (tdesc_create_union): Adjust.
463         (tdesc_create_flags): Adjust.
464         (tdesc_create_enum): Adjust.
465
466 2017-12-05  Simon Marchi  <simon.marchi@ericsson.com>
467
468         * target-descriptions.c (struct tdesc_reg) <tdesc_reg>: Change
469         type of name_ parameter, adjust to std::string change.
470         <name, group, type>: Change type to std::string.
471         <~tdesc_reg>: Replace with default implementation.
472         <operator==>: Adjust.
473         (tdesc_find_register_early): Adjust.
474         (tdesc_register_name): Adjust.
475         (tdesc_register_type): Adjust.
476         (tdesc_register_in_reggroup_p): Adjust.
477         (class print_c_tdesc) <visit>: Adjust.
478         (class print_c_feature) <visit>: Adjust.
479         * features/arc-arcompact.c: Re-generate.
480         * features/arc-v2.c: Re-generate.
481
482 2017-12-05  Simon Marchi  <simon.marchi@ericsson.com>
483
484         * target-descriptions.c (tdesc_reg_p): Remove typedef.
485         (DEF_VEC_P (tdesc_reg_p)): Remove.
486         (struct tdesc_feature) <registers>: Change type to std::vector.
487         <~tdesc_feature>: Don't manually free registers.
488         <accept>: Adjust.
489         <operator==>: Adjust.
490         (tdesc_has_registers): Adjust.
491         (tdesc_find_register_early): Adjust.
492         (tdesc_use_registers): Adjust.
493         (tdesc_create_reg): Adjust.
494
495 2017-12-05  Simon Marchi  <simon.marchi@polymtl.ca>
496
497         * target-descriptions.c (tdesc_feature) <name>: Change type to
498         std::string.
499         <~tdesc_feature>: Don't manually free name.
500         <operator==>: Adjust.
501         (tdesc_find_feature): Adjust.
502         (tdesc_feature_name): Adjust.
503         (class print_c_tdesc) <visit_pre>: Adjust.
504         (class print_c_feature) <visit_pre>: Adjust.
505
506 2017-12-05  Simon Marchi  <simon.marchi@polymtl.ca>
507
508         * target-descriptions.c (tdesc_feature_p): Remove typedef.
509         (DEF_VEC_P (tdesc_feature_p)): Remove.
510         (struct target_desc) <features>: Change type to std::vector.
511         <~target_desc>: Replace with default implementation.
512         <accept>: Adjust.
513         <operator==>: Adjust.
514         (tdesc_has_registers): Adjust.
515         (tdesc_find_feature): Adjust.
516         (tdesc_use_registers): Adjust.
517         (tdesc_create_feature): Adjust.
518
519 2017-12-05  Simon Marchi  <simon.marchi@polymtl.ca>
520
521         * target-descriptions.c (arch_p): Remove typedef.
522         (DEF_VEC_P (arch_p)): Remove.
523         (struct target_desc) <compatible>: Change type to std::vector.
524         <~target_desc>: Don't manually free compatible.
525         (tdesc_compatible_p): Adjust.
526         (tdesc_add_compatible): Adjust.
527         (class print_c_tdesc) <visit_pre>: Adjust.
528
529 2017-12-05  Simon Marchi  <simon.marchi@polymtl.ca>
530
531         * target-descriptions.c (property_s): Remove typedef.
532         (DEF_VEC_O (property_s)): Remove.
533         (struct target_desc) <properties>: Make an std::vector.
534         <~target_desc>: Don't manually free properties.
535         (tdesc_property): Adjust.
536         (set_tdesc_property): Adjust.
537         (class print_c_tdesc) <visit_pre>: Adjust.
538
539 2017-12-05  Simon Marchi  <simon.marchi@ericsson.com>
540
541         * common/gdb_assert.h (gdb_static_assert): Redefine using
542         static_assert.
543
544 2017-12-05  Simon Marchi  <simon.marchi@ericsson.com>
545
546         * ada-lang.c (ada_collect_symbol_completion_matches): Remove
547         unused variables.
548         (ada_is_redundant_range_encoding): Likewise.
549         * ada-varobj.c (ada_varobj_get_value_of_array_variable):
550         Likewise.
551         * alpha-tdep.c (alpha_software_single_step): Likewise.
552         * arm-tdep.c (_initialize_arm_tdep): Likewise.
553         * auto-load.c (info_auto_load_cmd): Likewise.
554         * break-catch-syscall.c (insert_catch_syscall): Likewise.
555         (remove_catch_syscall): Likewise.
556         * breakpoint.c (condition_completer): Likewise.
557         (clear_command): Likewise.
558         (update_breakpoint_locations): Likewise.
559         * btrace.c (btrace_disable): Likewise.
560         (btrace_teardown): Likewise.
561         (btrace_maint_update_pt_packets): Likewise.
562         (maint_btrace_clear_cmd): Likewise.
563         * cli/cli-decode.c (lookup_cmd_1): Likewise.
564         (lookup_cmd_composition): Likewise.
565         * cli/cli-dump.c (scan_filename): Likewise.
566         (restore_command): Likewise.
567         * compile/compile-loc2c.c (compute_stack_depth): Likewise.
568         * compile/compile-object-load.c (compile_object_load): Likewise.
569         * compile/compile-object-run.c (compile_object_run): Likewise.
570         * compile/compile.c (compile_to_object): Likewise.
571         * completer.c (filename_completer): Likewise.
572         (complete_files_symbols): Likewise.
573         (complete_expression): Likewise.
574         * corelow.c (core_open): Likewise.
575         * ctf.c (ctf_start): Likewise.
576         (ctf_write_status): Likewise.
577         (ctf_write_uploaded_tsv): Likewise.
578         (ctf_write_definition_end): Likewise.
579         (ctf_open_dir): Likewise.
580         (ctf_xfer_partial): Likewise.
581         (ctf_trace_find): Likewise.
582         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
583         Likewise.
584         * dwarf2loc.c (allocate_piece_closure): Likewise.
585         (indirect_pieced_value): Likewise.
586         (dwarf2_evaluate_loc_desc_full): Likewise.
587         * dwarf2read.c (dw2_expand_marked_cus): Likewise.
588         (dw2_expand_symtabs_matching): Likewise.
589         (dw2_map_symbol_filenames): Likewise.
590         (read_and_check_comp_unit_head): Likewise.
591         (read_cutu_die_from_dwo): Likewise.
592         (lookup_dwo_unit): Likewise.
593         (read_comp_units_from_section): Likewise.
594         (dwarf2_compute_name): Likewise.
595         (handle_DW_AT_stmt_list): Likewise.
596         (create_cus_hash_table): Likewise.
597         (create_dwp_v2_section): Likewise.
598         (dwarf2_rnglists_process): Likewise.
599         (dwarf2_ranges_process): Likewise.
600         (dwarf2_record_block_ranges): Likewise.
601         (is_vtable_name): Likewise.
602         (read_formatted_entries): Likewise.
603         (skip_form_bytes): Likewise.
604         * elfread.c (elf_symtab_read): Likewise.
605         * exec.c (exec_file_command): Likewise.
606         * f-valprint.c (f_val_print): Likewise.
607         (info_common_command_for_block): Likewise.
608         * guile/guile.c (initialize_scheme_side): Likewise.
609         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Likewise.
610         * guile/scm-cmd.c (cmdscm_completer): Likewise.
611         (gdbscm_register_command_x): Likewise.
612         * guile/scm-frame.c (gdbscm_frame_read_var): Likewise.
613         * guile/scm-param.c (gdbscm_parameter_value): Likewise.
614         * guile/scm-ports.c (file_port_magic): Likewise.
615         * guile/scm-pretty-print.c (ppscm_search_pp_list): Likewise.
616         (ppscm_pretty_print_one_value): Likewise.
617         (ppscm_print_children): Likewise.
618         * guile/scm-string.c (gdbscm_string_to_argv): Likewise.
619         * guile/scm-symtab.c (gdbscm_sal_symtab): Likewise.
620         * guile/scm-type.c (gdbscm_type_next_field_x): Likewise.
621         * guile/scm-utils.c (gdbscm_parse_function_args): Likewise.
622         * i386-tdep.c (i386_register_reggroup_p): Likewise.
623         * infcmd.c (run_command_1): Likewise.
624         (until_next_fsm_clean_up): Likewise.
625         * linespec.c (linespec_complete): Likewise.
626         (find_label_symbols): Likewise.
627         * m2-valprint.c (m2_val_print): Likewise.
628         * memattr.c (require_user_regions): Likewise.
629         (lookup_mem_region): Likewise.
630         (disable_mem_command): Likewise.
631         (mem_delete): Likewise.
632         * mep-tdep.c (mep_register_name): Likewise.
633         (mep_analyze_prologue): Likewise.
634         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Likewise.
635         * mi/mi-interp.c (mi_on_sync_execution_done): Likewise.
636         * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
637         * microblaze-linux-tdep.c (microblaze_linux_init_abi): Likewise.
638         * minidebug.c (lzma_open): Likewise.
639         * minsyms.c (lookup_minimal_symbol): Likewise.
640         * mips-linux-tdep.c (mips64_fill_fpregset): Likewise.
641         * mips-tdep.c (mips_stub_frame_sniffer): Likewise.
642         (mips_o64_return_value): Likewise.
643         (mips_single_step_through_delay): Likewise.
644         (_initialize_mips_tdep): Likewise.
645         * nios2-tdep.c (nios2_push_dummy_call): Likewise.
646         (nios2_software_single_step): Likewise.
647         * parse.c (find_minsym_type_and_address): Likewise.
648         * psymtab.c (psym_relocate): Likewise.
649         * python/py-breakpoint.c (bppy_get_commands): Likewise.
650         (gdbpy_breakpoint_modified): Likewise.
651         * python/py-infevents.c (create_inferior_call_event_object):
652         Likewise.
653         * python/py-record-btrace.c (btpy_list_item): Likewise.
654         * python/py-type.c (typy_str): Likewise.
655         * python/py-value.c (valpy_call): Likewise.
656         * python/python.c (do_start_initialization): Likewise.
657         * record-btrace.c (record_btrace_insn_history_range): Likewise.
658         (record_btrace_call_history_range): Likewise.
659         (record_btrace_record_method): Likewise.
660         (record_btrace_xfer_partial): Likewise.
661         (btrace_get_frame_function): Likewise.
662         * record-full.c (record_full_open): Likewise.
663         * record.c (get_context_size): Likewise.
664         * registry.h (DEFINE_REGISTRY): Likewise.
665         * remote-fileio.c (remote_fileio_request): Likewise.
666         * remote.c (remote_update_thread_list): Likewise.
667         (remote_check_symbols): Likewise.
668         (remote_commit_resume): Likewise.
669         (remote_interrupt): Likewise.
670         (remote_insert_breakpoint): Likewise.
671         (compare_sections_command): Likewise.
672         * rust-exp.y (super_name): Likewise.
673         (lex_string): Likewise.
674         (convert_ast_to_type): Likewise.
675         (convert_ast_to_expression): Likewise.
676         * rust-lang.c (rust_print_struct_def): Likewise.
677         (rust_print_type): Likewise.
678         (rust_evaluate_subexp): Likewise.
679         * rx-tdep.c (rx_register_type): Likewise.
680         * ser-event.c (serial_event_clear): Likewise.
681         * serial.c (serial_open): Likewise.
682         * spu-tdep.c (spu_overlay_new_objfile): Likewise.
683         * symfile.c (section_is_overlay): Likewise.
684         (overlay_unmapped_address): Likewise.
685         (overlay_mapped_address): Likewise.
686         (simple_overlay_update_1): Likewise.
687         (simple_overlay_update): Likewise.
688         * symtab.c (symbol_find_demangled_name): Likewise.
689         (search_symbols): Likewise.
690         * target-descriptions.c (tdesc_predefined_type): Likewise.
691         * target.c (target_commit_resume): Likewise.
692         * thread.c (print_selected_thread_frame): Likewise.
693         * top.c (new_ui_command): Likewise.
694         (gdb_readline_no_editing): Likewise.
695         * tracefile-tfile.c (tfile_open): Likewise.
696         * tracepoint.c (create_tsv_from_upload): Likewise.
697         * utils.c (quit): Likewise.
698         (defaulted_query): Likewise.
699         * valarith.c (value_concat): Likewise.
700         * xml-syscall.c (xml_list_syscalls_by_group): Likewise.
701         * xml-tdesc.c (target_fetch_description_xml): Likewise.
702         * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
703         (xtensa_pseudo_register_write): Likewise.
704
705 2017-12-04  Tom Tromey  <tom@tromey.com>
706
707         * NEWS: Mention Rust trait object inspection.
708
709 2017-12-04  Pedro Alves  <palves@redhat.com>
710
711         PR gdb/22499
712         * amd64-tdep.c (amd64_insn::rex_offset): Rename to...
713         (amd64_insn::enc_prefix_offset): ... this, and tweak comment.
714         (vex2_prefix_p, vex3_prefix_p): New functions.
715         (amd64_get_insn_details): Adjust to rename.  Also skip VEX2 and
716         VEX3 prefixes.
717         (fixup_riprel): Set VEX3.!B.
718
719 2017-12-03  Simon Marchi  <simon.marchi@ericsson.com>
720
721         * target.h (mem_region_vector): Remove.
722         (struct target_ops) <to_memory_map>: Change return type to
723         std::vector<mem_region>.
724         * target-debug.h (target_debug_print_mem_region_vector): Rename
725         to ...
726         (target_debug_print_std_vector_mem_region): ... this.
727         * target-delegates.c: Re-generate.
728
729 2017-12-03  Pedro Alves  <palves@redhat.com>
730
731         * make-target-delegates (munge_type): Also munge '<', '>', and
732         ':'.  Avoid double underscores in identifiers, and trailing
733         underscores.
734         * target-debug.h
735         (target_debug_print_VEC_static_tracepoint_marker_p__p): Rename to
736         ...
737         (target_debug_print_VEC_static_tracepoint_marker_p_p): ... this.
738         * target-delegates.c: Regenerate.
739
740 2017-12-02  Simon Marchi  <simon.marchi@polymtl.ca>
741
742         * common/poison.h (XDELETE): Fix typo.
743
744 2017-12-01  Andrew Cagney  <cagney@redhat.com>
745             Joel Brobecker  <brobecker@adacore.com>
746             Sergio Durigan Junior  <sergiodj@redhat.com>
747
748         * NEWS (Changes since GDB 8.0: Mention new '--readnever'
749         feature.
750         * coffread.c (coff_symfile_read): Do not map over sections with
751         'coff_locate_sections' if readnever is on.
752         * dwarf2read.c (dwarf2_has_info): Return 0 if
753         readnever is on.
754         * elfread.c (elf_symfile_read): Do not map over sections with
755         'elf_locate_sections' if readnever is on.
756         * main.c (validate_readnow_readnever): New function.
757         (captured_main_1): Add support for --readnever.
758         (print_gdb_help): Document --readnever.
759         * objfile-flags.h (enum objfile_flag) <OBJF_READNEVER>: New
760         flag.
761         * symfile.c (readnever_symbol_files): New global.
762         (symbol_file_add_with_addrs): Set 'OBJF_READNEVER' when
763         'READNEVER_SYMBOL_FILES' is set.
764         (validate_readnow_readnever): New function.
765         (symbol_file_command): Handle '-readnever' option.
766         Call 'validate_readnow_readnever'.
767         (add_symbol_file_command): Handle '-readnever' option.
768         Call 'validate_readnow_readnever'.
769         (_initialize_symfile): Document new '-readnever' option for
770         both 'symbol-file' and 'add-symbol-file' commands.
771         * top.h (readnever_symbol_files): New extern global.
772         * xcoffread.c (xcoff_initial_scan): Do not read debug
773         information if readnever is on.
774
775 2017-12-01  Sergio Durigan Junior  <sergiodj@redhat.com>
776
777         * symfile.c (symbol_file_command): Call
778         'symbol_file_add_main_1' only after processing all command
779         line options.
780         (add_symbol_file_command): Modify logic to make arguments
781         position-independent.
782
783 2017-12-01  Joel Brobecker  <brobecker@adacore.com>
784
785         * ada-lang.c (symbol_list_obstack): Delete.
786         (resolve_subexp): Make sure "candidates" gets xfree'ed.
787         (ada_lookup_symbol_list_worker): Remove the limitation that
788         the result is only good until the next call, now making it
789         the responsibility of the caller to free the result when no
790         longer needed.  Adjust the function's intro comment accordingly.
791         (ada_lookup_symbol_list): Adjust the function's intro comment.
792         (ada_iterate_over_symbols): Make sure "results" gets xfree'ed.
793         (ada_lookup_encoded_symbol, get_var_value): Likewise.
794         (_initialize_ada_language): Remove symbol_list_obstack
795         initialization.
796         * ada-exp.y (block_lookup): Make sure "syms" gets xfree'ed.
797         (write_var_or_type, write_name_assoc): Likewise.
798
799 2017-12-01  Tom Tromey  <tom@tromey.com>
800
801         * Makefile.in (all_deps_files): New variable.
802         Include .Po files using all_deps_files.
803
804 2017-12-01  Joel Brobecker  <brobecker@adacore.com>
805
806         * MAINTAINERS: Update list of maintainers, moving those who
807         stepped down or became inactive to the "Past Maintainers"
808         section.
809
810 2017-11-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
811
812         * configure.ac Don't check for sys/fault.h, sys/syscall.h,
813         sys/proc.h.
814         (NEW_PROC_API): Remove.
815         (prsysent_t, pr_sigset_t, pr_sigaction64_t, pr_siginfo64_t):
816         Likewise.
817         * common/common.m4 (GDB_AC_COMMON): Don't check for sys/syscall.h.
818         * configure: Regenerate.
819         * config.in: Regenerate.
820         * gdbserver/configure: Regenerate.
821         * gdbserver/config.in: Regenerate.
822
823         * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Remove
824         NEW_PROC_API test.
825         * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Likewise.
826
827         * linux-btrace.c: Remove HAVE_SYS_SYSCALL_H test.
828
829         * proc-api.c: Remove !NEW_PROC_API support.
830         Remove HAVE_SYS_PROC_H and HAVE_SYS_USER_H tests.
831         Remove tests for macros always defined on Solaris.
832         * proc-events.c: Remove !NEW_PROC_API support.
833         Remove Remove HAVE_SYS_SYSCALL_H, HAVE_SYS_PROC_H and
834         HAVE_SYS_USER_H tests.
835         (init_syscall_table): Remove non-Solaris syscalls.
836         Remove tests for syscalls present on all Solaris versions.
837         Add missing Solaris 10+ syscalls.
838         (signal_table): Remove non-Solaris signals.
839         Remove tests for signals present on all Solaris versions.
840         (fault_table): Remove non-Solaris faults.
841         Remove tests for faults present on all Solaris versions.
842         * proc-flags.c: Remove !NEW_PROC_API support.
843         (pr_flag_table): Remove non-Solaris and pre-Solaris 7 comments.
844         Remove non-Solaris flags.
845         * proc-why.c: Remove !NEW_PROC_API support.
846         (pr_why_table): Remove meaningless comments.
847         Remove tests for reasons present on all Solaris versions.
848         Remove OSF/1 cases.
849         (proc_prettyfprint_why): Likewise.
850
851         * procfs.c: Remove !NEW_PROC_API and DYNAMIC_SYSCALLS support.
852         Remove HAVE_SYS_FAULT_H and HAVE_SYS_SYSCALL_H tests.
853         Remove WA_READ test, IRIX watchpoint support.
854         (gdb_sigset_t, gdb_sigaction_t, gdb_siginfo_t): Replace by base
855         types.  Change users.
856         (gdb_praddset, gdb_prdelset, gdb_premptysysset, gdb_praddsysset)
857         (gdb_prdelset, gdb_pr_issyssetmember): Replace by base macros.
858         Change callers.
859         Remove CTL_PROC_NAME_FMT tests.
860         (gdb_prstatus_t, gdb_lwpstatus_t): Replace by base types.  Change
861         users.
862         (sysset_t_size): Remove.  Use sizeof (sysset_t) in callers.
863         Remove PROCFS_DONT_PIOCSSIG_CURSIG support.
864         (proc_modify_flag): Replace GDBRESET by PCUNSET.
865         Remove PR_ASYNC, PR_KLC tests.
866         (proc_unset_inherit_on_fork): Remove PR_ASYNC test.
867         (proc_parent_pid): Remove PCWATCH etc. tests.
868         (proc_set_watchpoint): Remove !PCWATCH && !PIOCSWATCH support.
869         Remove PCAGENT test.
870         (proc_get_nthreads) [PIOCNTHR && PIOCTLIST]: Remove.
871         Remove SYS_lwpcreate || SYS_lwp_create test.
872         (proc_get_current_thread): Likewise.
873         [PIOCNTHR && PIOCTLIST]: Remove.
874         [PIOCLSTATUS]: Remove.
875         (procfs_debug_inferior): Remove non-Solaris cases, conditionals.
876         [PRFS_STOPEXEC]: Remove.
877         (syscall_is_lwp_exit): Remove non-Solaris cases, conditionals.
878         (syscall_is_exit): Likewise.
879         (syscall_is_exec): Likewise.
880         (syscall_is_lwp_create): Likewise.
881         Remove SYS_syssgi support.
882         (procfs_wait): Remove PR_ASYNC, !PIOCSSPCACT tests.
883         [SYS_syssgi]: Remove.
884         Remove non-Solaris cases, conditionals.
885         (unconditionally_kill_inferior) [PROCFS_NEED_PIOCSSIG_FOR_KILL]:
886         Remove.
887         (procfs_init_inferior) [SYS_syssgi]: Remove.
888         (procfs_set_exec_trap) [PRFS_STOPEXEC]: Remove.
889         (procfs_inferior_created) [SYS_syssgi]: Remove.
890         (procfs_set_watchpoint): Remove !AIX5 test.
891         (procfs_stopped_by_watchpoint): Remove FLTWATCH test, FLTKWATCH
892         case.
893         (mappingflags) [MA_PHYS]: Remove.
894         (info_mappings_callback): Remove PCAGENT test.
895         Remove PIOCOPENLWP || PCAGENT test.
896
897 2017-11-30  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
898
899         * sol-thread.c (info_solthreads): Constify args.
900         Cast args to void *.
901
902 2017-11-29  John Baldwin  <jhb@FreeBSD.org>
903
904         * target-float.c [HAVE_LIBMPFR]: Define MPFR_USE_INTMAX_T.
905
906 2017-11-29  Joel Brobecker  <brobecker@adacore.com>
907
908         * ada-lang.c (to_fixed_range_type): Make sure that the size
909         of the range type being returned is the same as the size
910         of the range type being fixed.
911
912 2017-11-29  Pedro Alves  <palves@redhat.com>
913
914         PR c++/19436
915         * NEWS: Mention setting breakpoints on functions with C++ ABI
916         tags.
917         * completer.h (completion_match_for_lcd) <match,
918         mark_ignored_range>: New methods.
919         <finish>: Consider ignored ranges.
920         <clear>: Clear ignored ranges.
921         <m_ignored_ranges, m_finished_storage>: New fields.
922         * cp-support.c (cp_search_name_hash): Ignore ABI tags.
923         (cp_symbol_name_matches_1, cp_fq_symbol_name_matches): Pass the
924         completion_match_for_lcd pointer to strncmp_iw_with_mode.
925         (test_cp_symbol_name_cmp): Add [abi:...] tags unit tests.
926         * language.c (default_symbol_name_matcher): Pass the
927         completion_match_for_lcd pointer to strncmp_iw_with_mode.
928         * linespec.c (linespec_lexer_lex_string): Don't tokenize ABI tags.
929         * utils.c (skip_abi_tag): New function.
930         (strncmp_iw_with_mode): Add completion_match_for_lcd parameter.
931         Handle ABI tags.
932         * utils.h (strncmp_iw_with_mode): Add completion_match_for_lcd
933         parameter.
934
935 2017-11-29  Pedro Alves  <palves@redhat.com>
936
937         PR c++/19436
938         * NEWS: Mention setting breakpoints on functions with C++ ABI
939         tags.
940         * completer.h (completion_match_for_lcd) <match,
941         mark_ignored_range>: New methods.
942         <finish>: Consider ignored ranges.
943         <clear>: Clear ignored ranges.
944         <m_ignored_ranges, m_finished_storage>: New fields.
945         * cp-support.c (cp_search_name_hash): Ignore ABI tags.
946         (cp_symbol_name_matches_1, cp_fq_symbol_name_matches): Pass the
947         completion_match_for_lcd pointer to strncmp_iw_with_mode.
948         (test_cp_symbol_name_cmp): Add [abi:...] tags unit tests.
949         * language.c (default_symbol_name_matcher): Pass the
950         completion_match_for_lcd pointer to strncmp_iw_with_mode.
951         * linespec.c (linespec_lexer_lex_string): Don't tokenize ABI tags.
952         * utils.c (skip_abi_tag): New function.
953         (strncmp_iw_with_mode): Add completion_match_for_lcd parameter.
954         Handle ABI tags.
955         * utils.h (strncmp_iw_with_mode): Add completion_match_for_lcd
956         parameter.
957
958 2017-11-29  Pedro Alves  <palves@redhat.com>
959
960         * NEWS: Mention that breakpoints on C++ functions are now set on
961         on all namespaces/classes by default, and mention "break
962         -qualified".
963         * ax-gdb.c (agent_command_1): Adjust to pass a
964         symbol_name_match_type to new_linespec_location.
965         * breakpoint.c (parse_breakpoint_sals): Adjust to
966         get_linespec_location's return type change.
967         (strace_marker_create_sals_from_location): Adjust to pass a
968         symbol_name_match_type to new_linespec_location.
969         (strace_marker_decode_location): Adjust to get_linespec_location's
970         return type change.
971         (strace_command): Adjust to pass a symbol_name_match_type to
972         new_linespec_location.
973         (LOCATION_HELP_STRING): Add paragraph about wildmatching, and
974         mention "-qualified".
975         * c-lang.c (cplus_language_defn): Install cp_search_name_hash.
976         * completer.c (explicit_location_match_type::MATCH_QUALIFIED): New
977         enumerator.
978         (complete_address_and_linespec_locations): New parameter
979         'match_type'.  Pass it down.
980         (explicit_options): Add "-qualified".
981         (collect_explicit_location_matches): Pass the requested match type
982         to the linespec completers.  Handle MATCH_QUALIFIED.
983         (location_completer): Handle "-qualified" combined with linespecs.
984         * cp-support.c (cp_search_name_hash): New.
985         (cp_symbol_name_matches_1): Implement wild matching for C++.
986         (cp_fq_symbol_name_matches): Reimplement.
987         (cp_get_symbol_name_matcher): Return different matchers depending
988         on the lookup name's match type.
989         (selftests::test_cp_symbol_name_matches): Add wild matching tests.
990         * cp-support.h (cp_search_name_hash): New declaration.
991         * dwarf2read.c
992         (selftests::dw2_expand_symtabs_matching::test_symbols): Add
993         symbols.
994         (test_dw2_expand_symtabs_matching_symbol): Add wild matching
995         tests.
996         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Adjust to
997         pass a symbol_name_match_type to new_linespec_location.
998         * linespec.c (linespec_parse_basic): Lookup function symbols using
999         the parser's symbol name match type.
1000         (convert_explicit_location_to_linespec): New
1001         symbol_name_match_type parameter.  Pass it down to
1002         find_linespec_symbols.
1003         (convert_explicit_location_to_sals): Pass the location's name
1004         match type to convert_explicit_location_to_linespec.
1005         (parse_linespec): New match_type parameter.  Save it in the
1006         parser.
1007         (linespec_parser_new): Default to symbol_name_match_type::WILD.
1008         (linespec_complete_function): New symbol_name_match_type
1009         parameter.  Use it.
1010         (complete_linespec_component): Pass down the parser's recorded
1011         name match type.
1012         (linespec_complete_label): New symbol_name_match_type parameter.
1013         Use it.
1014         (linespec_complete): New symbol_name_match_type parameter.  Save
1015         it in the parser and pass it down.  Adjust to
1016         get_linespec_location's prototype change.
1017         (find_function_symbols, find_linespec_symbols): New
1018         symbol_name_match_type parameter.  Pass it down instead of
1019         assuming symbol_name_match_type::WILD.
1020         * linespec.h (linespec_complete, linespec_complete_function)
1021         (linespec_complete_label): New symbol_name_match_type parameter.
1022         * location.c (event_location::linespec_location): Now a struct
1023         linespec_location.
1024         (EL_LINESPEC): Adjust.
1025         (initialize_explicit_location): Default to
1026         symbol_name_match_type::WILD.
1027         (new_linespec_location): New symbol_name_match_type parameter.
1028         Record it in the location.
1029         (get_linespec_location): Now returns a struct linespec_location.
1030         (new_explicit_location): Also copy func_name_match_type.
1031         (explicit_to_string_internal)
1032         (string_to_explicit_location): Handle "-qualified".
1033         (copy_event_location): Adjust to LINESPEC_LOCATION type change.
1034         Copy symbol_name_match_type fields.
1035         (event_location_deleter::operator()): Adjust to LINESPEC_LOCATION
1036         type change.
1037         (event_location_to_string): Adjust to LINESPEC_LOCATION type
1038         change.  Handle "-qualfied".
1039         (string_to_explicit_location): Handle "-qualified".
1040         (string_to_event_location_basic): New symbol_name_match_type
1041         parameter.  Pass it down.
1042         (string_to_event_location): Handle "-qualified".
1043         * location.h (struct linespec_location): New.
1044         (explicit_location::func_name_match_type): New field.
1045         (new_linespec_location): Now returns a const linespec_location *.
1046         (string_to_event_location_basic): New symbol_name_match_type
1047         parameter.
1048         (explicit_completion_info::saw_explicit_location_option): New
1049         field.
1050         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Adjust to pass a
1051         symbol_name_match_type to new_linespec_location.
1052         * python/py-breakpoint.c (bppy_init): Likewise.
1053         * python/python.c (gdbpy_decode_line): Likewise.
1054
1055 2017-11-29  Pedro Alves  <palves@redhat.com>
1056
1057         * ada-lang.c (ada_lookup_name_info::matches): Change type of
1058         parameter from completion_match to completion_match_result.
1059         Adjust.
1060         (do_wild_match, do_full_match, ada_symbol_name_matches): Likewise.
1061         * completer.c (completion_tracker::maybe_add_completion): Add
1062         match_for_lcd parameter and use it.
1063         (completion_tracker::add_completion): Likewise.
1064         * completer.h (class completion_match_for_lcd): New class.
1065         (completion_match_result::match_for_lcd): New field.
1066         (completion_match_result::set_match): New method.
1067         (completion_tracker): Add comments.
1068         (completion_tracker::add_completion): Add match_for_lcd parameter.
1069         (completion_tracker::reset_completion_match_result): Reset
1070         match_for_lcd too.
1071         (completion_tracker::maybe_add_completion): Add match_for_lcd
1072         parameter.
1073         (completion_tracker::m_lowest_common_denominator_unique): Extend
1074         comments.
1075         * cp-support.c (cp_symbol_name_matches_1)
1076         (cp_fq_symbol_name_matches): Change type of parameter from
1077         completion_match to completion_match_result.  Adjust.
1078         * language.c (default_symbol_name_matcher): Change type of
1079         parameter from completion_match to completion_match_result.
1080         Adjust.
1081         * language.h (completion_match_for_lcd): Forward declare.
1082         (default_symbol_name_matcher): Change type of parameter from
1083         completion_match to completion_match_result.
1084         * symtab.c (compare_symbol_name): Adjust.
1085         (completion_list_add_name): Pass the match_for_lcd to the tracker.
1086         * symtab.h (ada_lookup_name_info::matches): Change type of
1087         parameter from completion_match to completion_match_result.
1088         (symbol_name_matcher_ftype): Likewise, and update comments.
1089
1090 2017-11-29  Pedro Alves  <palves@redhat.com>
1091
1092         * linespec.c (minsym_found, add_minsym): Use msymbol_is_function.
1093         * minsyms.c (msymbol_is_text): Delete.
1094         (msymbol_is_function): New function.
1095         * minsyms.h (msymbol_is_text): Delete.
1096         (msymbol_is_function): New declaration.
1097         * symtab.c (find_function_alias_target): Use msymbol_is_function.
1098
1099 2017-11-29  Tom Tromey  <tom@tromey.com>
1100
1101         * Makefile.in (distclean): Handle the case where rmdir fails.
1102
1103 2017-11-29  Tom Tromey  <tom@tromey.com>
1104
1105         * symfile.c (_initialize_symfile): Update usage text for
1106         add-symbol-file, symbol-file, load.
1107
1108 2017-11-29  Tom Tromey  <tom@tromey.com>
1109
1110         * symfile.c (add_symbol_file_command): Error if some arguments to
1111         -s are missing.  Change unrecognized-argument error message.
1112         (_initialize_symfile): Fix usage text for add-symbol-file.
1113
1114 2017-11-27  Tom Tromey  <tom@tromey.com>
1115
1116         * Makefile.in (REMOTE_OBS): Remove.
1117         (SFILES): Remove remote sources.
1118         (COMMON_SFILES): Add remote sources.
1119         (ALLDEPFILES): Remove dcache.c.
1120
1121 2017-11-27  Tom Tromey  <tom@tromey.com>
1122
1123         * Makefile.in (SUBDIR_TARGET_SRCS, SUBDIR_TARGET_OBS): New
1124         variables.
1125         (SFILES): Use SUBDIR_TARGET_SRCS.
1126         (COMMON_OBS): Use SUBDIR_TARGET_OBS.  Remove waitstatus.o.
1127         (CONFIG_SRC_SUBDIR): Add target.
1128         (%.o): Remove target rule.
1129
1130 2017-11-27  Tom Tromey  <tom@tromey.com>
1131
1132         * Makefile.in (COMMON_OBS): Remove filename-seen-cache.o,
1133         registry.o, thread-fsm.o, debug.o.
1134         (COMMON_SFILES): Add filename-seen-cache.c, registry.c,
1135         thread-fsm.c, debug.c.
1136
1137 2017-11-27  Tom Tromey  <tom@tromey.com>
1138
1139         * Makefile.in (COMMON_SFILES): New.
1140         (SFILES): Move some entries to COMMON_SFILES.
1141         (COMMON_OBS): Use COMMON_SFILES.
1142
1143 2017-11-27  Tom Tromey  <tom@tromey.com>
1144
1145         * Makefile.in (YYFILES): Update comment.
1146         (YYOBJ): Redefine.
1147
1148 2017-11-27  Tom Tromey  <tom@tromey.com>
1149
1150         * Makefile.in (SUBDIR_PYTHON_OBS): Redefine.
1151         (CONFIG_SRC_SUBDIR): Add python.
1152         (%.o): Remove python rule.
1153         (python/%.o): New rule.
1154         * configure: Rebuild.
1155         * configure.ac (CONFIG_OBS): Refer to python/python.o
1156
1157 2017-11-27  Tom Tromey  <tom@tromey.com>
1158
1159         * configure: Rebuild.
1160         * configure.ac (CONFIG_OBS): Refer to guile/guile.o.
1161         * Makefile.in (SUBDIR_GUILE_OBS): Redefine.
1162         (CONFIG_SRC_SUBDIR): Add guile.
1163         (%.o): Remove guile rule.
1164
1165 2017-11-27  Tom Tromey  <tom@tromey.com>
1166
1167         * Makefile.in (SUBDIR_UNITTESTS_OBS): Redefine.
1168         (%.o): Remove unittests rule.
1169         (CONFIG_SRC_SUBDIR): Add unittests.
1170
1171 2017-11-27  Tom Tromey  <tom@tromey.com>
1172
1173         * Makefile.in (SUBDIR_TUI_OBS): Redefine.
1174         (CONFIG_SRC_SUBDIR): Add tui.
1175         (%.o): Remove tui rule.
1176
1177 2017-11-27  Tom Tromey  <tom@tromey.com>
1178
1179         * Makefile.in (SUBDIR_GCC_COMPILE_OBS): Redefine.
1180         (%.o): Remove compile rule.
1181         (CONFIG_SRC_SUBDIR): Add compile.
1182
1183 2017-11-27  Tom Tromey  <tom@tromey.com>
1184
1185         * Makefile.in (SUBDIR_MI_OBS): Redefine.
1186         (%.o): Remove mi rule.
1187         (CONFIG_SRC_SUBDIR): Add mi.
1188         (COMMON_OBS): Use mi/mi-common.o
1189
1190 2017-11-27  Tom Tromey  <tom@tromey.com>
1191
1192         * Makefile.in (SUBDIR_CLI_OBS): Redefine.
1193         (%.o): Remove cli rule.
1194         (CONFIG_SRC_SUBDIR): Add cli.
1195
1196 2017-11-27  Tom Tromey  <tom@tromey.com>
1197
1198         * configure.ac (CONFIG_SRC_SUBDIR): Don't subst.
1199         * configure: Rebuild.
1200         * Makefile.in (CONFIG_SRC_SUBDIR): Redefine.
1201         (CONFIG_DEP_SUBDIR): New variable.
1202         (%.o): Add order-only dependency.
1203         ($(CONFIG_DEP_SUBDIR)): New target.
1204
1205 2017-11-26  Dominik Czarnota  <dominik.b.czarnota@gmail.com>
1206
1207         PR gdb/21945
1208         * findcmd.c (_initialize_mem_search): Update find command help
1209         text.
1210
1211 2017-11-26  Simon Marchi  <simon.marchi@polymtl.ca>
1212
1213         * python/python.c (do_start_initialization): Change progname
1214         type to gdb::unique_xmalloc_ptr.  Release the pointer when using
1215         Python 2.
1216
1217 2017-11-26  Tom Tromey  <tom@tromey.com>
1218
1219         * common/format.h: Add include guards.
1220
1221 2017-11-26  Tom Tromey  <tom@tromey.com>
1222
1223         * nat/linux-personality.h (class
1224         maybe_disable_address_space_randomization): New class.
1225         (maybe_disable_address_space_randomization): Don't declare
1226         function.
1227         * nat/linux-personality.c (restore_personality)
1228         (make_disable_asr_cleanup): Remove.
1229         (maybe_disable_address_space_randomization): Now a constructor.
1230         (~maybe_disable_address_space_randomization): New destructor.
1231         * linux-nat.c (linux_nat_create_inferior): Update.
1232
1233 2017-11-26  Tom Tromey  <tom@tromey.com>
1234
1235         * gcore.c (write_gcore_file_1): Use gdb::unique_xmalloc_ptr.
1236
1237 2017-11-26  Ulrich Weigand  <uweigand@de.ibm.com>
1238
1239         * spu-tdep.c (spu_software_single_step): Access SPU_LSLR_REGNUM as
1240         "cooked" register.  Access only first four bytes of branch target
1241         registers.
1242
1243 2017-11-25  Sergio Durigan Junior  <sergiodj@redhat.com>
1244
1245         PR gdb/22491
1246         * stap-probe.c (relocate_address): New function.
1247         (stap_probe::get_relocated_address): Use 'relocate_address'.
1248         (stap_probe::set_semaphore): Use 'relocate_address' and pass
1249         'm_sem_addr'.
1250         (stap_probe::clear_semaphore): Likewise.
1251
1252 2017-11-25  Pedro Alves  <palves@redhat.com>
1253
1254         * dictionary.c: Include "safe-ctype.h".
1255         * minsyms.c: Include "safe-ctype.h".
1256         * minsyms.c (SYMBOL_HASH_NEXT): Use TOLOWER instead of tolower.
1257
1258 2017-11-25   Pedro Alves  <palves@redhat.com>
1259
1260         * completer.c (complete_line_internal_1): Skip spaces until the
1261         start of the command.
1262
1263 2017-11-24  Pedro Alves  <palves@redhat.com>
1264
1265         * cp-support.c (cp_symbol_name_matches_1): New, factored out from
1266         cp_fq_symbol_name_matches.  Pass language_cplus to
1267         strncmp_with_mode.
1268         (cp_fq_symbol_name_matches): Call cp_symbol_name_matches_1.
1269         (selftests::test_cp_symbol_name_cmp): New.
1270         (_initialize_cp_support): Register "cp_symbol_name_matches"
1271         selftests.
1272         * language.c (default_symbol_name_matcher): Pass language_minimal
1273         to strncmp_iw_with_mode.
1274         * utils.c: Include "cp-support.h" and <algorithm>.
1275         (valid_identifier_name_char, cp_skip_operator_token, skip_ws)
1276         (cp_is_operator): New functions.
1277         (strncmp_iw_with_mode): Use them.  Add language parameter.  Don't
1278         skip whitespace in the symbol name when the lookup name doesn't
1279         have spaces, and vice versa.
1280         (strncmp_iw, strcmp_iw): Pass language to strncmp_iw_with_mode.
1281         * utils.h (strncmp_iw_with_mode): Add language parameter.
1282
1283 2017-11-24  Joel Brobecker  <brobecker@adacore.com>
1284
1285         * ada-lang.c (ada_exception_message_1, ada_exception_message):
1286         New functions.
1287         (print_it_exception): If available, display the exception
1288         message as well.
1289         * NEWS: Document new feature.
1290
1291 2017-11-24  Ulrich Weigand  <uweigand@de.ibm.com>
1292
1293         * configure.nat <spu-linux>: Add fork-inferior.o to NATDEPFILES.
1294
1295 2017-11-24  Philipp Rudo  <prudo@linux.vnet.ibm.com>
1296
1297         * dtrace-probe.c (dtrace_probe::build_arg_exprs)
1298         (dtrace_probe::is_enabled, dtrace_probe::enable)
1299         (dtrace_probe::disable): Remove keyword 'struct' at for-range
1300         variable
1301         * probe.c (gen_ui_out_table_header_info)
1302         (print_ui_out_not_applicables):  Remove keyword 'struct' at
1303         for-range variable
1304
1305 2017-11-24  Alan Hayward  <alan.hayward@arm.com>
1306
1307         * configure.tgt: Add arch/aarch64.o
1308
1309 2017-11-24  Simon Marchi  <simon.marchi@polymtl.ca>
1310
1311         * common/common-utils.h: Include poison.h.
1312         (xfree): Remove declaration, add definition with static_assert.
1313         * common/common-utils.c (xfree): Remove.
1314         * common/poison.h (IsMallocatable): Define.
1315         (IsFreeable): Define.
1316         (free): Delete for non-freeable types.
1317         (xnew): New.
1318         (XNEW): Undef and redefine.
1319         (xcnew): New.
1320         (XCNEW): Undef and redefine.
1321         (xdelete): New.
1322         (XDELETE): Undef and redefine.
1323         (xnewvec): New.
1324         (XNEWVEC): Undef and redefine.
1325         (xcnewvec): New.
1326         (XCNEWVEC): Undef and redefine.
1327         (xresizevec): New.
1328         (XRESIZEVEC): Undef and redefine.
1329         (xdeletevec): New.
1330         (XDELETEVEC): Undef and redefine.
1331         (xnewvar): New.
1332         (XNEWVAR): Undef and redefine.
1333         (xcnewvar): New.
1334         (XCNEWVAR): Undef and redefine.
1335         (xresizevar): New.
1336         (XRESIZEVAR): Undef and redefine.
1337
1338 2017-11-24  Simon Marchi  <simon.marchi@polymtl.ca>
1339
1340         * gdbthread.h (private_thread_info): Define structure type, add
1341         virtual pure destructor.
1342         (thread_info) <priv>: Change type to unique_ptr.
1343         <private_dtor>: Remove.
1344         * thread.c (add_thread_with_info): Adjust to use of unique_ptr.
1345         (private_thread_info::~private_thread_info): Provide default
1346         implementation.
1347         (thread_info::~thread_info): Don't call private_dtor nor
1348         manually free priv.
1349         * aix-thread.c (private_thread_info): Rename to ...
1350         (aix_thread_info): ... this.
1351         (get_aix_thread_info): New.
1352         (sync_threadlists): Adjust.
1353         (iter_tid): Adjust.
1354         (aix_thread_resume): Adjust.
1355         (aix_thread_fetch_registers): Adjust.
1356         (aix_thread_store_registers): Adjust.
1357         (aix_thread_extra_thread_info): Adjust.
1358         * darwin-nat.h (private_thread_info): Rename to ...
1359         (darwin_thread_info): ... this.
1360         (get_darwin_thread_info): New.
1361         * darwin-nat.c (darwin_init_thread_list): Adjust.
1362         (darwin_check_new_threads): Adjust.
1363         (thread_info_from_private_thread_info): Adjust.
1364         * linux-thread-db.c (private_thread_info): Rename to ...
1365         (thread_db_thread_info): ... this, initialize fields.
1366         (get_thread_db_thread_info): New.
1367         <dying>: Change type to bool.
1368         (update_thread_state): Adjust to type rename.
1369         (record_thread): Adjust to type rename an use of unique_ptr.
1370         (thread_db_pid_to_str): Likewise.
1371         (thread_db_extra_thread_info): Likewise.
1372         (thread_db_thread_handle_to_thread_info): Likewise.
1373         (thread_db_get_thread_local_address): Likewise.
1374         * nto-tdep.h (private_thread_info): Rename to ...
1375         (nto_thread_info): ... this, initialize fields.
1376         (get_nto_thread_info): New.
1377         <name>: Change type to std::string.
1378         * nto-tdep.c (nto_extra_thread_info): Adjust to type rename and
1379         use of unique_ptr.
1380         * nto-procfs.c (update_thread_private_data_name): Adjust to
1381         std::string change, allocate nto_private_thread_info with new.
1382         (update_thread_private_data): Adjust to unique_ptr.
1383         * remote.c (private_thread_info): Rename to ...
1384         (remote_thread_info): ... this, initialize data members with
1385         default values.
1386         <extra, name>: Change type to std::string.
1387         <thread_handle>: Change type to non-pointer.
1388         (free_private_thread_info): Remove.
1389         (get_private_info_thread): Rename to...
1390         (get_remote_thread_info): ... this, change return type, adjust to
1391         use of unique_ptr, use remote_thread_info constructor.
1392         (remote_add_thread): Adjust.
1393         (get_private_info_ptid): Rename to...
1394         (get_remote_thread_info): ...this, change return type.
1395         (remote_thread_name): Use get_remote_thread_info, adjust to
1396         change to std::string.
1397         (struct thread_item) <~thread_item>: Remove.
1398         <thread_handle>: Make non pointer.
1399         (start_thread): Adjust to thread_item::thread_handle type
1400         change.
1401         (remote_update_thread_list): Adjust to type name change, move
1402         strings from temporary to long-lived object instead of
1403         duplicating.
1404         (remote_threads_extra_info): Use get_remote_thread_info.
1405         (process_initial_stop_replies): Likewise.
1406         (resume_clear_thread_private_info): Likewise.
1407         (remote_resume): Adjust to type name change.
1408         (remote_commit_resume): Use get_remote_thread_info.
1409         (process_stop_reply): Adjust to type name change.
1410         (remote_stopped_by_sw_breakpoint): Use get_remote_thread_info.
1411         (remote_stopped_by_hw_breakpoint): Likewise.
1412         (remote_stopped_by_watchpoint): Likewise.
1413         (remote_stopped_data_address): Likewise.
1414         (remote_core_of_thread): Likewise.
1415         (remote_thread_handle_to_thread_info): Use
1416         get_private_info_thread, adjust to thread_handle field type
1417         change.
1418
1419 2017-11-24  Simon Marchi  <simon.marchi@polymtl.ca>
1420
1421         * remote.c (struct thread_item): Add constructor, disable copy
1422         construction and copy assignment, define default move
1423         construction and move assignment.
1424         <extra, name>: Change type to std::string.
1425         <core>: Initialize.
1426         <thread_handle>: Make non-pointer.
1427         (thread_item_t): Remove typedef.
1428         (DEF_VEC_O(thread_item_t)): Remove.
1429         (threads_listing_context) <contains_thread>: New method.
1430         <remove_thread>: New method.
1431         <items>: Change type to std::vector.
1432         (clear_threads_listing_context): Remove.
1433         (threads_listing_context_remove): Remove.
1434         (remote_newthread_step): Use thread_item constructor, adjust to
1435         change to std::vector.
1436         (start_thread): Use thread_item constructor, adjust to change to
1437         std::vector.
1438         (end_thread): Adjust to change to std::vector and std::string.
1439         (remote_get_threads_with_qthreadinfo): Use thread_item
1440         constructor, adjust to std::vector.
1441         (remote_update_thread_list): Adjust to change to std::vector and
1442         std::string, use threads_listing_context methods.
1443         (remove_child_of_pending_fork): Adjust.
1444         (remove_new_fork_children): Adjust.
1445         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add rsp-low-selftests.c.
1446         (SUBDIR_UNITTESTS_OBS): Add rsp-low-selftests.o.
1447         * unittests/rsp-low-selftests.c: New file.
1448         * common/rsp-low.h: Include common/byte-vector.h.
1449         (hex2bin): New overload.
1450         * common/rsp-low.c (hex2bin): New overload.
1451
1452 2017-11-24  Simon Marchi  <simon.marchi@ericsson.com>
1453
1454         * inferior.h (private_inferior): Define structure type, add
1455         virtual pure destructor.
1456         (inferior) <priv>: Change type to unique_ptr.
1457         * inferior.c (private_inferior::~private_inferior): Provide
1458         default implementation.
1459         (inferior::~inferior): Don't free priv field.
1460         (exit_inferior_1): Likewise.
1461         * darwin-nat.h (struct darwin_exception_info): Initialize fields.
1462         (darwin_exception_info): Remove typedef.
1463         (DEF_VEC_O (darwin_thread_t)); Remove.
1464         (private_inferior): Rename to ...
1465         (darwin_private_inferior): ... this, extend private_inferior.
1466         (get_darwin_inferior): New.
1467         <threads>: Change type to std::vector of darwin_thread_t pointers.
1468         * darwin-nat.c (darwin_check_new_threads): Adjust.
1469         (find_inferior_task_it): Adjust.
1470         (darwin_find_thread); Adjust.
1471         (darwin_suspend_inferior): Adjust.
1472         (darwin_resume_inferior): Adjust.
1473         (darwin_find_new_inferior): Adjust.
1474         (darwin_decode_notify_message): Adjust.
1475         (darwin_send_reply): Adjust.
1476         (darwin_resume_inferior_threads): Adjust.
1477         (darwin_suspend_inferior_threads): Adjust.
1478         (darwin_decode_message): Adjust.
1479         (darwin_wait): Adjust.
1480         (darwin_interrupt): Adjust.
1481         (darwin_deallocate_threads): Adjust.
1482         (darwin_mourn_inferior): Adjust, don't free private data.
1483         (darwin_reply_to_all_pending_messages): Adjust.
1484         (darwin_stop_inferior): Adjust.
1485         (darwin_setup_exceptions): Adjust.
1486         (darwin_kill_inferior): Adjust.
1487         (darwin_setup_request_notification): Adjust.
1488         (darwin_attach_pid): Adjust.
1489         (darwin_init_thread_list): Adjust.
1490         (darwin_setup_fake_stop_event): Adjust.
1491         (darwin_attach): Adjust.
1492         (darwin_detach): Adjust.
1493         (darwin_xfer_partial): Adjust.
1494         (set_enable_mach_exceptions): Adjust.
1495         (darwin_pid_to_exec_file): Adjust.
1496         (darwin_get_ada_task_ptid): Adjust.
1497         * darwin-nat-info.c (get_task_from_args): Adjust.
1498         (info_mach_ports_command): Adjust.
1499         (info_mach_region_command): Adjust.
1500         (info_mach_exceptions_command): Adjust.
1501         * remote.c (private_inferior): Rename to ...
1502         (remote_private_inferior): ... this, initialize fields.
1503         (get_remote_inferior); New.
1504         (remote_commit_resume): Use get_remote_inferior.
1505         (check_pending_event_prevents_wildcard_vcont_callback): Likewise.
1506
1507 2017-11-24  Pedro Alves  <palves@redhat.com>
1508
1509         * NEWS: Mention linespecs and explicit locations, and completion
1510         improvements.
1511
1512 2017-11-24  Yao Qi  <yao.qi@linaro.org>
1513
1514         * regcache.c (regcache::dump): Remove footnote_register_size.
1515
1516 2017-11-24  Yao Qi  <yao.qi@linaro.org>
1517
1518         * regcache.c (cooked_read_test): Add more test for readonly
1519         regcache.
1520
1521 2017-11-24  Yao Qi  <yao.qi@linaro.org>
1522
1523         * gdbarch-selftests.c (test_target_has_registers): Move it to
1524         target.c.
1525         (test_target_has_stack): Likewise.
1526         (test_target_has_memory): Likewise.
1527         (test_target_prepare_to_store): Likewise.
1528         (test_target_store_registers): Likewise.
1529         (test_target_ops): Likewise.
1530         * regcache.c: Include selftest-arch.h and gdbthread.h.
1531         (target_ops_no_register): New class.
1532         (test_target_fetch_registers): New.
1533         (test_target_store_registers): New.
1534         (test_target_xfer_partial): New.
1535         (readwrite_regcache): New.
1536         (cooked_read_test): New.
1537         (_initialize_regcache): Register the test.
1538         * target.c: (test_target_has_registers): Moved from
1539         gdbarch-selftests.c.
1540         (test_target_has_stack): Likewise.
1541         (test_target_has_memory): Likewise.
1542         (test_target_prepare_to_store): Likewise.
1543         (test_target_store_registers): Likewise.
1544         * target.h (test_target_ops): New class.
1545
1546 2017-11-24  Alan Hayward  <alan.hayward@arm.com>
1547
1548         * aarch64-tdep.c (_initialize_aarch64_tdep): Add target desc
1549         selftest.
1550
1551 2017-11-24  Alan Hayward  <alan.hayward@arm.com>
1552
1553         * aarch64-tdep.c (_initialize_aarch64_tdep): Remove init.
1554         * arch/aarch64.c (aarch64_create_target_description): Create
1555         new target description.
1556         * features/Makefile: Add new files.
1557         * features/aarch64.c: Remove file.
1558         * features/aarch64-core.c: New autogenerated file.
1559         * features/aarch64-fpu.c: New autogenerated file.
1560         * target-descriptions.c (maint_print_c_tdesc_cmd): Check for aarch64.
1561
1562 2017-11-24  Alan Hayward  <alan.hayward@arm.com>
1563
1564         * Makefile.in: Add new files.
1565         * aarch64-linux-nat.c (aarch64_linux_read_description): Call
1566         aarch64_read_description.
1567         * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
1568         Call aarch64_read_description.
1569         * aarch64-tdep.c (aarch64_read_description): New function.
1570         (aarch64_gdbarch_init): Call aarch64_read_description.
1571         * aarch64-tdep.h (aarch64_read_description): New function.
1572         * arch/aarch64.c: New file.
1573         * configure.tgt: Add new files.
1574
1575 2017-11-24  Yao Qi  <yao.qi@linaro.org>
1576
1577         * mi/mi-main.c (register_changed_p): Update.
1578         * value.c (value_contents_bits_eq): Change return type.
1579         (value_contents_eq): Likewise.
1580         * value.h: Update comments.
1581
1582 2017-11-24  Yao Qi  <yao.qi@linaro.org>
1583
1584         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Remove
1585         local 'changed'.  Remove error.
1586         (register_changed_p): Change return type to bool.
1587
1588 2017-11-24  Yao Qi  <yao.qi@linaro.org>
1589
1590         * arch/tic6x.c: New file.
1591         * arch/tic6x.h: New file.
1592         * features/Makefile (FEATURE_XMLFILES): Add tic6x-c6xp.xml,
1593         tic6x-core.xml and tic6x-gp.xml.
1594         * features/tic6x-c6xp.c: Generated.
1595         * features/tic6x-core.c: Generated.
1596         * features/tic6x-gp.c: Generated.
1597         * target-descriptions.c (maint_print_c_tdesc_cmd): Match
1598         "tic6x-".
1599
1600 2017-11-23  Simon Marchi  <simon.marchi@ericsson.com>
1601
1602         * mi/mi-main.c (list_available_thread_groups): Change map value
1603         type to std::vector.
1604
1605 2017-11-23  Simon Marchi  <simon.marchi@ericsson.com>
1606
1607         * osdata.c (osdata_end_column, get_osdata): Remove std::move.
1608
1609 2017-11-23  Simon Marchi  <simon.marchi@ericsson.com>
1610
1611         * varobj.c (struct varobj_dynamic) <children_requested_>: Rename
1612         back to...
1613         <children_requested>: ... this.
1614         (varobj_get_num_children, varobj_update): Adjust.
1615
1616 2017-11-23  Simon Marchi  <simon.marchi@ericsson.com>
1617
1618         * ada-varobj.c (ada_value_is_changeable_p): Change int to bool where applicable.
1619         (ada_value_has_mutated): Likewise.
1620         * c-varobj.c (varobj_is_anonymous_child): Likewise.
1621         (c_is_path_expr_parent): Likewise.
1622         * mi/mi-cmd-var.c (varobj_update_one): Likewise.
1623         (mi_cmd_var_set_frozen): Likewise.
1624         (mi_cmd_var_update_iter): Likewise.
1625         (mi_cmd_var_update): Likewise.
1626         * varobj.c (pretty_printing): Likewise.
1627         (varobj_enable_pretty_printing): Likewise.
1628         (struct varobj_root) <floating, is_valid>: Likewise.
1629         (struct varobj_dynamic) <children_requested>: Likewise.
1630         (delete_variable): Likewise.
1631         (delete_variable_1): Likewise.
1632         (install_variable): Likewise.
1633         (update_type_if_necessary): Likewise.
1634         (install_new_value): Likewise.
1635         (value_of_root): Likewise.
1636         (is_root_p): Likewise.
1637         (varobj_create): Likewise.
1638         (varobj_delete): Likewise.
1639         (varobj_has_more): Likewise.
1640         (varobj_set_frozen): Likewise.
1641         (varobj_get_frozen): Likewise.
1642         (install_dynamic_child): Likewise.
1643         (dynamic_varobj_has_child_method): Likewise.
1644         (update_dynamic_varobj_children): Likewise.
1645         (varobj_get_num_children): Likewise.
1646         (varobj_list_children): Likewise.
1647         (is_path_expr_parent): Likewise.
1648         (varobj_default_is_path_expr_parent): Likewise.
1649         (varobj_is_dynamic_p): Likewise.
1650         (varobj_set_value): Likewise.
1651         (varobj_value_has_mutated): Likewise.
1652         (varobj_update): Likewise.
1653         (check_scope): Likewise.
1654         (value_of_root_1): Likewise.
1655         (varobj_value_get_print_value): Likewise.
1656         (varobj_editable_p): Likewise.
1657         (varobj_value_is_changeable_p): Likewise.
1658         (varobj_floating_p): Likewise.
1659         (varobj_default_value_is_changeable_p): Likewise.
1660         (varobj_invalidate_iter): Likewise.
1661         * varobj.h (struct varobj_update_result) <type_changed,
1662         children_changed, changed, value_installed>: Likewise.
1663         (struct varobj) <updated, frozen, not_fetched>: Likewise.
1664         (struct lang_varobj_ops) <value_is_changeable_p,
1665         value_has_mutated, is_path_expr_parent>: Likewise.
1666         (varobj_delete): Likewise.
1667         (varobj_set_frozen): Likewise.
1668         (varobj_get_frozen): Likewise.
1669         (varobj_set_value): Likewise.
1670         (varobj_update): Likewise.
1671         (varobj_editable_p): Likewise.
1672         (varobj_floating_p): Likewise.
1673         (varobj_has_more): Likewise.
1674         (varobj_is_dynamic_p): Likewise.
1675         (varobj_default_value_is_changeable_p): Likewise.
1676         (varobj_value_is_changeable_p): Likewise.
1677         (varobj_is_anonymous_child): Likewise.
1678         (varobj_default_is_path_expr_parent): Likewise.
1679
1680 2017-11-22  Sergio Durigan Junior  <sergiodj@redhat.com>
1681
1682         * dtrace-probe.c (struct probe_ops dtrace_probe_ops): Delete.
1683         (struct dtrace_probe_arg) <dtrace_probe_arg>: New constructor.
1684         <type_str>: Convert to 'std::string'.
1685         <expr>: Convert to 'expression_up'.
1686         (dtrace_probe_arg_s): Delete type and VEC.
1687         (dtrace_probe_enabler_s): Likewise.
1688         (struct dtrace_probe): Replace by...
1689         (class dtrace_static_probe_ops): ...this and...
1690         (class dtrace_probe): ...this.
1691         (dtrace_probe_is_linespec): Rename to...
1692         (dtrace_static_probe_ops::is_linespec): ...this.  Adjust code
1693         to reflect change.
1694         (dtrace_process_dof_probe): Use 'std::vector' instead of VEC.
1695         Adjust code.  Create new instance of 'dtrace_probe'.
1696         (dtrace_build_arg_exprs): Rename to...
1697         (dtrace_probe::build_arg_exprs): ...this.  Adjust code to
1698         reflect change.
1699         (dtrace_get_probes): Rename to...
1700         (dtrace_static_probe_ops::get_probes): ...this.  Adjust code
1701         to reflect change.
1702         (dtrace_get_arg): Rename to...
1703         (dtrace_probe::get_arg_by_number): ...this.  Adjust code to
1704         reflect change.
1705         (dtrace_probe_is_enabled): Rename to...
1706         (dtrace_probe::is_enabled): ...this.  Adjust code to reflect
1707         change.
1708         (dtrace_get_probe_address): Rename to...
1709         (dtrace_probe::get_relocated_address): ...this.  Adjust code
1710         to reflect change.
1711         (dtrace_get_probe_argument_count): Rename to...
1712         (dtrace_probe::get_argument_count): ...this.  Adjust code to
1713         reflect change.
1714         (dtrace_can_evaluate_probe_arguments): Rename to...
1715         (dtrace_probe::can_evaluate_arguments): ...this.  Adjust code
1716         to reflect change.
1717         (dtrace_evaluate_probe_argument): Rename to...
1718         (dtrace_probe::evaluate_argument): ...this.  Adjust code to
1719         reflect change.
1720         (dtrace_compile_to_ax): Rename to...
1721         (dtrace_probe::compile_to_ax): ...this.  Adjust code to
1722         reflect change.
1723         (dtrace_probe_destroy): Delete.
1724         (dtrace_type_name): Rename to...
1725         (dtrace_static_probe_ops::type_name): ...this.  Adjust code to
1726         reflect change.
1727         (dtrace_probe::get_static_ops): New method.
1728         (dtrace_gen_info_probes_table_header): Rename to...
1729         (dtrace_static_probe_ops::gen_info_probes_table_header):
1730         ...this.  Adjust code to reflect change.
1731         (dtrace_gen_info_probes_table_values): Rename to...
1732         (dtrace_probe::gen_info_probes_table_values): ...this.  Adjust
1733         code to reflect change.
1734         (dtrace_enable_probe): Rename to...
1735         (dtrace_probe::enable_probe): ...this.  Adjust code to reflect
1736         change.
1737         (dtrace_disable_probe): Rename to...
1738         (dtrace_probe::disable_probe): ...this.  Adjust code to reflect
1739         change.
1740         (struct probe_ops dtrace_probe_ops): Delete.
1741         (info_probes_dtrace_command): Call 'info_probes_for_spops'
1742         instead of 'info_probes_for_ops'.
1743         (_initialize_dtrace_probe): Use 'all_static_probe_ops' instead
1744         of 'all_probe_ops'.
1745
1746 2017-11-22  Sergio Durigan Junior  <sergiodj@redhat.com>
1747             Simon Marchi  <simark@simark.ca>
1748
1749         * stap-probe.c (struct probe_ops stap_probe_ops): Delete
1750         variable.
1751         (struct stap_probe_arg) <stap_probe_arg>: New constructor.
1752         <aexpr>: Change type to 'expression_up'.
1753         (stap_probe_arg_s): Delete type and VEC.
1754         (struct stap_probe): Delete.  Replace by...
1755         (class stap_static_probe_ops): ...this and...
1756         (class stap_probe): ...this.  Rename variables to add 'm_'
1757         prefix.  Do not use 'union' for arguments anymore.
1758         (stap_get_expected_argument_type): Receive probe name instead
1759         of 'struct stap_probe'.  Adjust code.
1760         (stap_parse_probe_arguments): Rename to...
1761         (stap_probe::parse_arguments): ...this.  Adjust code to
1762         reflect change.
1763         (stap_get_probe_address): Rename to...
1764         (stap_probe::get_relocated_address): ...this.  Adjust code
1765         to reflect change.
1766         (stap_get_probe_argument_count): Rename to...
1767         (stap_probe::get_argument_count): ...this.  Adjust code
1768         to reflect change.
1769         (stap_get_arg): Rename to...
1770         (stap_probe::get_arg_by_number'): ...this. Adjust code to
1771         reflect change.
1772         (can_evaluate_probe_arguments): Rename to...
1773         (stap_probe::can_evaluate_arguments): ...this.  Adjust code
1774         to reflect change.
1775         (stap_evaluate_probe_argument): Rename to...
1776         (stap_probe::evaluate_argument): ...this.  Adjust code
1777         to reflect change.
1778         (stap_compile_to_ax): Rename to...
1779         (stap_probe::compile_to_ax): ...this.  Adjust code to
1780         reflect change.
1781         (stap_probe_destroy): Delete.
1782         (stap_modify_semaphore): Adjust comment.
1783         (stap_set_semaphore): Rename to...
1784         (stap_probe::set_semaphore): ...this.  Adjust code to reflect
1785         change.
1786         (stap_clear_semaphore): Rename to...
1787         (stap_probe::clear_semaphore): ...this.  Adjust code to
1788         reflect change.
1789         (stap_probe::get_static_ops): New method.
1790         (handle_stap_probe): Adjust code to create instance of
1791         'stap_probe'.
1792         (stap_get_probes): Rename to...
1793         (stap_static_probe_ops::get_probes): ...this.  Adjust code to
1794         reflect change.
1795         (stap_probe_is_linespec): Rename to...
1796         (stap_static_probe_ops::is_linespec): ...this.  Adjust code to
1797         reflect change.
1798         (stap_type_name): Rename to...
1799         (stap_static_probe_ops::type_name): ...this.  Adjust code to
1800         reflect change.
1801         (stap_gen_info_probes_table_header): Rename to...
1802         (stap_static_probe_ops::gen_info_probes_table_header):
1803         ...this.  Adjust code to reflect change.
1804         (stap_gen_info_probes_table_values): Rename to...
1805         (stap_probe::gen_info_probes_table_values): ...this.  Adjust
1806         code to reflect change.
1807         (struct probe_ops stap_probe_ops): Delete.
1808         (info_probes_stap_command): Use 'info_probes_for_spops'
1809         instead of 'info_probes_for_ops'.
1810         (_initialize_stap_probe): Use 'all_static_probe_ops' instead
1811         of 'all_probe_ops'.
1812
1813 2017-11-22  Sergio Durigan Junior  <sergiodj@redhat.com>
1814
1815         * break-catch-throw.c (fetch_probe_arguments): Use
1816         'probe.prob' instead of 'probe.probe'.
1817         * breakpoint.c (create_longjmp_master_breakpoint): Call
1818         'can_evaluate_arguments' and 'get_relocated_address' methods
1819         from probe.
1820         (create_exception_master_breakpoint): Likewise.
1821         (add_location_to_breakpoint): Use 'sal->prob' instead of
1822         'sal->probe'.
1823         (bkpt_probe_insert_location): Call 'set_semaphore' method from
1824         probe.
1825         (bkpt_probe_remove_location): Likewise, for 'clear_semaphore'.
1826         * elfread.c (elf_get_probes): Use 'static_probe_ops' instead
1827         of 'probe_ops'.
1828         (probe_key_free): Call 'delete' on probe.
1829         (check_exception_resume): Use 'probe.prob' instead of
1830         'probe.probe'.
1831         * location.c (string_to_event_location_basic): Call
1832         'probe_linespec_to_static_ops'.
1833         * probe.c (class any_static_probe_ops): New class.
1834         (any_static_probe_ops any_static_probe_ops): New variable.
1835         (parse_probes_in_pspace): Receive 'static_probe_ops' as
1836         argument.  Adjust code to reflect change.
1837         (parse_probes): Use 'static_probe_ops' instead of
1838         'probe_ops'.  Adjust code to reflect change.
1839         (find_probes_in_objfile): Call methods to get name and
1840         provider from probe.
1841         (find_probe_by_pc): Use 'result.prob' instead of
1842         'result.probe'.  Call 'get_relocated_address' method from
1843         probe.
1844         (collect_probes): Adjust comment and argument list to receive
1845         'static_probe_ops' instead of 'probe_ops'.  Adjust code to
1846         reflect change.  Call necessary methods from probe.
1847         (compare_probes): Call methods to get name and provider from
1848         probes.
1849         (gen_ui_out_table_header_info): Receive 'static_probe_ops'
1850         instead of 'probe_ops'.  Use 'std::vector' instead of VEC,
1851         adjust code accordingly.
1852         (print_ui_out_not_applicables): Likewise.
1853         (info_probes_for_ops): Rename to...
1854         (info_probes_for_spops): ...this.  Receive 'static_probe_ops'
1855         as argument instead of 'probe_ops'.  Adjust code.  Call
1856         necessary methods from probe.
1857         (info_probes_command): Use 'info_probes_for_spops'.
1858         (enable_probes_command): Pass correct argument to
1859         'collect_probes'.  Call methods from probe.
1860         (disable_probes_command): Likewise.
1861         (get_probe_address): Move to 'any_static_probe_ops::get_address'.
1862         (get_probe_argument_count): Move to
1863         'any_static_probe_ops::get_argument_count'.
1864         (can_evaluate_probe_arguments): Move to
1865         'any_static_probe_ops::can_evaluate_arguments'.
1866         (evaluate_probe_argument): Move to
1867         'any_static_probe_ops::evaluate_argument'.
1868         (probe_safe_evaluate_at_pc): Use 'probe.prob' instead of
1869         'probe.probe'.
1870         (probe_linespec_to_ops): Rename to...
1871         (probe_linespec_to_static_ops): ...this.  Adjust code.
1872         (probe_any_is_linespec): Rename to...
1873         (any_static_probe_ops::is_linespec): ...this.
1874         (probe_any_get_probes): Rename to...
1875         (any_static_probe_ops::get_probes): ...this.
1876         (any_static_probe_ops::type_name): New method.
1877         (any_static_probe_ops::gen_info_probes_table_header): New
1878         method.
1879         (compute_probe_arg): Use 'pc_probe.prob' instead of
1880         'pc_probe.probe'.  Call methods from probe.
1881         (compile_probe_arg): Likewise.
1882         (std::vector<const probe_ops *> all_probe_ops): Delete.
1883         (std::vector<const static_probe_ops *> all_static_probe_ops):
1884         New variable.
1885         (_initialize_probe): Use 'all_static_probe_ops' instead of
1886         'all_probe_ops'.
1887         * probe.h (struct info_probe_column) <field_name>: Delete
1888         extraneous newline
1889         (info_probe_column_s): Delete type and VEC.
1890         (struct probe_ops): Delete.  Replace with...
1891         (class static_probe_ops): ...this and...
1892         (clas probe): ...this.
1893         (struct bound_probe) <bound_probe>: Delete extraneous
1894         newline.  Adjust constructor to receive 'probe' instead of
1895         'struct probe'.
1896         <probe>: Rename to...
1897         <prob>: ...this.  Delete extraneous newline.
1898         <objfile>: Delete extraneous newline.
1899         (register_probe_ops): Delete unused prototype.
1900         (info_probes_for_ops): Rename to...
1901         (info_probes_for_spops): ...this.  Adjust comment.
1902         (get_probe_address): Move to 'probe::get_address'.
1903         (get_probe_argument_count): Move to
1904         'probe::get_argument_count'.
1905         (can_evaluate_probe_arguments): Move to
1906         'probe::can_evaluate_arguments'.
1907         (evaluate_probe_argument): Move to 'probe::evaluate_argument'.
1908         * solib-svr4.c (struct svr4_info): Adjust comment.
1909         (struct probe_and_action) <probe>: Rename to...
1910         <prob>: ...this.
1911         (register_solib_event_probe): Receive 'probe' instead of
1912         'struct probe' as argument.  Use 'prob' instead of 'probe'
1913         when applicable.
1914         (solib_event_probe_action): Call 'get_argument_count' method
1915         from probe.  Adjust comment.
1916         (svr4_handle_solib_event): Adjust comment.  Call
1917         'evaluate_argument' method from probe.
1918         (svr4_create_probe_breakpoints): Call 'get_relocated_address'
1919         from probe.
1920         (svr4_create_solib_event_breakpoints): Use 'probe' instead of
1921         'struct probe'.  Call 'can_evaluate_arguments' from probe.
1922         * symfile.h: Forward declare 'class probe' instead of 'struct
1923         probe'.
1924         * symtab.h: Likewise.
1925         (struct symtab_and_line) <probe>: Rename to...
1926         <prob>: ...this.
1927         * tracepoint.c (start_tracing): Use 'prob' when applicable.
1928         Call probe methods.
1929         (stop_tracing): Likewise.
1930
1931 2017-11-22  Joel Brobecker  <brobecker@adacore.com>
1932
1933         * ravenscar-thread.c (ravenscar_inferior_created): Remove
1934         trailing newline at end of string in call to warning.
1935
1936 2017-11-22  Simon Marchi  <simon.marchi@polymtl.ca>
1937
1938         * osdata.h: Include vector isntead of vec.h.
1939         (osdata_column_s): Remove typedef.
1940         (struct osdata_column): Add constructor.
1941         <name, value>: Change type to std::string.
1942         (DEF_VEC_O (osdata_column_s)): Remove.
1943         (osdata_item_s): Remove typedef.
1944         (struct osdata_item) <columns>: Change type to std::vector.
1945         (DEF_VEC_O (osdata_item_s)): Remove.
1946         (struct osdata): Add constructor.
1947         <type>: Change type to std::string.
1948         <items>: Change type to std::vector.
1949         (osdata_p): Remove typedef.
1950         (DEF_VEC_P (osdata_p)): Remove.
1951         (osdata_parse): Return a unique_ptr.
1952         (osdata_free): Remove.
1953         (make_cleanup_osdata_free): Remove.
1954         (get_osdata): Return a unique_ptr.
1955         (get_osdata_column): Return pointer to std::string, take a
1956         reference to osdata_item as parameter.
1957         * osdata.c (struct osdata_parsing_data) <osdata>: Change type to
1958         unique_ptr.
1959         <property_name>: Change type to std::string.
1960         (osdata_start_osdata): Allocate osdata with new and adjust.
1961         (osdata_start_item): Adjust.
1962         (osdata_start_column): Adjust.
1963         (osdata_end_column): Adjust.
1964         (clear_parsing_data): Remove.
1965         (osdata_parse): Return a unique_ptr and adjust, remove cleanup.
1966         (osdata_item_clear): Remove.
1967         (get_osdata): return a unique_ptr and adjust.
1968         (get_osdata_column): Return a pointer to std::string and adjust.
1969         (info_osdata): Adjust.
1970         * mi/mi-main.c: Include <map>.
1971         (free_vector_of_osdata_items): Remove.
1972         (list_available_thread_groups): Adjust, use std::map instead of
1973         splay tree.
1974
1975 2017-11-22  Simon Marchi  <simon.marchi@ericsson.com>
1976
1977         * stack.c (iterate_over_block_locals): Add LOC_OPTIMIZED_OUT
1978         case in switch.
1979
1980 2017-11-22  Simon Marchi  <simon.marchi@polymtl.ca>
1981
1982         * varobj.h (DEF_VEC_P (varobj_p)): Remove.
1983
1984 2017-11-22  Simon Marchi  <simon.marchi@polymtl.ca>
1985
1986         * varobj.h (struct varobj_update_result): Add constructor, add
1987         move constructor, disable copy and assign, initialize fields.
1988         <newobj>: Change type to std::vector.
1989         (varobj_update): Return std::vector.
1990         * varobj.c (install_dynamic_child): Change VEC parameters to
1991         std::vector and adjust.
1992         (update_dynamic_varobj_children): Likewise.
1993         (varobj_update): Return std::vector and adjust.
1994         * mi/mi-cmd-var.c (varobj_update_one): Adjust to vector changes.
1995
1996 2017-11-22  Simon Marchi  <simon.marchi@polymtl.ca>
1997
1998         * varobj.h (struct varobj) <parent>: Remove const.
1999         <children>: Change type to std::vector.
2000         (varobj_list_children): Return std::vector const reference.
2001         (varobj_restrict_range): Change parameter type to std::vector
2002         const reference.
2003         * varobj.c (varobj_has_more): Adjust.
2004         (varobj_restrict_range): Change parameter type to std::vector
2005         const reference and adjust.
2006         (install_dynamic_child): Adjust.
2007         (update_dynamic_varobj_children): Adjust.
2008         (varobj_list_children): Return std::vector const reference and
2009         adjust.
2010         (varobj_add_child): Adjust.
2011         (update_type_if_necessary): Adjust.
2012         (varobj_update): Adjust.
2013         (delete_variable_1): Adjust.
2014         * ada-varobj.c (ada_value_has_mutated): Adjust.
2015         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Adjust.
2016
2017 2017-11-22  Simon Marchi  <simon.marchi@polymtl.ca>
2018
2019         * varobj.h (struct varobj): Add constructor and destructor,
2020         initialize fields.
2021         * varobj.c (struct varobj_root): Initialize fields.
2022         (struct varobj_dynamic): Initialize fields.
2023         (varobj_create): Use unique_ptr instead of cleanup.  Create
2024         varobj with new instead of new_root_variable.
2025         (delete_variable_1): Free variable with delete instead of
2026         free_variable.
2027         (create_child_with_value): Create variable with new instead of
2028         new_variable.
2029         (varobj::varobj): New.
2030         (varobj::~varobj): New (body mostly coming from free_variable).
2031         (new_variable): Remove.
2032         (free_variable): Remove.
2033         (do_free_variable_cleanup): Remove.
2034         (make_cleanup_free_variable): Remove.
2035
2036 2017-11-22  Ulrich Weigand  <uweigand@de.ibm.com>
2037
2038         * core-regset.c: Remove file.
2039         * Makefile.in (ALLDEPFILES): Remove core-regset.c.
2040
2041 2017-11-22  Ulrich Weigand  <uweigand@de.ibm.com>
2042
2043         * NEWS: Document use of GNU MPFR.
2044         * README: Likewise.
2045
2046         * Makefile.in (LIBMPFR): Add define.
2047         (CLIBS): Add $(LIBMPFR).
2048         * configure.ac: Add --with-mpfr configure option.
2049         * configure: Regenerate.
2050         * config.in: Regenerate.
2051
2052         * target-float.c [HAVE_LIBMPFR]: Include <mpfr.h>.
2053         (class mpfr_float_ops): New type.
2054         (mpfr_float_ops::from_target): Two new overloaded functions.
2055         (mpfr_float_ops::to_target): Likewise.
2056         (mpfr_float_ops::to_string): New function.
2057         (mpfr_float_ops::from_string): Likewise.
2058         (mpfr_float_ops::to_longest): Likewise.
2059         (mpfr_float_ops::from_longest): Likewise.
2060         (mpfr_float_ops::from_ulongest): Likewise.
2061         (mpfr_float_ops::to_host_double): Likewise.
2062         (mpfr_float_ops::from_host_double): Likewise.
2063         (mpfr_float_ops::convert): Likewise.
2064         (mpfr_float_ops::binop): Likewise.
2065         (mpfr_float_ops::compare): Likewise.
2066         (get_target_float_ops): Use mpfr_float_ops if available.
2067
2068 2017-11-22  Ulrich Weigand  <uweigand@de.ibm.com>
2069
2070         * target-float.c: Do not include <math.h>.
2071         Include <cmath> and <limits>.
2072         (DOUBLEST): Do not define.
2073         (class target_float_ops): New type.
2074         (class host_float_ops): New templated type.
2075         (class decimal_float_ops): New type.
2076
2077         (floatformat_to_doublest): Rename to ...
2078         (host_float_ops<T>::from_target): ... this.  Use template type T
2079         instead of DOUBLEST.  Use C++ math routines.  Update recursive calls.
2080         (host_float_ops<T>::from_target): New overload using a type argument.
2081         (floatformat_from_doublest): Rename to ...
2082         (host_float_ops<T>::to_target): ... this.  Use template type T
2083         instead of DOUBLEST.  Use C++ math routines.  Update recursive calls.
2084         (host_float_ops<T>::to_target): New overload using a type argument.
2085         (floatformat_printf_format): New function.
2086         (struct printf_length_modifier): New templated type.
2087         (floatformat_to_string): Rename to ...
2088         (host_float_ops<T>::to_string): ... this.  Use type instead of
2089         floatformat argument.  Use floatformat_printf_format and
2090         printf_length_modifier.  Remove special handling of invalid numbers,
2091         infinities and NaN (moved to target_float_to_string).
2092         (struct scanf_length_modifier): New templated type.
2093         (floatformat_from_string): Rename to ...
2094         (host_float_ops<T>::from_string): ... this.  Use type instead of
2095         floatformat argument.  Use scanf_length_modifier.
2096         (floatformat_to_longest): Rename to ...
2097         (host_float_ops<T>::to_longest): ... this.  Use type instead of
2098         floatformat argument.  Handle out-of-range values deterministically.
2099         (floatformat_from_longest): Rename to ...
2100         (host_float_ops<T>::from_longest): ... this.  Use type instead of
2101         floatformat argument.
2102         (floatformat_from_ulongest): Rename to ...
2103         (host_float_ops<T>::from_ulongest): ... this.  Use type instead of
2104         floatformat argument.
2105         (floatformat_to_host_double): Rename to ...
2106         (host_float_ops<T>::to_host_double): ... this.  Use type instead of
2107         floatformat argument.
2108         (floatformat_from_host_double): Rename to ...
2109         (host_float_ops<T>::from_host_double): ... this.  Use type instead of
2110         floatformat argument.
2111         (floatformat_convert): Rename to ...
2112         (host_float_ops<T>::convert): ... this.  Use type instead of
2113         floatformat arguments.  Remove handling of no-op conversions.
2114         (floatformat_binop): Rename to ...
2115         (host_float_ops<T>::binop): ... this.  Use type instead of
2116         floatformat arguments.
2117         (floatformat_compare): Rename to ...
2118         (host_float_ops<T>::compare): ... this.  Use type instead of
2119         floatformat arguments.
2120
2121         (match_endianness): Use type instead of length/byte_order arguments.
2122         (set_decnumber_context): Likewise.
2123         (decimal_from_number): Likewise.  Update calls.
2124         (decimal_to_number): Likewise.
2125         (decimal_is_zero): Likewise.  Update calls.  Move to earlier in file.
2126         (decimal_float_ops::to_host_double): New dummy function.
2127         (decimal_float_ops::from_host_double): Likewise.
2128         (decimal_to_string): Rename to ...
2129         (decimal_float_ops::to_string): ... this.  Use type instead of
2130         length/byte_order arguments.  Update calls.
2131         (decimal_from_string): Rename to ...
2132         (decimal_float_ops::from_string): ... this.  Use type instead of
2133         length/byte_order arguments.  Update calls.
2134         (decimal_from_longest): Rename to ...
2135         (decimal_float_ops::from_longest): ... this.  Use type instead of
2136         length/byte_order arguments.  Update calls.
2137         (decimal_from_ulongest): Rename to ...
2138         (decimal_float_ops::from_ulongest): ... this.  Use type instead of
2139         length/byte_order arguments.  Update calls.
2140         (decimal_to_longest): Rename to ...
2141         (decimal_float_ops::to_longest): ... this.  Use type instead of
2142         length/byte_order arguments.  Update calls.
2143         (decimal_binop): Rename to ...
2144         (decimal_float_ops::binop): ... this.  Use type instead of
2145         length/byte_order arguments.  Update calls.
2146         (decimal_compare): Rename to ...
2147         (decimal_float_ops::compare): ... this.  Use type instead of
2148         length/byte_order arguments.  Update calls.
2149         (decimal_convert): Rename to ...
2150         (decimal_float_ops::convert): ... this.  Use type instead of
2151         length/byte_order arguments.  Update calls.
2152
2153         (target_float_same_category_p): New function.
2154         (target_float_same_format_p): Likewise.
2155         (target_float_format_length): Likewise.
2156         (enum target_float_ops_kind): New type.
2157         (get_target_float_ops_kind): New function.
2158         (get_target_float_ops): Three new overloaded functions.
2159
2160         (target_float_is_zero): Update call.
2161         (target_float_to_string): Add special handling of invalid numbers,
2162         infinities and NaN (moved from floatformat_to_string).  Use
2163         target_float_ops callback.
2164         (target_float_from_string): Use target_float_ops callback.
2165         (target_float_to_longest): Likewise.
2166         (target_float_from_longest): Likewise.
2167         (target_float_from_ulongest): Likewise.
2168         (target_float_to_host_double): Likewise.
2169         (target_float_from_host_double): Likewise.
2170         (target_float_convert): Add special case for no-op conversions.
2171         Use target_float_ops callback.
2172         (target_float_binop): Use target_float_ops callback.
2173         (target_float_compare): Likewise.
2174
2175 2017-11-22  Yao Qi  <yao.qi@linaro.org>
2176
2177         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use strcpy.
2178
2179 2017-11-22  Yao Qi  <yao.qi@linaro.org>
2180
2181         * cli/cli-decode.c (help_list): Use memcpy instead of strncpy.
2182         * cp-namespace.c (cp_lookup_transparent_type_loop): Likewise.
2183
2184 2017-11-21  Jerome Guitton  <guitton@adacore.com>
2185
2186         * ravenscar-thread.c (ravenscar_wait): Update inferior ptid
2187         with event ptid from the lower layer before doing the
2188         ravenscar-specific update.
2189
2190 2017-11-21  Joel Brobecker  <brobecker@adacore.com>
2191
2192         * ravenscar-thread.c (is_ravenscar_task): Also verify that
2193         the ptid's TID is nonzero.
2194
2195 2017-11-21  Joel Brobecker  <brobecker@adacore.com>
2196
2197         * ada-lang.h (ada_get_tcb_types_info): Add declaration.
2198         * ada-tasks.c (ada_get_tcb_types_info): Renames get_tcb_types_info.
2199         Make non-static.  Change return type to char *.  Adjust code
2200         accordingly.  Rewrite the function's documentation.
2201         (read_atcb): Adjust call to get_tcb_types_info accordingly.
2202         * ravenscar-thread.c (ravenscar_inferior_created): Check that
2203         we have enough debugging information in the runtime to support
2204         Ada task debugging before we enable the ravenscar-thread layer.
2205
2206 2017-11-21  Joel Brobecker  <brobecker@adacore.com>
2207
2208         * ada-lang.h (ada_get_task_info_from_ptid): Add declaration.
2209         * ada-tasks.c (ada_get_task_info_from_ptid): New function.
2210         * ravenscar-thread.c: Add into comment.
2211         (base_magic_null_ptid): Delete.
2212         (base_ptid): Change documentation.
2213         (ravenscar_active_task): Renames ravenscar_running_thread.
2214         All callers updated throughout.
2215         (is_ravenscar_task, ravenscar_get_thread_base_cpu): New function.
2216         (ravenscar_task_is_currently_active): Likewise.
2217         (get_base_thread_from_ravenscar_task): Ditto.
2218         (ravenscar_update_inferior_ptid): Adjust to handle multiple CPUs.
2219         (ravenscar_runtime_initialized): Likewise.
2220         (get_running_thread_id): Add new parameter "cpu".  Adjust
2221         implementation to handle this new parameter.
2222         (ravenscar_fetch_registers): Small adjustment to use
2223         is_ravenscar_task and ravenscar_task_is_currently_active in
2224         order to decide whether to use the target beneath or this
2225         module's arch_ops.
2226         (ravenscar_store_registers, ravenscar_prepare_to_store): Likewise.
2227         (ravenscar_stopped_by_sw_breakpoint): Use
2228         get_base_thread_from_ravenscar_task to get the underlying
2229         thread, rather than using base_ptid.
2230         (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
2231         (ravenscar_stopped_data_address, ravenscar_core_of_thread):
2232         Likewise.
2233         (ravenscar_inferior_created): Do not set base_magic_null_ptid.
2234
2235 2017-11-21  Joel Brobecker  <brobecker@adacore.com>
2236
2237         * ada-lang.h (struct ada_task_info) <base_cpu>: New field.
2238         * ada-lang.c (struct atcb_fieldno) <base_cpu>: New field.
2239         (get_tcb_types_info): Set fieldnos.base_cpu.
2240         (read_atcb): Set task_info->base_cpu.
2241         (info_task): Print "Base CPU" info if set by runtime.
2242
2243 2017-11-21  Joel Brobecker  <brobecker@adacore.com>
2244
2245         * ravenscar-thread.c (ravenscar_stopped_by_sw_breakpoint)
2246         (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
2247         (ravenscar_stopped_data_address, ravenscar_core_of_thread):
2248         New functions.
2249         (init_ravenscar_thread_ops): Set the to_stopped_by_sw_breakpoint,
2250         to_stopped_by_hw_breakpoint, to_stopped_by_watchpoint,
2251         to_stopped_data_address and to_core_of_thread fields of
2252         ravenscar_ops.
2253
2254 2017-11-21  Ulrich Weigand  <uweigand@de.ibm.com>
2255
2256         * ppc-tdep.h (enum powerpc_long_double_abi): New data type.
2257         (struct gdbarch_tdep): New member long_double_abi.
2258         * rs6000-tdep.c (rs6000_gdbarch_init): Initialize long_double_abi
2259         member of tdep struct based on Tag_GNU_Power_ABI_FP attribute.
2260         * ppc-linux-tdep.c (ppc_linux_init_abi): Install long double data
2261         format depending on long_double_abi tdep member.
2262         (ppc_floatformat_for_type): Handle __ibm128 type.
2263
2264 2017-11-20  Simon Marchi  <simon.marchi@polymtl.ca>
2265
2266         * darwin-nat.c (set_enable_mach_exceptions): Constify parameter.
2267
2268 2017-11-21  Pedro Alves  <palves@redhat.com>
2269
2270         * dwarf2read.c (mapped_index::find_name_components_bounds)
2271         <completion mode, upper bound>: Use std::lower_bound instead of
2272         std::upper_bound.
2273         (test_mapped_index_find_name_component_bounds): Remove incorrect
2274         "t1_fund" from expected symbols.
2275
2276 2017-11-21  Pedro Alves  <palves@redhat.com>
2277
2278         * dwarf2read.c (mapped_index::name_components_casing): New field.
2279         (mapped_index) <build_name_components,
2280         find_name_components_bounds): Declare new methods.
2281         (mapped_index::find_name_components_bounds)
2282         (mapped_index::build_name_components): New methods, factored out
2283         from dw2_expand_symtabs_matching_symbol.
2284         (check_find_bounds_finds)
2285         (test_mapped_index_find_name_component_bounds): New.
2286         (run_test): Rename to ...
2287         (test_dw2_expand_symtabs_matching_symbol): ... this.
2288         (run_test): Reimplement.
2289
2290 2017-11-21  Pedro Alves  <palves@redhat.com>
2291
2292         * cp-name-parser.y (cp_ident_is_alpha, cp_ident_is_alnum): New.
2293         (symbol_end): Use cp_ident_is_alnum.
2294         (yylex): Use cp_ident_is_alpha and cp_ident_is_alnum.
2295         * dwarf2read.c (make_sort_after_prefix_name): New function.
2296         (dw2_expand_symtabs_matching_symbol): Use it.
2297         (test_symbols): Add more symbols.
2298         (run_test): Add tests.
2299
2300 2017-11-17  Tom Tromey  <tom@tromey.com>
2301
2302         * symtab.h (enum symbol_subclass_kind): New.
2303         (struct symbol) <is_cplus_template_function, is_rust_vtable>:
2304         Remove.
2305         <subclass>: New member.
2306         (SYMBOL_IS_CPLUS_TEMPLATE_FUNCTION): Update.
2307         * rust-lang.c (rust_get_trait_object_pointer): Update.
2308         * dwarf2read.c (read_func_scope): Update.
2309         (read_variable): Update.
2310
2311 2017-11-17  Tom Tromey  <tom@tromey.com>
2312
2313         * dwarf2read.c (read_func_scope): Update.
2314         * symtab.h (struct template_symbol): Derive from symbol.
2315         <base>: Remove.
2316
2317 2017-11-17  Tom Tromey  <tom@tromey.com>
2318
2319         * symtab.h (struct symbol) <is_rust_vtable>: New member.
2320         (struct rust_vtable_symbol): New.
2321         (find_symbol_at_address): Declare.
2322         * symtab.c (find_symbol_at_address): New function.
2323         * symfile.h (struct quick_symbol_functions)
2324         <find_compunit_symtab_by_address>: New member.
2325         * symfile-debug.c (debug_qf_find_compunit_symtab_by_address): New
2326         function.
2327         (debug_sym_quick_functions): Link to
2328         debug_qf_find_compunit_symtab_by_address.
2329         * rust-lang.c (rust_get_trait_object_pointer): New function.
2330         (rust_evaluate_subexp) <case UNOP_IND>: New case.  Call
2331         rust_get_trait_object_pointer.
2332         * psymtab.c (psym_relocate): Clear psymbol_map.
2333         (psym_fill_psymbol_map, psym_find_compunit_symtab_by_address): New
2334         functions.
2335         (psym_functions): Link to psym_find_compunit_symtab_by_address.
2336         * objfiles.h (struct objfile) <psymbol_map>: New member.
2337         * dwarf2read.c (dwarf2_gdb_index_functions): Update.
2338         (process_die) <DW_TAG_variable>: New case.  Call read_variable.
2339         (rust_containing_type, read_variable): New functions.
2340
2341 2017-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
2342
2343         * common/gdb_vecs.h (DEF_VEC_I (int)): Remove.
2344
2345 2017-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
2346
2347         * common/filestuff.c: Include <algorithm>.
2348         (open_fds): Change type to std::vector<int>.
2349         (do_mark_open_fd): Adjust.
2350         (unmark_fd_no_cloexec): Adjust.
2351         (do_close): Adjust.
2352
2353 2017-11-17  Simon Marchi  <simon.marchi@polymtl.ca>
2354
2355         * breakpoint.c (output_thread_groups): Take an std::vector.
2356         (print_one_breakpoint_location): Adjust.
2357
2358 2017-11-17  Joel Brobecker  <brobecker@adacore.com>
2359
2360         * ada-lang.c (resolve_subexp): Add handling of OP_VAR_MSYM_VALUE.
2361         (ada_evaluate_subexp_for_cast): New function.
2362         (ada_evaluate_subexp) <UNOP_CAST>: Replace code by call to
2363         ada_evaluate_subexp_for_cast.
2364         (ada_evaluate_subexp) <nosideret>: Replace code by call to
2365         eval_skip_value.
2366         * eval.c (evaluate_var_value): Make non-static.
2367         (evaluate_var_msym_value, eval_skip_value): Likewise.
2368         * value.h (evaluate_var_value, evaluate_var_msym_value)
2369         (eval_skip_value): Declare.
2370
2371 2017-11-16  Joel Brobecker  <brobecker@adacore.com>
2372
2373         * ada-lang.c (ada_value_cast): Remove parameter "noside".
2374         Update all callers.
2375
2376 2017-11-16  Pedro Alves  <palves@redhat.com>
2377
2378         * python/py-unwind.c (pyuw_sniffer): Translate
2379         PyExc_KeyboardInterrupt to a GDB Quit exception.
2380
2381 2017-11-16  Pedro Alves  <palves@redhat.com>
2382
2383         * infrun.c (resume_cleanups): Delete.
2384         (resume): No longer install a resume_cleanups cleanup nor call
2385         QUIT.
2386         (proceed): Pass the terminal to the inferior.
2387         (keep_going_pass_signal): No longer install a resume_cleanups
2388         cleanup.
2389
2390 2017-11-16  Pedro Alves  <palves@redhat.com>
2391
2392         * inf-loop.c (inferior_event_handler): Don't swallow the exception
2393         if the prompt is blocked.
2394
2395 2017-11-16  Pedro Alves  <palves@redhat.com>
2396
2397         * breakpoint.c (insert_bp_location): Replace bp_err and
2398         bp_err_message locals by a gdb_exception local.
2399
2400 2017-11-16  Pedro Alves  <palves@redhat.com>
2401
2402         * inflow.c (scoped_ignore_sigttou): New class.
2403         (child_terminal_ours_1, new_tty): Use it.
2404
2405 2017-11-16  Ulrich Weigand  <uweigand@de.ibm.com>
2406
2407         * target-float.c (decimal_from_number): Add byte_order argument and
2408         call match_endianness.  Error if unknown floating-point type.
2409         (decimal_to_number): Add byte_order argument and call match_endianness.
2410         (decimal_from_longest): Update call.  Do not call match_endianness.
2411         (decimal_from_ulongest): Likewise.
2412         (decimal_binop): Likewise.
2413         (decimal_is_zero): Likewise.
2414         (decimal_compare): Likewise.
2415         (decimal_convert): Likewise.
2416
2417 2017-11-16  Phil Muldoon  <pmuldoon@redhat.com>
2418
2419         * python/python.c (gdbpy_rbreak): New function.
2420         * NEWS: Document Python rbreak feature.
2421
2422 2017-11-16  Yao Qi  <yao.qi@linaro.org>
2423
2424         * features/tic6x-c62x.xml: Remove.
2425         * features/tic6x-c64x.xml: Remove.
2426         * features/tic6x-c64xp.xml: Remove.
2427
2428 2017-11-15  John Baldwin  <jhb@FreeBSD.org>
2429
2430         * symtab.h: Include <array>.
2431
2432 2017-11-15  John Baldwin  <jhb@FreeBSD.org>
2433
2434         * bsd-kvm.c (bsd_kvm_cmd): Constify 'arg'.
2435         (bsd_kvm_proc_cmd): Likewise.
2436
2437 2017-11-15  Simon Marchi  <simon.marchi@ericsson.com>
2438
2439         * tui/tui-win.c (window_name_completer): Replace VEC with
2440         std::vector.
2441
2442 2017-11-15  Andrew Cagney  <cagney@gnu.org>
2443
2444         * MAINTAINERS: Remove no-longer applicable entries.
2445
2446 2017-11-15  Andrew Cagney  <cagney@gnu.org>
2447
2448         * MAINTAINERS: Move self to Past Maintainers.
2449
2450 2017-11-15  Yao Qi  <yao.qi@linaro.org>
2451
2452         * features/Makefile (XMLTOC): Remove nios2-linux.xml.
2453         * features/nios2-linux.c: Remove.
2454         * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Don't call
2455         initialize_tdesc_nios2_linux.
2456
2457 2017-11-15  Yao Qi  <yao.qi@linaro.org>
2458
2459         * m68hc11-tdep.c (M68HC11_NUM_REGS): Change it to
2460         M68HC11_LAST_HARD_REG + 1.
2461
2462 2017-11-14  Paul Carroll  <pcarroll@codesourcery.com>
2463
2464         PR gdb/22388
2465         * remote.c (remote_write_bytes_aux, remote_read_bytes_1,
2466         remote_read_bytes, remote_write_qxfer, remote_xfer_partial):
2467         Return TARGET_XFER_EOF if size of returned data is 0.
2468
2469 2017-11-14  Simon Marchi  <simon.marchi@ericsson.com>
2470
2471         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2472         memory-map-selftests.c.
2473         (SUBDIR_UNITTESTS_OBS): Add memory-map-selftests.o.
2474         * memory-map.c (memory_map_start_memory): Fix computation of hi
2475         address.
2476         * unittests/memory-map-selftests.c: New file.
2477
2478 2017-11-09  Joel Brobecker  <brobecker@adacore.com>
2479
2480         * ada-lang.c: Fix some typos in the general command documenting
2481         how Ada expressions are being evaluated and how their result
2482         is printed.
2483
2484 2017-11-09  Tom Tromey  <tom@tromey.com>
2485
2486         * psymtab.c (psymbol_hash): Do not hash string contents.
2487         (psymbol_compare): Add comment.
2488
2489 2017-11-09  Tom Tromey  <tom@tromey.com>
2490
2491         * dictionary.c (dict_hash): Move "TKB" check into the "switch".
2492
2493 2017-11-08  Joel Brobecker  <brobecker@adacore.com>
2494
2495         * ada-exp.y (write_var_from_sym): Remove parameter
2496         "orig_left_context".  Update all callers.
2497
2498 2017-11-08  Simon Marchi  <simon.marchi@ericsson.com>
2499
2500         * tracepoint.h (class collection_list) <stringify>: Return
2501         std::vector<std::string>.
2502         (encode_actions_rsp): Change parameters to
2503         std::vector<std::string> *.
2504         * tracepoint.c (collection_list::stringify): Return
2505         std::vector<std::string> and adjust accordingly.
2506         (encode_actions_rsp): Changee parameters to
2507         std::vector<std::string> and adjust accordingly.
2508         * remote.c (free_actions_list),
2509         free_actions_list_cleanup_wrapper): Remove.
2510         (remote_download_tracepoint): Adjust to std::vector.
2511
2512 2017-11-08  Tom Tromey  <tom@tromey.com>
2513
2514         * dwarf2read.c (symbolp): Remove typedef.
2515         (read_func_scope): Use std::vector.
2516         (process_structure_scope): Use std::vector.
2517
2518 2017-11-08  Pedro Alves  <palves@redhat.com>
2519
2520         * ada-lang.c (ada_make_symbol_completion_list): Use
2521         completion_skip_symbol.
2522         * symtab.c (symbol_is_function_or_method(minimal_symbol*)): New.
2523         (symbol_is_function_or_method(symbol*)): New.
2524         (add_symtab_completions): Add complete_symbol_mode parameter.  Use
2525         completion_skip_symbol.
2526         (default_collect_symbol_completion_matches_break_on): Use
2527         completion_skip_symbol.  Pass down mode.
2528         (collect_file_symbol_completion_matches): Pass down mode.
2529         * symtab.h (symbol_is_function_or_method): New declarations.
2530         (completion_skip_symbol): New template function.
2531
2532 2017-11-08  Pedro Alves  <palves@redhat.com>
2533
2534         * linespec.c (iterate_over_all_matching_symtabs): Add
2535         search_domain parameter.  Pass it down to expand_symtabs_matching.
2536         (decode_objc): Request FUNCTIONS_DOMAIN symbols only.
2537         (lookup_prefix_sym): Adjust by passing ALL_DOMAIN as
2538         search_domain.
2539         (add_all_symbol_names_from_pspace): Add search_domain parameter.
2540         Pass it down.
2541         (find_method, find_function_symbols): Request FUNCTIONS_DOMAIN
2542         symbols.
2543         (add_matching_symbols_to_info): Add search_domain parameter.  Pass
2544         it down.
2545
2546 2017-11-08  Pedro Alves  <palves@redhat.com>
2547
2548         * ada-lang.c (ada_make_symbol_completion_list): Remove text and
2549         text_len locals and don't pass them down.
2550         * symtab.c (completion_list_add_name): Remove
2551         sym_text/sym_text_len parameters and adjust.
2552         (completion_list_add_symbol, completion_list_add_msymbol)
2553         (completion_list_objc_symbol, completion_list_add_fields)
2554         (add_symtab_completions): Likewise.
2555         (default_collect_symbol_completion_matches_break_on)
2556         (collect_file_symbol_completion_matches): Remove sym_text_len
2557         local and don't pass it down.
2558         * symtab.h (completion_list_add_name): Remove
2559         sym_text/sym_text_len parameters.
2560
2561 2017-11-08  Pedro Alves  <palves@redhat.com>
2562
2563         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2564         unittests/lookup_name_info-selftests.c.
2565         (SUBDIR_UNITTESTS_OBS): Add lookup_name_info-selftests.o.
2566         * cp-support.c: Include "selftest.h".
2567         (cp_remove_params_1): Rename from cp_remove_params.  Add
2568         'require_param' parameter, and handle it.
2569         (cp_remove_params): Reimplement.
2570         (cp_remove_params_if_any): New.
2571         (selftests::quote): New.
2572         (selftests::check_remove_params): New.
2573         (selftests::test_cp_remove_params): New.
2574         (_initialize_cp_support): Install
2575         selftests::test_cp_remove_params.
2576         * cp-support.h (cp_remove_params_if_any): Declare.
2577         * dwarf2read.c :Include "selftest.h".
2578         (dw2_expand_symtabs_matching_symbol): Use
2579         lookup_name_info::make_ignore_params.
2580         (selftests::dw2_expand_symtabs_matching::mock_mapped_index)
2581         (selftests::dw2_expand_symtabs_matching::string_or_null)
2582         (selftests::dw2_expand_symtabs_matching::check_match)
2583         (selftests::dw2_expand_symtabs_matching::test_symbols)
2584         (selftests::dw2_expand_symtabs_matching::run_test): New.
2585         (_initialize_dwarf2_read): Register
2586         selftests::dw2_expand_symtabs_matching::run_test.
2587         * psymtab.c (psym_expand_symtabs_matching): Use
2588         lookup_name_info::make_ignore_params.
2589         * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info):
2590         If the lookup name wants to ignore parameters, strip them.
2591         (compare_symbol_name): Remove sym_text/sym_text_len parameters and
2592         code handling '('.
2593         (completion_list_add_name): Don't pass down sym_text/sym_text_len.
2594         (default_collect_symbol_completion_matches_break_on): Don't try to
2595         strip parameters.
2596         * symtab.h (lookup_name_info::lookup_name_info): Add
2597         'ignore_parameters' parameter.
2598         (lookup_name_info::ignore_parameters)
2599         (lookup_name_info::make_ignore_params): New methods.
2600         (lookup_name_info::m_ignore_parameters): New field.
2601         * unittests/lookup_name_info-selftests.c: New file.
2602
2603 2017-11-08  Pedro Alves  <palves@redhat.com>
2604
2605         * dwarf2read.c (dw2_expand_marked_cus)
2606         (dw2_expand_symtabs_matching_symbol): Remove forward declarations.
2607         (dw2_expand_symtabs_matching): Move further below.
2608         (dw2_expand_marked_cus): Reindent.
2609
2610 2017-11-08  Pedro Alves  <palves@redhat.com>
2611
2612         * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
2613         (struct name_component): New.
2614         (mapped_index::name_components): New field.
2615         (mapped_index::symbol_name_at): New method.
2616         (dwarf2_read_index): Call mapped_index ctor.
2617         (dw2_map_matching_symbols): Add comment about name_components
2618         table.
2619         (dw2_expand_symtabs_matching): Factor part to...
2620         (dw2_expand_symtabs_matching_symbol): ... this new function.
2621         Build name components table, and lookup symbols in it before
2622         calling the name matcher.
2623         (dw2_expand_marked_cus): New, factored out from
2624         dw2_expand_symtabs_matching.
2625         (dwarf2_per_objfile_free): Call the mapped_index's dtor.
2626
2627 2017-11-08   Pedro Alves  <palves@redhat.com>
2628
2629         * ada-lang.c (ada_encode): Rename to ..
2630         (ada_encode_1): ... this.  Add throw_errors parameter and handle
2631         it.
2632         (ada_encode): Reimplement.
2633         (match_name): Delete, folded into full_name.
2634         (resolve_subexp): No longer pass the encoded name to
2635         ada_lookup_symbol_list.
2636         (should_use_wild_match): Delete.
2637         (name_match_type_from_name): New.
2638         (ada_lookup_simple_minsym): Use lookup_name_info and the
2639         language's symbol_name_matcher_ftype.
2640         (add_symbols_from_enclosing_procs, ada_add_local_symbols)
2641         (ada_add_block_renamings): Adjust to use lookup_name_info.
2642         (ada_lookup_name): New.
2643         (add_nonlocal_symbols, ada_add_all_symbols)
2644         (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
2645         (ada_iterate_over_symbols): Adjust to use lookup_name_info.
2646         (ada_name_for_lookup): Delete.
2647         (ada_lookup_encoded_symbol): Construct a verbatim name.
2648         (wild_match): Reverse sense of return type.  Use bool.
2649         (full_match): Reverse sense of return type.  Inline bits of old
2650         match_name here.
2651         (ada_add_block_symbols): Adjust to use lookup_name_info.
2652         (symbol_completion_match): Delete, folded into...
2653         (ada_lookup_name_info::matches): ... .this new method.
2654         (symbol_completion_add): Delete.
2655         (ada_collect_symbol_completion_matches): Add name_match_type
2656         parameter.  Adjust to use lookup_name_info and
2657         completion_list_add_name.
2658         (get_var_value, ada_add_global_exceptions): Adjust to use
2659         lookup_name_info.
2660         (ada_get_symbol_name_cmp): Delete.
2661         (do_wild_match, do_full_match): New functions.
2662         (ada_lookup_name_info::ada_lookup_name_info): New method.
2663         (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
2664         functions.
2665         (ada_language_defn): Install ada_get_symbol_name_matcher.
2666         * ada-lex.l (processId): If name starts with '<', copy it
2667         verbatim.
2668         * block.c (block_iter_match_step, block_iter_match_first)
2669         (block_iter_match_next, block_lookup_symbol)
2670         (block_lookup_symbol_primary, block_find_symbol): Adjust to use
2671         lookup_name_info.
2672         * block.h (block_iter_match_first, block_iter_match_next)
2673         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
2674         * c-lang.c (c_language_defn, cplus_language_defn)
2675         (asm_language_defn, minimal_language_defn): Adjust comments to
2676         refer to la_get_symbol_name_matcher.
2677         * completer.c (complete_files_symbols)
2678         (collect_explicit_location_matches, symbol_completer): Pass a
2679         symbol_name_match_type down.
2680         * completer.h (class completion_match, completion_match_result):
2681         New classes.
2682         (completion_tracker::reset_completion_match_result): New method.
2683         (completion_tracker::m_completion_match_result): New field.
2684         * cp-support.c (make_symbol_overload_list_block): Adjust to use
2685         lookup_name_info.
2686         (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
2687         functions.
2688         * cp-support.h (cp_get_symbol_name_matcher): New declaration.
2689         * d-lang.c: Adjust comments to refer to
2690         la_get_symbol_name_matcher.
2691         * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
2692         Adjust to use lookup_name_info.
2693         (dict_iter_match_first, dict_iter_match_next)
2694         (iter_match_first_hashed, iter_match_next_hashed)
2695         (iter_match_first_linear, iter_match_next_linear): Adjust to work
2696         with a lookup_name_info.
2697         * dictionary.h (dict_iter_match_first, dict_iter_match_next):
2698         Likewise.
2699         * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
2700         (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
2701         (gdb_index_symbol_name_matcher): New class.
2702         (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
2703         gdb_index_symbol_name_matcher.  Accept a NULL symbol_matcher.
2704         * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
2705         with a symbol_name_match_type.
2706         (f_language_defn): Adjust comments to refer to
2707         la_get_symbol_name_matcher.
2708         * go-lang.c (go_language_defn): Adjust comments to refer to
2709         la_get_symbol_name_matcher.
2710         * language.c (default_symbol_name_matcher)
2711         (language_get_symbol_name_matcher): New functions.
2712         (unknown_language_defn, auto_language_defn): Adjust comments to
2713         refer to la_get_symbol_name_matcher.
2714         * language.h (symbol_name_cmp_ftype): Delete.
2715         (language_defn) <la_collect_symbol_completion_matches>: Add match
2716         type parameter.
2717         <la_get_symbol_name_cmp>: Delete field.
2718         <la_get_symbol_name_matcher>: New field.
2719         <la_iterate_over_symbols>: Adjust to use lookup_name_info.
2720         (default_symbol_name_matcher, language_get_symbol_name_matcher):
2721         Declare.
2722         * linespec.c (iterate_over_all_matching_symtabs)
2723         (iterate_over_file_blocks): Adjust to use lookup_name_info.
2724         (find_methods): Add language parameter, and use lookup_name_info
2725         and the language's symbol_name_matcher_ftype.
2726         (linespec_complete_function): Adjust.
2727         (lookup_prefix_sym): Use lookup_name_info.
2728         (add_all_symbol_names_from_pspace): Adjust.
2729         (find_superclass_methods): Add language parameter and pass it
2730         down.
2731         (find_method): Pass symbol language down.
2732         (find_linespec_symbols): Don't demangle or Ada encode here.
2733         (search_minsyms_for_name): Add lookup_name_info parameter.
2734         (add_matching_symbols_to_info): Add name_match_type parameter.
2735         Use lookup_name_info.
2736         * m2-lang.c (m2_language_defn): Adjust comments to refer to
2737         la_get_symbol_name_matcher.
2738         * minsyms.c: Include <algorithm>.
2739         (add_minsym_to_demangled_hash_table): Remove table parameter and
2740         add objfile parameter.  Use search_name_hash, and add language to
2741         demangled languages vector.
2742         (struct found_minimal_symbols): New struct.
2743         (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
2744         New functions.
2745         (lookup_minimal_symbol): Adjust to use them.  Don't canonicalize
2746         input names here.  Use lookup_name_info instead.  Lookup up
2747         demangled names once for each language in the demangled names
2748         vector.
2749         (iterate_over_minimal_symbols): Use lookup_name_info.  Lookup up
2750         demangled names once for each language in the demangled names
2751         vector.
2752         (build_minimal_symbol_hash_tables): Adjust.
2753         * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
2754         lookup_name_info.
2755         * objc-lang.c (objc_language_defn): Adjust comment to refer to
2756         la_get_symbol_name_matcher.
2757         * objfiles.h: Include <vector>.
2758         (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
2759         * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
2760         la_get_symbol_name_matcher.
2761         * p-lang.c (pascal_language_defn): Adjust comment to refer to
2762         la_get_symbol_name_matcher.
2763         * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
2764         (match_partial_symbol): Use symbol_name_match_type,
2765         lookup_name_info and psymbol_name_matches.
2766         (lookup_partial_symbol): Use lookup_name_info.
2767         (map_block): Use symbol_name_match_type and lookup_name_info.
2768         (psym_map_matching_symbols): Use symbol_name_match_type.
2769         (psymbol_name_matches): New.
2770         (recursively_search_psymtabs): Use lookup_name_info and
2771         psymbol_name_matches.  Rename 'kind' parameter to 'domain'.
2772         (psym_expand_symtabs_matching): Use lookup_name_info.  Rename
2773         'kind' parameter to 'domain'.
2774         * rust-lang.c (rust_language_defn): Adjust comment to refer to
2775         la_get_symbol_name_matcher.
2776         * symfile-debug.c (debug_qf_map_matching_symbols)
2777         (debug_qf_map_matching_symbols): Use symbol_name_match_type.
2778         (debug_qf_expand_symtabs_matching): Use lookup_name_info.
2779         * symfile.c (expand_symtabs_matching): Use lookup_name_info.
2780         * symfile.h (quick_symbol_functions) <map_matching_symbols>:
2781         Adjust to use symbol_name_match_type.
2782         <expand_symtabs_matching>: Adjust to use lookup_name_info.
2783         (expand_symtabs_matching): Adjust to use lookup_name_info.
2784         * symmisc.c (maintenance_expand_symtabs): Use
2785         lookup_name_info::match_any ().
2786         * symtab.c (symbol_matches_search_name): New.
2787         (eq_symbol_entry): Adjust to use lookup_name_info and the
2788         language's matcher.
2789         (demangle_for_lookup_info::demangle_for_lookup_info): New.
2790         (lookup_name_info::match_any): New.
2791         (iterate_over_symbols, search_symbols): Use lookup_name_info.
2792         (compare_symbol_name): Add language, lookup_name_info and
2793         completion_match_result parameters, and use them.
2794         (completion_list_add_name): Make extern.  Add language and
2795         lookup_name_info parameters.  Use them.
2796         (completion_list_add_symbol, completion_list_add_msymbol)
2797         (completion_list_objc_symbol): Add lookup_name_info parameters and
2798         adjust.  Pass down language.
2799         (completion_list_add_fields): Add lookup_name_info parameters and
2800         adjust.  Pass down language.
2801         (add_symtab_completions): Add lookup_name_info parameters and
2802         adjust.
2803         (default_collect_symbol_completion_matches_break_on): Add
2804         name_match_type parameter, and use it.  Use lookup_name_info.
2805         (default_collect_symbol_completion_matches)
2806         (collect_symbol_completion_matches): Add name_match_type
2807         parameter, and pass it down.
2808         (collect_symbol_completion_matches_type): Adjust.
2809         (collect_file_symbol_completion_matches): Add name_match_type
2810         parameter, and use lookup_name_info.
2811         * symtab.h: Include <string> and "common/gdb_optional.h".
2812         (enum class symbol_name_match_type): New.
2813         (class ada_lookup_name_info): New.
2814         (struct demangle_for_lookup_info): New.
2815         (class lookup_name_info): New.
2816         (symbol_name_matcher_ftype): New.
2817         (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
2818         (symbol_matches_search_name): Declare.
2819         (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
2820         (default_collect_symbol_completion_matches)
2821         (collect_symbol_completion_matches)
2822         (collect_file_symbol_completion_matches): Add name_match_type
2823         parameter.
2824         (iterate_over_symbols): Use lookup_name_info.
2825         (completion_list_add_name): Declare.
2826         * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
2827         (strncmp_iw_with_mode): Now extern.
2828         * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
2829         (strncmp_iw_with_mode): Declare.
2830
2831 2017-11-08  Keith Seitz  <keiths@redhat.com>
2832             Pedro Alves  <palves@redhat.com>
2833
2834         * ada-lang.c (ada_language_defn): Install
2835         default_search_name_hash.
2836         * buildsym.c (struct buildsym_compunit): <language>: New field.
2837         (finish_block_internal): Pass language when creating dictionaries.
2838         (start_buildsym_compunit, start_symtab): New language parameters.
2839         Use them.
2840         (restart_symtab): Pass down compilation unit's language.
2841         * buildsym.h (enum language): Forward declare.
2842         (start_symtab): New 'language' parameter.
2843         * c-lang.c (c_language_defn, cplus_language_defn)
2844         (asm_language_defn, minimal_language_defn): Install
2845         default_search_name_hash.
2846         * coffread.c (coff_start_symtab): Adjust.
2847         * d-lang.c (d_language_defn): Install default_search_name_hash.
2848         * dbxread.c (struct symloc): Add 'pst_language' field.
2849         (PST_LANGUAGE): Define.
2850         (start_psymtab, read_ofile_symtab): Use it.
2851         (process_one_symbol): New 'language' parameter.  Pass it down.
2852         * dictionary.c (struct dictionary) <language>: New field.
2853         (DICT_LANGUAGE): Define.
2854         (dict_create_hashed, dict_create_hashed_expandable)
2855         (dict_create_linear, dict_create_linear_expandable): New parameter
2856         'language'.  Set the dictionary's language.
2857         (iter_match_first_hashed): Adjust to rename.
2858         (insert_symbol_hashed): Assert we don't see mismatching
2859         languages.  Adjust to rename.
2860         (dict_hash): Rename to ...
2861         (default_search_name_hash): ... this and make extern.
2862         * dictionary.h (struct language_defn): Forward declare.
2863         (dict_create_hashed): New parameter 'language'.
2864         * dwarf2read.c (dwarf2_start_symtab): Pass down language.
2865         * f-lang.c (f_language_defn): Install default_search_name_hash.
2866         * go-lang.c (go_language_defn): Install default_search_name_hash.
2867         * jit.c (finalize_symtab): Pass compunit's language to dictionary
2868         creation.
2869         * language.c (unknown_language_defn, auto_language_defn):
2870         * language.h (language_defn::la_search_name_hash): New field.
2871         (default_search_name_hash): Declare.
2872         * m2-lang.c (m2_language_defn): Install default_search_name_hash.
2873         * mdebugread.c (new_block): New parameter 'language'.
2874         * mdebugread.c (parse_symbol): Pass symbol language to block
2875         allocation.
2876         (psymtab_to_symtab_1): Pass down language.
2877         (new_symtab): Pass compunit's language to block allocation.
2878         * objc-lang.c (objc_language_defn): Install
2879         default_search_name_hash.
2880         * opencl-lang.c (opencl_language_defn):
2881         * p-lang.c (pascal_language_defn): Install
2882         default_search_name_hash.
2883         * rust-lang.c (rust_language_defn): Install
2884         default_search_name_hash.
2885         * stabsread.h (enum language): Forward declare.
2886         (process_one_symbol): Add 'language' parameter.
2887         * symtab.c (search_name_hash): New function.
2888         * symtab.h (search_name_hash): Declare.
2889         * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
2890
2891 2017-11-08  Pedro Alves  <palves@redhat.com>
2892
2893         * cp-name-parser.y (main): Don't initialize extra_chars.
2894
2895 2017-11-07  Tom Tromey  <tom@tromey.com>
2896
2897         * event-top.h (command_handler): Constify.
2898         * record-full.c (cmd_record_full_start): Update.
2899         * thread.c (thread_apply_all_command): Update.
2900         * printcmd.c (eval_command): Update.
2901         * mi/mi-main.c (mi_execute_cli_command): Update.
2902         (mi_execute_async_cli_command): Update.
2903         * tui/tui-stack.c (tui_update_command): Update.
2904         * cli/cli-interp.c (safe_execute_command): Constify.
2905         * record.c (record_start): Update.
2906         (record_start, record_stop, cmd_record_start): Update.
2907         * record-btrace.c (cmd_record_btrace_bts_start): Update.
2908         (cmd_record_btrace_pt_start): Update.
2909         (cmd_record_btrace_start): Update.
2910         (cmd_record_btrace_start): Update.
2911         * reverse.c (exec_reverse_once): Update.
2912         * python/python.c (execute_gdb_command): Don't copy the command.
2913         * event-top.c (command_line_handler): Update.
2914         (command_handler): Constify.
2915         * defs.h (deprecated_call_command_hook): Constify.
2916         * cli/cli-script.h (execute_user_command): Constify.
2917         * cli/cli-script.c (execute_user_command): Constify.
2918         (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
2919         (enum command_control_type): Update.
2920         * main.c (catch_command_errors): Remove non-const overload.
2921         (catch_command_errors_ftype): Remove.
2922         * python/py-cmd.c (cmdpy_function): Constify.
2923         * guile/scm-cmd.c (cmdscm_function): Constify.
2924         * cli/cli-dump.c (call_dump_func): Constify.
2925         * cli/cli-decode.c (do_const_cfunc): Constify.
2926         (do_sfunc): Constify.
2927         (cmd_func): Constify.
2928         * gdbcmd.h (execute_command, execute_command_to_string): Constify.
2929         * top.h (execute_command): Constify.
2930         * top.c (execute_command): Constify.
2931         (execute_command_to_string): Constify.
2932         (deprecated_call_command_hook): Constify.
2933         * command.h (cmd_func): Constify.
2934         * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
2935
2936 2017-11-07  Tom Tromey  <tom@tromey.com>
2937
2938         * ada-lang.c (catch_ada_exception_command): Constify.
2939         (catch_assert_command): Constify.
2940         * break-catch-throw.c (catch_catch_command, catch_throw_command)
2941         (catch_rethrow_command): Constify.
2942         (catch_exception_command_1): Constify.
2943         * breakpoint.h (add_catch_command): Constify.
2944         * break-catch-syscall.c (catch_syscall_command_1): Constify.
2945         (catch_syscall_split_args): Constify.
2946         * break-catch-sig.c (catch_signal_command): Constify.
2947         (catch_signal_split_args): Constify.
2948         * cli/cli-decode.h (struct cmd_list_element) <function>: Use
2949         cmd_const_sfunc_ftype.
2950         * cli/cli-decode.c (add_setshow_cmd_full): Constify.
2951         (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
2952         (add_setshow_boolean_cmd, add_setshow_filename_cmd)
2953         (add_setshow_string_cmd, struct cmd_list_element)
2954         (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
2955         (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
2956         (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
2957         Constify.
2958         (set_cmd_sfunc): Constify.
2959         (empty_sfunc): Constify.
2960         * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
2961         (add_setshow_boolean_cmd, add_setshow_filename_cmd)
2962         (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
2963         (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
2964         (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
2965         (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
2966         Constify.
2967         (set_cmd_sfunc): Constify.
2968         (cmd_sfunc_ftype): Remove.
2969         * compile/compile.c (set_compile_args): Constify.
2970         * infrun.c (set_disable_randomization): Constify.
2971         * infcmd.c (set_args_command, set_cwd_command): Constify.
2972         * breakpoint.c (set_condition_evaluation_mode): Constify.
2973         (add_catch_command): Constify.
2974         (catch_fork_command_1, catch_exec_command_1)
2975         (catch_load_command_1, catch_unload_command_1): Constify.
2976         (catch_load_or_unload): Constify.
2977         * guile/scm-param.c (pascm_set_func): Constify.
2978         (add_setshow_generic): Constify.
2979         * python/py-param.c (get_set_value): Constify.
2980         * top.h (set_verbose): Constify.
2981         * tui/tui-win.c (tui_set_var_cmd): Constify.
2982         * mi/mi-main.c (set_mi_async_command): Constify.
2983         * cli/cli-logging.c (set_logging_overwrite)
2984         (set_logging_redirect): Constify.
2985         * value.c (set_max_value_size): Constify.
2986         * valprint.c (set_input_radix, set_output_radix): Constify.
2987         * utils.c (set_width_command, set_height_command): Constify.
2988         * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
2989         * tracepoint.c (set_disconnected_tracing)
2990         (set_circular_trace_buffer, set_trace_buffer_size)
2991         (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
2992         * top.c (set_history_size_command, set_verbose, set_editing)
2993         (set_gdb_datadir, set_history_filename): Constify.
2994         * target.c (set_targetdebug, maint_set_target_async_command)
2995         (maint_set_target_non_stop_command, set_target_permissions)
2996         (set_write_memory_permission): Constify.
2997         (open_target): Constify.
2998         * target-descriptions.c (set_tdesc_filename_cmd): Constify.
2999         * target-dcache.c (set_stack_cache, set_code_cache): Constify.
3000         * symtab.c (set_symbol_cache_size_handler): Constify.
3001         * symfile.c (set_ext_lang_command): Constify.
3002         * symfile-debug.c (set_debug_symfile): Constify.
3003         * source.c (set_directories_command): Constify.
3004         * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
3005         * serial.c (set_parity): Constify.
3006         * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
3007         * remote.c (set_remote_exec_file, set_remotebreak)
3008         (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
3009         * record.c (set_record_insn_history_size)
3010         (set_record_call_history_size): Constify.
3011         * record-full.c (set_record_full_insn_max_num): Constify.
3012         * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
3013         * osabi.c (set_osabi): Constify.
3014         * mips-tdep.c (set_mips64_transfers_32bit_regs)
3015         (reinit_frame_cache_sfunc, mips_abi_update): Constify.
3016         * maint.c (maintenance_set_profile_cmd): Constify.
3017         * linux-thread-db.c (set_libthread_db_search_path): Constify.
3018         * language.c (set_language_command, set_range_command)
3019         (set_case_command): Constify.
3020         * infrun.c (set_non_stop, set_observer_mode)
3021         (set_stop_on_solib_events, set_schedlock_func)
3022         (set_exec_direction_func): Constify.
3023         * infcmd.c (set_inferior_tty_command): Constify.
3024         * disasm.c (set_disassembler_options_sfunc): Constify.
3025         * demangle.c (set_demangling_command): Constify.
3026         * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
3027         * cris-tdep.c (set_cris_version, set_cris_mode)
3028         (set_cris_dwarf2_cfi): Constify.
3029         * corefile.c (set_gnutarget_command): Constify.
3030         * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
3031         (set_target_wide_charset_sfunc): Constify.
3032         * breakpoint.c (update_dprintf_commands): Constify.
3033         * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
3034         * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
3035         (set_disassembly_style_sfunc): Constify.
3036         * arch-utils.c (set_endian, set_architecture): Constify.
3037         * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
3038         * agent.c (set_can_use_agent): Constify.
3039
3040 2017-11-07  Tom Tromey  <tom@tromey.com>
3041
3042         * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
3043         (go32_pde, go32_pte, go32_pte_for_address): Constify.
3044         * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
3045         (set_thread_default_pause_cmd, set_thread_default_run_cmd)
3046         (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
3047         (parse_int_arg, show_thread_default_detach_sc_cmd)
3048         (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
3049         (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
3050         (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
3051         (show_task_pause_cmd, set_task_detach_sc_cmd)
3052         (show_task_detach_sc_cmd, set_task_exc_port_cmd)
3053         (set_noninvasive_cmd, set_thread_pause_cmd)
3054         (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
3055         (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
3056         (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
3057         * windows-nat.c (display_selectors): Constify.
3058         * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
3059         non-const "cfunc".
3060         * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
3061         (cmd_cfunc_eq): Likewise.
3062         (struct cmd_list_element): Likewise.
3063         (do_cfunc): Remove.
3064         (cli_user_command_p): Update.
3065         * command.h (add_cmd): Remove non-const overload.
3066         (cmd_cfunc_ftype): Remove typedef.
3067         (cmd_cfunc_eq): Remove non-const overload.
3068         * value.c (show_values): Constify.
3069         * thread.c (thread_apply_all_command): Constify.
3070         * symfile.c (load_command): Constify.
3071         * source.c (directory_command): Constify.
3072         * maint.c (maintenance_internal_error)
3073         (maintenance_demangler_warning, maintenance_space_display)
3074         (maintenance_print_architecture, maintenance_translate_address)
3075         (maintenance_info_selftests, maintenance_internal_warning):
3076         Constify.
3077         * breakpoint.c (disable_trace_command, enable_trace_command):
3078         Constify.
3079         * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
3080         Constify.
3081         (add_auto_load_safe_path): Constify.
3082         * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
3083         * top.h (show_commands): Constify.
3084         * linux-thread-db.c (info_auto_load_libthread_db): Constify.
3085         * sparc64-tdep.c (adi_examine_command): Constify.
3086         (adi_assign_command): Constify.
3087
3088 2017-11-07  Tom Tromey  <tom@tromey.com>
3089
3090         * frame.h (info_locals_command, info_args_command): Constify.
3091         * auto-load.h (auto_load_info_scripts): Constify.
3092         * inferior.h (registers_info): Constify.
3093         * copying.c: Rebuild.
3094         * copying.awk: Constify generated commands.
3095         * auto-load.c (auto_load_info_scripts)
3096         (info_auto_load_gdb_scripts): Constify.
3097         * cli/cli-decode.c (struct cmd_list_element): Take a
3098         cmd_const_cfunc_ftype.
3099         * command.h (add_info): Take a cmd_const_cfunc_ftype.
3100         * tui/tui-win.c (tui_all_windows_info): Constify.
3101         * python/py-auto-load.c (info_auto_load_python_scripts):
3102         Constify.
3103         * cli/cli-cmds.c (show_command): Remove non-const overload.
3104         * tracepoint.c (info_tvariables_command, info_scope_command):
3105         Constify.
3106         (info_static_tracepoint_markers_command): Constify.
3107         * thread.c (info_threads_command): Constify.
3108         (print_thread_info_1): Constify.
3109         * target.c (info_target_command): Constify.
3110         * symtab.c (info_sources_command, info_functions_command)
3111         (info_types_command): Constify.
3112         (info_variables_command): Remove non-const overload.
3113         * symfile.c (info_ext_lang_command): Constify.
3114         * stack.c (info_frame_command, info_locals_command)
3115         (info_args_command): Constify.
3116         (backtrace_command): Remove non-const overload.
3117         * source.c (info_source_command, info_line_command): Constify.
3118         * solib.c (info_sharedlibrary_command): Constify.
3119         * skip.c (info_skip_command): Constify.
3120         * ser-go32.c (info_serial_command): Constify.
3121         * reverse.c (info_bookmarks_command): Constify.
3122         * printcmd.c (info_symbol_command, info_address_command)
3123         (info_display_command): Constify.
3124         * osdata.c (info_osdata_command): Constify.
3125         * objc-lang.c (info_selectors_command, info_classes_command):
3126         Constify.
3127         * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
3128         * memattr.c (info_mem_command): Constify.
3129         * macrocmd.c (info_macro_command, info_macros_command): Constify.
3130         * linux-fork.c (info_checkpoints_command): Constify.
3131         * infrun.c (info_signals_command): Constify.
3132         * inflow.c (info_terminal_command): Constify.
3133         * inferior.c (info_inferiors_command): Constify.
3134         (print_inferior): Constify.
3135         * infcmd.c (info_program_command, info_all_registers_command)
3136         (info_registers_command, info_vector_command)
3137         (info_float_command): Constify.
3138         (registers_info): Constify.
3139         * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
3140         (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
3141         Constify.
3142         * f-valprint.c (info_common_command): Constify.
3143         * dcache.c (info_dcache_command): Constify.
3144         (dcache_info_1): Constify.
3145         * darwin-nat-info.c (info_mach_tasks_command)
3146         (info_mach_task_command, info_mach_ports_command)
3147         (info_mach_port_command, info_mach_threads_command)
3148         (info_mach_thread_command, info_mach_regions_command)
3149         (info_mach_regions_recurse_command, info_mach_region_command)
3150         (info_mach_exceptions_command): Constify.
3151         (get_task_from_args): Constify.
3152         * cp-support.c (info_vtbl_command): Constify.
3153         * breakpoint.c (info_watchpoints_command)
3154         (info_tracepoints_command): Constify.
3155         (info_breakpoints_command): Remove non-const overload.
3156         * avr-tdep.c (avr_io_reg_read_command): Constify.
3157         * auxv.c (info_auxv_command): Constify.
3158         * ada-tasks.c (info_tasks_command): Constify.
3159         (info_task): Constify.
3160         * ada-lang.c (info_exceptions_command): Constify.
3161
3162 2017-11-07  Tom Tromey  <tom@tromey.com>
3163
3164         * solib.h (no_shared_libraries): Constify.
3165         * frame.h (return_command): Constify.
3166         * cli/cli-cmds.h (quit_command): Constify.
3167         * top.h (quit_command, execute_command): Constify.
3168         * target.h (flash_erase_command): Constify.
3169         * inferior.h (set_inferior_args, attach_command): Constify.
3170         * tracepoint.h (start_tracing, stop_tracing): Constify.
3171         * breakpoint.h (break_command, tbreak_command)
3172         (hbreak_command_wrapper, thbreak_command_wrapper)
3173         (rbreak_command_wrapper, watch_command_wrapper)
3174         (awatch_command_wrapper, rwatch_command_wrapper)
3175         (get_tracepoint_by_number): Constify.
3176         * symtab.c (info_variables_command, rbreak_command)
3177         (symtab_symbol_info): Constify.
3178         (info_variables_command): Add non-const overload.
3179         * top.c (dont_repeat_command): Constify.
3180         * breakpoint.c (ignore_command, commands_command)
3181         (condition_command, tbreak_command, hbreak_command)
3182         (thbreak_command, clear_command, break_command)
3183         (info_breakpoints_command, watch_command, rwatch_command)
3184         (awatch_command, trace_command, ftrace_command, strace_command)
3185         (trace_pass_command, break_range_command, dprintf_command)
3186         (agent_printf_command, get_tracepoint_by_number)
3187         (watch_maybe_just_location, trace_pass_command): Constify.
3188         (info_breakpoints_command): Add non-const overload.
3189         * tracefile.c (tsave_command): Constify.
3190         * infcmd.c (attach_command, disconnect_command, signal_command)
3191         (queue_signal_command, stepi_command, nexti_command)
3192         (finish_command, next_command, step_command, until_command)
3193         (advance_command, jump_command, continue_command, run_command)
3194         (start_command, starti_command, interrupt_command)
3195         (run_command_1, set_inferior_args, step_1): Constify.
3196         * inferior.c (add_inferior_command, remove_inferior_command)
3197         (clone_inferior_command): Constify.
3198         * linux-fork.c (checkpoint_command, restart_command): Constify.
3199         * windows-nat.c (signal_event_command): Constify.
3200         * guile/guile.c (guile_repl_command, guile_command): Constify.
3201         * printcmd.c (x_command, display_command, printf_command)
3202         (output_command, set_command, call_command, print_command)
3203         (eval_command): Constify.
3204         (non_const_set_command): Remove.
3205         (_initialize_printcmd): Update.
3206         * source.c (forward_search_command, reverse_search_command):
3207         Constify.
3208         * jit.c (jit_reader_load_command, jit_reader_unload_command):
3209         Constify.
3210         * infrun.c (handle_command): Constify.
3211         * memattr.c (mem_command): Constify.
3212         * stack.c (return_command, up_command, up_silently_command)
3213         (down_command, down_silently_command, frame_command)
3214         (backtrace_command, func_command, backtrace_command_1): Constify.
3215         (backtrace_command): Add non-const overload.
3216         * remote-sim.c (simulator_command): Constify.
3217         * exec.c (set_section_command): Constify.
3218         * tracepoint.c (tdump_command, trace_variable_command)
3219         (tstatus_command, tstop_command, tstart_command)
3220         (end_actions_pseudocommand, while_stepping_pseudocommand)
3221         (collect_pseudocommand, teval_pseudocommand, actions_command)
3222         (start_tracing, stop_tracing): Constify.
3223         * value.c (init_if_undefined_command): Constify.
3224         * tui/tui-stack.c (tui_update_command): Constify.
3225         * tui/tui-win.c (tui_refresh_all_command)
3226         (tui_set_tab_width_command, tui_set_win_height_command)
3227         (tui_set_focus_command, tui_scroll_forward_command)
3228         (tui_scroll_backward_command, tui_scroll_left_command)
3229         (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
3230         (tui_set_win_height): Constify.
3231         * tui/tui-layout.c (tui_layout_command): Constify.
3232         * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
3233         (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
3234         (proc_untrace_sysexit_cmd): Constify.
3235         * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
3236         (threadset_test_cmd, threadlist_update_test_cmd)
3237         (threadalive_test): Constify.
3238         * objc-lang.c (print_object_command): Constify.
3239         * command.h (add_com): Constify.
3240         * cli/cli-dump.c (restore_command): Constify.
3241         * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
3242         (help_command, complete_command, shell_command, edit_command)
3243         (list_command, disassemble_command, make_command)
3244         (apropos_command, alias_command): Constify.
3245         * cli/cli-script.c (document_command, define_command)
3246         (while_command, if_command, validate_comname): Constify.
3247         * cli/cli-decode.c (struct cmd_list_element): Change type of
3248         "fun".
3249         * target.c (do_monitor_command, flash_erase_command): Constify.
3250         * regcache.c (reg_flush_command): Constify.
3251         * reverse.c (reverse_step, reverse_next, reverse_stepi)
3252         (reverse_nexti, reverse_continue, reverse_finish)
3253         (save_bookmark_command, goto_bookmark_command)
3254         (exec_reverse_once): Constify.
3255         * python/python.c (python_interactive_command, python_command):
3256         Constify.
3257         * typeprint.c (ptype_command, whatis_command, whatis_exp):
3258         Constify.
3259         * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
3260         * gcore.c (gcore_command): Constify.
3261
3262 2017-11-07  Tom Tromey  <tom@tromey.com>
3263
3264         * printcmd.c (x_command): Call set_repeat_arguments.
3265         * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
3266         * top.c (repeat_arguments): New global.
3267         (set_repeat_arguments): New function.
3268         (execute_command): Handle repeat_arguments.
3269         (show_commands): Calls set_repeat_arguments.
3270         * command.h (set_repeat_arguments): Declare.
3271
3272 2017-11-07  Tom Tromey  <tom@tromey.com>
3273
3274         * stack.c (backtrace_command): Use std::string.
3275         (backtrace_command_1): Make "count_exp" const.
3276
3277 2017-11-07  Tom Tromey  <tom@tromey.com>
3278
3279         * source.c (directory_switch, mod_path, add_path): Constify.
3280         * defs.h (add_path, mod_path, directory_switch): Constify.
3281         * mi/mi-cmd-env.c (env_mod_path): Constify.
3282
3283 2017-11-07  Tom Tromey  <tom@tromey.com>
3284
3285         * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
3286         (run_command_1, continue_command, step_1, jump_command)
3287         (signal_command, until_command, advance_command, finish_command)
3288         (attach_command): Update.
3289
3290 2017-11-07  Tom Tromey  <tom@tromey.com>
3291
3292         * command.h (set_cmd_cfunc): Don't declare.
3293         * cli/cli-decode.c (set_cmd_cfunc): Now static.
3294
3295 2017-11-07  Tom Tromey  <tom@tromey.com>
3296
3297         * stack.c (select_frame_command): Constify.
3298         * cli/cli-decode.c (add_com_suppress_notification): Constify.
3299         * command.h (add_com_suppress_notification): Constify.
3300
3301 2017-11-07  Tom Tromey  <tom@tromey.com>
3302
3303         * breakpoint.c (stop_command): Constify.
3304         * cli/cli-decode.c (struct cmd_list_element): Constify.
3305         * command.h (add_abbrev_prefix_cmd): Constify.
3306
3307 2017-11-07  Pedro Alves  <palves@redhat.com>
3308
3309         * breakpoint.c (extract_bp_kind): New enum.
3310         (extract_bp_num, extract_bp_or_bp_range): New functions, partially
3311         factored out from ...
3312         (extract_bp_number_and_location): ... here.
3313         * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
3314
3315 2017-11-07  Pedro Alves  <palves@redhat.com>
3316
3317         * breakpoint.c (extract_bp_number_and_location): Change return
3318         type to void.  Throw error instead of warning.
3319         (enable_disable_command): Adjust.
3320
3321 2017-11-07  Xavier Roirand  <roirand@adacore.com>
3322             Pedro Alves  <palves@redhat.com>
3323
3324         * breakpoint.c (map_breakpoint_number_range): New, factored out
3325         from ...
3326         (map_breakpoint_numbers): ... here.
3327         (find_location_by_number): Change parameters from string to
3328         breakpoint number and location.
3329         (extract_bp_number_and_location): New function.
3330         (enable_disable_bp_num_loc)
3331         (enable_disable_breakpoint_location_range)
3332         (enable_disable_command): New functions, factored out ...
3333         (enable_command, disable_command): ... these functions, and
3334         adjusted to support ranges.
3335         * NEWS: Document enable/disable breakpoint location range feature.
3336
3337 2017-11-06  Luis Machado  <luis.machado@linaro.org>
3338
3339         * MAINTAINERS (Write After Approval): Update my e-mail address.
3340
3341 2017-11-06  Pedro Alves  <palves@redhat.com>
3342
3343         * gnu-nat.c (gnu_terminal_init): Delete.
3344         (gnu_target): Don't install gnu_terminal_init.
3345         * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
3346         (child_terminal_init): ... this function.
3347
3348 2017-11-06  Pedro Alves  <palves@redhat.com>
3349
3350         * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
3351         sgtty.h.
3352         * config.in, configure: Regenerate.
3353
3354 2017-11-06  Pedro Alves  <palves@redhat.com>
3355
3356         * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
3357         (async_init_signals): Adjust.
3358         (handle_stop_sig): Rename to ...
3359         (handle_sigtstp): ... this.
3360         (async_stop_sig): Rename to ...
3361         (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
3362         SIGTSTP path.
3363         * event-top.h: Move signal.h include to the top.  Check SIGTSTP
3364         instead of STOP_SIGNAL thoughout.
3365         (handle_stop_sig): Rename to ...
3366         (handle_sigtstp): ... this.
3367         * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
3368
3369 2017-11-06  Pedro Alves  <palves@redhat.com>
3370
3371         * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
3372         longer set flags twice in row.
3373
3374 2017-11-06  Pedro Alves  <palves@redhat.com>
3375
3376         * Makefile.in (SER_HARDWIRE): Update comment.
3377         (HFILES_NO_SRCDIR): Remove gdb_termios.h.
3378         * common/gdb_termios.h: Delete file.
3379         * common/job-control.c: Include termios.h and unistd.h instead of
3380         gdb_termios.h.
3381         (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
3382         check.
3383         (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
3384         Remove sgtty code.
3385         * configure.ac: No longer check for termio.h and sgtty.h.
3386         * configure: Regenerate.
3387         * inflow.c: Include termios.h instead of gdb_termios.h.  Replace
3388         PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
3389         Replace PROCESS_GROUP_TYPE references with pid_t references
3390         throughout.
3391         (gdb_getpgrp): Delete.
3392         (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
3393         (child_terminal_inferior): Remove comment.  Remove sgtty code.
3394         (child_terminal_ours_1): Use tcgetpgrp directly instead of
3395         gdb_getpgrp.  Use serial_set_tty_state instead aof
3396         serial_noflush_set_tty_state.  Remove sgtty code.
3397         * inflow.h: Include unistd.h instead of gdb_termios.h.  Replace
3398         PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
3399         (inferior_process_group): Now returns pid_t.
3400         * ser-base.c (ser_base_noflush_set_tty_state): Delete.
3401         * ser-base.h (ser_base_noflush_set_tty_state): Delete.
3402         * ser-event.c (serial_event_ops): Update.
3403         * ser-go32.c (dos_noflush_set_tty_state): Delete.
3404         (dos_ops): Update.
3405         * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
3406         * ser-pipe.c (pipe_ops): Update.
3407         * ser-tcp.c (tcp_ops): Update.
3408         * ser-unix.c: Include termios.h instead of gdb_termios.h.  Remove
3409         HAVE_TERMIOS checks.
3410         [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
3411         [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
3412         (get_tty_state, set_tty_state): Drop termio and sgtty code, and
3413         assume termios.
3414         (hardwire_noflush_set_tty_state): Delete.
3415         (hardwire_print_tty_state, hardwire_drain_output)
3416         (hardwire_flush_output, hardwire_flush_input)
3417         (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
3418         (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
3419         code, and assume termios.
3420         (hardwire_ops): Update.
3421         (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
3422         * serial.c (serial_noflush_set_tty_state): Delete.
3423         * serial.h (serial_noflush_set_tty_state): Delete.
3424         (serial_ops::noflush_set_tty_state): Delete.
3425
3426 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
3427
3428         * Makefile.in (SFILES): Remove doublest.c and dfp.c.
3429         (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
3430         (COMMON_OBS): Remove doublest.o and dfp.o.
3431         Do not build target-float.c (instead of doublest.c)
3432         with -Wformat-nonliteral.
3433
3434         * doublest.c: Remove file.
3435         * doublest.h: Remove file.
3436         * dfp.c: Remove file.
3437         * dfp.h: Remove file.
3438
3439         * target-float.c: Do not include "doublest.h" and "dfp.h".
3440         (DOUBLEST): Move here from doublest.h.
3441         (enum float_kind): Likewise.
3442         (FLOATFORMAT_CHAR_BIT): Likewise.
3443         (FLOATFORMAT_LARGEST_BYTES): Likewise.
3444         (floatformat_totalsize_bytes): Move here from doublest.c.  Make static.
3445         (floatformat_precision): Likewise.
3446         (floatformat_normalize_byteorder, get_field, put_field): Likewise.
3447         (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
3448         Likewise.
3449         (host_float_format, host_double_format, host_long_double_format):
3450         Likewise.
3451         (floatformat_to_string, floatformat_from_string): Likewise.
3452         (floatformat_to_doublest): Likewise.  Also, inline the original
3453         convert_floatformat_to_doublest.
3454         (floatformat_from_doublest): Likewise.  Also, inline the original
3455         convert_floatformat_from_doublest.
3456
3457         Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
3458         (MAX_DECIMAL_STRING): Move here from dfp.c.
3459         (match_endianness): Likewise.
3460         (set_decnumber_context, decimal_check_errors): Likewise.
3461         (decimal_from_number, decimal_to_number): Likewise.
3462         (decimal_to_string, decimal_from_string): Likewise.  Make static.
3463         (decimal_from_longest, decimal_from_ulongest): Likewise.
3464         (decimal_to_longest): Likewise.
3465         (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
3466         (decimal_convert): Likewise.
3467
3468 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
3469
3470         * doublest.c: Do not include "gdbtypes.h".
3471         (extract_typed_floating): Remove.
3472         (store_typed_floating): Remove.
3473         (convert_typed_floating): Remove.
3474         * doublest.h (struct type): Remove.
3475         (DOUBLEST_PRINT_FORMAT): Remove.
3476         (DOUBLEST_SCAN_FORMAT): Remove.
3477         (extract_typed_floating): Remove.
3478         (store_typed_floating): Remove.
3479         (convert_typed_floating): Remove.
3480
3481         * dfp.c (decimal_from_doublest): Remove.
3482         (decimal_to_doublest): Remove.
3483         * dfp.h: Do not include "doublest.h".
3484         (decimal_from_doublest): Remove.
3485         (decimal_to_doublest): Remove.
3486
3487         * value.c: Do not include "doublest.h" and "dfp.h".
3488         (value_as_double): Remove.
3489         (unpack_double): Remove.
3490         (value_from_double): Remove.
3491         (value_from_decfloat): Remove.
3492         * value.h: Do not include "doublest.h".
3493         (value_as_double): Remove.
3494         (unpack_double): Remove.
3495         (value_from_double): Remove.
3496         (value_from_decfloat): Remove.
3497
3498 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
3499
3500         * i386-tdep.c: Include "target-float.h".  Do not include "doublest.h".
3501         (i386_extract_return_value): Use target_float_convert.
3502         (i386_store_return_value): Likewise.
3503         * i387-tdep.c (i387_register_to_value): Use target_float_convert.
3504         (i387_value_to_register): Likewise.
3505         * ia64-tdep.c: Include "target-float.h".  Do not include "doublest.h".
3506         (ia64_register_to_value): Use target_float_convert.
3507         (ia64_value_to_register): Likewise.
3508         (ia64_extract_return_value): Likewise.
3509         (ia64_store_return_value): Likewise.
3510         (ia64_push_dummy_call): Likewise.
3511         * m68k-tdep.c: Include "target-float.h".
3512         (m68k_register_to_value): Use target_float_convert.
3513         (m68k_value_to_register): Likewise.
3514         (m68k_svr4_extract_return_value): Likewise.
3515         (m68k_svr4_store_return_value): Likewise.
3516         * ppc-sysv-tdep.c: Include "target-float.h".
3517         (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
3518         (do_ppc_sysv_return_value): Likewise.
3519         (ppc64_sysv_abi_push_freg): Likewise.
3520         (ppc64_sysv_abi_return_value_base): Likewise.
3521         * rs6000-aix-tdep.c: Include "target-float.h".
3522         (rs6000_push_dummy_call): Use target_float_convert.
3523         (rs6000_return_value): Likewise.
3524         * rs6000-lynx178-tdep.c: Include "target-float.h".
3525         (rs6000_lynx178_push_dummy_call): Use target_float_convert.
3526         (rs6000_lynx178_return_value): Likewise.
3527         * rs6000-tdep.c: Include "target-float.h".  Do not include "doublest.h".
3528         (rs6000_register_to_value): Use target_float_convert.
3529         (rs6000_value_to_register): Likewise.
3530         * arm-tdep.c: Include "target-float.h".  Do not include "doublest.h".
3531         (arm_extract_return_value): Use target_float_convert.
3532         (arm_store_return_value): Likewise.
3533         * sh-tdep.c: Include "target-float.h".  Do not include "doublest.h".
3534         (sh_register_convert_to_virtual): Use target_float_convert.
3535         (sh_register_convert_to_raw): Likewise.
3536         * sh64-tdep.c: Include "target-float.h".
3537         (sh64_extract_return_value): Use target_float_convert.
3538         (sh64_register_convert_to_virtual): Likewise.
3539         (sh64_register_convert_to_raw): Likewise.  Fix argument types.
3540
3541 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
3542
3543         * target-float.c (floatformat_to_host_double): New function.
3544         (floatformat_from_host_double): Likewise.
3545         (target_float_to_host_double): Likewise.
3546         (target_float_from_host_double): Likewise.
3547         * target-float.h (target_float_to_host_double): Add prototype.
3548         (target_float_from_host_double): Likewise.
3549
3550         * guile/scm-value.c: Include "target-float.h".
3551         (gdbscm_value_to_real): Use target_float_to_host_double.
3552         Handle integer source values via value_as_long.
3553         * guile/scm-math.c: Include "target-float.h".  Do not include
3554         "doublest.h", "dfp.h", and "expression.h".
3555         (vlscm_convert_typed_number): Use target_float_from_host_double.
3556         (vlscm_convert_number): Likewise.
3557
3558         * python/py-value.c (valpy_float): Use target_float_to_host_double.
3559         (convert_value_from_python): Use target_float_from_host_double.
3560
3561 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
3562
3563         * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
3564         (cast_from_fixed): Likewise.
3565         (ada_scaling_type): New function.
3566         (ada_delta): Return value instead of DOUBLEST.  Perform target
3567         arithmetic instead of host arithmetic.
3568         (scaling_factor): Rename to ...
3569         (ada_scaling_factor) ... this.  Make non-static.  Return value instead
3570         of DOUBLEST.  Perform target arithmetic instead of host arithmetic.
3571         (ada_fixed_to_float): Remove.
3572         (ada_float_to_fixed): Remove.
3573         * ada-lang.h (ada_fixed_to_float): Remove.
3574         (ada_float_to_fixed): Remove.
3575         (ada_delta): Return value instead of DOUBLEST.
3576         (ada_scaling_factor): Add prototype.
3577
3578         * ada-typeprint.c: Include "target-float.h".
3579         (print_fixed_point_type): Perform target arithmetic instead of
3580         host arithmetic.
3581         * ada-valprint.c: Include "target-float.h".
3582         (ada_val_print_num): Perform target arithmetic instead of
3583         host arithmetic for fixed-point types.
3584
3585 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
3586
3587         * target-float.c: Include <math.h>.
3588         (floatformat_binop): New function.
3589         (floatformat_compare): Likewise.
3590         (target_float_binop): Likewise.
3591         (target_float_compare): Likewise.
3592         * target-float.h: Include "expression.h".
3593         (target_float_binop): Add prototype.
3594         (target_float_compare): Likewise.
3595
3596         * valarith.c: Do not include "doublest.h" and "dfp.h".
3597         Include "common/byte-vector.h".
3598         (value_args_as_decimal): Remove, replace by ...
3599         (value_args_as_target_float): ... this function.  Handle both
3600         binary and decimal target floating-point formats.
3601         (scalar_binop): Handle both binary and decimal FP using
3602         value_args_as_target_float and target_float_binop.
3603         (value_equal): Handle both binary and decimal FP using
3604         value_args_as_target_float and target_float_compare.
3605         (value_less): Likewise.
3606         (value_pos): Handle all scalar types as simple copy.
3607         (value_neg): Handle all scalar types via BINOP_SUB from 0.
3608         * dfp.c (decimal_binop): Throw error instead of internal_error
3609         when called with an unsupported operation code.
3610
3611 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
3612
3613         * target-float.c (target_float_to_string): New function.
3614         (target_float_from_string): New function.
3615         * target-float.h (target_float_to_string): Add prototype.
3616         (target_float_from_string): Add prototype.
3617
3618         * valprint.c: Include "target-float.h".  Do not include
3619         "doublest.h" and "dfp.h".
3620         (print_floating): Use target_float_to_string.
3621         * printcmd.c: Include "target-float.h".  Do not include "dfp.h".
3622         (printf_floating): Use target_float_to_string.
3623         * i387-tdep.c: Include "target-float.h".  Do not include "doublest.h".
3624         (print_i387_value): Use target_float_to_string.
3625         * mips-tdep.c: Include "target-float.h".
3626         (mips_print_fp_register): Use target_float_to_string.
3627         * sh64-tdep.c: Include "target-float.h".
3628         (sh64_do_fp_register): Use target_float_to_string.
3629
3630         * parse.c: Include "target-float.h".  Do not include
3631         "doublest.h" and "dfp.h".
3632         (parse_float): Use target_float_from_string.
3633         * stabsread.c: Include "target-float.h".  Do not include "doublest.h".
3634         (define_symbol): Use target_float_from_string.
3635         * gdbarch-selftests.c: Include "target-float.h".
3636         (register_to_value_test): Use target_float_from_string.
3637
3638 2017-11-06  Ulrich Weigand  <uweigand@de.ibm.com>
3639
3640         * Makefile.c (SFILES): Add target-float.c.
3641         (HFILES_NO_SRCDIR): Add target-float.h.
3642         (COMMON_OBS): Add target-float.o.
3643         * target-float.h: New file.
3644         * target-float.c: New file.
3645
3646         * doublest.c (floatformat_classify): Fix detection of float_zero.
3647
3648         * gdbtypes.c (is_floating_type): New function.
3649         * gdbtypes.h (is_floating_type): Add prototype.
3650
3651         * value.c: Do not include "floatformat.h".
3652         (unpack_double): Use target_float_is_valid.
3653         (is_floating_value): New function.
3654         * value.h (is_floating_value): Add prototype-
3655
3656         * valarith.c: Include "target-float.h".
3657         (value_logical_not): Use target_float_is_zero.
3658
3659         * python/py-value.c: Include "target-float.h".
3660         (valpy_nonzero): Use target_float_is_zero.
3661
3662 2017-11-04  Tom Tromey  <tom@tromey.com>
3663
3664         * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
3665
3666 2017-11-04  Tom Tromey  <tom@tromey.com>
3667
3668         * breakpoint.c (set_momentary_breakpoint): Return
3669         breakpoint_up.
3670         (until_break_command): Update.
3671         (new_until_break_fsm): Change argument types to
3672         breakpoint_up.
3673         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
3674         (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
3675         Remove.
3676         * infcmd.c (finish_forward): Update.
3677         * breakpoint.h (set_momentary_breakpoint)
3678         (set_momentary_breakpoint_at_pc): Return breakpoint_up.
3679         (make_cleanup_delete_breakpoint): Remove.
3680         (struct breakpoint_deleter): New.
3681         (breakpoint_up): New typedef.
3682         * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
3683         (insert_exception_resume_breakpoint): Update.
3684         (insert_exception_resume_from_probe): Update.
3685         (insert_longjmp_resume_breakpoint): Update.
3686         * arm-linux-tdep.c (arm_linux_copy_svc): Update.
3687         * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
3688         * infcall.c (call_function_by_hand_dummy): Update
3689
3690 2017-11-04  Tom Tromey  <tom@tromey.com>
3691
3692         * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
3693
3694 2017-11-04  Tom Tromey  <tom@tromey.com>
3695
3696         * linux-tdep.c (linux_core_info_proc_mappings): Use
3697         gdb::def_vector.
3698         (linux_get_siginfo_data): Return gdb::byte_vector.  Remove
3699         "size" argument.
3700         (linux_corefile_thread): Update.
3701         (linux_make_corefile_notes): Remove unused variable.
3702
3703 2017-11-04  Tom Tromey  <tom@tromey.com>
3704
3705         * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
3706         gdb::byte_vector.
3707
3708 2017-11-04  Tom Tromey  <tom@tromey.com>
3709
3710         * objfiles.c (do_free_objfile_cleanup): Remove.
3711         * compile/compile-object-load.c (compile_object_load): Update.
3712         * objfiles.h (make_cleanup_free_objfile): Remove.
3713
3714 2017-11-04  Tom Tromey  <tom@tromey.com>
3715
3716         * sparc64-tdep.c (do_examine): Use gdb::def_vector.
3717         (adi_read_versions): Change "tags" to "gdb_byte *".
3718         (adi_print_versions): Likewise.
3719
3720 2017-11-04  Tom Tromey  <tom@tromey.com>
3721
3722         * breakpoint.c
3723         (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
3724         from start_rbreak_breakpoints.
3725         (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
3726         * breakpoint.h (class scoped_rbreak_breakpoints): New.
3727         (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
3728         * symtab.c (do_end_rbreak_breakpoints): Remove.
3729         (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
3730
3731 2017-11-04  Tom Tromey  <tom@tromey.com>
3732
3733         * cp-namespace.c (reset_directive_searched): Remove.
3734         (cp_lookup_symbol_via_imports): Use scoped_restore.
3735         * cp-support.c (reset_directive_searched): Remove.
3736         (make_symbol_overload_list_using): Use scoped_restore.
3737         * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
3738         (reset_directive_searched): Remove.
3739
3740 2017-11-04  Tom Tromey  <tom@tromey.com>
3741
3742         * symfile.c (find_separate_debug_file_by_debuglink): Use
3743         unique_xmalloc_ptr.
3744
3745 2017-11-04  Tom Tromey  <tom@tromey.com>
3746
3747         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
3748         type of "info".
3749         (compute_stack_depth): Likewise.
3750         (do_compile_dwarf_expr_to_c): Use std::vector.
3751
3752 2017-11-04  Tom Tromey  <tom@tromey.com>
3753
3754         * compile/compile-object-load.c (link_callbacks_einfo): Use
3755         std::string.
3756
3757 2017-11-04  Tom Tromey  <tom@tromey.com>
3758
3759         * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
3760         Use scoped_free_pendings.
3761         * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
3762         scoped_free_pendings.
3763         * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
3764         (xcoff_initial_scan): Likewise.
3765         * buildsym.c (reset_symtab_globals): Update comment.
3766         (scoped_free_pendings): Rename from really_free_pendings.
3767         (prepare_for_building): Update comment.
3768         (buildsym_init): Likewise.
3769         * buildsym.h (class scoped_free_pendings): New class.
3770         (really_free_pendings): Don't declare.
3771
3772 2017-11-03  Ulrich Weigand  <uweigand@de.ibm.com>
3773
3774         * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
3775         output when converting a zero value to a special byteorder format.
3776
3777 2017-11-02  Yao Qi  <yao.qi@linaro.org>
3778
3779         * frame.c (do_frame_register_read): Remove aspace.
3780         * jit.c (jit_frame_sniffer): Likwise.
3781         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
3782         * regcache.c (regcache::regcache): Pass nullptr.
3783         (regcache_print): Caller updated.
3784         * regcache.h (regcache::regcache): Remove one constructor
3785         parameter aspace.
3786
3787 2017-11-02  Yao Qi  <yao.qi@linaro.org>
3788
3789         * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
3790
3791 2017-11-02  Yao Qi  <yao.qi@linaro.org>
3792
3793         * breakpoint.c (insert_single_step_breakpoints): Update.
3794         * frame.c (struct frame_info) <aspace>: Add const.
3795         (frame_save_as_regcache): Add const.
3796         (get_frame_address_space): Return const address_space *.
3797         * frame.h (get_frame_address_space): Update declaration.
3798         * infrun.c (struct step_over_info) <aspace>: Add const.
3799         (set_step_over_info): Make aspace const.
3800         (displaced_step_prepare_throw): Change variable const.
3801         (resume): Likewise.
3802         (proceed): Likewise.
3803         (adjust_pc_after_break): Likewise.
3804         (save_waitstatus): Likewise.
3805         (handle_signal_stop): Likewise.
3806         (keep_going_pass_signal): Likewise.
3807         * jit.c (jit_frame_sniffer): Add const.
3808         * mips-tdep.c (mips_single_step_through_delay): Likewise.
3809         * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
3810         * record-full.c (record_full_wait_1): Likewise.
3811         * regcache.c (regcache::regcache): Change parameter to const.
3812         * regcache.h (regcache::regcache): Likewise.
3813         (regcache::aspace): Return const address_space *.
3814         (regcache) <m_aspace>: Add const.
3815
3816 2017-11-02  Yao Qi  <yao.qi@linaro.org>
3817
3818         * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
3819         * frame.c (create_sentinel_frame): Likewise.
3820         * infrun.c (displaced_step_prepare_throw): Likewise.
3821         (resume): Likewise.
3822         (thread_still_needs_step_over_bp): Likewise.
3823         (proceed): Likewise.
3824         (do_target_wait): Likewise.
3825         (adjust_pc_after_break): Likewise.
3826         (handle_syscall_event): Likewise.
3827         (save_waitstatus): Likewise.
3828         (handle_inferior_event_1): Likewise.
3829         (handle_signal_stop): Likewise.
3830         (keep_going_pass_signal): Likewise.
3831         * linux-nat.c (status_callback): Likewise.
3832         (save_stop_reason): Likewise.
3833         (resume_stopped_resumed_lwps): Likewise.
3834         * record-full.c (record_full_exec_insn): Likewise.
3835         (record_full_wait_1): Likewise.
3836         * regcache.c (get_regcache_aspace): Remove.
3837         * regcache.h (get_regcache_aspace): Remove.
3838
3839 2017-11-02  Yao Qi  <yao.qi@linaro.org>
3840
3841         * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
3842         (init_regcache_descr): Use gdbarch_num_regs.
3843         (regcache::regcache): Likewise.
3844         (regcache::get_register_status): Likewise.
3845         (regcache::assert_raw_regnum): Likewise.
3846         (regcache::cooked_read): Likewise.
3847         (regcache::cooked_read_value): Likewise.
3848         (regcache::cooked_write): Likewise.
3849         (regcache::dump): Likewise.
3850         (regcache::num_raw_registers): New method.
3851         * regcache.h (class regcache) <num_raw_registers>: New.
3852
3853 2017-11-02  Yao Qi  <yao.qi@linaro.org>
3854
3855         * regcache.c (regcache::assert_regnum): New method.
3856         (regcache::invalidate): Call assert_regnum.
3857         (regcache::raw_update): Likewise.
3858         (regcache::raw_write): Likewise.
3859         (regcache::raw_read_part): Likewise.
3860         (regcache::raw_write_part): Likewise.
3861         (regcache::raw_supply): Likewise.
3862         (regcache::raw_supply_integer): Likewise.
3863         (regcache::raw_supply_zeroed): Likewise.
3864         (regcache::raw_collect): Likewise.
3865         (regcache::raw_collect_integer): Likewise.
3866         * regcache.h (regcache::assert_regnum): Declare.
3867
3868 2017-11-02  Yao Qi  <yao.qi@linaro.org>
3869
3870         * regcache.c (regcache::dump): Remove code.
3871
3872 2017-11-02  Yao Qi  <yao.qi@linaro.org>
3873
3874         * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
3875         Remove.
3876         <sizeof_cooked_register_status>: Remove.
3877         (init_regcache_descr): Update.
3878         (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
3879         (regcache::save): Likewise.
3880         (regcache::dump): Likewise.
3881
3882 2017-11-01  James Bowman  <james.bowman@ftdichip.com>
3883
3884         * ft32-tdep.c (ft32_fetch_instruction): New function.
3885         (ft32_analyze_prologue): Use ft32_fetch_instruction().
3886
3887 2017-10-31  Simon Marchi  <simon.marchi@polymtl.ca>
3888
3889         * cli/cli-script.c (execute_control_command): Rename to ...
3890         (execute_control_command_1): ... this.
3891         (execute_control_command): New function.
3892
3893 2017-10-31  Simon Marchi  <simon.marchi@ericsson.com>
3894
3895         * tracepoint.c (tfind_command): Remove const_cast.
3896
3897 2017-10-30  Mike Gulick  <mgulick@mathworks.com>
3898
3899         * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
3900
3901 2017-10-30  Simon Marchi  <simon.marchi@ericsson.com>
3902
3903         * common/common-utils.h (in_inclusive_range): New function.
3904         * arm-tdep.c (arm_record_extension_space): Use
3905         in_inclusive_range.
3906         (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
3907         * cris-tdep.c (cris_spec_reg_applicable): Use
3908         in_inclusive_range.
3909
3910 2017-10-30  Pedro Alves  <palves@redhat.com>
3911             Simon Marchi <simon.marchi@ericsson.com>
3912
3913         * remote.c (remote_set_syscall_catchpoint): Build a std::string
3914         instead of a gdb::unique_xmalloc_ptr, using string_appendf.
3915
3916 2017-10-30  Pedro Alves  <palves@redhat.com>
3917
3918         * common/common-utils.c (string_appendf, string_vappendf): New
3919         functions.
3920         * common/common-utils.h (string_appendf, string_vappendf): New
3921         declarations.
3922         * unittests/common-utils-selftests.c (string_appendf_func)
3923         (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
3924         (string_vappendf_tests): New functions.
3925         (_initialize_common_utils_selftests): Register "string_appendf" and
3926         "string_vappendf tests".
3927
3928 2017-10-30  Pedro Alves  <palves@redhat.com>
3929
3930         * unittests/common-utils-selftests.c (format_func): New typedef.
3931         (string_printf_tests, string_vprintf_tests): Tests factored out
3932         and merged to ...
3933         (test_format_func): ... this new function.
3934         (string_printf_tests, string_vprintf_tests): Reimplement on top of
3935         test_format_func.
3936
3937 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
3938
3939         * darwin-nat.c: Remove include of gdb.h.
3940
3941 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
3942
3943         * xtensa-xtregs.c: Fix formatting issues.
3944
3945 2017-10-29  Simon Marchi  <simon.marchi@ericsson.com>
3946
3947         * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
3948
3949 2017-10-28  Maksim Dzabraev  <dzabraew@gmail.com>
3950
3951         PR python/21213
3952         * python/py-infthread.c (thpy_get_inferior): Increment reference
3953         of inferior before returning it.
3954
3955 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
3956
3957         * unittests/common-utils-selftests.c (format): Add
3958         ATTRIBUTE_PRINTF.
3959
3960 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
3961
3962         * xml-syscall.c (struct syscall_desc): Add constructor.
3963         <name>: Change type to std::string.
3964         (syscall_desc_up): New typedef.
3965         (syscall_desc_p): Remove typeder.
3966         (DEF_VEC_P(syscall_desc_p)): Remove.
3967         (struct syscall_group_desc): Add constructor.
3968         <name>: Change type to std::string.
3969         <syscalls>: Change type to std::vector.
3970         (syscall_group_desc_up): New typedef.
3971         (syscall_group_desc_p): Remove typedef.
3972         (DEF_VEC_P(syscall_group_desc_p)): Remove.
3973         (struct syscalls_info) <syscalls>: Change type to std::vector of
3974         unique_ptr.
3975         <groups>: Likewise.
3976         <my_gdb_datadir>: Change type to std::string.
3977         (syscalls_info_up): New typedef.
3978         (allocate_syscalls_info): Remove.
3979         (syscalls_info_free_syscalls_desc): Remove.
3980         (syscalls_info_free_syscall_group_desc): Remove.
3981         (free_syscalls_info): Remove.
3982         (make_cleanup_free_syscalls_info): Remove.
3983         (syscall_group_create_syscall_group_desc): Adjust.
3984         (syscall_group_add_syscall): Adjust.
3985         (syscall_create_syscall_desc): Adjust.
3986         (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
3987         (init_syscalls_info): Adjust.
3988         (syscall_group_get_group_by_name): Adjust.
3989         (xml_get_syscall_number): Adjust.
3990         (xml_get_syscall_name): Adjust.
3991         (xml_list_of_syscalls): Adjust.
3992         (xml_list_syscalls_by_group): Adjust.
3993         (xml_list_of_groups): Adjust.
3994
3995 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
3996
3997         * probe.h: Don't include gdb_vecs.h.
3998         (DEF_VEC_P (probe_p)): Remove.
3999         (find_probes_in_objfile): Return an std::vector.
4000         * probe.c (find_probes_in_objfile): Likewise.
4001         * breakpoint.c (breakpoint_objfile_data)
4002         <longjmp_probes>: Change type to std::vector.
4003         <exception_probes>: Likewise.
4004         (free_breakpoint_probes): Don't manually free vectors.
4005         (create_longjmp_master_breakpoint): Adjust.
4006         (create_exception_master_breakpoint): Adjust.
4007         * solib-svr4.c (svr4_create_probe_breakpoints): Change
4008         parameter type, adjust.
4009         (svr4_create_solib_event_breakpoints): Adjust.
4010
4011 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
4012
4013         * breakpoint.c (breakpoint_objfile_data): Initialize fields.
4014         (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
4015         with new.
4016         (free_breakpoint_probes): Rename to ...
4017         (free_breakpoint_objfile_data): ... this, and call delete on
4018         bp_objfile_data..
4019
4020 2017-10-27  Simon Marchi  <simon.marchi@polymtl.ca>
4021
4022         * auto-load.c: Don't include gdb_vecs.h, include algorithm.
4023         (loaded_script_ptr): Remove typedef.
4024         (DEF_VEC_P (loaded_script_ptr)): Remove.
4025         (struct collect_matching_scripts_data): Add constructor.
4026         <scripts_p>: Change type to (pointer to) std::vector.
4027         (collect_matching_scripts_data): Adjust.
4028         (sort_scripts_by_name): Make suitable for std::sort.
4029         (print_scripts): Don't sort vector, adjust to std::vector.
4030         (auto_load_info_scripts): Sort vectors, adjust to std::vector.
4031
4032 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
4033
4034         * symfile.c (filename_language): Make struct, not typedef.  Add
4035         constructor.
4036         <ext>: Change type to std::string.
4037         (DEF_VEC_O (filename_language)): Remove.
4038         (filename_language_table): Change type to std::vector.
4039         (add_filename_language): Adjust.
4040         (set_ext_lang_command): Adjust.
4041         (info_ext_lang_command): Adjust.
4042         (deduce_language_from_filename): Adjust.
4043         (class scoped_restore_filename_language_table): Remove.
4044         (test_filename_language): Use scoped_restore.
4045         (test_set_ext_lang_command): Use scoped_restore, adjust to
4046         std::vector change.
4047
4048 2017-10-27  Simon Marchi  <simon.marchi@ericsson.com>
4049
4050         * symfile.c: Include selftest.h.
4051         (class scoped_restore_filename_language_table): New.
4052         (test_filename_language): New test.
4053         (test_set_ext_lang_command): New test.
4054         (_initialize_symfile): Register tests.
4055
4056 2017-10-27  Keith Seitz  <keiths@redhat.com>
4057
4058         * breakpoint.c (print_breakpoint_location): Use the symbol saved
4059         in the bp_location, falling back to find_pc_sect_function when
4060         needed.
4061         (add_location_to_breakpoint): Save sal->symbol.
4062         * breakpoint.h (struct bp_location) <symbol>: New field.
4063         * symtab.c (find_function_start_sal): Save the symbol into the SaL.
4064         * symtab.h (struct symtab_and_line) <symbol>: New field.
4065
4066 2017-10-26  Patrick Frants  <osscontribute@gmail.com>
4067
4068         PR gdb/13669
4069         * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
4070         to rewind obstack.
4071
4072 2017-10-26  Pedro Alves  <palves@redhat.com>
4073
4074         * remote.c (remote_async_terminal_ours_p): Delete.
4075         (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
4076         Remove references to 'remote_async_terminal_ours_p'.
4077
4078 2017-10-26  Yao Qi  <yao.qi@linaro.org>
4079
4080         * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
4081
4082 2017-10-26  Yao Qi  <yao.qi@linaro.org>
4083
4084         * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
4085         aspace const.
4086         * break-catch-syscall.c (breakpoint_hit_catch_syscall):
4087         Likewise.
4088         * breakpoint.c (bpstat_check_location): Remove cast.
4089         (breakpoint_hit_catch_fork): Make aspce const.
4090         (breakpoint_hit_catch_solib): Likewise.
4091         (breakpoint_hit_catch_exec): Likewise.
4092         (breakpoint_hit_ranged_breakpoint): Likewise.
4093         (breakpoint_hit_watchpoint): Likewise.
4094         (base_breakpoint_breakpoint_hit): Likewise.
4095         (bkpt_breakpoint_hit): Likewise.
4096         (dprintf_breakpoint_hit): Likewise.
4097         (tracepoint_breakpoint_hit): Likewise.
4098         * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
4099
4100 2017-10-26  Yao Qi  <yao.qi@linaro.org>
4101
4102         * breakpoint.c (breakpoint_location_address_match): Change
4103         "struct address_space *" to "const address_space".
4104         (breakpoint_location_address_range_overlap): Likewise.
4105         (breakpoint_here_p): Likewise.
4106         (breakpoint_in_range_p): Likewise.
4107         (moribund_breakpoint_here_p): Likewise.
4108         (bp_location_inserted_here_p): Likewise.
4109         (software_breakpoint_inserted_here_p): Likewise.
4110         (hardware_breakpoint_inserted_here_p): Likewise.
4111         (hardware_watchpoint_inserted_in_range): Likewise.
4112         (bpstat_check_location): Likewise.
4113         (bpstat_stop_status): Likewise.
4114         (breakpoint_address_match): Likewise.
4115         (breakpoint_address_match_range): Likewise.
4116         (breakpoint_location_address_match): Likewise.
4117         (breakpoint_location_address_range_overlap): Likewise.
4118         (insert_single_step_breakpoint): Likewise.
4119         (breakpoint_has_location_inserted_here): Likewise.
4120         (single_step_breakpoint_inserted_here_p): Likewise.
4121         (pc_at_non_inline_function): Likewise.
4122         * breakpoint.h (bpstat_stop_status): Update declaration.
4123         (breakpoint_here_p): Likewise.
4124         (breakpoint_in_range_p): Likewise.
4125         (moribund_breakpoint_here_p): Likewise.
4126         (breakpoint_inserted_here_p): Likewise.
4127         (software_breakpoint_inserted_here_p): Likewise.
4128         (hardware_breakpoint_inserted_here_p): Likewise.
4129         (breakpoint_has_location_inserted_here): Likewise.
4130         (single_step_breakpoint_inserted_here_p): Likewise.
4131         (hardware_watchpoint_inserted_in_range): Likewise.
4132         (breakpoint_address_match): Likewise.
4133         (insert_single_step_breakpoint): Likewise.
4134         (pc_at_non_inline_function): Likewise.
4135         * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
4136         * record.c (record_check_stopped_by_breakpoint): Likewise.
4137         * record.h (record_check_stopped_by_breakpoint): Likewise.
4138         * thread.c (thread_has_single_step_breakpoint_here): Likewise.
4139
4140 2017-10-25  Yao Qi  <yao.qi@linaro.org>
4141
4142         * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
4143         regcache->arch () instead get_regcache_arch.
4144         * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
4145         Likewise.
4146         (aarch64_fbsd_store_inferior_registers): Likewise.
4147         * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
4148         (store_gregs_to_thread): Likewise.
4149         (fetch_fpregs_from_thread): Likewise.
4150         (store_fpregs_to_thread): Likewise.
4151         * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
4152         (aarch64_store_return_value): Likewise.
4153         (aarch64_software_single_step): Likewise.
4154         * aix-thread.c (aix_thread_wait): Likewise.
4155         (supply_reg32): Likewise.
4156         (supply_sprs64): Likewise.
4157         (supply_sprs32): Likewise.
4158         (fill_gprs64): Likewise.
4159         (fill_gprs32): Likewise.
4160         (fill_sprs64): Likewise.
4161         (fill_sprs32): Likewise.
4162         (store_regs_user_thread): Likewise.
4163         (store_regs_kernel_thread): Likewise.
4164         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
4165         (alphabsd_store_inferior_registers): Likewise.
4166         * alpha-tdep.c (alpha_extract_return_value): Likewise.
4167         (alpha_store_return_value): Likewise.
4168         (alpha_deal_with_atomic_sequence): Likewise.
4169         (alpha_next_pc): Likewise.
4170         (alpha_software_single_step): Likewise.
4171         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
4172         (amd64bsd_store_inferior_registers): Likewise.
4173         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
4174         Likewise.
4175         (amd64_linux_store_inferior_registers): Likewise.
4176         * amd64-nat.c (amd64_supply_native_gregset): Likewise.
4177         (amd64_collect_native_gregset): Likewise.
4178         * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
4179         (amd64obsd_collect_uthread): Likewise.
4180         * amd64-tdep.c (amd64_supply_fpregset): Likewise.
4181         (amd64_collect_fpregset): Likewise.
4182         (amd64_supply_fxsave): Likewise.
4183         (amd64_supply_xsave): Likewise.
4184         (amd64_collect_fxsave): Likewise.
4185         (amd64_collect_xsave): Likewise.
4186         * arc-tdep.c (arc_write_pc): Likewise.
4187         * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
4188         * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
4189         (arm_fbsd_store_inferior_registers): Likewise.
4190         * arm-linux-nat.c (fetch_vfp_regs): Likewise.
4191         (store_vfp_regs): Likewise.
4192         (arm_linux_fetch_inferior_registers): Likewise.
4193         (arm_linux_store_inferior_registers): Likewise.
4194         * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
4195         (arm_linux_sigreturn_next_pc): Likewise.
4196         (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
4197         * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
4198         (fetch_register): Likewise.
4199         (store_register): Likewise.
4200         * arm-tdep.c (arm_is_thumb): Likewise.
4201         (displaced_in_arm_mode): Likewise.
4202         (bx_write_pc): Likewise.
4203         (arm_get_next_pcs_addr_bits_remove): Likewise.
4204         (arm_software_single_step): Likewise.
4205         (arm_extract_return_value): Likewise.
4206         (arm_store_return_value): Likewise.
4207         (arm_write_pc): Likewise.
4208         * bfin-tdep.c (bfin_extract_return_value): Likewise.
4209         * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
4210         (bsd_uthread_store_registers): Likewise.
4211         * core-regset.c (fetch_core_registers): Likewise.
4212         * corelow.c (get_core_registers): Likewise.
4213         * cris-tdep.c (cris_store_return_value): Likewise.
4214         (cris_extract_return_value): Likewise.
4215         (find_step_target): Likewise.
4216         (find_step_target): Likewise.
4217         (cris_software_single_step): Likewise.
4218         * ctf.c (ctf_fetch_registers): Likewise.
4219         * darwin-nat.c (cancel_breakpoint): Likewise.
4220         * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
4221         * frv-tdep.c (frv_extract_return_value): Likewise.
4222         * ft32-tdep.c (ft32_store_return_value): Likewise.
4223         (ft32_extract_return_value): Likewise.
4224         * go32-nat.c (fetch_register): Likewise.
4225         (go32_fetch_registers): Likewise.
4226         (go32_store_registers): Likewise.
4227         (store_register): Likewise.
4228         * h8300-tdep.c (h8300_extract_return_value): Likewise.
4229         (h8300_store_return_value): Likewise.
4230         * hppa-linux-nat.c (fetch_register): Likewise.
4231         (store_register): Likewise.
4232         (hppa_linux_fetch_inferior_registers): Likewise.
4233         (hppa_linux_store_inferior_registers): Likewise.
4234         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
4235         (i386_darwin_store_inferior_registers): Likewise.
4236         * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
4237         (gnu_store_registers): Likewise.
4238         * i386-linux-nat.c (fetch_register): Likewise.
4239         (store_register): Likewise.
4240         (supply_gregset): Likewise.
4241         (fill_gregset): Likewise.
4242         (i386_linux_fetch_inferior_registers): Likewise.
4243         (i386_linux_store_inferior_registers): Likewise.
4244         (i386_linux_resume): Likewise.
4245         * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
4246         Likewise.
4247         * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
4248         * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
4249         * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
4250         (i386obsd_collect_uthread): Likewise.
4251         * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
4252         (i386_supply_gregset): Likewise.
4253         (i386_collect_gregset): Likewise.
4254         (i386_supply_fpregset): Likewise.
4255         (i386_collect_fpregset): Likewise.
4256         (i386_mpx_bd_base): Likewise.
4257         * i386-v4-nat.c (supply_fpregset): Likewise.
4258         (fill_fpregset): Likewise.
4259         * i387-tdep.c (i387_supply_fsave): Likewise.
4260         (i387_collect_fsave): Likewise.
4261         (i387_supply_fxsave): Likewise.
4262         (i387_collect_fxsave): Likewise.
4263         (i387_supply_xsave): Likewise.
4264         (i387_collect_xsave): Likewise.
4265         * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
4266         (ia64_linux_store_registers): Likewise.
4267         * ia64-tdep.c (ia64_access_rse_reg): Likewise.
4268         (ia64_extract_return_value): Likewise.
4269         (ia64_store_return_value): Likewise.
4270         (find_func_descr): Likewise.
4271         * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
4272         * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
4273         (inf_ptrace_store_registers): Likewise.
4274         * infrun.c (use_displaced_stepping): Likewise.
4275         (displaced_step_prepare_throw): Likewise.
4276         (resume): Likewise.
4277         (proceed): Likewise.
4278         (do_target_wait): Likewise.
4279         (adjust_pc_after_break): Likewise.
4280         (handle_inferior_event_1): Likewise.
4281         (handle_signal_stop): Likewise.
4282         (save_infcall_suspend_state): Likewise.
4283         (restore_infcall_suspend_state): Likewise.
4284         * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
4285         * jit.c (jit_frame_prev_register): Likewise.
4286         * linux-nat.c (save_stop_reason): Likewise.
4287         (linux_nat_wait_1): Likewise.
4288         (resume_stopped_resumed_lwps): Likewise.
4289         * linux-record.c (record_linux_sockaddr): Likewise.
4290         (record_linux_msghdr): Likewise.
4291         (record_linux_system_call): Likewise.
4292         * linux-tdep.c (linux_collect_thread_registers): Likewise.
4293         * lm32-tdep.c (lm32_extract_return_value): Likewise.
4294         (lm32_store_return_value): Likewise.
4295         * m32c-tdep.c (m32c_read_flg): Likewise.
4296         (m32c_pseudo_register_read): Likewise.
4297         (m32c_pseudo_register_write): Likewise.
4298         * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
4299         (m32r_linux_collect_gregset): Likewise.
4300         * m32r-tdep.c (m32r_store_return_value): Likewise.
4301         (m32r_extract_return_value): Likewise.
4302         * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
4303         (m68kbsd_collect_fpregset): Likewise.
4304         * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
4305         * m68k-linux-nat.c (fetch_register): Likewise.
4306         (old_fetch_inferior_registers): Likewise.
4307         (old_store_inferior_registers): Likewise.
4308         (store_regs): Likewise.
4309         * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
4310         (m68k_svr4_store_return_value): Likewise.
4311         * m88k-tdep.c (m88k_store_arguments): Likewise.
4312         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
4313         (mi_cmd_data_write_register_values): Likewise.
4314         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
4315         (mips_fbsd_store_inferior_registers): Likewise.
4316         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
4317         (mips_fbsd_supply_gregs): Likewise.
4318         (mips_fbsd_collect_fpregs): Likewise.
4319         (mips_fbsd_collect_gregs): Likewise.
4320         (mips_fbsd_supply_fpregset): Likewise.
4321         (mips_fbsd_collect_fpregset): Likewise.
4322         (mips_fbsd_supply_gregset): Likewise.
4323         (mips_fbsd_collect_gregset): Likewise.
4324         * mips-linux-nat.c (supply_gregset): Likewise.
4325         (fill_gregset): Likewise.
4326         (supply_fpregset): Likewise.
4327         (fill_fpregset): Likewise.
4328         * mips-linux-tdep.c (mips_supply_gregset): Likewise.
4329         (mips_fill_gregset): Likewise.
4330         (mips_supply_fpregset): Likewise.
4331         (mips_fill_fpregset): Likewise.
4332         (mips64_supply_gregset): Likewise.
4333         (micromips_linux_sigframe_validate): Likewise.
4334         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
4335         (mipsnbsd_fetch_inferior_registers): Likewise.
4336         (mipsnbsd_store_inferior_registers): Likewise.
4337         * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
4338         (mipsnbsd_supply_gregset): Likewise.
4339         (mipsnbsd_iterate_over_regset_sections): Likewise.
4340         (mipsnbsd_supply_reg): Likewise.
4341         (mipsnbsd_supply_fpreg): Likewise.
4342         * mips-tdep.c (mips_in_frame_stub): Likewise.
4343         (mips_dummy_id): Likewise.
4344         (is_octeon_bbit_op): Likewise.
4345         (micromips_bc1_pc): Likewise.
4346         (extended_mips16_next_pc): Likewise.
4347         (mips16_next_pc): Likewise.
4348         (deal_with_atomic_sequence): Likewise.
4349         * moxie-tdep.c (moxie_process_readu): Likewise.
4350         * nios2-tdep.c (nios2_get_next_pc): Likewise.
4351         * nto-procfs.c (procfs_store_registers): Likewise.
4352         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
4353         (ppcfbsd_store_inferior_registers): Likewise.
4354         * ppc-linux-nat.c (fetch_vsx_register): Likewise.
4355         (fetch_altivec_register): Likewise.
4356         (get_spe_registers): Likewise.
4357         (fetch_spe_register): Likewise.
4358         (fetch_altivec_registers): Likewise.
4359         (fetch_all_gp_regs): Likewise.
4360         (fetch_all_fp_regs): Likewise.
4361         (store_vsx_register): Likewise.
4362         (store_altivec_register): Likewise.
4363         (set_spe_registers): Likewise.
4364         (store_spe_register): Likewise.
4365         (store_altivec_registers): Likewise.
4366         (store_all_gp_regs): Likewise.
4367         (store_all_fp_regs): Likewise.
4368         * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
4369         (ppc_linux_collect_gregset): Likewise.
4370         (ppc_canonicalize_syscall): Likewise.
4371         (ppc_linux_record_signal): Likewise.
4372         (ppu2spu_prev_register): Likewise.
4373         * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
4374         * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
4375         (ppcobsd_store_registers): Likewise.
4376         * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
4377         Likewise.
4378         (ppc_ravenscar_generic_store_registers): Likewise.
4379         * procfs.c (procfs_fetch_registers): Likewise.
4380         (procfs_store_registers): Likewise.
4381         * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
4382         (ravenscar_store_registers): Likewise.
4383         (ravenscar_prepare_to_store): Likewise.
4384         * record-btrace.c (record_btrace_fetch_registers): Likewise.
4385         * record-full.c (record_full_wait_1): Likewise.
4386         (record_full_registers_change): Likewise.
4387         (record_full_store_registers): Likewise.
4388         (record_full_core_fetch_registers): Likewise.
4389         (record_full_save): Likewise.
4390         (record_full_goto_insn): Likewise.
4391         * regcache.c (regcache_register_size): Likewise.
4392         (get_regcache_arch): Remove.
4393         (regcache_read_pc): Likewise.
4394         * regcache.h (get_regcache_arch): Remove.
4395         * remote-sim.c (gdbsim_fetch_register): Likewise.
4396         (gdbsim_store_register): Likewise.
4397         * remote.c (fetch_register_using_p): Likewise.
4398         (send_g_packet): Likewise.
4399         (remote_prepare_to_store): Likewise.
4400         (store_registers_using_G): Likewise.
4401         * reverse.c (save_bookmark_command): Likewise.
4402         (goto_bookmark_command): Likewise.
4403         * rs6000-aix-tdep.c (branch_dest): Likewise.
4404         * rs6000-nat.c (rs6000_ptrace64): Likewise.
4405         (fetch_register): Likewise.
4406         * rs6000-tdep.c (ppc_supply_reg): Likewise.
4407         (ppc_collect_reg): Likewise.
4408         (ppc_collect_gregset): Likewise.
4409         (ppc_collect_fpregset): Likewise.
4410         (ppc_collect_vsxregset): Likewise.
4411         (ppc_collect_vrregset): Likewise.
4412         (ppc_displaced_step_hw_singlestep): Likewise.
4413         (rs6000_pseudo_register_read): Likewise.
4414         (rs6000_pseudo_register_write): Likewise.
4415         * s390-linux-nat.c (supply_gregset): Likewise.
4416         (fill_gregset): Likewise.
4417         (s390_linux_fetch_inferior_registers): Likewise.
4418         * s390-linux-tdep.c (s390_write_pc): Likewise.
4419         (s390_software_single_step): Likewise.
4420         (s390_all_but_pc_registers_record): Likewise.
4421         (s390_linux_syscall_record): Likewise.
4422         * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
4423         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
4424         (shnbsd_store_inferior_registers): Likewise.
4425         * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
4426         (sh_extract_return_value_fpu): Likewise.
4427         (sh_store_return_value_nofpu): Likewise.
4428         (sh_corefile_supply_regset): Likewise.
4429         (sh_corefile_collect_regset): Likewise.
4430         * sh64-tdep.c (sh64_extract_return_value): Likewise.
4431         (sh64_store_return_value): Likewise.
4432         * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
4433         * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
4434         (sparc_store_inferior_registers): Likewise.
4435         * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
4436         (sparc_ravenscar_prepare_to_store): Likewise.
4437         * sparc-tdep.c (sparc32_store_arguments): Likewise.
4438         (sparc_analyze_control_transfer): Likewise.
4439         (sparc_step_trap): Likewise.
4440         (sparc_software_single_step): Likewise.
4441         (sparc32_gdbarch_init): Likewise.
4442         (sparc_supply_rwindow): Likewise.
4443         (sparc_collect_rwindow): Likewise.
4444         * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
4445         * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
4446         (sparc64nbsd_collect_gregset): Likewise.
4447         (sparc64nbsd_supply_fpregset): Likewise.
4448         (sparc64nbsd_collect_fpregset): Likewise.
4449         * sparc64-tdep.c (sparc64_store_arguments): Likewise.
4450         (sparc64_supply_gregset): Likewise.
4451         (sparc64_collect_gregset): Likewise.
4452         (sparc64_supply_fpregset): Likewise.
4453         (sparc64_collect_fpregset): Likewise.
4454         * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
4455         * spu-tdep.c (spu_unwind_sp): Likewise.
4456         (spu2ppu_prev_register): Likewise.
4457         (spu_memory_remove_breakpoint): Likewise.
4458         * stack.c (return_command): Likewise.
4459         * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
4460         * tracefile-tfile.c (tfile_fetch_registers): Likewise.
4461         * tracefile.c (trace_save_ctf): Likewise.
4462         * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
4463         (do_windows_store_inferior_registers): Likewise.
4464         (windows_resume): Likewise.
4465         * xtensa-linux-nat.c (fill_gregset): Likewise.
4466         (supply_gregset_reg): Likewise.
4467         * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
4468         (xtensa_register_read_masked): Likewise.
4469         (xtensa_supply_gregset): Likewise.
4470         (xtensa_extract_return_value): Likewise.
4471         (xtensa_store_return_value): Likewise.
4472
4473 2017-10-25  Ulrich Weigand  <uweigand@de.ibm.com>
4474
4475         * doublest.c (floatformat_from_string): New function.
4476         * doublest.h (floatformat_from_string): Add prototype.
4477
4478         * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
4479         (OP_FLOAT): ... this.
4480         * expression.h: Do not include "doublest.h".
4481         (union exp_element): Replace doubleconst and decfloatconst by
4482         new element floatconst.
4483         * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
4484         (ada_evaluate_subexp): Likewise.
4485         * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
4486         OP_DOUBLE and OP_DECFLOAT.
4487         * expprint.c (print_subexp_standard): Likewise.
4488         (dump_subexp_body_standard): Likewise.
4489         * breakpoint.c (watchpoint_exp_is_const): Likewise.
4490
4491         * parse.c: Include "dfp.h".
4492         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
4493         (write_exp_elt_floatcst): New function.
4494         (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
4495         and OP_DECFLOAT.
4496         (operator_check_standard): Likewise.
4497         (parse_float): Do not accept suffix.  Take type as input.  Return bool.
4498         Return target format buffer instead of host DOUBLEST.
4499         Use floatformat_from_string and decimal_from_string to parse
4500         either binary or decimal floating-point types.
4501         (parse_c_float): Remove.
4502         * parser-defs.h: Do not include "doublest.h".
4503         (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
4504         (write_exp_elt_floatcst): Add prototype.
4505         (parse_float): Update prototype.
4506         (parse_c_float): Remove.
4507
4508         * c-exp.y: Do not include "dfp.h".
4509         (typed_val_float): Use byte buffer instead of DOUBLEST.
4510         (typed_val_decfloat): Remove.
4511         (DECFLOAT): Remove.
4512         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4513         (parse_number): Update to new parse_float interface.
4514         Parse suffixes and determine type before calling parse_float.
4515         Handle decimal and binary FP types the same way.
4516
4517         * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
4518         (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
4519         (parse_number): Update to new parse_float interface.
4520         Parse suffixes and determine type before calling parse_float.
4521
4522         * f-exp.y: Replace dval by typed_val_float.
4523         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4524         (parse_number): Use parse_float instead of atof.
4525
4526         * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
4527         (parse_go_float): Remove.
4528         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4529         (parse_number): Call parse_float instead of parse_go_float.
4530         Parse suffixes and determine type before calling parse_float.
4531
4532         * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
4533         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4534         (parse_number): Update to new parse_float interface.
4535         Parse suffixes and determine type before calling parse_float.
4536
4537         * m2-exp.y: Replace dval by byte buffer val.
4538         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4539         (parse_number): Call parse_float instead of atof.
4540
4541         * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
4542         (lex_number): Call parse_float instead of strtod.
4543         (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
4544         (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
4545         Use write_exp_elt_floatcst.
4546         (unit_testing): Remove static variable.
4547         (rust_type): Do not check unit_testing.
4548         (rust_lex_tests): Do not set uint_testing.  Set up dummy rust_parser.
4549
4550         * ada-exp.y (type_float, type_double): Remove.
4551         (typed_val_float): Use byte buffer instead of DOUBLEST.
4552         (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4553         * ada-lex.l (processReal): Use parse_float instead of sscanf.
4554
4555 2017-10-25  Alan Hayward  <alan.hayward@arm.com>
4556
4557         * aarch64-tdep.h (enum aarch64_regnum): Remove.
4558         * arch/aarch64.h: New file.
4559
4560 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
4561
4562         * dfp.h (decimal_from_string): Use const reference for argument.
4563         * dfp.c (decimal_from_string): Likewise.
4564
4565 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
4566
4567         * i387-tdep.c (print_i387_value): Use floatformat_to_string.
4568         * sh64-tdep.c (sh64_do_fp_register): Likewise.
4569         * mips-tdep.c (mips_print_fp_register): Likewise.
4570
4571 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
4572
4573         * common/format.h (enum argclass): Replace decfloat_arg by
4574         dec32float_arg, dec64float_arg, and dec128float_arg.
4575         * common/format.c (parse_format_string): Update to return
4576         new decimal float argument classes.
4577
4578         * printcmd.c (printf_decfloat): Rename to ...
4579         (printf_floating): ... this.  Add argclass argument, and use it
4580         instead of parsing the format string again.  Add support for
4581         binary floating-point values, using floatformat_to_string.
4582         Convert value to the target format if it doesn't already match.
4583         (ui_printf): Call printf_floating instead of printf_decfloat,
4584         also for double_arg / long_double_arg.  Pass argclass.
4585
4586         * dfp.c (decimal_to_string): Add format string argument.
4587         * dfp.h (decimal_to_string): Likewise.
4588
4589         * doublest.c (floatformat_to_string): Add format string argument.
4590         * doublest.h (floatformat_to_string): Likewise.
4591
4592 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
4593
4594         * doublest.c (floatformat_precision): New routine.
4595         (floatformat_to_string): Likewise.
4596         * doublest.c (floatformat_to_string): Add prototype.
4597
4598         * printcmd.c (print_scalar_formatted): Only call print_floating
4599         on floating-point types.
4600         * valprint.c: Do not include "floatformat.h".
4601         (generic_val_print_decfloat): Remove.
4602         (generic_val_print): Call generic_val_print_float for both
4603         TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
4604         (print_floating): Use floatformat_to_string.  Handle decimal float.
4605         (print_decimal_floating): Remove, merge into floatformat_to_string.
4606         * value.h (print_decimal_floating): Remove.
4607
4608         * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
4609
4610 2017-10-24  Ulrich Weigand  <uweigand@de.ibm.com>
4611
4612         * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
4613
4614 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
4615
4616         * memattr.h: Don't include vec.h.
4617         (struct mem_attrib): Initialize fields.
4618         <unknown>: New static method.
4619         (struct mem_region): Add constructors, operator<, initialize
4620         fields.
4621         * memattr.c: Include algorithm.
4622         (default_mem_attrib, unknown_mem_attrib): Remove.
4623         (user_mem_region_list): New global.
4624         (target_mem_region_list, mem_region_list): Change type to
4625         std::vector<mem_region>.
4626         (mem_use_target): Now a function.
4627         (target_mem_regions_valid): Change type to bool.
4628         (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
4629         (require_user_regions): Adjust.
4630         (require_target_regions): Adjust.
4631         (create_mem_region): Adjust.
4632         (lookup_mem_region): Adjust.
4633         (invalidate_target_mem_regions): Adjust.
4634         (mem_clear): Rename to...
4635         (user_mem_clear): ... this, and adjust.
4636         (mem_command): Adjust.
4637         (info_mem_command): Adjust.
4638         (mem_enable, enable_mem_command, mem_disable,
4639         disable_mem_command): Adjust.
4640         (mem_delete): Adjust.
4641         (delete_mem_command): Adjust.
4642         * memory-map.h (parse_memory_map): Return an std::vector.
4643         * memory-map.c (parse_memory_map): Likewise.
4644         (struct memory_map_parsing_data): Add constructor.
4645         <memory_map>: Point to std::vector.
4646         (memory_map_start_memory): Adjust.
4647         (memory_map_end_memory): Adjust.
4648         (memory_map_end_property): Adjust.
4649         (clear_result): Remove.
4650         * remote.c (remote_memory_map): Return an std::vector.
4651         * target-debug.h (target_debug_print_VEC_mem_region_s__p):
4652         Remove.
4653         (target_debug_print_mem_region_vector): New.
4654         * target-delegates.c: Regenerate.
4655         * target.h (mem_region_vector): New typedef.
4656         (to_memory_map): Return mem_region_vector.
4657         (target_memory_map): Return an std::vector.
4658         * target.c (target_memory_map): Return an std::vector.
4659         (flash_erase_command): Adjust.
4660
4661 2017-10-21  Simon Marchi  <simon.marchi@ericsson.com>
4662
4663         * memory-map.c (struct memory_map_parsing_data) <property_name>:
4664         Change type to std::string.
4665         (memory_map_start_property): Adjust.
4666         (memory_map_end_property): Adjust.
4667
4668 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
4669
4670         * infrun.h: Include common/byte-vector.h.
4671         (struct displaced_step_closure): New struct.
4672         (struct buf_displaced_step_closure): New struct.
4673         * infrun.c (displaced_step_closure::~displaced_step_closure):
4674         Provide default implementation.
4675         (displaced_step_clear): Deallocate step closure with delete.
4676         * aarch64-tdep.c (displaced_step_closure): Rename to ...
4677         (aarch64_displaced_step_closure): ... this, extend
4678         displaced_step_closure.
4679         (aarch64_displaced_step_data) <dsc>: Change type to
4680         aarch64_displaced_step_closure.
4681         (aarch64_displaced_step_copy_insn): Adjust to type change, use
4682         unique_ptr.
4683         (aarch64_displaced_step_fixup): Add cast for displaced step
4684         closure.
4685         * amd64-tdep.c (displaced_step_closure): Rename to ...
4686         (amd64_displaced_step_closure): ... this, extend
4687         displaced_step_closure.
4688         <insn_buf>: Change type to std::vector<gdb_byte>.
4689         <max_len>: Remove.
4690         (fixup_riprel): Change type of DSC parameter, adjust to type
4691         change of insn_buf.
4692         (fixup_displaced_copy): Change type of DSC parameter.
4693         (amd64_displaced_step_copy_insn): Instantiate
4694         amd64_displaced_step_closure.
4695         (amd64_displaced_step_fixup): Add cast for closure type, adjust
4696         to type change of insn_buf.
4697         * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
4698         parameter DSC.
4699         (arm_linux_copy_svc): Likewise.
4700         (cleanup_kernel_helper_return): Likewise.
4701         (arm_catch_kernel_helper_return): Likewise.
4702         (arm_linux_displaced_step_copy_insn): Instantiate
4703         arm_displaced_step_closure.
4704         * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
4705         (displaced_read_reg): Change type of parameter DSC.
4706         (branch_write_pc): Likewise.
4707         (load_write_pc): Likewise.
4708         (alu_write_pc): Likewise.
4709         (displaced_write_reg): Likewise.
4710         (arm_copy_unmodified): Likewise.
4711         (thumb_copy_unmodified_32bit): Likewise.
4712         (thumb_copy_unmodified_16bit): Likewise.
4713         (cleanup_preload): Likewise.
4714         (install_preload): Likewise.
4715         (arm_copy_preload): Likewise.
4716         (thumb2_copy_preload): Likewise.
4717         (install_preload_reg): Likewise.
4718         (arm_copy_preload_reg): Likewise.
4719         (cleanup_copro_load_store): Likewise.
4720         (install_copro_load_store): Likewise.
4721         (arm_copy_copro_load_store) Likewise.
4722         (thumb2_copy_copro_load_store): Likewise.
4723         (cleanup_branch): Likewise.
4724         (install_b_bl_blx): Likewise.
4725         (arm_copy_b_bl_blx): Likewise.
4726         (thumb2_copy_b_bl_blx): Likewise.
4727         (thumb_copy_b): Likewise.
4728         (install_bx_blx_reg): Likewise.
4729         (arm_copy_bx_blx_reg): Likewise.
4730         (thumb_copy_bx_blx_reg): Likewise.
4731         (cleanup_alu_imm): Likewise.
4732         (arm_copy_alu_imm): Likewise.
4733         (thumb2_copy_alu_imm): Likewise.
4734         (cleanup_alu_reg): Likewise.
4735         (install_alu_reg): Likewise.
4736         (arm_copy_alu_reg): Likewise.
4737         (thumb_copy_alu_reg): Likewise.
4738         (cleanup_alu_shifted_reg): Likewise.
4739         (install_alu_shifted_reg): Likewise.
4740         (arm_copy_alu_shifted_reg): Likewise.
4741         (cleanup_load): Likewise.
4742         (cleanup_store): Likewise.
4743         (arm_copy_extra_ld_st): Likewise.
4744         (install_load_store): Likewise.
4745         (thumb2_copy_load_literal): Likewise.
4746         (thumb2_copy_load_reg_imm): Likewise.
4747         (arm_copy_ldr_str_ldrb_strb): Likewise.
4748         (cleanup_block_load_all): Likewise.
4749         (cleanup_block_store_pc): Likewise.
4750         (cleanup_block_load_pc): Likewise.
4751         (arm_copy_block_xfer): Likewise.
4752         (thumb2_copy_block_xfer): Likewise.
4753         (cleanup_svc): Likewise.
4754         (install_svc): Likewise.
4755         (arm_copy_svc): Likewise.
4756         (thumb_copy_svc): Likewise.
4757         (arm_copy_undef): Likewise.
4758         (thumb_32bit_copy_undef): Likewise.
4759         (arm_copy_unpred): Likewise.
4760         (arm_decode_misc_memhint_neon): Likewise.
4761         (arm_decode_unconditional): Likewise.
4762         (arm_decode_miscellaneous): Likewise.
4763         (arm_decode_dp_misc): Likewise.
4764         (arm_decode_ld_st_word_ubyte): Likewise.
4765         (arm_decode_media): Likewise.
4766         (arm_decode_b_bl_ldmstm): Likewise.
4767         (arm_decode_ext_reg_ld_st): Likewise.
4768         (thumb2_decode_dp_shift_reg): Likewise.
4769         (thumb2_decode_ext_reg_ld_st): Likewise.
4770         (arm_decode_svc_copro): Likewise.
4771         (thumb2_decode_svc_copro): Likewise.
4772         (install_pc_relative): Likewise.
4773         (thumb_copy_pc_relative_16bit): Likewise.
4774         (thumb_decode_pc_relative_16bit): Likewise.
4775         (thumb_copy_pc_relative_32bit): Likewise.
4776         (thumb_copy_16bit_ldr_literal): Likewise.
4777         (thumb_copy_cbnz_cbz): Likewise.
4778         (thumb2_copy_table_branch): Likewise.
4779         (cleanup_pop_pc_16bit_all): Likewise.
4780         (thumb_copy_pop_pc_16bit): Likewise.
4781         (thumb_process_displaced_16bit_insn): Likewise.
4782         (decode_thumb_32bit_ld_mem_hints): Likewise.
4783         (thumb_process_displaced_32bit_insn): Likewise.
4784         (thumb_process_displaced_insn): Likewise.
4785         (arm_process_displaced_insn): Likewise.
4786         (arm_displaced_init_closure): Likewise.
4787         (arm_displaced_step_fixup): Add cast for closure.
4788         * arm-tdep.h: Include infrun.h.
4789         (displaced_step_closure): Rename to ...
4790         (arm_displaced_step_closure): ... this, extend
4791         displaced_step_closure.
4792         <u::svc::copy_svc_os>: Change type of parameter DSC.
4793         <cleanup>: Likewise.
4794         (arm_process_displaced_insn): Likewise.
4795         (arm_displaced_init_closure): Likewise.
4796         (displaced_read_reg): Likewise.
4797         (displaced_write_reg): Likewise.
4798         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
4799         Adjust.
4800         * i386-tdep.h: Include infrun.h.
4801         (i386_displaced_step_closure): New typedef.
4802         * i386-tdep.c (i386_displaced_step_copy_insn): Use
4803         i386_displaced_step_closure.
4804         (i386_displaced_step_fixup): Adjust.
4805         * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
4806         (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
4807         and unique_ptr.
4808         (ppc_displaced_step_fixup): Adjust.
4809         * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
4810         (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
4811         and unique_ptr.
4812         (s390_displaced_step_fixup): Adjust.
4813
4814 2017-10-21  Simon Marchi  <simon.marchi@polymtl.ca>
4815
4816         * interps.h (interp_resume, interp_suspend, interp_set_temp):
4817         Remove declarations.
4818
4819 2017-10-20  Tom Tromey  <tom@tromey.com>
4820
4821         * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
4822         std::vector.
4823         (gdb_bfd_record_inclusion): Update.
4824         (bfdp): Remove typedef.
4825
4826 2017-10-20  Tom Tromey  <tom@tromey.com>
4827
4828         * gdb_bfd.c (gdb_bfd_ref): Use new.
4829         (struct gdb_bfd_data): Add constructor, destructor, and member
4830         initializers.
4831         (gdb_bfd_unref): Use delete.
4832
4833 2017-10-20  Tom Tromey  <tom@tromey.com>
4834
4835         * exec.c (exec_file_attach): Use new_bfd_ref.
4836         * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
4837         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
4838         (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
4839         new_bfd_ref.
4840         * gdb_bfd.h (new_bfd_ref): New function.
4841
4842 2017-10-20  Pedro Alves  <palves@redhat.com>
4843
4844         * main.c (captured_command_loop): Add attribute noinline.
4845
4846 2017-10-19  Simon Marchi  <simon.marchi@ericsson.com>
4847
4848         * interps.c (struct interp_factory): Add constructor.
4849         (interp_factory_p): Remove typedef.
4850         (DEF_VEC_P(interp_factory_p)): Remove.
4851         (interpreter_factories): Change type to std::vector.
4852         (interp_factory_register): Adjust.
4853         (interp_lookup): Adjust.
4854         (interpreter_completer): Adjust.
4855
4856 2017-10-19  Tom Tromey  <tom@tromey.com>
4857
4858         * break-catch-syscall.c (catch_syscall_completer): Use
4859         std::string, gdb::unique_xmalloc_ptr.
4860
4861 2017-10-19  Tom Tromey  <tom@tromey.com>
4862
4863         * infcall.c (call_function_by_hand_dummy): Use std::string.
4864
4865 2017-10-19  Tom Tromey  <tom@tromey.com>
4866
4867         * mi/mi-main.c (mi_cmd_execute): Update.
4868         * top.h (prepare_execute_command): Return scoped_value_mark.
4869         * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
4870         Add move constructor.
4871         * top.c (prepare_execute_command): Return scoped_value_mark.
4872         (execute_command): Update.
4873
4874 2017-10-19  Pedro Alves  <palves@redhat.com>
4875
4876         * xml-support.c (xml_fetch_content_from_file): Check fread's
4877         return.
4878
4879 2017-10-19  Pedro Alves  <palves@redhat.com>
4880
4881         * ser-base.c (ser_base_read_error_fd): Delete the file handler if
4882         async.
4883         (handle_error_fd): New function.
4884         (ser_base_async): Add/delete an event loop file handler for
4885         error_fd.
4886
4887 2017-10-19  Pedro Alves  <palves@redhat.com>
4888
4889         * xml-support.c (xml_fetch_content_from_file): Don't read in
4890         chunks.  Instead use fseek to determine the file's size, and read
4891         it in one go.
4892
4893 2017-11-18  Keith Seitz  <keiths@redhat.com>
4894
4895         * c-exp.y (oper): Canonicalize conversion operators of user-defined
4896         types.
4897         Add whitespace to front of type name.
4898
4899 2017-10-18  Keith Seitz  <keiths@redhat.com>
4900
4901         * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
4902         DW_AT_accessibility.
4903
4904 2017-10-18  Yao Qi  <yao.qi@linaro.org>
4905
4906         * features/tic6x-c62x-linux.c: Remove.
4907
4908 2017-10-17  Tom Tromey  <tom@tromey.com>
4909
4910         * disasm.c (do_mixed_source_and_assembly_deprecated): Use
4911         gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
4912         (do_mixed_source_and_assembly): Likewise.
4913
4914 2017-10-17  Tom Tromey  <tom@tromey.com>
4915
4916         * regcache.c (regcache::xfer_part): Remove assertion.
4917
4918 2017-10-17  Pedro Alves  <palves@redhat.com>
4919
4920         * xml-support.c (xml_fetch_content_from_file): Call
4921         unique_ptr::release() instead unique_ptr::get() when passing
4922         through xrealloc.
4923
4924 2017-10-17  Yao Qi  <yao.qi@linaro.org>
4925
4926         * regcache.c (regcache::xfer_part): Remove parameters read and
4927         write, add parameter is_raw.  All callers are updated.
4928
4929 2017-10-16  Keith Seitz  <keiths@redhat.com>
4930
4931         * c-typeprint.c (enum access_specifier): Moved here from
4932         c_type_print_base.
4933         (output_access_specifier): New function.
4934         (c_type_print_base): Consider typedefs when assessing
4935         whether access labels are needed.
4936         Use output_access_specifier as needed.
4937         Output access specifier for typedefs, if needed.
4938         * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
4939         * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
4940         fields.
4941         (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
4942         accessor macros.
4943
4944 2017-10-16  Tom Tromey  <tom@tromey.com>
4945
4946         * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
4947         (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
4948         * target.c (target_fileio_read_stralloc): Update.
4949         * sparc64-tdep.c (adi_is_addr_mapped): Update.
4950         * target.h (target_fileio_read_stralloc): Return
4951         unique_xmalloc_ptr.
4952
4953 2017-10-16  Tom Tromey  <tom@tromey.com>
4954
4955         * xml-syscall.c (xml_init_syscalls_info): Update.
4956         * xml-support.c (xinclude_start_include): Update.
4957         (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
4958         * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
4959         (xml_fetch_content_from_file): Likewise.
4960         * osdata.c (get_osdata): Update.
4961         * target.h (target_read_stralloc, target_get_osdata): Return
4962         unique_xmalloc_ptr.
4963         * solib-aix.c (solib_aix_get_library_list): Update.
4964         * solib-target.c (solib_target_current_sos): Update.
4965         * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
4966         * xml-tdesc.c (fetch_available_features_from_target): Update.
4967         (target_fetch_description_xml): Update.
4968         (file_read_description_xml): Update.
4969         * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
4970         (remote_traceframe_info, btrace_read_config, remote_read_btrace)
4971         (remote_pid_to_exec_file): Update.
4972         * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
4973         (target_get_osdata): Likewise.
4974
4975 2017-10-16  Tom Tromey  <tom@tromey.com>
4976
4977         * remote.c (remote_register_number_and_offset): Use std::vector.
4978         (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
4979         (putpkt_binary): Use gdb::def_vector.
4980         (compare_sections_command): Use gdb::byte_vector.
4981
4982 2017-10-16  Tom Tromey  <tom@tromey.com>
4983
4984         * ppc-linux-nat.c (hwdebug_insert_point): Use
4985         gdb::unique_xmalloc_ptr, XDUP.
4986
4987 2017-10-16  Tom Tromey  <tom@tromey.com>
4988
4989         * probe.c (parse_probes): Use std::string.
4990         (info_probes_for_ops, enable_probes_command)
4991         (disable_probes_command): Remove cleanups.
4992
4993 2017-10-16  Tom Tromey  <tom@tromey.com>
4994
4995         * buildsym.c (block_compar): Remove.
4996         (end_symtab_get_static_block): Use std::vector.
4997
4998 2017-10-16  Simon Marchi  <simon.marchi@ericsson.com>
4999
5000         * memrange.h (struct mem_range): Define operator< and operator==.
5001         (mem_range_s): Remove.
5002         (DEF_VEC_O (mem_range_s)): Remove.
5003         (normalize_mem_ranges): Change parameter type to std::vector.
5004         * memrange.c (compare_mem_ranges): Remove.
5005         (normalize_mem_ranges): Change parameter type to std::vector,
5006         adjust to vector change.
5007         * exec.c (section_table_available_memory): Return vector, remove
5008         parameter.
5009         (section_table_read_available_memory): Adjust to std::vector
5010         change.
5011         * remote.c (remote_read_bytes): Adjust to std::vector
5012         change.
5013         * tracepoint.h (traceframe_available_memory): Change parameter
5014         type to std::vector.
5015         * tracepoint.c (traceframe_available_memory): Change parameter
5016         type to std::vector, adjust.
5017         * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
5018         std::vector change.
5019         * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5020         unittests/memrange-selftests.c.
5021         (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
5022         * gdb/unittests/memrange-selftests.c: New file.
5023
5024 2017-10-16  Pedro Alves  <palves@redhat.com>
5025
5026         * elfread.c (probe_key_free): Rename range-for variable.
5027         * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
5028         (find_probe_by_pc, collect_probes): Rename range-for variable.
5029
5030 2017-10-16  Yao Qi  <yao.qi@linaro.org>
5031
5032         * features/Makefile (XMLTOC): Remove tic6x-*.xml.
5033         * features/tic6x-c62x.c: Remove.
5034         * features/tic6x-c64x-linux.c: Remove.
5035         * features/tic6x-c64x.c: Remove.
5036         * features/tic6x-c64xp-linux.c: Remove.
5037         * features/tic6x-c64xp.c: Remove.
5038         * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
5039         initialize_tdesc_tic6x_*_linux functions.
5040         * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
5041         initialize_tdesc_tic6x_* functions.
5042
5043 2017-10-16  Yao Qi  <yao.qi@linaro.org>
5044
5045         * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
5046         tic6x-c62x.
5047         * regformats/tic6x-c62x.dat: Remove.
5048         * regformats/tic6x-c64x.dat: Remove.
5049         * regformats/tic6x-c64xp.dat: Remove.
5050
5051 2017-10-15  Simon Marchi  <simon.marchi@ericsson.com>
5052
5053         * tracepoint.c (parse_traceframe_info): Return a unique_ptr
5054         (the !HAVE_LIBEXPAT version).
5055
5056 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
5057
5058         * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
5059         const.
5060
5061 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
5062
5063         * target.h: Include tracepoint.h.
5064         (enum trace_find_type): Move to tracepoint.h.
5065         (struct target_ops) <to_traceframe_info>: Return a unique ptr.
5066         * tracepoint.h: Don't include target.h
5067         (enum trace_find_type): Move from target.h.
5068         (parse_traceframe_info): Return a unique ptr.
5069         * tracepoint.c (current_traceframe_info): Change type to unique
5070         ptr.
5071         (free_traceframe_info): Remove.
5072         (clear_traceframe_info): Don't manually free
5073         current_traceframe_info.
5074         (free_result): Remove.
5075         (parse_traceframe_info): Return a unique ptr.
5076         (get_traceframe_info): Adjust to unique ptr.
5077         * ctf.c (ctf_traceframe_info): Return a unique ptr.
5078         * remote.c (remote_traceframe_info): Return a unique ptr.
5079         * tracefile-tfile.c (tfile_traceframe_info): Return a unique
5080         ptr.
5081         * target-debug.h (target_debug_print_traceframe_info_up): New
5082         macro.
5083         * target-delegates.c: Regenerate.
5084
5085 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
5086
5087         * memrange.h (struct mem_range): Add constructors.
5088         * tracepoint.h (struct traceframe_info) <memory>: Change type to
5089         std::vector<mem_range>.
5090         * tracepoint.c (free_traceframe_info): Don't manually free
5091         vector.
5092         (traceframe_info_start_memory): Adjust to vector change.
5093         (traceframe_available_memory): Likewise.
5094         * tracefile-tfile.c (build_traceframe_info): Likewise.
5095         * ctf.c (ctf_traceframe_info): Likewise.
5096
5097 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
5098
5099         * tracepoint.h (struct traceframe_info) <tvars>: Change type to
5100         std::vector<int>.
5101         * tracepoint.c (free_traceframe_info): Deallocate with delete.
5102         (traceframe_info_start_tvar): Adjust to vector change.
5103         (parse_traceframe_info): Allocate with new.
5104         * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
5105         vector change.
5106         * tracefile-tfile.c (build_traceframe_info): Adjust to vector
5107         change.
5108         tfile_traceframe_info): Allocate with new.
5109         * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
5110         change.
5111
5112 2017-10-14  Simon Marchi  <simon.marchi@polymtl.ca>
5113
5114         * tracepoint.c (traceframe_info): Rename to...
5115         (current_traceframe_info): ...this.
5116         (clear_traceframe_info): Adjust.
5117         (get_traceframe_info): Adjust.
5118
5119 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
5120
5121         * nat/linux-osdata.c: Include algorithm.
5122         (compare_processes): Remove.
5123         (struct pid_pgid_entry): New struct.
5124         (linux_xfer_osdata_processgroups): Use std::vector instead of
5125         XNEWVEC.
5126
5127 2017-10-14  Simon Marchi  <simon.marchi@ericsson.com>
5128
5129         * objfiles.h: Don't include symfile.h.
5130         (struct partial_symbol): Remove forward-declaration.
5131         (struct objfile) <global_psymbols, static_psymbols>: Change type
5132         to std::vector<partial_symbol *>.
5133         * objfiles.c (objfile::objfile): Don't memset those fields.
5134         (objfile::~objfile): Don't free those fields.
5135         * psympriv.h (struct psymbol_allocation_list): Remove
5136         forward-declaration.
5137         (add_psymbol_to_list): Change psymbol_allocation_list parameter
5138         to std::vector.
5139         (start_psymtab_common): Change parameters to std::vector.
5140         * psymtab.c: Include algorithm.
5141         (require_partial_symbols): Call shrink_to_fit.
5142         (find_pc_sect_psymbol): Adjust to vector change.
5143         (match_partial_symbol): Likewise.
5144         (lookup_partial_symbol): Likewise.
5145         (psym_relocate): Likewise.
5146         (dump_psymtab): Likewise.
5147         (recursively_search_psymtabs): Likewise.
5148         (compare_psymbols): Remove.
5149         (sort_pst_symbols): Adjust to vector change.
5150         (start_psymtab_common): Likewise.
5151         (end_psymtab_common): Likewise.
5152         (psymbol_bcache_full): De-constify return value.
5153         (add_psymbol_to_bcache): Likewise.
5154         (extend_psymbol_list): Remove.
5155         (append_psymbol_to_list): Adjust to vector change.
5156         (add_psymbol_to_list): Likewise.
5157         (init_psymbol_list): Likewise.
5158         (maintenance_info_psymtabs): Likewise.
5159         (maintenance_check_psymtabs): Likewise.
5160         * symfile.h (struct psymbol_allocation_list): Remove.
5161         * symfile.c (reread_symbols): Adjust to vector change.
5162         * dbxread.c (start_psymtab): Change type of parameters.
5163         (dbx_symfile_read): Adjust to vector change.
5164         (read_dbx_symtab): Likewise.
5165         (start_psymtab): Change type of parameters.
5166         * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
5167         (create_partial_symtab): Likewise.
5168         (add_partial_symbol): Likewise.
5169         (write_one_signatured_type): Likewise.
5170         (recursively_write_psymbols): Likewise.
5171         * mdebugread.c (parse_partial_symbols): Likewise.
5172         * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
5173         (scan_xcoff_symtab): Adjust to vector change.
5174         (xcoff_initial_scan): Likewise.
5175
5176 2017-10-13  Simon Marchi  <simon.marchi@ericsson.com>
5177
5178         * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
5179
5180 2017-10-13  Yao Qi  <yao.qi@linaro.org>
5181
5182         * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
5183         Remove s390x-*-expedite, add s390x-expedite.
5184
5185 2017-10-13  Yao Qi  <yao.qi@linaro.org>
5186
5187         * features/s390-gs-linux64.c: Regenerated.
5188         * features/s390x-gs-linux64.c: Regenerated.
5189
5190 2017-10-13  Tom Tromey  <tom@tromey.com>
5191
5192         * compile/compile-object-run.c (do_module_cleanup): Use delete.
5193         * solib.c (update_solib_list, reload_shared_libraries_1): Use
5194         delete.
5195         * symfile.c (symbol_file_add_with_addrs): Use new.
5196         (symbol_file_add_separate): Update comment.
5197         (syms_from_objfile_1, remove_symbol_file_command): Use delete.
5198         * jit.c (jit_object_close_impl): Use new.
5199         (jit_unregister_code): Use delete.
5200         * objfiles.c (objfile::objfile): Rename from allocate_objfile.
5201         (~objfile): Rename from free_objfile.
5202         (free_objfile_separate_debug, do_free_objfile_cleanup)
5203         (free_all_objfiles, objfile_purge_solibs): Use delete.
5204         * objfiles.h (struct objfile): Add constructor and destructor.
5205         Use DISABLE_COPY_AND_ASSIGN.  Add initializers to data members.
5206         (allocate_objfile, free_objfile): Don't declare.
5207         (struct objstats): Add initializers.
5208
5209 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
5210
5211         * arch-utils.h (simple_displaced_step_copy_insn): Remove.
5212         * arch-utils.c (simple_displaced_step_copy_insn): Remove.
5213         * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
5214         * gdbarch.h: Regenerate.
5215         * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
5216         Adjust comment.
5217         * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
5218         (i386_displaced_step_fixup): Adjust comment.
5219         * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
5220
5221 2017-10-12  Tom Tromey  <tom@tromey.com>
5222
5223         * prologue-value.h (pv_area::store_would_trash): Return bool.
5224         (pv_area::find_reg): Likewise.
5225         * prologue-value.c (pv_area::store_would_trash): Return bool.
5226         (pv_area::find_reg): Likewise.
5227
5228 2017-10-12  Tom Tromey  <tom@tromey.com>
5229
5230         * s390-linux-tdep.c (s390_store, s390_load)
5231         (s390_check_for_saved, s390_analyze_prologue): Update.
5232         * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
5233         * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
5234         * prologue-value.h (class pv_area): Move from prologue-value.c.
5235         Change names of members.  Add constructor, destructor, member
5236         functions.
5237         (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
5238         (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
5239         (pv_area_fetch, pv_area_scan): Don't declare.
5240         * prologue-value.c (struct pv_area::area_entry): Now member of
5241         pv_area.
5242         (struct pv_area): Move to prologue-value.h.
5243         (pv_area::pv_area): Rename from make_pv_area.
5244         (pv_area::~pv_area): Rename from free_pv_area.
5245         (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
5246         (clear_entries, find_entry, overlaps, store_would_trash, store)
5247         (fetch, find_reg, scan): Now member of pv_area.
5248         Remove "area" argument.  Update.
5249         * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
5250         Update.
5251         * mn10300-tdep.c (push_reg, check_for_saved)
5252         (mn10300_analyze_prologue): Update.
5253         * mep-tdep.c (is_arg_spill, check_for_saved)
5254         (mep_analyze_prologue): Update.
5255         * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
5256         (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
5257         (m32c_is_struct_return, m32c_analyze_prologue): Update.
5258         * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
5259         Update.
5260         * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
5261         * aarch64-tdep.c (aarch64_analyze_prologue): Update.
5262
5263 2017-10-12  Simon Marchi  <simon.marchi@ericsson.com>
5264
5265         * linux-nat.h (linux_nat_set_delete_thread): New declaration.
5266         * linux-nat.c (linux_nat_delete_thread): New variable.
5267         (lwp_free): Invoke linux_nat_delete_thread if set.
5268         (linux_nat_set_delete_thread): New function.
5269         * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
5270         thread delete callback.
5271         * arm-linux-nat.c (arm_linux_delete_thread): New function.
5272         (_initialize_arm_linux_nat): Assign thread delete callback.
5273         * s390-linux-nat.c (s390_delete_thread): New function.
5274         (_initialize_s390_nat): Assign thread delete callback.
5275         * x86-linux-nat.c (x86_linux_add_target): Likewise.
5276         * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
5277         function.
5278         * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
5279         declaration.
5280         * nat/x86-linux.c (x86_linux_delete_thread): New function.
5281         * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
5282
5283 2017-10-09  Tom Tromey  <tom@tromey.com>
5284
5285         * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
5286         std::string.
5287         * tui/tui-layout.c (enum tui_status): Use std::string.
5288
5289 2017-10-11  Tom Tromey  <tom@tromey.com>
5290
5291         * gdbthread.h (thread_command): Constify.
5292         * inferior.h (detach_command): Constify.
5293         * top.h (set_history, show_history): Constify.
5294         * arm-tdep.c (set_arm_command, show_arm_command): Constify.
5295         * serial.c (serial_set_cmd, serial_show_cmd): Constify.
5296         * bsd-kvm.c (bsd_kvm_cmd): Constify.
5297         * printcmd.c (set_command): Constify.
5298         (non_const_set_command): New function.
5299         * dcache.c (set_dcache_command, show_dcache_command): Constify.
5300         * breakpoint.c (enable_command, disable_command, delete_command)
5301         (catch_command, tcatch_command, set_breakpoint_cmd)
5302         (show_breakpoint_cmd): Constify.
5303         * macrocmd.c (macro_command): Constify.
5304         * infcmd.c (unset_command, kill_command, detach_command)
5305         (info_proc_cmd): Constify.
5306         * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
5307         * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
5308         (info_auto_load_cmd): Constify.
5309         * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
5310         (unset_tdesc_cmd): Constify.
5311         * ada-lang.c (set_ada_command, show_ada_command)
5312         (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
5313         * guile/guile.c (set_guile_command, show_guile_command)
5314         (info_guile_command): Constify.
5315         * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
5316         Constify.
5317         * skip.c (skip_command): Constify.
5318         * compile/compile.c (_initialize_compile): Constify.
5319         * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
5320         * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
5321         (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
5322         (maint_btrace_pt_show_cmd): Constify.
5323         * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
5324         Constify.
5325         * python/python.c (user_show_python, user_set_python): Constify.
5326         * mips-tdep.c (set_mips_command, show_mips_command)
5327         (set_mipsfpu_command): Constify.
5328         * record-btrace.c (cmd_record_btrace_start)
5329         (cmd_set_record_btrace, cmd_show_record_btrace)
5330         (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
5331         (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
5332         * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
5333         Constify.
5334         * symfile.c (overlay_command): Constify.
5335         * spu-tdep.c (set_spu_command, show_spu_command): Constify.
5336         * cli/cli-logging.c (set_logging_command, show_logging_command):
5337         Constify.
5338         * cli/cli-dump.c (dump_command, append_command)
5339         (srec_dump_command, ihex_dump_command, verilog_dump_command)
5340         (tekhex_dump_command, binary_dump_command)
5341         (binary_append_command): Constify.
5342         * cli/cli-decode.c (struct cmd_list_element): Change type of
5343         "fun".
5344         * cli/cli-cmds.c (info_command, show_command, set_debug)
5345         (show_debug): Constify.
5346         (show_command): Add non-const overload.
5347         * top.c (set_history, show_history): Constify.
5348         * sh-tdep.c (set_sh_command, show_sh_command): Constify.
5349         * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
5350         * target.c (target_command): Constify.
5351         * sparc64-tdep.c (info_adi_command): Constify.
5352         * record-full.c (cmd_record_full_start): Constify.
5353         (set_record_full_command): Constify.  Fix typo.
5354         (show_record_full_command): Constify.
5355         * thread.c (thread_command, thread_apply_command): Constify.
5356         * memattr.c (dummy_cmd): Constify.
5357         * value.c (function_command): Constify.
5358         * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
5359         * probe.c (info_probes_command): Constify.
5360         * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
5361         * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
5362         (show_thread_cmd, set_thread_default_cmd)
5363         (show_thread_default_cmd): Constify.
5364         (check_empty): Constify.
5365         * tracepoint.c (tfind_command): Constify.
5366         * cp-support.c (maint_cplus_command): Constify.
5367         * windows-tdep.c (info_w32_command): Constify.
5368         * record.c (cmd_record_start, set_record_command)
5369         (show_record_command, info_record_command, cmd_record_goto):
5370         Constify.
5371         * ravenscar-thread.c (set_ravenscar_command)
5372         (show_ravenscar_command): Constify.
5373         * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
5374         Constify.
5375         (add_internal_problem_command): Remove casts.
5376         * arc-tdep.c (maintenance_print_arc_command): Constify.
5377         * valprint.c (set_print, show_print, set_print_raw)
5378         (show_print_raw): Constify.
5379         * maint.c (maintenance_command, maintenance_info_command)
5380         (maintenance_print_command, maintenance_set_cmd)
5381         (maintenance_show_cmd, set_per_command_cmd)
5382         (show_per_command_cmd, maintenance_check_command): Constify.
5383         * language.c (set_check, show_check): Constify.
5384         * typeprint.c (show_print_type, set_print_type): Constify.
5385         * go32-nat.c (go32_info_dos_command): Constify.
5386
5387 2017-10-11  Tom Tromey  <tom@tromey.com>
5388
5389         * breakpoint.c (prepare_re_set_context): Remove.
5390         (breakpoint_re_set_one): Update.  Don't use cleanups.
5391         (breakpoint_re_set): Use scoped_restore, std::string, and
5392         scoped_restore_current_language.
5393
5394 2017-10-11  Tom Tromey  <tom@tromey.com>
5395
5396         * breakpoint.c (commands_command_1): Use std::string.
5397         (cleanup_executing_breakpoints): Remove.
5398         (bpstat_do_actions_1): Use scoped_restore.
5399         (bpstat_check_watchpoint): Use std::string.
5400         (decode_static_tracepoint_spec): Likewise.
5401         (break_range_command): Likewise.
5402         (watch_command_1): Likewise.
5403         (compare_breakpoints): Change argument types.
5404         (clear_command): Use std::vector.
5405         (cleanup_executing_breakpoints): Remove.
5406         (update_global_location_list): Use unique_xmalloc_ptr.
5407         (strace_command): Remove unused declaration.
5408
5409 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
5410
5411         * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
5412         * NEWS: Mention new FreeBSD/arm native configuration.
5413         * configure.host: Add arm*-*-freebsd*.
5414         * configure.nat: Likewise.
5415         * arm-fbsd-nat.c: New file.
5416
5417 2017-10-11  John Baldwin  <jhb@FreeBSD.org>
5418
5419         * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
5420         (ALLDEPFILES): Add arm-fbsd-tdep.c.
5421         * NEWS: Mention new FreeBSD/arm target.
5422         * configure.tgt: Add arm*-*-freebsd*.
5423         * arm-fbsd-tdep.c: New file.
5424         * arm-fbsd-tdep.h: New file.
5425
5426 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
5427
5428         * linux-tdep.c (linux_make_corefile_notes): Remove call to
5429         `gdbarch_elfcore_write_linux_prpsinfo'.
5430         * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
5431         method.
5432         (elf_internal_linux_prpsinfo): Remove declaration.
5433         * gdbarch.h: Regenerate.
5434         * gdbarch.c: Regenerate.
5435
5436 2017-10-11  Maciej W. Rozycki  <macro@imgtec.com>
5437
5438         * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
5439         `set_gdbarch_elfcore_write_linux_prpsinfo'.
5440
5441 2017-10-11  Pedro Alves  <palves@redhat.com>
5442
5443         * breakpoint.c (reattach_breakpoints): Delete.
5444         * breakpoint.h (reattach_breakpoints): Delete.
5445
5446 2017-10-11  Simon Marchi  <simon.marchi@ericsson.com>
5447
5448         * symfile.c (registered_sym_fns): Make struct, not typedef.
5449         (DEF_VEC_O (registered_sym_fns)): Remove.
5450         (symtab_fns): Change type to std::vector.
5451         (add_symtab_fns): Adjust.
5452         (find_sym_fns): Adjust.
5453
5454 2017-10-11  Anton Kolesov  <Anton.Kolesov@synopsys.com>
5455
5456         * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
5457         * arc-tdep.h (arc_arch_is_em): New function.
5458         (arc_arch_is_hs): Likewise.
5459
5460 2017-10-11  Egeyar Bagcioglu  <egeyar.bagcioglu@oracle.com>
5461
5462         * macrotab.h (macro_lookup_inclusion): Remove unnecessary
5463         parentheses in the declaration.
5464         (macro_lookup_inclusion): Likewise.
5465         (macro_lookup_definition): Likewise.
5466         * p-lang.h (pascal_builtin_types): Likewise.
5467         * tui/tui-data.c (tui_win_list): Likewise.
5468         * tui/tui-data.h (tui_win_list): Likewise.
5469         * utils.h (make_cleanup_free_section_addr_info): Likewise.
5470
5471 2017-10-11  Mark Rages  <markrages@gmail.com>
5472
5473         * target-memory.c (block_boundaries): Fix for block address not
5474         aligned on block size.
5475
5476 2017-10-10  Pedro Alves <palves@redhat.com>
5477             Tom Tromey  <tom@tromey.com>
5478
5479         * breakpoint.c (struct captured_breakpoint_query_args)
5480         (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
5481         (print_breakpoint): New.
5482         * breakpoint.h (print_breakpoint): Declare.
5483         * common/common-exceptions.h (enum return_reason): Remove
5484         references to catch_exceptions.
5485         * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
5486         Delete.
5487         * exceptions.h (catch_exceptions_ftype, catch_exceptions)
5488         (catch_exception_ftype, catch_exceptions_with_msg): Delete.
5489         * gdb.h: Delete.
5490         * gdbthread.h (thread_select): Declare.
5491         * mi/mi-cmd-break.c: Don't include gdb.h.
5492         (breakpoint_notify): Use print_breakpoint.
5493         * mi/mi-cmd-catch.c: Don't include gdb.h.
5494         * mi/mi-interp.c: Don't include gdb.h.
5495         (mi_print_breakpoint_for_event): New.
5496         (mi_breakpoint_created, mi_breakpoint_modified): Use
5497         mi_print_breakpoint_for_event.
5498         * mi/mi-main.c: Don't include gdb.h.
5499         (mi_cmd_thread_select): Parse the global thread ID here.  Use
5500         thread_select instead of gdb_thread_select.
5501         (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
5502         of using gdb_list_thread_ids.
5503         * remote-fileio.c (do_remote_fileio_request): Change type.  Reply
5504         FILEIO_ENOSYS here.
5505         (remote_fileio_request): Use TRY/CATCH instead of
5506         catch_exceptions.
5507         * symfile-mem.c (struct symbol_file_add_from_memory_args)
5508         (symbol_file_add_from_memory_wrapper): Delete.
5509         (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
5510         * thread.c: Don't include gdb.h.
5511         (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
5512         (thread_alive): Use thread_select.
5513         (do_captured_thread_select): Delete, parts salvaged as ...
5514         (thread_select): ... this new function.
5515         (gdb_thread_select): Delete.
5516
5517 2017-10-10  Pedro Alves  <palves@redhat.com>
5518             Tom Tromey  <tom@tromey.com>
5519
5520         * breakpoint.c (breakpoint_cond_eval): Change return type to bool
5521         and reverse logic.
5522         (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
5523         No longer macros.  Instead ...
5524         (enum wp_check_result): They're now values of this new
5525         enumeration.
5526         (watchpoint_check): Change return type to wp_check_result and
5527         parameter type to bpstat.
5528         (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
5529         (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
5530         catch_errors.  Reverse logic of watchpoint_check call.
5531         (breakpoint_re_set_one): Now returns void and takes a breakpoint
5532         pointer as parameter.
5533         (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
5534         * common/common-exceptions.c (throw_exception_sjlj): Update
5535         comments to avoid mentioning catch_errors.
5536         * exceptions.c (catch_errors): Delete.
5537         * exceptions.h: Update comments to avoid mentioning catch_errors.
5538         (catch_errors_ftype, catch_errors): Delete.
5539         * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
5540         (hook_stop_stub): Delete.
5541         (restore_selected_frame): Change return type to void, and
5542         parameter type to const frame_id &.
5543         (restore_infcall_control_state): Use TRY/CATCH instead of
5544         catch_errors.
5545         * main.c (captured_command_loop): Return void and remove
5546         parameter.  Remove references to catch_errors.
5547         (captured_main): Use TRY/CATCH instead of catch_errors.
5548         * objc-lang.c (objc_submethod_helper_data)
5549         (find_objc_msgcall_submethod_helper): Delete.
5550         (find_objc_msgcall_submethod): Use TRY/CATCH instead of
5551         catch_errors.
5552         * record-full.c (record_full_message): Return void.
5553         (record_full_message_args, record_full_message_wrapper): Delete.
5554         (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
5555         instead of catch_errors.
5556         * solib-aix.c (solib_aix_open_symbol_file_object): Change
5557         parameter type to int.
5558         * solib-darwin.c (open_symbol_file_object): Ditto.
5559         * solib-dsbt.c (open_symbol_file_object): Ditto.
5560         * solib-frv.c (open_symbol_file_object): Ditto.
5561         * solib-svr4.c (open_symbol_file_object): Ditto.
5562         * solib-target.c (solib_target_open_symbol_file_object): Ditto.
5563         * solib.c (update_solib_list): Use TRY/CATCH instead of
5564         catch_errors.
5565         * solist.h (struct target_so_ops) <open_symbol_file_object>:
5566         Change type.
5567         * symmisc.c (struct print_symbol_args): Remove.
5568         (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
5569         (print_symbol): Change type.
5570         * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
5571         and remove parameters.
5572         (catch_errors): New.
5573         (get_windows_debug_event): Adjust.
5574
5575 2017-10-09  Tom Tromey  <tom@tromey.com>
5576
5577         * mi/mi-main.c (free_splay_tree): Remove.
5578         (list_available_thread_groups): Use splay_tree_up.
5579         * common/gdb_splay_tree.h: New file.
5580
5581 2017-10-09  Tom Tromey  <tom@tromey.com>
5582
5583         * mi/mi-main.c (do_nothing): Remove.
5584         (list_available_thread_groups): Update.
5585
5586 2017-10-09  Pedro Alves  <palves@redhat.com>
5587
5588         * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
5589         reading registers when switching context.
5590
5591 2017-10-09  John Baldwin  <jhb@FreeBSD.org>
5592
5593         * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
5594         (fbsd_convert_siginfo): Likewise.
5595         * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
5596
5597 2017-10-09  Simon Marchi  <simon.marchi@polymtl.ca>
5598
5599         * configure.ac (try_guile_versions): Remove guile-2.2.
5600         * configure: Regenerate.
5601
5602 2017-10-09  Tom Tromey  <tom@tromey.com>
5603
5604         * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
5605         (COMPILE.pre): Use $(CXX).
5606
5607 2017-10-09  Pedro Alves  <palves@redhat.com>
5608
5609         * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
5610         Use bool.
5611         (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
5612         * cp-support.h (cp_remove_params): Now returns a
5613         gdb::unique_xmalloc_ptr.
5614         * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
5615         Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
5616         * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
5617         returning a gdb::unique_xmalloc_ptr.
5618         (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
5619         * stack.c (find_frame_funname): Adjust to cp_remove_params
5620         returning a gdb::unique_xmalloc_ptr.
5621
5622 2017-10-08  Tom Tromey  <tom@tromey.com>
5623
5624         * dwarf2read.c (dwarf2_get_dwz_file): Use
5625         gdb::unique_xmalloc_ptr.
5626         (find_slot_in_mapped_hash): Likewise.
5627         (dwarf2_physname): Likewise.
5628         (create_dwo_unit_in_dwp_v1): Use std::string.
5629         (create_dwo_unit_in_dwp_v2): Likewise.
5630         (lookup_dwo_cutu): Likewise.
5631         (inherit_abstract_dies): Use std::vector.
5632         (read_array_type): Likewise.
5633         (dwarf_decode_macros): Remove unused declaration.
5634         (unsigned_int_compar): Remove.
5635         (dwarf2_build_psymtabs_hard): Use scoped_restore.
5636         (psymtabs_addrmap_cleanup): Remove.
5637
5638 2017-10-08  Tom Tromey  <tom@tromey.com>
5639
5640         * frame-unwind.c (frame_unwind_try_unwinder): Update.
5641         * frame.h (frame_cleanup_after_sniffer): Declare.
5642         (frame_prepare_for_sniffer): Return void.
5643         * frame.c (frame_cleanup_after_sniffer): No longer static.  Change
5644         type of argument.
5645         (frame_prepare_for_sniffer): Return void.
5646
5647 2017-10-08  Tom Tromey  <tom@tromey.com>
5648
5649         * utils.h (make_cleanup_value_free): Remove.
5650         * utils.c (do_value_free, struct cleanup): Remove.
5651         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
5652         Use gdb_value_up.
5653         * value.h (struct value_deleter): New.
5654         (gdb_value_up): New typedef.
5655
5656 2017-10-08  Tom Tromey  <tom@tromey.com>
5657
5658         * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
5659         (make_cleanup_free_search_symbols): Remove.
5660         (search_symbols): Return std::vector.
5661         (symbol_search::compare_search_syms): Now member of
5662         symbol_search.  Change arguments.
5663         (sort_search_symbols_remove_dups): Change arguments.  Rewrite.
5664         (symtab_symbol_info, rbreak_command): Update.
5665         * symtab.h (struct symbol_search) <next>: Remove.
5666         Add constructors.
5667         (symbol_search::operator<): New function.
5668         (symbol_search::operator==): New function.
5669         (search_symbols): Remove std::vector.
5670         (free_search_symbols, make_cleanup_free_search_symbols): Remove.
5671         (symbol_search::compare_search_syms): Declare.
5672
5673 2017-10-06  Yao Qi  <yao.qi@linaro.org>
5674
5675         * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
5676         arch/aarch64-insn.o.
5677         Remove one rule.
5678         * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
5679
5680 2017-10-06  Yao Qi  <yao.qi@linaro.org>
5681
5682         * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
5683         and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
5684         arch/arm-linux.o respectively.
5685         * configure.tgt: Likewise.
5686
5687 2017-10-06  Yao Qi  <yao.qi@linaro.org>
5688
5689         * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
5690         * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
5691
5692 2017-10-06  Pedro Alves  <palves@redhat.com>
5693
5694         * windows-nat.c: Include <algorithm>.
5695
5696 2017-10-06  Yao Qi  <yao.qi@linaro.org>
5697
5698         * configure.tgt (i386_tobjs): New variable.
5699         (amd64_tobjs): New variable.
5700         Set $cpu_obs and $os_obs.
5701
5702 2017-10-06  Yao Qi  <yao.qi@linaro.org>
5703
5704         * Makefile.in (CONFIG_SRC_SUBDIR): New.
5705         (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
5706         (clean): Remove object files and dependency files.
5707         (distclean): Remove the directory.
5708         * configure.ac: Invoke AC_CONFIG_COMMANDS.
5709         * configure: Re-generated.
5710         * configure.tgt: Replace amd64.o with arch/amd64.o.
5711
5712 2017-10-05  Jose E. Marchesi  <jose.marchesi@oracle.com>
5713
5714         PR build/22188
5715         * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
5716         and SETEND.
5717
5718 2017-10-05  Pedro Alves  <palves@redhat.com>
5719
5720         * linux-nat.c (linux_child_follow_fork): When following the parent
5721         and detaching the child, consult the parent thread's architecture
5722         instead of the child's.
5723
5724 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
5725
5726         * ax.h: Do not include "doublest.h".
5727         (union agent_val): Remove.
5728
5729 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
5730
5731         * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
5732         (decimal_to_string): Return std::string object.
5733         (decimal_from_string): Accept std::string object.  Return bool.
5734         (decimal_from_integral, decimal_from_doublest): Remove.
5735         (decimal_from_longest): Add prototype.
5736         (decimal_from_ulongest): Likewise.
5737         (decimal_to_longest): Likewise.
5738         (decimal_from_doublest): Likewise.
5739         * dfp.c: Do not include "gdbtypes.h" or "value.h".
5740         (MAX_DECIMAL_STRING): Move here.
5741         (decimal_to_string): Return std::string object.
5742         (decimal_from_string): Accept std::string object.  Return bool.
5743         (decimal_from_integral): Remove, replace by ...
5744         (decimal_from_longest, decimal_from_ulongest): ... these new functions.
5745         (decimal_to_longest): New function.
5746         (decimal_from_floating): Remove, replace by ...
5747         (decimal_from_doublest): ... this new function.
5748         (decimal_to_doublest): Update to new decimal_to_string interface.
5749
5750         * value.c (unpack_long): Use decimal_to_longest.
5751         * valops.c (value_cast): Use decimal_from_doublest instead of
5752         decimal_from_floating.  Use decimal_from_[u]longest isntead of
5753         decimal_from_integral.
5754         * valarith.c (value_args_as_decimal): Likewise.
5755         * valprint.c (print_decimal_floating): Update to new
5756         decimal_to_string interface.
5757         * printcmd.c (printf_decfloat): Likewise.
5758         * c-exp.y (parse_number): Update to new decimal_from_string interface.
5759
5760 2017-10-05  Ulrich Weigand  <uweigand@de.ibm.com>
5761
5762         * doublest.h: Do not include "floatformat.h".  Remove stale comments.
5763         * gdbtypes.c: Include "floatformat.h".
5764         * value.c: Likewise.
5765         * m68k-tdep.c: Likewise.
5766
5767         * findvar.c: Do not include "floatformat.h".
5768         * amd64-darwin-tdep.c: Likewise.
5769         * arm-linux-tdep.c: Likewise.
5770         * i386-darwin-tdep.c: Likewise.
5771         * i387-tdep.c: Likewise.
5772         * m68k-linux-tdep.c: Likewise.
5773         * mep-tdep.c: Likewise.
5774         * mips-tdep.c: Likewise.
5775         * nios2-tdep.c: Likewise.
5776         * s390-linux-tdep.c: Likewise.
5777         * sparc-obsd-tdep.c: Likewise.
5778         * sparc-tdep.c: Likewise.
5779         * sparc64-tdep.c: Likewise.
5780         * spu-tdep.c: Likewise.
5781         * tic6x-tdep.c: Likewise.
5782         * tilegx-tdep.c: Likewise.
5783         * vax-tdep.c: Likewise.
5784         * xstormy16-tdep.c: Likewise.
5785         * xtensa-tdep.c: Likewise.
5786
5787         * top.c: Do not include "doublest.h".
5788         * aarch64-tdep.c: Likewise.
5789         * alpha-tdep.c: Likewise.
5790         * arm-linux-tdep.c: Likewise.
5791         * m68k-linux-tdep.c: Likewise.
5792         * tilegx-tdep.c: Likewise.
5793         * xstormy16-tdep.c: Likewise.
5794
5795 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
5796
5797         * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
5798         (mipsn32_fbsd_sigframe): Define.
5799         (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
5800         for FreeBSD/mipsn32.
5801
5802 2017-10-05  John Baldwin  <jhb@FreeBSD.org>
5803
5804         * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
5805         AT_HWCAP.
5806
5807 2017-10-05  Tristan Gingold  <tgingold@free.fr>
5808
5809         * MAINTAINERS (Misc): Update my email address.
5810
5811 2017-10-04  Pedro Alves  <palves@redhat.com>
5812
5813         * remote.c (get_remote_arch_state): New 'gdbarch' parameter.  Use
5814         it instead of target_gdbarch.
5815         (get_remote_state, get_remote_packet_size): Adjust
5816         get_remote_arch_state calls, passing down target_gdbarch
5817         explicitly.
5818         (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
5819         'gdbarch' and use it instead of target_gdbarch.
5820         (get_memory_packet_size): Adjust get_remote_arch_state calls,
5821         passing down target_gdbarch explicitly.
5822         (struct stop_reply) <arch>: New field.
5823         (remote_parse_stop_reply): Use the stopped thread's architecture,
5824         not the current inferior's.  Save the architecture in the
5825         stop_reply.
5826         (process_stop_reply): Use the stop reply's architecture.
5827         (process_g_packet, remote_fetch_registers)
5828         (remote_prepare_to_store, store_registers_using_G)
5829         (remote_store_registers): Adjust get_remote_arch_state calls,
5830         using the regcache's architecture.
5831         (remote_get_trace_status): Adjust get_remote_arch_state calls,
5832         passing down target_gdbarch explicitly.
5833         * spu-multiarch.c (spu_thread_architecture): Defer to the target
5834         beneath instead of calling target_gdbarch.
5835         * target.c (default_thread_architecture): Use the specified
5836         inferior's architecture, instead of the current inferior's
5837         architecture (via target_gdbarch).
5838
5839 2017-10-04  Pedro Alves  <palves@redhat.com>
5840
5841         * regcache.c (get_thread_arch_regcache): Remove null_ptid special
5842         case.
5843         (regcache_print): Handle !target_has_registers here instead.
5844
5845 2017-10-04  Pedro Alves  <palves@redhat.com>
5846
5847         * frame.c (create_test_frame): Delete.
5848         * frame.h (create_test_frame): Delete.
5849         * gdbarch-selftests.c: Include gdbthread.h and target.h.
5850         (class regcache_test): Delete.
5851         (test_target_has_registers, test_target_has_stack)
5852         (test_target_has_memory, test_target_prepare_to_store)
5853         (test_target_store_registers): New functions.
5854         (test_target_ops): New class.
5855         (register_to_value_test): Error out if there's already a
5856         process_stratum (or higher) target pushed.  Create a fuller mock
5857         environment, with mock target_ops, inferior, address space, thread
5858         and inferior_ptid.
5859         * progspace.c (struct address_space): Move to ...
5860         * progspace.h (struct address_space): ... here.
5861         * regcache.h (regcache::~regcache, regcache::raw_write)
5862         [GDB_SELF_TEST]: No longer virtual.
5863
5864 2017-10-04  Simon Marchi  <simon.marchi@ericsson.com>
5865
5866         * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
5867
5868 2017-10-04  Pedro Alves  <palves@redhat.com>
5869
5870         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
5871         out of 'between TRY and CATCH'.
5872
5873 2017-10-04  Pedro Alves  <palves@redhat.com>
5874
5875         * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
5876         * common/common-exceptions.h (TRY): Open an outermost scope.
5877         Expand intro comment.
5878         (CATCH): Reindent.
5879         (END_CATCH): Close the outermost scope.
5880         * completer.c (complete_line_internal): Add missing END_CATCH.
5881
5882 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
5883
5884         * NEWS (Changes since GDB 8.0): Add entry about new
5885         'set-cwd-on-gdbserver' feature.
5886         (New remote packets): Add entry for QSetWorkingDir.
5887         * common/common-inferior.h (set_inferior_cwd): New prototype.
5888         * infcmd.c (set_inferior_cwd): Remove "static".
5889         (show_cwd_command): Expand text to include remote debugging.
5890         * remote.c: Add PACKET_QSetWorkingDir.
5891         (remote_protocol_features) <QSetWorkingDir>: New entry for
5892         PACKET_QSetWorkingDir.
5893         (extended_remote_set_inferior_cwd): New function.
5894         (extended_remote_create_inferior): Call
5895         "extended_remote_set_inferior_cwd".
5896         (_initialize_remote): Call "add_packet_config_cmd" for
5897         QSetWorkingDir.
5898
5899 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
5900
5901         * NEWS (New commands): Mention "set/show cwd".
5902         * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
5903         "cd" command's help text.
5904         * common/common-inferior.h (get_inferior_cwd): New prototype.
5905         * infcmd.c (inferior_cwd_scratch): New global variable.
5906         (set_inferior_cwd): New function.
5907         (get_inferior_cwd): Likewise.
5908         (set_cwd_command): Likewise.
5909         (show_cwd_command): Likewise.
5910         (_initialize_infcmd): Add "set/show cwd" commands.
5911         * inferior.h (class inferior) <cwd>: New field.
5912         * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
5913         (fork_inferior): Change inferior's cwd before its execution.
5914         * windows-nat.c (windows_create_inferior): Pass inferior's cwd
5915         to CreateProcess.
5916
5917 2017-10-04  Sergio Durigan Junior  <sergiodj@redhat.com>
5918
5919         * Makefile.in (SFILES): Add gdb_tilde_expand.c.
5920         (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
5921         (COMMON_OBS): Add gdb_tilde_expand.o.
5922         * common/gdb_tilde_expand.c: New file.
5923         * common/gdb_tilde_expand.h: Likewise.
5924
5925 2017-10-03  Maciej W. Rozycki  <macro@imgtec.com>
5926
5927         * gdbarch.sh (objfile): Remove duplicate declaration.
5928         * gdbarch.h: Regenerate.
5929
5930 2017-10-03  Tom Tromey  <tom@tromey.com>
5931
5932         * utils.c (internal_vproblem): Use string_vprintf.
5933
5934 2017-10-03  Tom Tromey  <tom@tromey.com>
5935
5936         * printcmd.c (info_symbol_command): Use std::string.
5937
5938 2017-10-03  Tom Tromey  <tom@tromey.com>
5939
5940         * top.c (gdb_safe_append_history): Use std::string.
5941
5942 2017-10-03  Tom Tromey  <tom@tromey.com>
5943
5944         * event-top.c (stdin_event_handler): Update.
5945         * main.c (captured_main_1): Update.
5946         * top.h (make_delete_ui_cleanup): Remove.
5947         (struct ui): Add constructor and destructor.
5948         (new_ui, delete_ui): Remove.
5949         * top.c (make_delete_ui_cleanup): Remove.
5950         (new_ui_command): Use std::unique_ptr.
5951         (delete_ui_cleanup): Remove.
5952         (ui::ui): Rename from new_ui.  Update.
5953         (free_ui): Remove.
5954         (ui::~ui): Rename from delete_ui.  Update.
5955
5956 2017-10-03  Tom Tromey  <tom@tromey.com>
5957
5958         * symfile.c (load_progress): Use gdb::byte_vector.
5959
5960 2017-10-03  Tom Tromey  <tom@tromey.com>
5961
5962         * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
5963         declaration.
5964         * printcmd.c (x_command): Remove unused declaration.
5965         * symfile.c (symbol_file_command): Remove unused declaration.
5966
5967 2017-10-03  Tom Tromey  <tom@tromey.com>
5968
5969         * utils.c (internal_vproblem): Use std::string.
5970         (defaulted_query): Likewise.
5971
5972 2017-10-03  Tom Tromey  <tom@tromey.com>
5973
5974         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
5975         * top.c (execute_command_to_string): Update.
5976         * utils.c (make_cleanup_restore_page_info): Remove.
5977         (do_restore_page_info_cleanup): Remove.
5978         (set_batch_flag_and_restore_page_info):
5979         New.
5980         (make_cleanup_restore_page_info): Remove.
5981         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
5982         (~set_batch_flag_and_restore_page_info): New
5983         (make_cleanup_restore_uinteger): Remove.
5984         (make_cleanup_restore_integer): Remove.
5985         (struct restore_integer_closure): Remove.
5986         (restore_integer): Remove.
5987         * utils.h (struct set_batch_flag_and_restore_page_info): New
5988         class.
5989         (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
5990         (make_cleanup_restore_page_info): Remove.
5991         (make_cleanup_restore_uinteger) Remove.
5992         (make_cleanup_restore_integer) Remove.
5993
5994 2017-10-03  Tom Tromey  <tom@tromey.com>
5995
5996         * record-full.h (record_full_gdb_operation_disable_set): Return
5997         scoped_restore_tmpl<int>.
5998         * infrun.c (adjust_pc_after_break): Update.
5999         (handle_signal_stop): Update.
6000         * record-full.c (record_full_gdb_operation_disable_set): Return
6001         scoped_restore_tmpl<int>.
6002         (record_full_wait_1, record_full_insert_breakpoint)
6003         (record_full_remove_breakpoint, record_full_save)
6004         (record_full_goto_insn): Update.
6005
6006 2017-10-02  Tom Tromey  <tom@tromey.com>
6007
6008         PR rust/22236:
6009         * rust-lang.c (rust_val_print_str): New function.
6010         (val_print_struct): Call it.
6011         (rust_subscript): Preserve name of slice type.
6012
6013 2017-10-02  Tom Tromey  <tom@tromey.com>
6014
6015         * rust-lang.c (rust_subscript): Handle slices in
6016         EVAL_AVOID_SIDE_EFFECTS case.
6017
6018 2017-10-02  Tom Tromey  <tom@tromey.com>
6019
6020         * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
6021
6022 2017-10-02  Tom Tromey  <tom@tromey.com>
6023
6024         * rust-lang.h (rust_slice_type): Add "extern".
6025
6026 2017-10-02  Tom Tromey  <tom@tromey.com>
6027             Pedro Alves  <palves@redhat.com>
6028
6029         * ada-lang.h (ada_exc_info::operator<): Make const.
6030         (ada_exc_info::operator==): Make const.
6031         * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
6032         Make const.
6033
6034 2017-09-29  Tom Tromey  <tom@tromey.com>
6035
6036         * target.c (read_whatever_is_readable): Change type of "result".
6037         Update.
6038         (free_memory_read_result_vector): Remove.
6039         (read_memory_robust): Change return type.  Update.
6040         * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update.  Use
6041         bin2hex, std::string.
6042         * target.h (memory_read_result_s): Remove typedef.
6043         (free_memory_read_result_vector): Remove.
6044         (read_memory_robust): Return std::vector.
6045
6046 2017-09-29  Tom Tromey  <tom@tromey.com>
6047
6048         * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
6049
6050 2017-09-29  Tom Tromey  <tom@tromey.com>
6051
6052         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
6053         * ada-lang.h (struct ada_exc_info): Remove typedef.  Declare
6054         operator< and operator==.
6055         (ada_exceptions_list): Return a std::vector.
6056         * ada-lang.c (ada_exc_info::operator<): Rename from
6057         compare_ada_exception_info.
6058         (ada_exc_info::operator==): New.
6059         (sort_remove_dups_ada_exceptions_list): Change type of
6060         "exceptions".
6061         (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
6062         (ada_add_global_exceptions): Likewise.
6063         (ada_exceptions_list_1): Return a std::vector.
6064         (ada_exceptions_list): Likewise.
6065
6066 2017-09-29  Tom Tromey  <tom@tromey.com>
6067
6068         * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
6069         'std::set *'.
6070         (print_one_inferior): Update.
6071         (free_vector_of_ints): Remove.
6072         (list_available_thread_groups): Change "ids" to std::set.
6073         (mi_cmd_list_thread_groups): Update.
6074         (struct collect_cores_data) <core>: Now a std::set.
6075         (collect_cores): Update.
6076         (unique): Remove.
6077         (print_one_inferior): Update.
6078
6079 2017-09-29  Tom Tromey  <tom@tromey.com>
6080
6081         * mi/mi-main.c (mi_execute_cli_command): Use std::string.
6082         (mi_execute_async_cli_command): Likewise.
6083         (mi_cmd_trace_frame_collected): Use field_fmt.
6084
6085 2017-09-29  Tom Tromey  <tom@tromey.com>
6086
6087         * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
6088         gdb::byte_vector.
6089
6090 2017-09-29  Tom Tromey  <tom@tromey.com>
6091
6092         * mi/mi-parse.c (mi_parse): Remove unused declaration.
6093
6094 2017-09-29  Tom Tromey  <tom@tromey.com>
6095
6096         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
6097
6098 2017-09-29  Tom Tromey  <tom@tromey.com>
6099
6100         * varobj.h (varobj_gen_name): Return std::string.
6101         * varobj.c (varobj_gen_name): Return std::string.
6102         * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
6103         (mi_cmd_var_delete): Don't copy "name".
6104
6105 2017-09-29  Tom Tromey  <tom@tromey.com>
6106
6107         * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
6108         (mi_cmd_break_insert_1): Update.
6109
6110 2017-09-29  Tom Tromey  <tom@tromey.com>
6111
6112         * target.h (make_scoped_defer_target_commit_resume): Update.
6113         * target.c (make_scoped_defer_target_commit_resume): Rename from
6114         make_cleanup_defer_target_commit_resume.  Return a
6115         scoped_restore.
6116         * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
6117
6118 2017-09-29  Tom Tromey  <tom@tromey.com>
6119
6120         * main.c (captured_main_1): Remove unused declaration.
6121         * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
6122
6123 2017-09-29  Tom Tromey  <tom@tromey.com>
6124
6125         * symtab.c (search_symbols): Remove unused outer cleanup.
6126         (make_source_files_completion_list): Remove unused declaration.
6127
6128 2017-09-29  Tom Tromey  <tom@tromey.com>
6129
6130         * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
6131
6132 2017-09-29  Tom Tromey  <tom@tromey.com>
6133
6134         * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
6135         gdb::byte_vector.
6136
6137 2017-09-29  Tom Tromey  <tom@tromey.com>
6138
6139         * complaints.c (vcomplaint): Use std::string.
6140
6141 2017-09-29  Tom Tromey  <tom@tromey.com>
6142
6143         * tracepoint.c (trace_variable_command): Use std::string.
6144         (encode_actions_1): Remove unused declarations.
6145         (create_tsv_from_upload): Use std::string.
6146
6147 2017-09-29  Tom Tromey  <tom@tromey.com>
6148
6149         * cp-support.c (gdb_demangle): Use std::string.
6150
6151 2017-09-29  Tom Tromey  <tom@tromey.com>
6152
6153         * stack.c (parse_frame_specification): Use std::string
6154         (info_frame_command): Use gdb::unique_xmalloc_ptr.
6155
6156 2017-09-29  Tom Tromey  <tom@tromey.com>
6157
6158         * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
6159
6160 2017-09-29  Tom Tromey  <tom@tromey.com>
6161
6162         * utils.c (vfprintf_maybe_filtered): Use std::string.
6163         (vfprintf_unfiltered): Likewise.
6164
6165 2017-09-29  Tom Tromey  <tom@tromey.com>
6166
6167         * event-top.c (top_level_prompt): Return std::string.
6168         (display_gdb_prompt): Update.
6169
6170 2017-09-29  Tom Tromey  <tom@tromey.com>
6171
6172         * unittests/common-utils-selftests.c (format): New function.
6173         (string_vprintf_tests): New function.
6174         (_initialize_common_utils_selftests): Register new tests.
6175         * common/common-utils.c (string_vprintf): New function.
6176         * common/common-utils.h (string_vprintf): Declare.
6177
6178 2017-09-29  Pedro Alves  <palves@redhat.com>
6179
6180         * common/rsp-low.c (unpack_varlen_hex): Constify.
6181         * common/rsp-low.h (unpack_varlen_hex): Constify.
6182         * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
6183         Constify.
6184         * remote.c (remote_set_permissions, read_ptid)
6185         (remote_current_thread, remote_get_threads_with_qthreadinfo)
6186         (remote_static_tracepoint_marker_at)
6187         (remote_static_tracepoint_markers_by_strid)
6188         (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
6189         * tracepoint.c (parse_trace_status, parse_tracepoint_status)
6190         (parse_tracepoint_definition, parse_tsv_definition)
6191         (parse_static_tracepoint_marker_definition): Constify.
6192         * tracepoint.h (parse_static_tracepoint_marker_definition)
6193         (parse_trace_status, parse_tracepoint_status)
6194         (parse_tracepoint_definition, parse_tsv_definition): Constify.
6195
6196 2017-09-29  Pedro Alves  <palves@redhat.com>
6197
6198         * remote.c (target_buf, target_buf_size): Delete.
6199         (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
6200         Use the connection's packet buffer instead.
6201         All callers adjusted.
6202         (_initialize_remote): Remove references to target_buf and
6203         target_buf_size.
6204
6205 2017-09-28  Pedro Alves  <palves@redhat.com>
6206
6207         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6208         unittests/common-utils-selftests.c.
6209         (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
6210         (COMMON_OBS): Remove utils-selftests.o.
6211         * utils-selftests.c: Move to ...
6212         * unittests/common-utils-selftests.c: ... here and rename self
6213         test to "string_printf".
6214
6215 2017-09-28  Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
6216
6217         * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
6218         having NULL cus or tus.
6219
6220 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
6221
6222         * arm-tdep.c: (convert_from_extended): Remove.
6223         (convert_to_extended): Likewise.
6224         (arm_extract_return_value): Use convert_typed_floating.
6225         (arm_store_return_value): Likewise.
6226
6227         * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
6228         * sh-tdep.c: Do not include "floatformat.h".
6229         (sh_littlebyte_bigword_type): New function.
6230         (sh_register_convert_to_virtual): Use convert_typed_floating.
6231         (sh_register_convert_to_raw): Likewise.
6232         * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
6233         (sh64_littlebyte_bigword_type): New function.
6234         (sh64_extract_return_value): Use convert_typed_floating.
6235         (sh64_register_convert_to_virtual): Likewise.
6236         (sh64_register_convert_to_raw): Likewise.
6237
6238 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
6239
6240         * doublest.h (floatformat_from_type): Move to gdbtypes.h.
6241         * doublest.c (floatformat_from_type): Move to gdbtypes.c.
6242
6243         * gdbtypes.h (union type_specific): Make field floatformat hold
6244         just a single struct floatformat, not an array.
6245         (floatformat_from_type): Move here.
6246         * gdbtypes.c (floatformat_from_type): Move here.  Update to
6247         changed TYPE_FLOATFORMAT definition.
6248         (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
6249         (recursive_dump_type): Likewise.
6250         (init_float_type): Install correct floatformat for byte order.
6251         (arch_float_type): Likewise.
6252
6253 2017-09-27  Ulrich Weigand  <uweigand@de.ibm.com>
6254
6255         * gdbtypes.c (init_type): Change incoming argument from
6256         length-in-bytes to length-in-bits.  Assert length is a
6257         multiple of TARGET_CHAR_BITS.
6258         (arch_type, arch_flags_type): Likewise.
6259         (init_integer_type): Update call to init_type.
6260         (init_character_type): Likewise.
6261         (init_boolean_type): Likewise.
6262         (init_float_type): Likewise.
6263         (init_decfloat_type): Likewise.
6264         (init_complex_type): Likewise.
6265         (init_pointer_type): Likewise.
6266         (objfile_type): Likewise.
6267         (arch_integer_type): Update call to arch_type.
6268         (arch_character_type): Likewise.
6269         (arch_boolean_type): Likewise.
6270         (arch_float_type): Likewise.
6271         (arch_decfloat_type): Likewise.
6272         (arch_complex_type): Likewise.
6273         (arch_pointer_type): Likewise.
6274         (gdbtypes_post_init): Likewise.
6275
6276         * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
6277         (read_base_type): Likewise.
6278         * mdebugread.c (basic_type): Likewise.
6279         * stabsread.c (dbx_init_float_type): Likewise.
6280         (rs6000_builtin_type): Likewise.
6281         (read_range_type): Likewise.  Also, fix call to init_integer_type
6282         with erroneous length argument.
6283
6284         * ada-lang.c (ada_language_arch_info): Update call to arch_type.
6285         * d-lang.c (build_d_types): Likewise.
6286         * f-lang.c (build_fortran_types): Likewise.
6287         * go-lang.c (build_go_types): Likewise.
6288         * opencl-lang.c (build_opencl_types): Likewise.
6289         * jit.c (finalize_symtab): Likewise.
6290         * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
6291         (build_std_type_info_type): Likewise.
6292         * target-descriptions.c (tdesc_gdb_type): Likewise.  Also,
6293         update call to arch_flags_type.
6294
6295         * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
6296         arch_type.
6297         * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
6298         * windows-tdep.c (windows_get_tlb_type): Likewise.
6299
6300         * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
6301         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
6302         * m32c-tdep.c (make_types): Likewise.
6303         * rl78-tdep.c (rl78_gdbarch_init): Likewise.
6304         (rl78_psw_type): Update call to arch_flags_type.
6305         * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
6306         * rx-tdep.c (rx_psw_type): Likewise.
6307         (rx_fpsw_type): Likewise.
6308         * sparc-tdep.c (sparc_psr_type): Likewise.
6309         (sparc_fsr_type): Likewise.
6310         * sparc64-tdep.c (sparc64_pstate_type): Likewise.
6311         (sparc64_ccr_type): Likewise.
6312         (sparc64_fsr_type): Likewise.
6313         (sparc64_fprs_type): Likewise.
6314
6315 2017-09-27  Tom Tromey  <tom@tromey.com>
6316
6317         * findcmd.c (find_command): Constify.
6318
6319 2017-09-27  Tom Tromey  <tom@tromey.com>
6320
6321         * ada-tasks.c (task_command_1, task_command): Constify.
6322
6323 2017-09-27  Tom Tromey  <tom@tromey.com>
6324
6325         * symtab.c (maintenance_print_symbol_cache)
6326         (maintenance_flush_symbol_cache)
6327         (maintenance_print_symbol_cache_statistics): Constify.
6328
6329 2017-09-27  Tom Tromey  <tom@tromey.com>
6330
6331         * inferior.c (detach_inferior_command, kill_inferior_command)
6332         (inferior_command): Constify.
6333
6334 2017-09-27  Tom Tromey  <tom@tromey.com>
6335
6336         * regcache.c (regcache_print, maintenance_print_registers)
6337         (maintenance_print_raw_registers)
6338         (maintenance_print_cooked_registers)
6339         (maintenance_print_register_groups)
6340         (maintenance_print_remote_registers): Constify.
6341
6342 2017-09-27  Tom Tromey  <tom@tromey.com>
6343
6344         * printcmd.c (map_display_numbers, undisplay_command)
6345         (enable_disable_display_command, enable_display_command)
6346         (disable_display_command): Constify.
6347
6348 2017-09-27  Tom Tromey  <tom@tromey.com>
6349
6350         * breakpoint.h (delete_command): Don't declare.
6351         * breakpoint.c (delete_command, enable_once_command)
6352         (enable_count_command, enable_delete_command, breakpoint_1)
6353         (maintenance_info_breakpoints, stopin_command, stopat_command)
6354         (delete_command, delete_trace_command, save_breakpoints)
6355         (save_breakpoints_command, save_tracepoints_command): Constify.
6356
6357 2017-09-27  Tom Tromey  <tom@tromey.com>
6358
6359         * macrocmd.c (macro_expand_command, macro_expand_once_command)
6360         (skip_ws, extract_identifier, macro_define_command)
6361         (macro_undef_command, macro_list_command): Constify.
6362
6363 2017-09-27  Tom Tromey  <tom@tromey.com>
6364
6365         * infcmd.c (environment_info, set_environment_command)
6366         (unset_environment_command, path_info, info_proc_cmd_1)
6367         (info_proc_cmd_mappings, info_proc_cmd_stat)
6368         (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
6369         (info_proc_cmd_exe, info_proc_cmd_all): Constify.
6370
6371 2017-09-27  Tom Tromey  <tom@tromey.com>
6372
6373         * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
6374         Constify.
6375
6376 2017-09-27  Tom Tromey  <tom@tromey.com>
6377
6378         * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
6379
6380 2017-09-27  Tom Tromey  <tom@tromey.com>
6381
6382         * demangle.c (demangle_command): Constify.
6383
6384 2017-09-27  Tom Tromey  <tom@tromey.com>
6385
6386         * progspace.c (maintenance_info_program_spaces_command):
6387         Constify.
6388
6389 2017-09-27  Tom Tromey  <tom@tromey.com>
6390
6391         * compile/compile.c (check_raw_argument, compile_file_command)
6392         (compile_code_command, compile_print_command): Constify.
6393
6394 2017-09-27  Tom Tromey  <tom@tromey.com>
6395
6396         * reggroups.c (maintenance_print_reggroups): Constify.
6397
6398 2017-09-27  Tom Tromey  <tom@tromey.com>
6399
6400         * dwarf2read.c (save_gdb_index_command): Constify.
6401
6402 2017-09-27  Tom Tromey  <tom@tromey.com>
6403
6404         * stap-probe.c (info_probes_stap_command): Constify.
6405
6406 2017-09-27  Tom Tromey  <tom@tromey.com>
6407
6408         * fork-child.c (unset_exec_wrapper_command): Constify.
6409
6410 2017-09-27  Tom Tromey  <tom@tromey.com>
6411
6412         * btrace.c (get_uint, get_context_size, no_chunk)
6413         (maint_btrace_packet_history_cmd)
6414         (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
6415         (maint_info_btrace_cmd): Constify.
6416
6417 2017-09-27  Tom Tromey  <tom@tromey.com>
6418
6419         * reverse.c (delete_bookmark_command): Constify.
6420
6421 2017-09-27  Tom Tromey  <tom@tromey.com>
6422
6423         * remote.c (set_memory_packet_size)
6424         (set_memory_write_packet_size, show_memory_write_packet_size)
6425         (set_memory_read_packet_size, show_memory_read_packet_size)
6426         (compare_sections_command, packet_command, remote_put_command)
6427         (remote_get_command, remote_delete_command): Constify.
6428
6429 2017-09-27  Tom Tromey  <tom@tromey.com>
6430
6431         * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
6432         (set_mipsfpu_double_command, set_mipsfpu_none_command)
6433         (set_mipsfpu_auto_command): Constify.
6434
6435 2017-09-27  Tom Tromey  <tom@tromey.com>
6436
6437         * cli/cli-cmds.h (cd_command): Constify.
6438         * cli/cli-cmds.c (cd_command): Constify.
6439
6440 2017-09-27  Tom Tromey  <tom@tromey.com>
6441
6442         * thread.c (thread_name_command, thread_find_command): Constify.
6443
6444 2017-09-27  Tom Tromey  <tom@tromey.com>
6445
6446         * probe.c (enable_probes_command, disable_probes_command):
6447         Constify.
6448
6449 2017-09-27  Tom Tromey  <tom@tromey.com>
6450
6451         * symfile.c (symbol_file_command): Constify.
6452         * gdbcore.h (deprecated_file_changed_hook): Constify.
6453         * exec.c (deprecated_file_changed_hook, exec_file_command)
6454         (file_command): Constify.
6455         * defs.h (symbol_file_command): Constify.
6456
6457 2017-09-27  Tom Tromey  <tom@tromey.com>
6458
6459         * remote-fileio.c (set_system_call_allowed)
6460         (show_system_call_allowed): Constify.
6461
6462 2017-09-27  Tom Tromey  <tom@tromey.com>
6463
6464         * tracepoint.c (delete_trace_variable_command)
6465         (tfind_end_command, tfind_start_command, tfind_pc_command)
6466         (tfind_tracepoint_command, tfind_line_command)
6467         (tfind_range_command, tfind_outside_command): Constify.
6468
6469 2017-09-27  Tom Tromey  <tom@tromey.com>
6470
6471         * ax-gdb.c (maint_agent_printf_command, agent_command)
6472         (agent_eval_command): Constify.
6473
6474 2017-09-27  Tom Tromey  <tom@tromey.com>
6475
6476         * tracepoint.c (info_scope_command): Constify.
6477         * python/python.c (gdbpy_decode_line): Constify.
6478         * python/py-breakpoint.c (bppy_init): Constify.
6479         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
6480         * location.h: (new_linespec_location)
6481         (string_to_event_location_basic, string_to_event_location):
6482         Constify.
6483         * location.c (new_linespec_location)
6484         (string_to_event_location_basic, string_to_event_location):
6485         Constify.
6486         * linespec.h (decode_line_with_current_source)
6487         (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
6488         * linespec.c (linespec_lex_to_end)
6489         (decode_line_with_current_source)
6490         (decode_line_with_last_displayed): Constify.
6491         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
6492         Constify.
6493         * cli/cli-cmds.c (edit_command, list_command): Constify.
6494         * breakpoint.h (until_break_command, watch_command_wrapper)
6495         (awatch_command_wrapper, rwatch_command_wrapper)
6496         (init_ada_exception_breakpoint): Constify.
6497         * breakpoint.c (break_command_1, dprintf_command)
6498         (break_range_command, watch_command_wrapper)
6499         (rwatch_command_wrapper, awatch_command_wrapper)
6500         (until_break_command, init_ada_exception_breakpoint)
6501         (strace_marker_create_sals_from_location, trace_command)
6502         (ftrace_command, strace_command, struct tracepoint): Constify.
6503         * ax-gdb.c (agent_command_1): Constify.
6504         * ada-lang.c (ada_exception_sal): Constify.
6505
6506 2017-09-27  Tom Tromey  <tom@tromey.com>
6507
6508         * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
6509         (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
6510         (get_context_size, no_chunk, get_insn_history_modifiers)
6511         (cmd_record_insn_history, get_call_history_modifiers)
6512         (cmd_record_call_history): Constify.
6513
6514 2017-09-27  Tom Tromey  <tom@tromey.com>
6515
6516         * source.c (show_substitute_path_command)
6517         (unset_substitute_path_command, set_substitute_path_command):
6518         Constify.
6519
6520 2017-09-27  Tom Tromey  <tom@tromey.com>
6521
6522         * typeprint.c (maintenance_print_type): Constify.
6523         * maint.c (maintenance_dump_me, maintenance_demangle)
6524         (maintenance_time_display, maintenance_info_sections)
6525         (maintenance_print_statistics, maintenance_deprecate)
6526         (maintenance_undeprecate): Constify.
6527         (maintenance_do_deprecate): Constify.  Use std::string.
6528         (maintenance_selftest): Constify.
6529         * gdbtypes.h (maintenance_print_type): Constify.
6530
6531 2017-09-27  Tom Tromey  <tom@tromey.com>
6532
6533         * hppa-tdep.c (unwind_command): Constify.
6534
6535 2017-09-27  Tom Tromey  <tom@tromey.com>
6536
6537         * target-descriptions.c (unset_tdesc_filename_cmd)
6538         (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
6539         Constify.
6540
6541 2017-09-27  Tom Tromey  <tom@tromey.com>
6542
6543         * dummy-frame.c (maintenance_print_dummy_frames): Constify.
6544
6545 2017-09-27  Tom Tromey  <tom@tromey.com>
6546
6547         * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
6548
6549 2017-09-27  Tom Tromey  <tom@tromey.com>
6550
6551         * tui/tui-regs.c (tui_reg_command): Constify.
6552
6553 2017-09-27  Tom Tromey  <tom@tromey.com>
6554
6555         * skip.c (skip_file_command, skip_function_command)
6556         (skip_enable_command, skip_disable_command, skip_delete_command):
6557         Constify.
6558
6559 2017-09-27  Tom Tromey  <tom@tromey.com>
6560
6561         * record-btrace.c (cmd_record_btrace_bts_start)
6562         (cmd_record_btrace_pt_start): Constify.
6563
6564 2017-09-27  Tom Tromey  <tom@tromey.com>
6565
6566         * symmisc.c (maintenance_print_symbols)
6567         (maintenance_print_msymbols, maintenance_print_objfiles)
6568         (maintenance_info_symtabs, maintenance_check_symtabs)
6569         (maintenance_expand_symtabs, maintenance_info_line_tables):
6570         Constify.
6571
6572 2017-09-27  Tom Tromey  <tom@tromey.com>
6573
6574         * top.c (new_ui_command): Constify.
6575
6576 2017-09-27  Tom Tromey  <tom@tromey.com>
6577
6578         * symfile.c (add_symbol_file_command)
6579         (remove_symbol_file_command, list_overlays_command)
6580         (map_overlay_command, unmap_overlay_command)
6581         (overlay_auto_command, overlay_manual_command)
6582         (overlay_off_command, overlay_load_command): Constify.
6583
6584 2017-09-27  Tom Tromey  <tom@tromey.com>
6585
6586         * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
6587         (info_spu_mailbox_command, info_spu_dma_command)
6588         (info_spu_proxydma_command): Constify.
6589
6590 2017-09-27  Tom Tromey  <tom@tromey.com>
6591
6592         * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
6593
6594 2017-09-27  Tom Tromey  <tom@tromey.com>
6595
6596         * cli/cli-script.c (user_defined_command): Constify.
6597
6598 2017-09-27  Tom Tromey  <tom@tromey.com>
6599
6600         * cli/cli-dump.c (dump_memory_command, dump_value_command)
6601         (dump_srec_memory, dump_srec_value, dump_ihex_memory)
6602         (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
6603         (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
6604         (dump_binary_value, append_binary_memory, append_binary_value):
6605         Constify.
6606         (struct dump_context) <func>: Constify.
6607         (add_dump_command): Update.
6608
6609 2017-09-27  Tom Tromey  <tom@tromey.com>
6610
6611         * cli/cli-cmds.c (show_version, show_configuration)
6612         (source_command, show_user): Constify.
6613
6614 2017-09-27  Tom Tromey  <tom@tromey.com>
6615
6616         * target.c (maintenance_print_target_stack): Constify.
6617
6618 2017-09-27  Tom Tromey  <tom@tromey.com>
6619
6620         * interps.c (interpreter_exec_cmd): Constify.
6621
6622 2017-09-27  Tom Tromey  <tom@tromey.com>
6623
6624         * record-full.c (cmd_record_full_restore): Constify.
6625
6626 2017-09-27  Tom Tromey  <tom@tromey.com>
6627
6628         * memattr.c (enable_mem_command, disable_mem_command)
6629         (delete_mem_command): Constify.
6630
6631 2017-09-27  Tom Tromey  <tom@tromey.com>
6632
6633         * value.c (show_convenience): Constify.
6634
6635 2017-09-27  Tom Tromey  <tom@tromey.com>
6636
6637         * gdbcore.h (core_file_command): Update.
6638         * corefile.c (core_file_command): Constify.
6639
6640 2017-09-27  Tom Tromey  <tom@tromey.com>
6641
6642         * user-regs.c (maintenance_print_user_registers): Constify.
6643
6644 2017-09-27  Tom Tromey  <tom@tromey.com>
6645
6646         * cp-namespace.c (maintenance_cplus_namespace): Constify.
6647
6648 2017-09-27  Tom Tromey  <tom@tromey.com>
6649
6650         * cp-support.c (first_component_command): Constify.
6651
6652 2017-09-27  Tom Tromey  <tom@tromey.com>
6653
6654         * psymtab.c (maintenance_print_psymbols)
6655         (maintenance_info_psymtabs, maintenance_check_psymtabs):
6656         Constify.
6657
6658 2017-09-27  Tom Tromey  <tom@tromey.com>
6659
6660         * windows-tdep.c (display_tib): Constify.
6661
6662 2017-09-27  Tom Tromey  <tom@tromey.com>
6663
6664         * linux-fork.c (delete_checkpoint_command)
6665         (detach_checkpoint_command): Constify.
6666
6667 2017-09-27  Tom Tromey  <tom@tromey.com>
6668
6669         * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
6670
6671 2017-09-27  Tom Tromey  <tom@tromey.com>
6672
6673         * arc-tdep.c (dump_arc_instruction_command): Constify.
6674
6675 2017-09-27  Tom Tromey  <tom@tromey.com>
6676
6677         * valprint.c (set_radix, show_radix): Constify.
6678
6679 2017-09-27  Tom Tromey  <tom@tromey.com>
6680
6681         * dtrace-probe.c (info_probes_dtrace_command): Constify.
6682
6683 2017-09-27  Tom Tromey  <tom@tromey.com>
6684
6685         * command.h (not_just_help_class_command): Update.
6686         * cli/cli-decode.h (not_just_help_class_command): Update.
6687         * cli/cli-decode.c (not_just_help_class_command): Constify.
6688
6689 2017-09-27  Tom Tromey  <tom@tromey.com>
6690
6691         * gdb_bfd.c (maintenance_info_bfds): Constify.
6692
6693 2017-09-27  Tom Tromey  <tom@tromey.com>
6694
6695         * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
6696         overloads.
6697         (do_add_cmd): Rename from add_cmd.  Don't call set_cmd_cfunc.
6698         (do_const_cfunc): New function.
6699         (cmd_cfunc_eq): New overload.
6700         (cli_user_command_p): Check do_const_cfunc.
6701         * cli/cli-decode.h (struct cmd_list_element) <function>: New field
6702         const_cfunc.
6703         * command.h (add_cmd): Add const overload and no-function
6704         overload.
6705         (set_cmd_cfunc): Add const overload.
6706         (cmd_const_cfunc_ftype): Declare.
6707         (cmd_cfunc_eq): Add const overload.
6708         * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
6709         python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
6710         overload.
6711
6712 2017-09-27  Tom Tromey  <tom@tromey.com>
6713
6714         * macroexp.c (get_next_token_for_substitution): New function.
6715         (substitute_args): Call it.  Check for __VA_OPT__.
6716
6717 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
6718             Pedro Alves <palves@redhat.com>
6719
6720         * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
6721         producer_is_icc_lt_14.
6722         (producer_is_icc_lt_14): New function.
6723         (check_producer): Add code for checking version of ICC.
6724         (producer_is_icc): Move to producer.c.
6725         (read_structure_type): Restrict ICC workaround to ICC<14.
6726         * producer.c: Include selftest.h.
6727         (producer_is_icc, producer_parsing_tests, _initialize_producer):
6728         New functions.
6729         * producer.h (producer_is_icc): New declaration.
6730
6731 2017-09-26  Walfred Tedeschi  <walfred.tedeschi@intel.com>
6732
6733         * Makefile.in (SFILES): Add producer.c.
6734         (COMMON_OBS): Add producer.o
6735         * amd64-tdep.c (producer.h): Add new include.
6736         * dwarf2read.c (producer.h): Add new include.
6737         * producer.c: New file.
6738         * producer.h: New file.
6739         * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
6740         producer.c.
6741         * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
6742         producer.h.
6743
6744 2017-09-26  Matthias Klose  <doko@ubuntu.com>
6745
6746         * configure.ac: Search ncursesw before ncurses.
6747         Check ncursesw/ncurses.h before ncurses/ncurses.h.
6748         * gdb_curses.h: Include <ncursesw/ncurses.h>
6749         * config.in, configure: Regenerate.
6750
6751 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6752
6753         PR gdb/22185
6754         * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
6755         obsolete.
6756         Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
6757         Remove i386sol2 support.
6758         * configure.nat <i386sol2>: Remove.
6759         <sol2-64>: Fold into ...
6760         <sol2>: ... this.
6761         Move common settings to default section.
6762         Add sol-thread.o.
6763         * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
6764         x86_64-*-solaris2.1[0-9]*>: Rename to ...
6765         <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
6766         <i[34567]86-*-solaris*>: Remove.
6767         <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
6768
6769         * configure.ac: Remove wctype in libw check.
6770         (_MSE_INT_H): Don't define on Solaris 7-9.
6771         <solaris*>: Remove libthread_db.so.1 check.
6772         * configure: Regenerate.
6773         * config.in: Regenerate.
6774
6775         * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
6776         (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
6777         (gdb_ps_size_t): Remove.
6778         Use base types in users.
6779         * sol-thread.c: Likewise, also for gdb_ps_addr_t.
6780
6781         * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
6782
6783 2017-09-26  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
6784
6785         PR build/22206
6786         * sparc64-tdep.c (adi_tag_fd): Print pid as long.
6787         (adi_is_addr_mapped): Likewise.
6788         (PSR_ICC): Don't redefine.
6789         (PSR_IMPL): Likewise.
6790
6791 2017-09-25  Tom Tromey  <tom@tromey.com>
6792
6793         * regcache.c (regcache::dump): Use string_printf.
6794
6795 2017-09-25  Tom Tromey  <tom@tromey.com>
6796
6797         * regcache.c (class regcache_invalidator): New.
6798         (struct register_to_invalidate): Remove.
6799         (make_cleanup_regcache_invalidate): Remove.
6800         (regcache::raw_write): Use regcache_invalidator.
6801
6802 2017-09-25  Tom Tromey  <tom@tromey.com>
6803
6804         * spu-tdep.c (spu2ppu_sniffer): Update.
6805         * regcache.h (make_cleanup_regcache_xfree): Don't declare.
6806         * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
6807         Remove.
6808         * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
6809         * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
6810         * frame.h (frame_save_as_regcache): Return std::unique_ptr.
6811         * frame.c (frame_save_as_regcache): Return std::unique_ptr.
6812         (frame_pop): Update.
6813
6814 2017-09-25  Tom Tromey  <tom@tromey.com>
6815
6816         * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
6817         * regcache.h (regcache_xfree): Don't declare.
6818         * regcache.c (regcache_xfree): Remove.
6819         (do_regcache_xfree): Use delete.
6820         * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
6821         * linux-fork.c (free_fork): Use delete.
6822         (fork_save_infrun_state): Likewise.
6823         * jit.c (jit_dealloc_cache): Use delete.
6824         * infrun.c (discard_infcall_suspend_state): Use delete.
6825
6826 2017-09-25  Tom Tromey  <tom@tromey.com>
6827
6828         * regcache.h (regcache_xmalloc): Don't declare.
6829         (regcache_raw_set_cached_value): Update comment.
6830         * regcache.c (regcache_xmalloc): Remove.
6831         * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
6832         * jit.c (jit_frame_sniffer): Use new.
6833         * frame.c (frame_save_as_regcache): Use new.
6834
6835 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6836
6837         * NEWS: Advertise support for guarded-storage registers on IBM z.
6838
6839 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6840
6841         * s390-linux-nat.c (have_regset_gs): New static variable.
6842         (s390_linux_fetch_inferior_registers): Handle guarded-storage
6843         control block and guarded-storage broadcast control regsets.
6844         (s390_read_description): Detect whether the target has
6845         guarded-storage support, return appropriate tdesc.
6846         * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
6847         (features/s390x-gs-linux64.c): Likewise.
6848         (struct gdbarch_tdep) <have_gs>: New field.
6849         (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
6850         (s390_gsbc_regset): New variables.
6851         (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
6852         and s390_gsbc_regset, if applicable.
6853         (s390_core_read_description): Check whether core file was from a
6854         target with guarded-storage support; include appropriate regsets.
6855         (s390_gdbarch_init): Add registers for guarded-storage support.
6856         (_initialize_s390_tdep): Initialize new target descriptions that
6857         include registers for guarded-storage support.
6858         * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
6859         (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
6860         (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
6861         (S390_NUM_REGS): Adjust macro definition.
6862         (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
6863         (tdesc_s390x_gs_linux64): New declarations.
6864
6865 2017-09-25  Andreas Arnez  <arnez@linux.vnet.ibm.com>
6866
6867         * features/s390-gs-linux64.xml: New file.
6868         * features/s390-gs.xml: New file.
6869         * features/s390-gsbc.xml: New file.
6870         * features/s390x-gs-linux64.xml: New file.
6871         * features/Makefile (WHICH): Add s390-gs-linux64 and
6872         s390x-gs-linux64.
6873         (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
6874         (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
6875         * features/s390-gs-linux64.c: New generated file.
6876         * features/s390x-gs-linux64.c: New file.
6877         * regformats/s390-gs-linux64.dat: New file.
6878         * regformats/s390x-gs-linux64.dat: New file.
6879
6880 2017-09-23  Tom Tromey  <tom@tromey.com>
6881
6882         * defs.h (make_cleanup_override_quit_handler): Don't declare.
6883
6884 2017-09-22  Tom Tromey  <tom@tromey.com>
6885
6886         * utils.c (class scoped_input_handler) <m_quit_handler>: Change
6887         type to scoped_restore_tmpl.
6888         <scoped_input_handler>: Initialize m_quit_handler directly.
6889
6890 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
6891
6892         * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
6893         (cd_command): Likewise.  Free "current_directory" before
6894         assigning to it.
6895         * main.c (captured_main_1): Use "getcwd (NULL, 0)".
6896         * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
6897         * top.c (gdb_dirbuf): Remove global declaration.
6898         * top.h (gdb_dirbuf): Likewise.
6899
6900 2017-09-22  Sergio Durigan Junior  <sergiodj@redhat.com>
6901
6902         * gnulib/aclocal.m4: Regenerate.
6903         * gnulib/config.in: Regenerate.
6904         * gnulib/configure: Regenerate.
6905         * gnulib/import/Makefile.am: Regenerate.
6906         * gnulib/import/Makefile.in: Regenerate.
6907         * gnulib/import/assure.h: New file.
6908         * gnulib/import/at-func.c: Likewise
6909         * gnulib/import/chdir-long.c: New file.
6910         * gnulib/import/chdir-long.h: New file.
6911         * gnulib/import/cloexec.c: New file.
6912         * gnulib/import/cloexec.h: New file.
6913         * gnulib/import/close.c: New file.
6914         * gnulib/import/closedir.c: New file.
6915         * gnulib/import/dirent-private.h: New file.
6916         * gnulib/import/dup-safer.c: New file.
6917         * gnulib/import/dup.c: New file.
6918         * gnulib/import/dup2.c: New file.
6919         * gnulib/import/error.c: New file.
6920         * gnulib/import/error.h: New file.
6921         * gnulib/import/exitfail.c: New file.
6922         * gnulib/import/exitfail.h: New file.
6923         * gnulib/import/fchdir.c: New file.
6924         * gnulib/import/fcntl.c: New file.
6925         * gnulib/import/fcntl.in.h: New file.
6926         * gnulib/import/fd-hook.c: New file.
6927         * gnulib/import/fd-hook.h: New file.
6928         * gnulib/import/fd-safer.c: New file.
6929         * gnulib/import/fdopendir.c: New file.
6930         * gnulib/import/filename.h: New file.
6931         * gnulib/import/filenamecat-lgpl.c: New file.
6932         * gnulib/import/filenamecat.h: New file.
6933         * gnulib/import/fstat.c: New file.
6934         * gnulib/import/fstatat.c: New file.
6935         * gnulib/import/getcwd-lgpl.c: New file.
6936         * gnulib/import/getcwd.c: New file.
6937         * gnulib/import/getdtablesize.c: New file.
6938         * gnulib/import/getlogin_r.c: New file.
6939         * gnulib/import/getprogname.c: New file.
6940         * gnulib/import/getprogname.h: New file.
6941         * gnulib/import/gettext.h: New file.
6942         * gnulib/import/glob-libc.h: New file.
6943         * gnulib/import/glob.c: New file.
6944         * gnulib/import/glob.in.h: New file.
6945         * gnulib/import/intprops.h: New file.
6946         * gnulib/import/m4/chdir-long.m4: New file.
6947         * gnulib/import/m4/close.m4: New file.
6948         * gnulib/import/m4/closedir.m4: New file.
6949         * gnulib/import/m4/d-ino.m4: New file.
6950         * gnulib/import/m4/d-type.m4: New file.
6951         * gnulib/import/m4/dup.m4: New file.
6952         * gnulib/import/m4/dup2.m4: New file.
6953         * gnulib/import/m4/error.m4: New file.
6954         * gnulib/import/m4/fchdir.m4: New file.
6955         * gnulib/import/m4/fcntl.m4: New file.
6956         * gnulib/import/m4/fcntl_h.m4: New file.
6957         * gnulib/import/m4/fdopendir.m4: New file.
6958         * gnulib/import/m4/filenamecat.m4: New file.
6959         * gnulib/import/m4/fstat.m4: New file.
6960         * gnulib/import/m4/fstatat.m4: New file.
6961         * gnulib/import/m4/getcwd-abort-bug.m4: New file.
6962         * gnulib/import/m4/getcwd-path-max.m4: New file.
6963         * gnulib/import/m4/getcwd.m4: New file.
6964         * gnulib/import/m4/getdtablesize.m4: New file.
6965         * gnulib/import/m4/getlogin_r.m4: New file.
6966         * gnulib/import/m4/getprogname.m4: New file.
6967         * gnulib/import/m4/glob.m4: New file.
6968         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
6969         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
6970         * gnulib/import/m4/mempcpy.m4: New file.
6971         * gnulib/import/m4/memrchr.m4: New file.
6972         * gnulib/import/m4/mode_t.m4: New file.
6973         * gnulib/import/m4/msvc-inval.m4: New file.
6974         * gnulib/import/m4/msvc-nothrow.m4: New file.
6975         * gnulib/import/m4/open.m4: New file.
6976         * gnulib/import/m4/openat.m4: New file.
6977         * gnulib/import/m4/opendir.m4: New file.
6978         * gnulib/import/m4/readdir.m4: New file.
6979         * gnulib/import/m4/realloc.m4: New file.
6980         * gnulib/import/m4/rewinddir.m4: New file.
6981         * gnulib/import/m4/save-cwd.m4: New file.
6982         * gnulib/import/m4/strdup.m4: New file.
6983         * gnulib/import/m4/strerror.m4: New file.
6984         * gnulib/import/m4/unistd-safer.m4: New file.
6985         * gnulib/import/mempcpy.c: New file.
6986         * gnulib/import/memrchr.c: New file.
6987         * gnulib/import/msvc-inval.c: New file.
6988         * gnulib/import/msvc-inval.h: New file.
6989         * gnulib/import/msvc-nothrow.c: New file.
6990         * gnulib/import/msvc-nothrow.h: New file.
6991         * gnulib/import/open.c: New file.
6992         * gnulib/import/openat-die.c: New file.
6993         * gnulib/import/openat-priv.h: New file.
6994         * gnulib/import/openat-proc.c: New file.
6995         * gnulib/import/openat.c: New file.
6996         * gnulib/import/openat.h: New file.
6997         * gnulib/import/opendir.c: New file.
6998         * gnulib/import/pipe-safer.c: New file.
6999         * gnulib/import/readdir.c: New file.
7000         * gnulib/import/realloc.c: New file.
7001         * gnulib/import/rewinddir.c: New file.
7002         * gnulib/import/save-cwd.c: New file.
7003         * gnulib/import/save-cwd.h: New file.
7004         * gnulib/import/strdup.c: New file.
7005         * gnulib/import/strerror-override.c: New file.
7006         * gnulib/import/strerror-override.h: New file.
7007         * gnulib/import/strerror.c: New file.
7008         * gnulib/import/unistd--.h: New file.
7009         * gnulib/import/unistd-safer.h: New file.
7010         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
7011         "getcwd" and "glob".
7012         * ser-tcp.c: Undefine "close" before redefining it.
7013
7014 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
7015
7016         * guile/scm-value.c (gdbscm_value_address): Initialize address,
7017         get rid of res_val.
7018
7019 2017-09-22  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
7020
7021         * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
7022         <sol2,sparc>: Likewise.
7023         <sol2-64,i386>: Likewise.
7024
7025         * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
7026         -Wdeprecated-declarations on *-*-solaris*.
7027         * configure: Regenerate.
7028
7029         * procfs.c: Include "nat/inferior.h".
7030         (procfs_info_proc): Fix typo.
7031
7032 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
7033
7034         * remote.c (vector): Include.
7035         (struct private_thread_info): Add field, thread_handle.
7036         (free_private_thread_info): Deallocate storage associated with
7037         thread handle.
7038         (get_private_info_thread): Initialize `thread_handle' field.
7039         (struct thread_item): Add field, thread_handle.
7040         (clear_threads_listing_context): Deallocate storage associated
7041         with thread handle.
7042         (start_thread): Add support for "handle" attribute.
7043         (thread_attributes): Add "handle".
7044         (remote_get_threads_with_qthreadinfo): Initialize thread_handle
7045         field.
7046         (remote_update_thread_list): Update thread_handle.
7047         (remote_thread_handle_to_thread_info): New function.
7048         (init_remote_ops): Initialize to_thread_handle_to_thread_info.
7049
7050 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
7051
7052         * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
7053         function.
7054         (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
7055         * python/python-internal.h (thread_object_type): Declare.
7056
7057 2017-09-21  Kevin Buettner  <kevinb@redhat.com>
7058
7059         * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
7060         (target_thread_handle_to_thread_info): Declare.
7061         * target.c (target_thread_handle_to_thread_info): New function.
7062         * target-delegates.c: Regenerate.
7063         * gdbthread.h (find_thread_by_handle): Declare.
7064         * thread.c (find_thread_by_handle): New function.
7065         * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
7066         function.
7067         (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
7068
7069 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
7070
7071         * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
7072
7073 2017-09-21  Simon Marchi  <simon.marchi@ericsson.com>
7074
7075         * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
7076
7077 2017-09-21  Yao Qi  <yao.qi@linaro.org>
7078
7079         * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
7080         to gdb_target_obs.
7081
7082 2017-09-20  Tom Tromey  <tom@tromey.com>
7083
7084         * breakpoint.c (struct counted_command_line): Remove.
7085         (breakpoint_commands): Update.
7086         (alloc_counted_command_line, incref_counted_command_line)
7087         (decref_counted_command_line, do_cleanup_counted_command_line)
7088         (make_cleanup_decref_counted_command_line): Remove.
7089         (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
7090         (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
7091         (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
7092         (save_breakpoints): Update.
7093         * breakpoint.h (counted_command_line): Now a typedef to
7094         shared_ptr.
7095         (struct breakpoint) <commands>: Now a counted_command_line.
7096         (struct bpstats) <command>: Likewise.
7097
7098 2017-09-20  Tom Tromey  <tom@tromey.com>
7099
7100         * breakpoint.c (struct commands_info, do_map_commands_command):
7101         Remove.
7102         (commands_command_1): Update.
7103         (iterate_over_related_breakpoints): Take a function_view.
7104         (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
7105         (delete_command): Update.
7106         (map_breakpoint_numbers): Take a function_view.
7107         (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
7108         (disable_command): Update.
7109         (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
7110         (enable_command): Update.
7111         (struct disp_data, do_enable_breakpoint_disp)
7112         (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
7113         (do_map_enable_delete_breakpoint): Remove.
7114         (enable_once_command, enable_count_command, enable_delete_command)
7115         (delete_trace_variable_command): Update.
7116
7117 2017-09-20  Tom Tromey  <tom@tromey.com>
7118
7119         * breakpoint.c (~bpstats): Rename from bpstat_free.  Update.
7120         (bpstat_clear): Use delete.
7121         (bpstats): New constructors.
7122         (bpstat_copy, bpstat_stop_status): Use new.
7123         (dprintf_after_condition_true): Update.
7124         * breakpoint.h (bpstats::bpstats): Add constructors.
7125         (bpstats::~bpstats): Add destructor.
7126
7127 2017-09-20  Pedro Alves  <palves@redhat.com>
7128
7129         * eval.c (make_params): Delete, refactored as ...
7130         (class fake_method): ... this new type's ctor.
7131         (fake_method::~fake_method): New.
7132         (evaluate_subexp_standard): Use 'fake_method'.
7133
7134 2017-09-20  Tom Tromey  <tom@tromey.com>
7135
7136         * windows-nat.c (get_windows_debug_event, windows_wait)
7137         (do_initial_windows_stuff, windows_attach): Update.
7138         * utils.c (vwarning, internal_vproblem): Update.
7139         (ui_unregister_input_event_handler_cleanup)
7140         (prepare_to_handle_input): Remove.
7141         (class scoped_input_handler): New.
7142         (defaulted_query, prompt_for_continue): Update.
7143         * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
7144         Update.
7145         * top.c (undo_terminal_modifications_before_exit): Update.
7146         * target/target.h (target_terminal_init, target_terminal_inferior)
7147         (target_terminal_ours): Don't declare.
7148         (class target_terminal): New.
7149         * target.h (target_terminal_is_inferior, target_terminal_is_ours)
7150         (target_terminal_ours_for_output)
7151         (make_cleanup_restore_target_terminal): Don't declare.
7152         (target_terminal_info): Remove.
7153         * target.c (enum terminal_state, terminal_state): Remove.
7154         (target_terminal::terminal_state): Define.
7155         (target_terminal::init): Rename from target_terminal_init.
7156         (target_terminal::inferior): Rename from
7157         target_terminal_inferior.
7158         (target_terminal::ours): Rename from target_terminal_ours.
7159         (target_terminal::ours_for_output): Rename from
7160         target_terminal_ours_for_output.
7161         (target_terminal::info): New method.
7162         (cleanup_restore_target_terminal)
7163         (make_cleanup_restore_target_terminal): Remove.
7164         * solib.c (handle_solib_event): Update.
7165         * remote.c (remote_serial_quit_handler): Update.
7166         (remote_terminal_inferior, remote_wait_as): Update.
7167         * record-full.c (record_full_wait_1): Update.
7168         * nto-procfs.c (procfs_create_inferior): Update.
7169         * nat/fork-inferior.c (startup_inferior): Update.
7170         * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
7171         (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
7172         (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
7173         (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
7174         (mi_breakpoint_created, mi_breakpoint_deleted)
7175         (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
7176         (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
7177         (mi_user_selected_context_changed, report_initial_inferior):
7178         Update.
7179         * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
7180         (linux_nat_terminal_inferior): Update.
7181         * infrun.c (follow_fork_inferior)
7182         (handle_vfork_child_exec_or_exit, do_target_resume)
7183         (check_curr_ui_sync_execution_done, handle_inferior_event_1)
7184         (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
7185         Update.
7186         * inflow.c (child_terminal_init, info_terminal_command): Update.
7187         * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
7188         (attach_command): Update.
7189         * infcall.c (call_thread_fsm_should_stop): Update.
7190         * gnu-nat.c (gnu_attach): Update.
7191         * extension.c (struct active_ext_lang_state)
7192         (restore_active_ext_lang): Update.
7193         * exceptions.c (print_flush): Update.
7194         * event-top.c (async_enable_stdin, default_quit_handler): Update.
7195         (struct quit_handler_cleanup_data, restore_quit_handler)
7196         (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
7197         Remove.
7198         * cp-support.c (gdb_demangle): Update.
7199         * breakpoint.c (update_inserted_breakpoint_locations)
7200         (insert_breakpoint_locations, handle_jit_event)
7201         (disable_breakpoints_in_unloaded_shlib): Update.
7202         * annotate.c (annotate_breakpoints_invalid)
7203         (annotate_frames_invalid): Update.
7204
7205 2017-09-20  Tom Tromey  <tom@tromey.com>
7206
7207         * main.c (catch_command_errors): Rename from
7208         catch_command_errors_const.
7209         (captured_main_1): Update.
7210
7211 2017-09-20  Pedro Alves  <palves@redhat.com>
7212
7213         * cli/cli-cmds.c (list_command): Use print_sal_location.
7214         (print_sal_location): New function.
7215         (ambiguous_line_spec): Use print_sal_location.
7216         * linespec.c (symbol_to_sal): Record the symbol in the sal.
7217         * symtab.c (find_function_start_sal): Likewise.
7218         * symtab.h (symtab_and_line::symbol): New field.
7219
7220 2017-09-20  Pedro Alves  <palves@redhat.com>
7221
7222         * linespec.c (minsym_found): Handle non-text minsyms.
7223         (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
7224
7225 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
7226
7227         * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
7228         backslash.
7229
7230 2017-09-20  Walfred Tedeschi  <walfred.tedeschi@intel.com>
7231
7232         * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
7233         vmovups instead vmovaps.
7234         (move_zmm_data_to_memory): Use vmovups instead vmovaps.
7235
7236 2017-09-19  John Baldwin  <jhb@FreeBSD.org>
7237
7238         * NEWS (Changes since GDB 8.0): Add starti.
7239         * infcmd.c (enum run_break): New.
7240         (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
7241         case.
7242         (run_command): Use enum run_how.
7243         (start_command): Likewise.
7244         (starti_command): New function.
7245         (RUN_ARGS_HELP): New macro.
7246         (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
7247         commands.  Add starti command.
7248
7249 2017-09-19  Yao Qi  <yao.qi@linaro.org>
7250
7251         * Makefile.in (monitor.o): Remove the rule.
7252
7253 2017-09-19  Yao Qi  <yao.qi@linaro.org>
7254
7255         * annotate.h (struct annotate_arg_emitter): Use
7256         DISABLE_COPY_AND_ASSIGN.
7257         * common/refcounted-object.h (refcounted_object): Likewise.
7258         * completer.h (struct completion_result): Likewise.
7259         * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
7260         * filename-seen-cache.h (filename_seen_cache): Likewise.
7261         * gdbcore.h (thread_section_name): Likewise.
7262         * gdb_regex.h (compiled_regex): Likewise.
7263         * gdbthread.h (scoped_restore_current_thread): Likewise.
7264         * inferior.h (scoped_restore_current_inferior): Likewise.
7265         * jit.c (jit_reader): Likewise.
7266         * linespec.h (struct linespec_result): Likewise.
7267         * mi/mi-parse.h (struct mi_parse): Likewise.
7268         * nat/fork-inferior.c (execv_argv): Likewise.
7269         * progspace.h (scoped_restore_current_program_space): Likewise.
7270         * python/python-internal.h (class gdbpy_enter): Likewise.
7271         * regcache.h (regcache): Likewise.
7272         * target-descriptions.c (struct tdesc_reg): Likewise.
7273         (struct tdesc_type): Likewise.
7274         (struct tdesc_feature): Likewise.
7275         * ui-out.h (ui_out_emit_type): Likewise.
7276
7277 2017-09-18  Simon Marchi  <simon.marchi@ericsson.com>
7278
7279         * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
7280         label abort_expression.
7281
7282 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
7283
7284         * common/buffer.c (buffer_xml_printf): Adjust.
7285         * common/xml-utils.c (xml_escape_text): Change return type to
7286         std::string, update code accordingly.
7287         * common/xml-utils.h (xml_escape_text): Change return type to
7288         std::string.
7289         * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
7290         * windows-tdep.c (windows_xfer_shared_library): Adjust.
7291         * unittests/xml-utils-selftests.c (test_xml_escape_text):
7292         Adjust.
7293
7294 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
7295
7296         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
7297         (SUBDIR_UNITTESTS_OBS): Add new object file.
7298         * unittests/xml-utils-selftests.c: New file.
7299
7300 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
7301
7302         * common/selftest.h (selftest): New struct/interface.
7303         (register_test): Add name parameter, add new overload.
7304         (run_tests): Add filter parameter.
7305         (for_each_selftest_ftype): New typedef.
7306         (for_each_selftest): New declaration.
7307         * common/selftest.c (tests): Change type to
7308         map<string, unique_ptr<selftest>>.
7309         (simple_selftest): New struct.
7310         (register_test): New function.
7311         (register_test): Add name parameter and use it.
7312         (run_tests): Add filter parameter and use it.  Add prints.
7313         Adjust to vector -> map change.
7314         * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
7315         registering selftests.
7316         * arm-tdep.c (_initialize_arm_tdep): Likewise.
7317         * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
7318         * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
7319         * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
7320         * findvar.c (_initialize_findvar): Likewise.
7321         * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
7322         * maint.c (maintenance_selftest): Update call to run_tests.
7323         (maintenance_info_selftests): New function.
7324         (_initialize_maint_cmds): Register "maintenance info selftests"
7325         command.  Update "maintenance selftest" doc.
7326         * regcache.c (_initialize_regcache): Add names when registering
7327         selftests.
7328         * rust-exp.y (_initialize_rust_exp): Likewise.
7329         * selftest-arch.c (gdbarch_selftest): New struct.
7330         (gdbarch_tests): Remove.
7331         (register_test_foreach_arch): Add name parameter.  Call
7332         register_test.
7333         (tests_with_arch): Remove, move most content to
7334         gdbarch_selftest::operator().
7335         (_initialize_selftests_foreach_arch): Remove.
7336         * selftest-arch.h (register_test_foreach_arch): Add name
7337         parameter.
7338         (run_tests_with_arch): New declaration.
7339         * utils-selftests.c (_initialize_utils_selftests): Add names
7340         when registering selftests.
7341         * utils.c (_initialize_utils): Likewise.
7342         * unittests/array-view-selftests.c
7343         (_initialize_array_view_selftests): Likewise.
7344         * unittests/environ-selftests.c (_initialize_environ_selftests):
7345         Likewise.
7346         * unittests/function-view-selftests.c
7347         (_initialize_function_view_selftests): Likewise.
7348         * unittests/offset-type-selftests.c
7349         (_initialize_offset_type_selftests): Likewise.
7350         * unittests/optional-selftests.c
7351         (_initialize_optional_selftests): Likewise.
7352         * unittests/scoped_restore-selftests.c
7353         (_initialize_scoped_restore_selftests): Likewise.
7354         * NEWS: Document "maintenance selftest" and "maint info
7355         selftests".
7356
7357 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
7358
7359         * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
7360         scoped_restore.
7361
7362 2017-09-16  Simon Marchi  <simon.marchi@ericsson.com>
7363
7364         * mi/mi-main.c (mi_load_progress): Make uiout variable
7365         a unique_ptr.
7366
7367 2017-09-15  Pedro Alves  <palves@redhat.com>
7368
7369         * compile/compile-c-types.c (convert_enum, convert_int)
7370         (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
7371
7372 2017-09-15  Simon Marchi  <simon.marchi@ericsson.com>
7373
7374         * dwarf2read.c (copy_string): Remove.
7375         (parse_macro_definition): Replace copy_string with savestring.
7376
7377 2017-09-15  Yao Qi  <yao.qi@linaro.org>
7378
7379         * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
7380         gdb_target_obs.
7381         (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
7382         Likewise.
7383         (i[34567]86-*-linux*): Likewise.
7384
7385 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
7386
7387         * dwarf2expr.h (dwarf_stack_value): Add constructor.
7388         (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
7389         <stack>: Change type to std::vector.
7390         <stack_len, stack_allocated>: Remove.
7391         <grow_stack>: Remove.
7392         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
7393         (dwarf_expr_context::~dwarf_expr_context): Remove.
7394         (dwarf_expr_context::grow_stack): Remove.
7395         (dwarf_expr_context::push): Adjust.
7396         (dwarf_expr_context::pop): Adjust.
7397         (dwarf_expr_context::fetch): Adjust.
7398         (dwarf_expr_context::fetch_in_stack_memory): Adjust.
7399         (dwarf_expr_context::stack_empty_p): Adjust.
7400         (dwarf_expr_context::execute_stack_op): Adjust.
7401
7402 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
7403
7404         * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
7405         return type to bool.
7406         * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
7407
7408 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
7409
7410         * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
7411         Change type to bool.
7412         (dwarf_stack_value) <in_stack_memory>: Likewise.
7413         (dwarf_expr_context) <push_address>: Change parameter type to
7414         bool.
7415         <fetch_in_stack_memory>: Change return type to bool.
7416         <push>: Change parameter type to bool.
7417         * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
7418         to bool.
7419         (dwarf_expr_context::push_address): Likewise.
7420         (dwarf_expr_context::fetch_in_stack_memory): Change return type
7421         to bool.
7422         (dwarf_expr_context::execute_stack_op): Adjust.
7423         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
7424
7425 2017-09-14  Simon Marchi  <simon.marchi@ericsson.com>
7426
7427         * dwarf2expr.h (struct dwarf_expr_piece): Move up.
7428         (struct dwarf_expr_context) <n_pieces>: Remove.
7429         <pieces>: Change type to std::vector.
7430         * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
7431         (dwarf_expr_context::~dwarf_expr_context): Don't manually free
7432         pieces.
7433         (dwarf_expr_context::add_piece): Adjust.
7434         * dwarf2loc.c (struct piece_closure): Initialize fields.
7435         <n_pieces>: Remove.
7436         <pieces>: Change type to std::vector.
7437         (allocate_piece_closure): Adjust, change parameter to
7438         std::vector rvalue and std::move it to piece_closure.
7439         (rw_pieced_value): Adjust.
7440         (check_pieced_synthetic_pointer): Adjust.
7441         (indirect_synthetic_pointer): Adjust.
7442         (coerce_pieced_ref): Adjust.
7443         (free_pieced_value_closure):  Adjust.  Use delete to free
7444         piece_closure.
7445         (dwarf2_evaluate_loc_desc_full): Adjust.  std::move ctx.pieces
7446         to allocate_piece_closure.
7447         (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
7448
7449 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
7450
7451         * probe.h (probe_ops_cp): Remove typedef.
7452         (DEF_VEC_P (probe_ops_cp)): Remove.
7453         (all_probe_ops): Change type to std::vector.
7454         * probe.c (info_probes_for_ops): Adjust to vector change.
7455         (probe_linespec_to_ops): Likewise.
7456         (all_probe_ops): Change type to std::vector.
7457         (_initialize_probe): Adjust to vector change.
7458         * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
7459         * elfread.c (elf_get_probes): Likewise.
7460         * stap-probe.c (_initialize_stap_probe): Likewise.
7461
7462 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
7463
7464         * probe.h (struct bound_probe): Define constructors.
7465         * probe.c (bound_probe_s): Remove typedef.
7466         (DEF_VEC_O (bound_probe_s)): Remove VEC.
7467         (collect_probes): Change return type to std::vector, remove
7468         cleanup.
7469         (compare_probes): Return bool, change parameter type.  Change
7470         semantic to "less than".
7471         (gen_ui_out_table_header_info): Change parameter to std::vector
7472         and update.
7473         (exists_probe_with_pops): Likewise.
7474         (info_probes_for_ops): Update to std::vector change.
7475         (enable_probes_command): Likewise.
7476         (disable_probes_command): Likewise.
7477
7478 2017-09-12  Simon Marchi  <simon.marchi@ericsson.com>
7479
7480         * probe.h (struct probe_ops) <get_probes>: Change parameter from
7481         vec to std::vector.
7482         * probe.c (parse_probes_in_pspace): Update.
7483         (find_probes_in_objfile): Update.
7484         (find_probe_by_pc): Update.
7485         (collect_probes): Update.
7486         (probe_any_get_probes): Update.
7487         * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
7488         return type to reference to std::vector.
7489         * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
7490         std::vector and update.
7491         (dtrace_process_dof): Likewise.
7492         (dtrace_get_probes): Likewise.
7493         * elfread.c (elf_get_probes): Change return type to std::vector,
7494         store an std::vector in bfd_data.
7495         (probe_key_free): Update to std::vector.
7496         * stap-probe.c (handle_stap_probe): Change parameter to
7497         std::vector and update.
7498         (stap_get_probes): Likewise.
7499         * symfile-debug.c (debug_sym_get_probes): Change return type to
7500         std::vector and update.
7501
7502 2017-09-11  Tom Tromey  <tom@tromey.com>
7503
7504         * breakpoint.c (program_breakpoint_here_p): Update.
7505         * target.c (make_scoped_restore_show_memory_breakpoints): Rename
7506         from make_show_memory_breakpoints_cleanup.  Return a
7507         scoped_restore_tmpl<int>.
7508         (restore_show_memory_breakpoints): Remove.
7509         * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
7510         * mem-break.c (memory_validate_breakpoint): Update.
7511         * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
7512         (ia64_memory_remove_breakpoint): Update.
7513         (ia64_breakpoint_from_pc): Update.
7514         * target.h (make_scoped_restore_show_memory_breakpoints): Rename
7515         from make_show_memory_breakpoints_cleanup.
7516
7517 2017-09-11  Tom Tromey  <tom@tromey.com>
7518
7519         * d-namespace.c (d_lookup_symbol): Use std::string.
7520         (find_symbol_in_baseclass): Likewise.
7521
7522 2017-09-11  Tom Tromey  <tom@tromey.com>
7523
7524         * ctf.c (ctf_start): Use std::string.
7525
7526 2017-09-11  Tom Tromey  <tom@tromey.com>
7527
7528         * ada-lang.c (is_known_support_routine): Update.
7529         (ada_unhandled_exception_name_addr_from_raise): Update.
7530         * guile/scm-frame.c (gdbscm_frame_name): Update.
7531         * python/py-frame.c (frapy_name): Update.
7532         (frapy_function): Update.
7533         * stack.h (find_frame_funname): Update.
7534         * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
7535         (print_frame): Update.
7536
7537 2017-09-11  Tom Tromey  <tom@tromey.com>
7538
7539         * findcmd.c (put_bits): Take a gdb::byte_vector.
7540         (parse_find_args): Return gdb::byte_vector.  "args" now const.
7541         Remove "pattern_bufp" and "pattern_lenp" parameters.  Remove
7542         cleanups.
7543         (find_command): Update.
7544
7545 2017-09-11  Tom Tromey  <tom@tromey.com>
7546
7547         * cli/cli-script.c (class scoped_restore_hook_in): New.
7548         (clear_hook_in_cleanup): Remove.
7549         (execute_cmd_pre_hook, execute_cmd_post_hook): Use
7550         scoped_restore_hook_in.
7551
7552 2017-09-11  Tom Tromey  <tom@tromey.com>
7553
7554         * cli/cli-script.c (restore_interp): Remove.
7555         (read_command_lines): Use scoped_restore_interp.
7556         * interps.c (scoped_restore_interp::set_temp): Rename from
7557         interp_set_temp.
7558         * interps.h (class scoped_restore_interp): New.
7559         (interp_set_temp): Remove.
7560
7561 2017-09-11  Tom Tromey  <tom@tromey.com>
7562
7563         * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
7564         (mi_cmd_catch_exception, mi_catch_load_unload): Update.
7565         * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
7566         scoped_restore.
7567         (mi_cmd_break_insert_1): Update.
7568         * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
7569         scoped_restore.
7570
7571 2017-09-11  Tom Tromey  <tom@tromey.com>
7572
7573         * demangle.c (demangle_command): Update.
7574         * breakpoint.c (disable_command): Update.
7575         (enable_command): Update.
7576         (find_location_by_number): Make "number" const.  Use
7577         get_number_trailer.
7578         * cli/cli-utils.c (extract_arg): Return std::string.
7579         * probe.c (parse_probe_linespec): Update.  Change types.
7580         (collect_probes): Take string arguments.
7581         (parse_probe_linespec): Likewise.
7582         (info_probes_for_ops): Update.
7583         (enable_probes_command): Update.
7584         (disable_probes_command): Update.
7585         * break-catch-sig.c (catch_signal_split_args): Update.
7586         * mi/mi-parse.c (mi_parse): Update.
7587
7588 2017-09-11  Tom Tromey  <tom@tromey.com>
7589
7590         * language.h (language_enum): Make argument const.
7591         * language.c (language_enum): Make argument const.
7592
7593 2017-09-11  Tom Tromey  <tom@tromey.com>
7594
7595         * common/common-utils.h (skip_to_space): Remove macro, redeclare
7596         as function.
7597         (skip_to_space): Rename from skip_to_space_const.
7598         * common/common-utils.c (skip_to_space): New function.
7599         (skip_to_space): Rename from skip_to_space_const.
7600         * cli/cli-utils.h (get_number): Rename from get_number_const.
7601         (extract_arg): Rename from extract_arg_const.
7602         * cli/cli-utils.c (get_number): Rename from get_number_const.
7603         (extract_arg): Rename from extract_arg_const.
7604         (number_or_range_parser::get_number): Use ::get_number.
7605         * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
7606         break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
7607         cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
7608         completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
7609         linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
7610         minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
7611         python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
7612         stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
7613
7614 2017-09-11  Tom Tromey  <tom@tromey.com>
7615
7616         * python/python.c (do_start_initialization): Use
7617         py-event-types.def to initialize types.
7618         Define all object type structures.
7619         * python/python-internal.h: Don't declare event initialization
7620         functions.
7621         * python/py-threadevent.c (thread_event_object_type): Don't
7622         define.
7623         * python/py-stopevent.c (stop_event_object_type): Don't define.
7624         * python/py-signalevent.c (signal_event_object_type): Don't
7625         declare or define.
7626         * python/py-newobjfileevent.c (new_objfile_event_object_type)
7627         (clear_objfiles_event_object_type): Don't declare or define.
7628         * python/py-infevents.c (inferior_call_pre_event_object_type)
7629         (inferior_call_post_event_object_type)
7630         (register_changed_event_object_type)
7631         (memory_changed_event_object_type): Don't declare or define.
7632         * python/py-inferior.c (new_thread_event_object_type)
7633         (new_inferior_event_object_type)
7634         (inferior_deleted_event_object_type): Don't declare or define.
7635         * python/py-exitedevent.c (exited_event_object_type): Don't
7636         declare or define.
7637         * python/py-evts.c (gdbpy_initialize_py_events): Use
7638         py-all-events.def.
7639         * python/py-events.h (thread_event_object_type): Don't declare.
7640         (events_object): Use py-all-events.def.
7641         * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove.  Use
7642         py-event-types.def.
7643         * python/py-event-types.def: New file.
7644         * python/py-continueevent.c (create_continue_event_object): Don't
7645         declare or define.
7646         * python/py-bpevent.c (breakpoint_event_object_type): Don't
7647         declare or define.
7648         * python/py-all-events.def: New file.
7649
7650 2017-09-11  Tom Tromey  <tom@tromey.com>
7651
7652         * python/py-threadevent.c (create_thread_event_object): Return
7653         gdbpy_ref.
7654         * python/py-stopevent.h (create_stop_event_object)
7655         (create_breakpoint_event_object, create_signal_event_object):
7656         Update.
7657         * python/py-stopevent.c (create_stop_event_object): Return
7658         gdbpy_ref.
7659         (emit_stop_event): Update.
7660         * python/py-signalevent.c (create_signal_event_object): Return
7661         gdbpy_ref.
7662         * python/py-infevents.c (create_inferior_call_event_object):
7663         Update.
7664         * python/py-event.h (create_event_object)
7665         (create_thread_event_object): Update.
7666         * python/py-event.c (create_event_object): Return gdbpy_ref.
7667         * python/py-continueevent.c: Return gdbpy_ref.
7668         * python/py-bpevent.c (create_breakpoint_event_object): Return
7669         gdbpy_ref.
7670
7671 2017-09-11  Tom Tromey  <tom@tromey.com>
7672
7673         PR python/15622:
7674         * NEWS: Add entry.
7675         * python/python.c (do_start_initialization): Initialize new event
7676         types.
7677         * python/python-internal.h (gdbpy_initialize_new_inferior_event)
7678         (gdbpy_initialize_inferior_deleted_event)
7679         (gdbpy_initialize_new_thread_event): Declare.
7680         * python/py-threadevent.c (create_thread_event_object): Add option
7681         "thread" parameter.
7682         * python/py-inferior.c (new_thread_event_object_type)
7683         (new_inferior_event_object_type)
7684         (inferior_deleted_event_object_type): Declare.
7685         (python_new_inferior, python_inferior_deleted): New functions.
7686         (add_thread_object): Emit new_thread event.
7687         (gdbpy_initialize_inferior): Attach new functions to corresponding
7688         observers.
7689         (new_thread, new_inferior, inferior_deleted): Define new event
7690         types.
7691         * python/py-evts.c (gdbpy_initialize_py_events): Add new
7692         registries.
7693         * python/py-events.h (events_object) <new_inferior,
7694         inferior_deleted, new_thread>: New fields.
7695         * python/py-event.h (create_thread_event_breakpoint): Add optional
7696         "thread" parameter.
7697
7698 2017-09-10  Andrew Burgess  <andrew.burgess@embecosm.com>
7699
7700         * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
7701         check current_ui instead.
7702         (internal_vproblem): Likewise.
7703
7704 2017-09-09  Simon Marchi  <simon.marchi@ericsson.com>
7705
7706         * thread.c (print_thread_info_1): Remove unnecessary calls to
7707         uiout->is_mi_like_p.
7708
7709 2017-09-09  Tom Tromey  <tom@tromey.com>
7710
7711         * namespace.h (add_using_directive): Update.
7712         * namespace.c (add_using_directive): Change type of excludes to
7713         std::vector.
7714         * dwarf2read.c (read_import_statement): Use std::vector.
7715         (read_namespace): Update.
7716         * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
7717
7718 2017-09-09  Tom Tromey  <tom@tromey.com>
7719
7720         * linespec.c (create_sals_line_offset): Use gdb::def_vector.
7721
7722 2017-09-09  Tom Tromey  <tom@tromey.com>
7723
7724         * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
7725
7726 2017-09-09  Tom Tromey  <tom@tromey.com>
7727
7728         * stack.c (func_command): Use gdb::def_vector.
7729
7730 2017-09-09  Tom Tromey  <tom@tromey.com>
7731
7732         * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
7733         ui_out_emit_list, ui_out_emit_tuple.
7734         (mi_cmd_var_update): Likewise.
7735
7736 2017-09-09  Tom Tromey  <tom@tromey.com>
7737
7738         * mi/mi-interp.c (mi_user_selected_context_changed): Use
7739         ui_out_redirect_pop.
7740         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
7741         ui_out_redirect_pop.
7742         * utils.c (do_ui_out_redirect_pop)
7743         (make_cleanup_ui_out_redirect_pop): Remove.
7744         * top.c (execute_command_to_string): Use ui_out_redirect_pop.
7745         * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
7746         * ui-out.h (ui_out_redirect_pop): New class.
7747
7748 2017-09-09  Tom Tromey  <tom@tromey.com>
7749
7750         * mi/mi-main.c (output_cores): Use ui_out_emit_list.
7751         (list_available_thread_groups, mi_cmd_list_thread_groups)
7752         (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
7753         (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
7754         Likewise.
7755
7756 2017-09-09  Tom Tromey  <tom@tromey.com>
7757
7758         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
7759         ui_out_emit_tuple.
7760
7761 2017-09-09  Tom Tromey  <tom@tromey.com>
7762
7763         * target.c (flash_erase_command): Use ui_out_emit_tuple.
7764         * stack.c (print_frame): Use ui_out_emit_tuple.
7765         * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
7766         (info_spu_mailbox_command, info_spu_dma_command)
7767         (info_spu_proxydma_command): Likewise.
7768         * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
7769         ui_out_emit_tuple, gdb::byte_vector, bin2hex.
7770         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
7771         ui_out_emit_tuple.
7772         * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
7773
7774 2017-09-09  Tom Tromey  <tom@tromey.com>
7775
7776         * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
7777         (class ui_out_emit_table): Update comment.
7778         * ui-out.c (do_cleanup_table_end)
7779         (make_cleanup_ui_out_table_begin_end): Remove.
7780         * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
7781         (info_spu_dma_cmdlist): Likewise.
7782         * probe.c (info_probes_for_ops): Use ui_out_emit_table.
7783         * darwin-nat-info.c (darwin_debug_regions_recurse): Use
7784         ui_out_emit_table.
7785
7786 2017-09-09  Tom Tromey  <tom@tromey.com>
7787
7788         * thread.c (print_thread_info_1): Use ui_out_emit_table,
7789         ui_out_emit_list, gdb::optional.
7790
7791 2017-09-09  John Baldwin  <jhb@FreeBSD.org>
7792
7793         * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
7794         prototype.
7795         * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
7796         prototype.
7797         * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
7798         prototype.
7799         * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
7800         * ada-exp.y: Remove _initialize_ada_exp prototype.
7801         * ada-lang.c: Remove _initialize_ada_language prototype.
7802         * ada-tasks.c: Remove _initialize_tasks prototype.
7803         * addrmap.c: Remove _initialize_addrmap prototype.
7804         * agent.c: Remove _initialize_agent prototype.
7805         * aix-thread.c: Remove _initialize_aix_thread prototype.
7806         * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
7807         * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
7808         * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
7809         prototype.
7810         * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
7811         * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
7812         * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
7813         * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
7814         prototype.
7815         * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
7816         prototype.
7817         * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
7818         * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
7819         * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
7820         * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
7821         prototype.
7822         * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
7823         * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
7824         * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
7825         * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
7826         * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
7827         * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
7828         * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
7829         prototype.
7830         * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
7831         prototype.
7832         * annotate.c: Remove _initialize_annotate prototype.
7833         * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
7834         * arc-tdep.c: Remove _initialize_arc_tdep prototype.
7835         * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
7836         * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
7837         * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
7838         * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
7839         * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
7840         * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
7841         prototype.
7842         * arm-tdep.c: Remove _initialize_arm_tdep prototype.
7843         * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
7844         * auto-load.c: Remove _initialize_auto_load prototype.
7845         * auxv.c: Remove _initialize_auxv prototype.
7846         * avr-tdep.c: Remove _initialize_avr_tdep prototype.
7847         * ax-gdb.c: Remove _initialize_ax_gdb prototype.
7848         * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
7849         * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
7850         * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
7851         * break-catch-syscall.c: Remove _initialize_break_catch_syscall
7852         prototype.
7853         * break-catch-throw.c: Remove _initialize_break_catch_throw
7854         prototype.
7855         * breakpoint.c: Remove _initialize_breakpoint prototype.
7856         * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
7857         * btrace.c: Remove _initialize_btrace prototype.
7858         * charset.c: Remove _initialize_charset prototype.
7859         * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
7860         * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
7861         * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
7862         * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
7863         * cli/cli-script.c: Remove _initialize_cli_script prototype.
7864         * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
7865         * coffread.c: Remove _initialize_coffread prototype.
7866         * compile/compile.c: Remove _initialize_compile prototype.
7867         * complaints.c: Remove _initialize_complaints prototype.
7868         * completer.c: Remove _initialize_completer prototype.
7869         * copying.awk: Remove _initialize_copying prototype.
7870         * copying.c: Regenerate.
7871         * core-regset.c: Remove _initialize_core_regset prototype.
7872         * corefile.c: Remove _initialize_core prototype.
7873         * corelow.c: Remove _initialize_corelow prototype.
7874         * cp-abi.c: Remove _initialize_cp_abi prototype.
7875         * cp-namespace.c: Remove _initialize_cp_namespace prototype.
7876         * cp-support.c: Remove _initialize_cp_support prototype.
7877         * cp-valprint.c: Remove _initialize_cp_valprint prototype.
7878         * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
7879         * cris-tdep.c: Remove _initialize_cris_tdep prototype.
7880         * ctf.c: Remove _initialize_ctf prototype.
7881         * d-lang.c: Remove _initialize_d_language prototype.
7882         * darwin-nat-info.c: Remove _initialize_darwin_info_commands
7883         prototype.
7884         * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
7885         * dbxread.c: Remove _initialize_dbxread prototype.
7886         * dcache.c: Remove _initialize_dcache prototype.
7887         * demangle.c: Remove _initialize_demangler prototype.
7888         * disasm-selftests.c: Remove _initialize_disasm_selftests
7889         prototype.
7890         * disasm.c: Remove _initialize_disasm prototype.
7891         * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
7892         * dummy-frame.c: Remove _initialize_dummy_frame prototype.
7893         * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
7894         prototype.
7895         * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
7896         * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
7897         * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
7898         * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
7899         * elfread.c: Remove _initialize_elfread prototype.
7900         * exec.c: Remove _initialize_exec prototype.
7901         * extension.c: Remove _initialize_extension prototype.
7902         * f-lang.c: Remove _initialize_f_language prototype.
7903         * f-valprint.c: Remove _initialize_f_valprint prototype.
7904         * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
7905         * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
7906         * filesystem.c: Remove _initialize_filesystem prototype.
7907         * findcmd.c: Remove _initialize_mem_search prototype.
7908         * fork-child.c: Remove _initialize_fork_child prototype.
7909         * frame-base.c: Remove _initialize_frame_base prototype.
7910         * frame-unwind.c: Remove _initialize_frame_unwind prototype.
7911         * frame.c: Remove _initialize_frame prototype.
7912         * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
7913         * frv-tdep.c: Remove _initialize_frv_tdep prototype.
7914         * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
7915         * gcore.c: Remove _initialize_gcore prototype.
7916         * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
7917         * gdbarch.c: Regenerate.
7918         * gdbarch.sh: Remove _initialize_gdbarch prototype.
7919         * gdbtypes.c: Remove _initialize_gdbtypes prototype.
7920         * gnu-nat.c: Remove _initialize_gnu_nat prototype.
7921         * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
7922         * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
7923         * go-lang.c: Remove _initialize_go_language prototype.
7924         * go32-nat.c: Remove _initialize_go32_nat prototype.
7925         * guile/guile.c: Remove _initialize_guile prototype.
7926         * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
7927         * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
7928         * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
7929         * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
7930         * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
7931         * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
7932         * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
7933         * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
7934         * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
7935         * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
7936         prototype.
7937         * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
7938         prototype.
7939         * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
7940         * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
7941         * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
7942         * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
7943         * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
7944         * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
7945         * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
7946         * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
7947         * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
7948         * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
7949         * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
7950         * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
7951         * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
7952         * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
7953         * i386-tdep.c: Remove _initialize_i386_tdep prototype.
7954         * i386-windows-nat.c: Remove _initialize_i386_windows_nat
7955         prototype.
7956         * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
7957         prototype.
7958         * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
7959         * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
7960         * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
7961         * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
7962         * infcall.c: Remove _initialize_infcall prototype.
7963         * infcmd.c: Remove _initialize_infcmd prototype.
7964         * inferior.c: Remove _initialize_inferiors prototype.
7965         * inflow.c: Remove _initialize_inflow prototype.
7966         * infrun.c: Remove _initialize_infrun prototype.
7967         * interps.c: Remove _initialize_interpreter prototype.
7968         * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
7969         * jit.c: Remove _initialize_jit prototype.
7970         * language.c: Remove _initialize_language prototype.
7971         * linux-fork.c: Remove _initialize_linux_fork prototype.
7972         * linux-nat.c: Remove _initialize_linux_nat prototype.
7973         * linux-tdep.c: Remove _initialize_linux_tdep prototype.
7974         * linux-thread-db.c: Remove _initialize_thread_db prototype.
7975         * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
7976         * m2-lang.c: Remove _initialize_m2_language prototype.
7977         * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
7978         * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
7979         * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
7980         * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
7981         * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
7982         * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
7983         * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
7984         * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
7985         * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
7986         * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
7987         * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
7988         * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
7989         * machoread.c: Remove _initialize_machoread prototype.
7990         * macrocmd.c: Remove _initialize_macrocmd prototype.
7991         * macroscope.c: Remove _initialize_macroscope prototype.
7992         * maint.c: Remove _initialize_maint_cmds prototype.
7993         * mdebugread.c: Remove _initialize_mdebugread prototype.
7994         * memattr.c: Remove _initialize_mem prototype.
7995         * mep-tdep.c: Remove _initialize_mep_tdep prototype.
7996         * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
7997         * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
7998         * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
7999         * mi/mi-main.c: Remove _initialize_mi_main prototype.
8000         * microblaze-linux-tdep.c: Remove
8001         _initialize_microblaze_linux_tdep prototype.
8002         * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
8003         * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
8004         * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
8005         * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
8006         * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
8007         * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
8008         * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
8009         * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
8010         * mips-tdep.c: Remove _initialize_mips_tdep prototype.
8011         * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
8012         * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
8013         prototype.
8014         * mipsread.c: Remove _initialize_mipsread prototype.
8015         * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
8016         prototype.
8017         * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
8018         * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
8019         * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
8020         * mt-tdep.c: Remove _initialize_mt_tdep prototype.
8021         * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
8022         * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
8023         prototype.
8024         * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
8025         * nto-procfs.c: Remove _initialize_procfs prototype.
8026         * nto-tdep.c: Remove _initialize_nto_tdep prototype.
8027         * objc-lang.c: Remove _initialize_objc_language prototype.
8028         * objfiles.c: Remove _initialize_objfiles prototype.
8029         * observer.c: Remove observer_test_first_notification_function,
8030         observer_test_second_notification_function,
8031         observer_test_third_notification_function, and
8032         _initialize_observer prototypes.
8033         * opencl-lang.c: Remove _initialize_opencl_language prototypes.
8034         * osabi.c: Remove _initialize_gdb_osabi prototype.
8035         * osdata.c: Remove _initialize_osdata prototype.
8036         * p-valprint.c: Remove _initialize_pascal_valprint prototype.
8037         * parse.c: Remove _initialize_parse prototype.
8038         * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
8039         * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
8040         * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
8041         * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
8042         * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
8043         * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
8044         * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
8045         * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
8046         * printcmd.c: Remove _initialize_printcmd prototype.
8047         * probe.c: Remove _initialize_probe prototype.
8048         * proc-api.c: Remove _initialize_proc_api prototype.
8049         * proc-events.c: Remove _initialize_proc_events prototype.
8050         * proc-service.c: Remove _initialize_proc_service prototype.
8051         * procfs.c: Remove _initialize_procfs prototype.
8052         * psymtab.c: Remove _initialize_psymtab prototype.
8053         * python/python.c: Remove _initialize_python prototype.
8054         * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
8055         * record-btrace.c: Remove _initialize_record_btrace prototype.
8056         * record-full.c: Remove _initialize_record_full prototype.
8057         * record.c: Remove _initialize_record prototype.
8058         * regcache.c: Remove _initialize_regcache prototype.
8059         * reggroups.c: Remove _initialize_reggroup prototype.
8060         * remote-notif.c: Remove _initialize_notif prototype.
8061         * remote-sim.c: Remove _initialize_remote_sim prototype.
8062         * remote.c: Remove _initialize_remote prototype.
8063         * reverse.c: Remove _initialize_reverse prototype.
8064         * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
8065         * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
8066         * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
8067         prototype.
8068         * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
8069         * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
8070         * rust-exp.y: Remove _initialize_rust_exp prototype.
8071         * rx-tdep.c: Remove _initialize_rx_tdep prototype.
8072         * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
8073         * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
8074         * score-tdep.c: Remove _initialize_score_tdep prototype.
8075         * selftest-arch.c: Remove _initialize_selftests_foreach_arch
8076         prototype.
8077         * ser-go32.c: Remove _initialize_ser_dos prototype.
8078         * ser-mingw.c: Remove _initialize_ser_windows prototype.
8079         * ser-pipe.c: Remove _initialize_ser_pipe prototype.
8080         * ser-tcp.c: Remove _initialize_ser_tcp prototype.
8081         * ser-unix.c: Remove _initialize_ser_hardwire prototype.
8082         * serial.c: Remove _initialize_serial prototype.
8083         * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
8084         * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
8085         * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
8086         * sh-tdep.c: Remove _initialize_sh_tdep prototype.
8087         * skip.c: Remove _initialize_step_skip prototype.
8088         * sol-thread.c: Remove _initialize_sol_thread prototype.
8089         * solib-aix.c: Remove _initialize_solib_aix prototype.
8090         * solib-darwin.c: Remove _initialize_darwin_solib prototype.
8091         * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
8092         * solib-frv.c: Remove _initialize_frv_solib prototype.
8093         * solib-spu.c: Remove _initialize_spu_solib prototype.
8094         * solib-svr4.c: Remove _initialize_svr4_solib prototype.
8095         * solib-target.c: Remove _initialize_solib_target prototype.
8096         * solib.c: Remove _initialize_solib prototype.
8097         * source.c: Remove _initialize_source prototype.
8098         * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
8099         * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
8100         prototype.
8101         * sparc-nat.c: Remove _initialize_sparc_nat prototype.
8102         * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
8103         * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
8104         * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
8105         prototype.
8106         * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
8107         * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
8108         * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
8109         * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
8110         prototype.
8111         * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
8112         prototype.
8113         * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
8114         prototype.
8115         * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
8116         prototype.
8117         * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
8118         * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
8119         prototype.
8120         * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
8121         prototype.
8122         * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
8123         prototype.
8124         * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
8125         prototype.
8126         * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
8127         prototype.
8128         * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
8129         * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
8130         * spu-tdep.c: Remove _initialize_spu_tdep prototype.
8131         * stabsread.c: Remove _initialize_stabsread prototype.
8132         * stack.c: Remove _initialize_stack prototype.
8133         * stap-probe.c: Remove _initialize_stap_probe prototype.
8134         * std-regs.c: Remove _initialize_frame_reg prototype.
8135         * symfile-debug.c: Remove _initialize_symfile_debug prototype.
8136         * symfile-mem.c: Remove _initialize_symfile_mem prototype.
8137         * symfile.c: Remove _initialize_symfile prototype.
8138         * symmisc.c: Remove _initialize_symmisc prototype.
8139         * symtab.c: Remove _initialize_symtab prototype.
8140         * target-dcache.c: Remove _initialize_target_dcache prototype.
8141         * target-descriptions.c: Remove _initialize_target_descriptions
8142         prototype.
8143         * thread.c: Remove _initialize_thread prototype.
8144         * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
8145         prototype.
8146         * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
8147         * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
8148         * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
8149         prototype.
8150         * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
8151         * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
8152         * tracefile.c: Remove _initialize_tracefile prototype.
8153         * tracepoint.c: Remove _initialize_tracepoint prototype.
8154         * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
8155         * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
8156         * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
8157         * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
8158         * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
8159         * tui/tui-win.c: Remove _initialize_tui_win prototype.
8160         * tui/tui.c: Remove _initialize_tui prototype.
8161         * typeprint.c: Remove _initialize_typeprint prototype.
8162         * user-regs.c: Remove _initialize_user_regs prototype.
8163         * utils.c: Remove _initialize_utils prototype.
8164         * v850-tdep.c: Remove _initialize_v850_tdep prototype.
8165         * valarith.c: Remove _initialize_valarith prototype.
8166         * valops.c: Remove _initialize_valops prototype.
8167         * valprint.c: Remove _initialize_valprint prototype.
8168         * value.c: Remove _initialize_values prototype.
8169         * varobj.c: Remove _initialize_varobj prototype.
8170         * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
8171         * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
8172         * vax-tdep.c: Remove _initialize_vax_tdep prototype.
8173         * windows-nat.c: Remove _initialize_windows_nat,
8174         _initialize_check_for_gdb_ini, and _initialize_loadable
8175         prototypes.
8176         * windows-tdep.c: Remove _initialize_windows_tdep prototype.
8177         * xcoffread.c: Remove _initialize_xcoffread prototype.
8178         * xml-support.c: Remove _initialize_xml_support prototype.
8179         * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
8180         * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
8181         prototype.
8182         * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
8183         prototype.
8184         * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
8185
8186 2017-09-08  Keith Seitz  <keiths@redhat.com>
8187
8188         * dwarf2read.c (struct field_info) <fnfields>: Remove unused
8189         field.
8190
8191 2017-09-08  Christoph Weinmann  <christoph.t.weinmann@intel.com>
8192
8193         * f-valprint.c (f_val_print): Remove check for one byte
8194         sized integers. Remove printing of character type.
8195
8196 2017-09-08  Frank Penczek  <frank.penczek@intel.com>
8197             Christoph Weinmann  <christoph.t.weinmann@intel.com>
8198             Bernhard Heckel  <bernhard.heckel@intel.com>
8199
8200         * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
8201         to maintain proper indentation when printing pointers/refs.
8202
8203 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
8204
8205         GDB 8.0.1 released.
8206
8207 2017-09-07  Joel Brobecker  <brobecker@adacore.com>
8208
8209         * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
8210
8211 2017-09-05  Tom Tromey  <tom@tromey.com>
8212
8213         * parse.c (funcall_chain): Now a std::vector.
8214         (start_arglist, end_arglist): Simplify.
8215         (free_funcalls): Remove.
8216         (parse_exp_in_context_1): Remove cleanup.
8217
8218 2017-09-05  Tom Tromey  <tom@tromey.com>
8219
8220         * go-exp.y (go_parse): Don't create a cleanup.
8221
8222 2017-09-05  Tom Tromey  <tom@tromey.com>
8223
8224         * d-exp.y (PrimaryExpression): Use std::string.
8225         (d_parse): Don't create a cleanup.
8226
8227 2017-09-05  Tom Tromey  <tom@tromey.com>
8228
8229         * utils.c (do_clear_parser_state): Remove.
8230         (make_cleanup_clear_parser_state): Remove.
8231         * p-exp.y (pascal_parse): Use scoped_restore.
8232         * m2-exp.y (m2_parse): Use scoped_restore.
8233         * f-exp.y (f_parse): Use scoped_restore.
8234         * d-exp.y (d_parse): Use scoped_restore.
8235         * c-exp.y (c_parse): Use scoped_restore.
8236         * ada-exp.y (ada_parse): Use scoped_restore.
8237         * utils.h (make_cleanup_clear_parser_state): Remove.
8238
8239 2017-09-06  Keith Seitz  <keiths@redhat.com>
8240
8241         * dwarf2read.c (dw2_linkage_name_attr): New function.
8242         (dw2_linkage_name): New function.
8243         (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
8244         (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
8245         (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
8246
8247 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
8248
8249         * config/djgpp/djconfig.sh: Correct shell portability issue.
8250
8251 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
8252
8253         * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
8254
8255 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
8256
8257         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
8258         * NEWS: Mention new FreeBSD/mips native configuration.
8259         * configure.host: Add aarch64*-*-freebsd*.
8260         * configure.nat: Likewise.
8261         * aarch64-fbsd-nat.c: New file.
8262
8263 2017-09-06  John Baldwin  <jhb@FreeBSD.org>
8264
8265         * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
8266         (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
8267         * NEWS: Mention new FreeBSD/aarch64 target.
8268         * configure.tgt: Add aarch64*-*-freebsd*.
8269         * aarch64-fbsd-tdep.c: New file.
8270         * aarch64-fbsd-tdep.h: New file.
8271
8272 2017-09-06  Kamil Rytarowski  <n54@gmx.com>
8273
8274         * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
8275
8276 2017-09-06  Jan Kratochvil  <jan.kratochvil@redhat.com>
8277
8278         * parse.c (find_minsym_type_and_address): Don't relocate addresses
8279         of TLS symbols.
8280
8281 2017-09-05  Philippe Waroquiers  <philippe.waroquiers@skynet.be>
8282
8283         * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
8284         call.
8285
8286 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
8287
8288         * infrun.c (follow_exec): Call add_thread after
8289         target_find_description.
8290
8291 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
8292
8293         * infrun.c (handle_inferior_event_1): When exec'ing, read
8294         stop_pc after follow_exec.
8295
8296 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
8297
8298         * remote.c (process_g_packet): Update error message.
8299
8300 2017-09-05  Yao Qi  <yao.qi@linaro.org>
8301
8302         * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
8303         targets.
8304
8305 2017-09-05  Pedro Alves  <palves@redhat.com>
8306
8307         * eval.c (eval_call, evaluate_funcall): New functions, factored
8308         out from ...
8309         (evaluate_subexp_standard): ... this.
8310
8311 2017-09-05  Yao Qi  <yao.qi@linaro.org>
8312
8313         * amd64-tdep.c (amd64_target_description): Create target
8314         descriptions.
8315         (_initialize_amd64_tdep): Don't call functions
8316         initialize_tdesc_amd64_*.  Add self tests.
8317         * arch/amd64.c (amd64_create_target_description): Add parameter
8318         is_linux.  Call set_tdesc_osabi if is_linux is true.
8319         * arch/amd64.h (amd64_create_target_description): Update the
8320         declaration.
8321         * arch/i386.c (i386_create_target_description): Add parameter
8322         is_linux.  Call set_tdesc_osabi if is_linux is true.
8323         * arch/i386.h (i386_create_target_description): Update
8324         declaration.
8325         * configure.tgt: Add i386.o to gdb_target_obs.
8326         * features/Makefile (XMLTOC): Remove i386/*.xml.
8327         * features/i386/amd64-avx-avx512.c: Remove.
8328         * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
8329         * features/i386/amd64-avx-mpx.c: Remove.
8330         * features/i386/amd64-avx.c: Remove.
8331         * features/i386/amd64-mpx.c: Remove.
8332         * features/i386/amd64.c: Remove.
8333         * features/i386/i386-avx-avx512.c: Remove.
8334         * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
8335         * features/i386/i386-avx-mpx.c: Remove.
8336         * features/i386/i386-avx.c: Remove.
8337         * features/i386/i386-mmx.c: Remove.
8338         * features/i386/i386-mpx.c: Remove.
8339         * features/i386/i386.c: Remove.
8340         * i386-tdep.c: Don't include features/i386/i386*.c., include
8341         target-descriptions.h and arch/i386.h.
8342         (i386_target_description): Create target descriptions.
8343         (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
8344         functions.  Do self tests.
8345
8346 2017-09-05  Yao Qi  <yao.qi@linaro.org>
8347
8348         * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
8349         * features/i386/amd64-avx-avx512-linux.c: Removed.
8350         * features/i386/amd64-avx-linux.c: Removed.
8351         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
8352         * features/i386/amd64-avx-mpx-linux.c: Removed.
8353         * features/i386/amd64-linux.c: Removed.
8354         * features/i386/amd64-mpx-linux.c: Removed.
8355         * features/i386/x32-avx-avx512-linux.c: Removed.
8356         * features/i386/x32-avx-linux.c: Removed.
8357         * features/i386/x32-linux.c: Removed.
8358
8359 2017-09-05  Yao Qi  <yao.qi@linaro.org>
8360
8361         * amd64-linux-tdep.c: Include arch/amd64.h.  Don't include
8362         features/i386/*.c.
8363         (amd64_linux_read_description): Call
8364         amd64_create_target_description.
8365         * arch/amd64.c: New file.
8366         * arch/amd64.h: New file.
8367         * configure.tgt (x86_64-*-linux*): Append amd64.o.
8368         * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
8369
8370 2017-09-05  Yao Qi  <yao.qi@linaro.org>
8371
8372         * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
8373         x32-XXX-linux.c.  Include 64bit-XX.c and x32-XX.c.
8374         (amd64_linux_read_description): Create target descriptions.
8375         (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
8376         functions.  Add unit tests.
8377         * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
8378         x32-core.xml.
8379         * features/i386/64bit-avx.c: Generated.
8380         * features/i386/64bit-avx512.c: Generated.
8381         * features/i386/64bit-core.c: Generated.
8382         * features/i386/64bit-linux.c: Generated.
8383         * features/i386/64bit-mpx.c: Generated.
8384         * features/i386/64bit-pkeys.c: Generated.
8385         * features/i386/64bit-segments.c: Generated.
8386         * features/i386/64bit-sse.c: Generated.
8387         * features/i386/x32-core.c: Generated.
8388         * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
8389         c files for amd64-linux and x32-linux.
8390
8391 2017-09-05  Yao Qi  <yao.qi@linaro.org>
8392
8393         * amd64-linux-tdep.c (amd64_linux_read_description): New
8394         function.
8395         (amd64_linux_core_read_description): Call
8396         amd64_linux_read_description.
8397         (amd64_linux_init_abi): Likewise.
8398         (amd64_x32_linux_init_abi): Likewise.
8399         * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
8400         * x86-linux-nat.c (x86_linux_read_description): Call
8401         amd64_linux_read_description.
8402
8403 2017-09-05  Yao Qi  <yao.qi@linaro.org>
8404
8405         * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
8406         comments.
8407
8408 2017-09-05  Yao Qi  <yao.qi@linaro.org>
8409
8410         * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
8411         * features/i386/i386-avx-avx512-linux.c: Remove.
8412         * features/i386/i386-avx-linux.c: Remove.
8413         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
8414         * features/i386/i386-avx-mpx-linux.c: Remove.
8415         * features/i386/i386-linux.c: Remove.
8416         * features/i386/i386-mmx-linux.c: Remove.
8417         * features/i386/i386-mpx-linux.c: Remove.
8418
8419 2017-09-05  Yao Qi  <yao.qi@linaro.org>
8420
8421         * Makefile.in (ALL_TARGET_OBS): Add i386.o.
8422         (SFILES): Add arch/i386.c.
8423         (HFILES_NO_SRCDIR): Add arch/i386.h.
8424         * arch/i386.c: New file.
8425         * arch/i386.h: New file.
8426         * arch/tdesc.h (allocate_target_description): Declare.
8427         (set_tdesc_architecture): Declare.
8428         (set_tdesc_osabi): Declare.
8429         * configure.tgt (i[34567]86-*-linux*): Add i386.o.
8430         * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
8431         include arch/i386.h.
8432         (i386_linux_read_description): Remove code and call
8433         i386_create_target_description.
8434         (set_tdesc_architecture): New function.
8435         (set_tdesc_osabi): New function.
8436         * target-descriptions.h (allocate_target_description): Remove.
8437
8438 2017-09-05  Yao Qi  <yao.qi@linaro.org>
8439
8440         * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
8441         * target-descriptions.c (tdesc_create_feature): Likewise, and
8442         adjust code.
8443         * features/i386/32bit-avx.c: Re-generated.
8444         * features/i386/32bit-avx512.c: Re-generated.
8445         * features/i386/32bit-core.c: Re-generated.
8446         * features/i386/32bit-linux.c: Re-generated.
8447         * features/i386/32bit-mpx.c: Re-generated.
8448         * features/i386/32bit-pkeys.c: Re-generated.
8449         * features/i386/32bit-sse.c: Re-generated.
8450
8451 2017-09-05  Yao Qi  <yao.qi@linaro.org>
8452
8453         * regformats/regdef.h (struct reg): Override operator == and !=.
8454
8455 2017-09-05  Yao Qi  <yao.qi@linaro.org>
8456
8457         * arch/tdesc.h: New file.
8458         * regformats/regdat.sh: Generate code using tdesc_create_reg.
8459         * target-descriptions.c: Update comments.
8460         * target-descriptions.h: Include "arch/tdesc.h".  Remove the
8461         declarations.
8462         * features/i386/32bit-avx.c: Re-generated.
8463         * features/i386/32bit-avx512.c: Re-generated.
8464         * features/i386/32bit-core.c: Re-generated.
8465         * features/i386/32bit-linux.c: Re-generated.
8466         * features/i386/32bit-mpx.c: Re-generated.
8467         * features/i386/32bit-pkeys.c: Re-generated.
8468         * features/i386/32bit-sse.c: Re-generated.
8469
8470 2017-09-05  Yao Qi  <yao.qi@linaro.org>
8471
8472         * regformats/regdat.sh: Update generated code.
8473
8474 2017-09-05  Yao Qi  <yao.qi@linaro.org>
8475
8476         * regformats/regdat.sh: Adjust code order.
8477
8478 2017-09-05  Simon Marchi  <simon.marchi@ericsson.com>
8479
8480         * expprint.c (dump_subexp_body_standard): Use constant format
8481         string in fprintf_filtered call.
8482
8483 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
8484
8485         * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
8486         NetBSD/i386.
8487         * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
8488
8489 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
8490
8491         * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
8492
8493 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
8494
8495         * bsd-kvm.o: Define _KMEMUSER.
8496         * configure.ac: Define _KMEMUSER when checking for "struct lwp".
8497         * configure: Regenerate.
8498
8499 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
8500
8501         * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
8502         * i386-fbsd-nat.c: Likewise.
8503
8504 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
8505
8506         * unittests/array-view-selftests.c: Add include of <array>.
8507
8508 2017-09-04  John Baldwin  <jhb@FreeBSD.org>
8509
8510         * spu-tdep.c (flush_ea_cache): Add missing argument to
8511         call_function_by_hand.
8512
8513 2017-09-04  Pedro Alves  <palves@redhat.com>
8514
8515         * NEWS (Safer support for debugging with no debug info): New.
8516
8517 2017-09-04  Pedro Alves  <palves@redhat.com>
8518
8519         * c-exp.y (function_method, function_method_void): Add current
8520         instance flags to TYPE_INSTANCE.
8521         * dwarf2read.c (check_modifier): New.
8522         (compute_delayed_physnames): Assert that only C++ adds delayed
8523         physnames.  Mark fn_fields as const/volatile depending on
8524         physname.
8525         * eval.c (make_params): New type_instance_flags parameter.  Use
8526         it as the new type's instance flags.
8527         (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
8528         flags element and pass it to make_params.
8529         * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
8530         instance flags element.
8531         (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
8532         * gdbtypes.h: Include "enum-flags.h".
8533         (type_instance_flags): New enum-flags type.
8534         (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
8535         (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
8536         * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
8537         (follow_type_instance_flags): New function.
8538         (operator_check_standard) <TYPE_INSTANCE>: Adjust.
8539         * parser-defs.h (follow_type_instance_flags): Declare.
8540         * valops.c (value_struct_elt_for_reference): const/volatile must
8541         match too.
8542
8543 2017-09-04  Pedro Alves  <palves@redhat.com>
8544
8545         * cp-namespace.c (cp_search_static_and_baseclasses): Handle
8546         function/method scopes; lookup the nested name as a function local
8547         static variable.
8548
8549 2017-09-04  Pedro Alves  <palves@redhat.com>
8550
8551         (%type <voidval>): Add function_method.
8552         * c-exp.y (exp): New production for calls with no arguments.
8553         (function_method, function_method_void_or_typelist): New
8554         productions.
8555         (exp): New production for "method()::static_var".
8556         * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
8557         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
8558         Handle OP_FUNC_STATIC_VAR.
8559         * parse.c (operator_length_standard):
8560         Handle OP_FUNC_STATIC_VAR.
8561
8562 2017-09-04  Pedro Alves  <palves@redhat.com>
8563
8564         * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
8565         handling.
8566         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
8567         Ditto.
8568         * parse.c (operator_length_standard, operator_check_standard):
8569         Ditto.
8570         * std-operator.def (UNOP_MEMVAL_TLS): Delete.
8571
8572 2017-09-04  Pedro Alves  <palves@redhat.com>
8573
8574         * ax-gdb.c: Include "typeprint.h".
8575         (gen_expr_for_cast): New function.
8576         (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
8577         <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
8578         type is unknown.
8579         * dwarf2read.c (new_symbol_full): Fallback to int instead of
8580         nodebug_data_symbol.
8581         * eval.c: Include "typeprint.h".
8582         (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
8583         Error out if symbol has unknown type.
8584         <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
8585         evaluate_subexp_for_cast.
8586         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
8587         OP_VAR_MSYM_VALUE.
8588         (evaluate_subexp_for_cast): New function.
8589         * gdbtypes.c (init_nodebug_var_type): New function.
8590         (objfile_type): Use it to initialize types of variables with no
8591         debug info.
8592         * typeprint.c (error_unknown_type): New.
8593         * typeprint.h (error_unknown_type): New declaration.
8594         * compile/compile-c-types.c (convert_type_basic): Handle
8595         TYPE_CODE_ERROR; warn and fallback to int for variables with
8596         unknown type.
8597
8598 2017-09-04  Pedro Alves  <palves@redhat.com>
8599
8600         * eval.c (evaluate_var_value): New function, factored out from ...
8601         (evaluate_subexp_standard): ... here.
8602
8603 2017-09-04  Pedro Alves  <palves@redhat.com>
8604
8605         * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
8606         Remove useless assignments to 'op'.
8607
8608 2017-09-04  Pedro Alves  <palves@redhat.com>
8609
8610         * eval.c (eval_skip_value): New function.
8611         (evaluate_subexp_standard): Use it.
8612
8613 2017-09-04  Pedro Alves  <palves@redhat.com>
8614
8615         * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
8616         function name from symbol/minsym and pass it to
8617         error_call_unknown_return_type.
8618
8619 2017-09-04  Pedro Alves  <palves@redhat.com>
8620
8621         * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
8622         * ax-gdb.c (gen_msym_var_ref): New function.
8623         (gen_expr): Handle OP_VAR_MSYM_VALUE.
8624         * eval.c (evaluate_var_msym_value): New function.
8625         * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
8626         <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
8627         to call_function_by_hand.
8628         * expprint.c (print_subexp_standard, dump_subexp_body_standard):
8629         Handle OP_VAR_MSYM_VALUE.
8630         (union exp_element) <msymbol>: New field.
8631         * minsyms.h (struct type): Forward declare.
8632         (find_minsym_type_and_address): Declare.
8633         * parse.c (write_exp_elt_msym): New function.
8634         (write_exp_msymbol): Delete, refactored as ...
8635         (find_minsym_type_and_address): ... this new function.
8636         (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
8637         (operator_length_standard, operator_check_standard): Handle
8638         OP_VAR_MSYM_VALUE.
8639         * std-operator.def (OP_VAR_MSYM_VALUE): New.
8640
8641 2017-09-04  Pedro Alves  <palves@redhat.com>
8642
8643         * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
8644         TYPE_GNU_IFUNC specially here.  Throw error if return type is
8645         unknown.
8646         * ada-typeprint.c (print_func_type): Handle functions with unknown
8647         return type.
8648         * c-typeprint.c (c_type_print_base): Handle functions and methods
8649         with unknown return type.
8650         * compile/compile-c-symbols.c (convert_symbol_bmsym)
8651         <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
8652         * compile/compile-c-types.c: Include "objfiles.h".
8653         (convert_func): For functions with unknown return type, warn and
8654         default to int.
8655         * compile/compile-object-run.c (compile_object_run): Adjust call
8656         to call_function_by_hand_dummy.
8657         * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
8658         call_function_by_hand.
8659         * eval.c (evaluate_subexp_standard): Adjust calls to
8660         call_function_by_hand.  Handle functions and methods with unknown
8661         return type.  Pass expect_type to call_function_by_hand.
8662         * f-typeprint.c (f_type_print_base): Handle functions with unknown
8663         return type.
8664         * gcore.c (call_target_sbrk): Adjust call to
8665         call_function_by_hand.
8666         * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
8667         return type instead of int.  Make nodebug_text_gnu_ifunc_symbol be
8668         an integer address type instead of nodebug.
8669         * guile/scm-value.c (gdbscm_value_call): Adjust call to
8670         call_function_by_hand.
8671         * infcall.c (error_call_unknown_return_type): New function.
8672         (call_function_by_hand): New "default_return_type" parameter.
8673         Pass it down.
8674         (call_function_by_hand_dummy): New "default_return_type"
8675         parameter.  Use it instead of defaulting to int.  If there's no
8676         default and the return type is unknown, throw an error.  If
8677         there's a default return type, and the called function has no
8678         debug info, then assume the function is prototyped.
8679         * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
8680         New "default_return_type" parameter.
8681         (error_call_unknown_return_type): New declaration.
8682         * linux-fork.c (call_lseek): Cast return type of lseek.
8683         (inferior_call_waitpid, checkpoint_command): Adjust calls to
8684         call_function_by_hand.
8685         * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
8686         calls to call_function_by_hand.
8687         * m2-typeprint.c (m2_procedure): Handle functions with unknown
8688         return type.
8689         * objc-lang.c (lookup_objc_class, lookup_child_selector)
8690         (value_nsstring, print_object_command): Adjust calls to
8691         call_function_by_hand.
8692         * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
8693         functions with unknown return type.
8694         (pascal_type_print_func_varspec_suffix): New function.
8695         (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
8696         TYPE_CODE_METHOD>: Use it.
8697         * python/py-value.c (valpy_call): Adjust call to
8698         call_function_by_hand.
8699         * rust-lang.c (rust_evaluate_funcall): Adjust call to
8700         call_function_by_hand.
8701         * valarith.c (value_x_binop, value_x_unop): Adjust calls to
8702         call_function_by_hand.
8703         * valops.c (value_allocate_space_in_inferior): Adjust call to
8704         call_function_by_hand.
8705         * typeprint.c (type_print_unknown_return_type): New function.
8706         * typeprint.h (type_print_unknown_return_type): New declaration.
8707
8708 2017-09-04  Pedro Alves  <palves@redhat.com>
8709
8710         * gdbtypes.c (lookup_function_type_with_arguments): Mark function
8711         types with more than one parameter as prototyped.
8712
8713 2017-09-04  Pedro Alves  <palves@redhat.com>
8714
8715         * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
8716         (disassemble_command): Use gdb_disassembly_flags instead of bare
8717         int.
8718         * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
8719         (dump_insns, do_mixed_source_and_assembly_deprecated)
8720         (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
8721         Use gdb_disassembly_flags instead of bare int.
8722         * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
8723         (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
8724         (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
8725         (DISASSEMBLY_SPECULATIVE): No longer macros.  Instead they're...
8726         (enum gdb_disassembly_flag): ... values of this new enumeration.
8727         (gdb_disassembly_flags): Define.
8728         (gdb_disassembly)
8729         (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
8730         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
8731         gdb_disassembly_flags instead of bare int.
8732         * record-btrace.c (btrace_insn_history)
8733         (record_btrace_insn_history, record_btrace_insn_history_range)
8734         (record_btrace_insn_history_from): Use gdb_disassembly_flags
8735         instead of bare int.
8736         * record.c (get_insn_history_modifiers, cmd_record_insn_history):
8737         Use gdb_disassembly_flags instead of bare int.
8738         * target-debug.h (target_debug_print_gdb_disassembly_flags):
8739         Define.
8740         * target-delegates.c: Regenerate.
8741         * target.c (target_insn_history, target_insn_history_from)
8742         (target_insn_history_range): Use gdb_disassembly_flags instead of
8743         bare int.
8744         * target.h: Include "disasm.h".
8745         (struct target_ops) <to_insn_history, to_insn_history_from,
8746         to_insn_history_range>: Use gdb_disassembly_flags instead of bare
8747         int.
8748         (target_insn_history, target_insn_history_from)
8749         (target_insn_history_range): Use gdb_disassembly_flags instead of
8750         bare int.
8751
8752 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
8753
8754         * cli/cli-script.c (build_command_line): For if/while commands,
8755         check whether args is empty.
8756
8757 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
8758
8759         * cli/cli-script.h (enum misc_command_type): Move from defs.h.
8760         (enum command_control_type): Likewise.
8761         (struct command_line): Likewise.
8762         (free_command_lines): Likewise.
8763         (struct command_lines_deleter): Likewise.
8764         (command_line_up): Likewise.
8765         (read_command_lines): Likewise.
8766         (read_command_lines_1): Likewise.
8767         * defs.h (enum misc_command_type): Move to cli/cli-script.h.
8768         (enum command_control_type): Likewise.
8769         (struct command_line): Likewise.
8770         (free_command_lines): Likewise.
8771         (struct command_lines_deleter): Likewise.
8772         (command_line_up): Likewise.
8773         (read_command_lines): Likewise.
8774         (read_command_lines_1): Likewise.
8775         * breakpoint.h: Include cli/cli-script.h.
8776         * extension-priv.h: Likewise.
8777         * gdbcmd.h: Likewise.
8778
8779 2017-09-04  Pedro Alves  <palves@redhat.com>
8780
8781         * ada-lang.c (is_known_support_routine): Move sal declaration to
8782         where it is initialized.
8783         * breakpoint.c (create_internal_breakpoint, init_catchpoint)
8784         (parse_breakpoint_sals, decode_static_tracepoint_spec)
8785         (clear_command, update_static_tracepoint): Remove init_sal
8786         references.  Move declarations closer to initializations.
8787         * cli/cli-cmds.c (list_command): Move sal declarations closer to
8788         initializations.
8789         * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
8790         references.  Move sal declarations closer to initializations.
8791         * frame.c (find_frame_sal): Return a symtab_and_line via function
8792         return instead of output parameter.  Remove init_sal references.
8793         * frame.h (find_frame_sal): Return a symtab_and_line via function
8794         return instead of output parameter.
8795         * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
8796         * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
8797         instead of memset.
8798         (gdbscm_find_pc_line): Remove init_sal reference.
8799         * infcall.c (call_function_by_hand_dummy): Remove init_sal
8800         references.  Move declarations closer to initializations.
8801         * infcmd.c (set_step_frame): Update.  Move declarations closer to
8802         initializations.
8803         (finish_backward): Remove init_sal references.  Move declarations
8804         closer to initializations.
8805         * infrun.c (process_event_stop_test, handle_step_into_function)
8806         (insert_hp_step_resume_breakpoint_at_frame)
8807         (insert_step_resume_breakpoint_at_caller): Likewise.
8808         * linespec.c (create_sals_line_offset, decode_digits_ordinary)
8809         (symbol_to_sal): Likewise.
8810         * probe.c (parse_probes_in_pspace): Remove init_sal reference.
8811         * python/py-frame.c (frapy_find_sal): Move sal declaration closer
8812         to its initialization.
8813         * reverse.c (save_bookmark_command): Use new/delete.  Remove
8814         init_sal references.  Move declarations closer to initializations.
8815         * source.c (get_current_source_symtab_and_line): Remove brace
8816         initialization.
8817         (set_current_source_symtab_and_line): Now takes the sal by const
8818         reference.  Remove brace initialization.
8819         (line_info): Remove init_sal reference.
8820         * source.h (set_current_source_symtab_and_line): Now takes a
8821         symtab_and_line via const reference.
8822         * stack.c (set_current_sal_from_frame): Adjust.
8823         (print_frame_info): Adjust.
8824         (get_last_displayed_sal): Return the sal via function return
8825         instead of via output parameter.  Simplify.
8826         (frame_info): Adjust.
8827         * stack.h (get_last_displayed_sal): Return the sal via function
8828         return instead of via output parameter.
8829         * symtab.c (init_sal): Delete.
8830         (find_pc_sect_line): Remove init_sal references.  Move
8831         declarations closer to initializations.
8832         (find_function_start_sal): Remove init_sal references.  Move
8833         declarations closer to initializations.
8834         * symtab.h (struct symtab_and_line): In-class initialize all
8835         fields.
8836         * tracepoint.c (set_traceframe_context)
8837         (print_one_static_tracepoint_marker): Remove init_sal references.
8838         Move declarations closer to initializations.
8839         * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
8840         * tui/tui-stack.c (tui_show_frame_info): Adjust.  Move
8841         declarations closer to initializations.
8842         * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
8843         init_sal references.  Adjust.
8844
8845 2017-09-04  Pedro Alves  <palves@redhat.com>
8846
8847         * ax-gdb.c (agent_command_1): Use range-for.
8848         * break-catch-throw.c (re_set_exception_catchpoint): Update.
8849         * breakpoint.c: Include "common/array-view.h".
8850         (init_breakpoint_sal, create_breakpoint_sal): Change sals
8851         parameter from struct symtabs_and_lines to
8852         array_view<symtab_and_line>.  Adjust.  Use range-for.  Update.
8853         (breakpoint_sals_to_pc): Change sals parameter from struct
8854         symtabs_and_lines to std::vector reference.
8855         (check_fast_tracepoint_sals): Change sals parameter from struct
8856         symtabs_and_lines to std::array_view.  Use range-for.
8857         (decode_static_tracepoint_spec): Return a std::vector instead of
8858         symtabs_and_lines.  Update.
8859         (create_breakpoint): Update.
8860         (break_range_command, until_break_command, clear_command): Update.
8861         (base_breakpoint_decode_location, bkpt_decode_location)
8862         (bkpt_probe_create_sals_from_location)
8863         (bkpt_probe_decode_location, tracepoint_decode_location)
8864         (tracepoint_probe_decode_location)
8865         (strace_marker_create_sals_from_location): Return a std::vector
8866         instead of symtabs_and_lines.
8867         (strace_marker_create_breakpoints_sal): Update.
8868         (strace_marker_decode_location): Return a std::vector instead of
8869         symtabs_and_lines.  Update.
8870         (update_breakpoint_locations): Change struct symtabs_and_lines
8871         parameters to gdb::array_view.  Adjust.
8872         (location_to_sals): Return a std::vector instead of
8873         symtabs_and_lines.  Update.
8874         (breakpoint_re_set_default): Use std::vector instead of struct
8875         symtabs_and_lines.
8876         (decode_location_default): Return a std::vector instead of
8877         symtabs_and_lines.  Update.
8878         * breakpoint.h: Include "common/array-view.h".
8879         (struct breakpoint_ops) <decode_location>: Now returns a
8880         std::vector instead of returning a symtabs_and_lines via output
8881         parameter.
8882         (update_breakpoint_locations): Change sals parameters to use
8883         gdb::array_view.
8884         * cli/cli-cmds.c (edit_command, list_command): Update to use
8885         std::vector and gdb::array_view.
8886         (ambiguous_line_spec): Adjust to use gdb::array_view and
8887         range-for.
8888         (compare_symtabs): Rename to ...
8889         (cmp_symtabs): ... this.  Change parameters to symtab_and_line
8890         const reference and adjust.
8891         (filter_sals): Rewrite using std::vector and standard algorithms.
8892         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
8893         (jump_command): Update to use std::vector.
8894         * linespec.c (struct linespec_state) <canonical_names>: Update
8895         comment.
8896         (add_sal_to_sals_basic): Delete.
8897         (add_sal_to_sals, filter_results, convert_results_to_lsals)
8898         (decode_line_2, create_sals_line_offset)
8899         (convert_address_location_to_sals, convert_linespec_to_sals)
8900         (convert_explicit_location_to_sals, parse_linespec)
8901         (event_location_to_sals, decode_line_full, decode_line_1)
8902         (decode_line_with_current_source)
8903         (decode_line_with_last_displayed, decode_objc)
8904         (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
8905         (linespec_result::~linespec_result): Adjust to use std::vector
8906         instead of symtabs_and_lines.
8907         * linespec.h (linespec_sals::sals): Now a std::vector.
8908         (struct linespec_result): Use std::vector, bool, and in-class
8909         initialization.
8910         (decode_line_1, decode_line_with_current_source)
8911         (decode_line_with_last_displayed): Return std::vector.
8912         * macrocmd.c (info_macros_command): Use std::vector.
8913         * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
8914         * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
8915         std::vector.
8916         * probe.h (parse_probes): Return a std::vector.
8917         * python/python.c (gdbpy_decode_line): Use std::vector and
8918         gdb::array_view.
8919         * source.c (select_source_symtab, line_info): Use std::vector.
8920         * stack.c (func_command): Use std::vector.
8921         * symtab.h (struct symtabs_and_lines): Delete.
8922         * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
8923
8924 2017-09-04  Pedro Alves  <palves@redhat.com>
8925
8926         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8927         unittests/array-view-selftests.c.
8928         (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
8929         * common/array-view.h: New file.
8930         * unittests/array-view-selftests.c: New file.
8931
8932 2017-09-04  Pedro Alves  <palves@redhat.com>
8933
8934         * cli/cli-cmds.c (edit_command): Pass message to
8935         ambiguous_line_spec.
8936         (list_command): Pass message to ambiguous_line_spec.  Say
8937         "first"/"last" instead of "start" and "end" to be consistent with
8938         the manual.
8939         (ambiguous_line_spec): Add 'format' and vararg parameters.  Use
8940         them to print formatted message.
8941
8942 2017-09-04  Pedro Alves  <palves@redhat.com>
8943
8944         * btrace.c (ftrace_add_pt): Pass btrace_insn to
8945         ftrace_update_insns by reference instead of pointer.
8946
8947 2017-09-04  Yao Qi  <yao.qi@linaro.org>
8948
8949         * i386-go32-tdep.c: Include x86-xstate.h.
8950         (i386_go32_init_abi): Call i386_target_description.
8951         * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
8952         if xcr0 is X86_XSTATE_X87_MASK.
8953         * i386-tdep.h (tdesc_i386): Remove the declaration.
8954         (tdesc_i386_mmx): Likewise.
8955
8956 2017-09-04  Yao Qi  <yao.qi@linaro.org>
8957
8958         * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
8959         X86_XSTATE_SSE_MASK instead of 0.
8960
8961 2017-09-04  Yao Qi  <yao.qi@linaro.org>
8962
8963         * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
8964         i386_target_description.
8965         * i386-fbsd-nat.c (i386fbsd_read_description): Call
8966         i386_target_description.
8967         * i386-tdep.c (i386_gdbarch_init): Likewise.
8968
8969 2017-09-04  Yao Qi  <yao.qi@linaro.org>
8970
8971         * amd64-darwin-tdep.c: Include "x86-xstate.h".
8972         (x86_darwin_init_abi_64): Call amd64_target_description.
8973         * amd64-dicos-tdep.c: Likewise.
8974         * amd64-fbsd-nat.c: Likewise.
8975         * amd64-fbsd-tdep.c: Likewise.
8976         * amd64-nbsd-tdep.c: Likewise.
8977         * amd64-obsd-tdep.c: Likewise.
8978         * amd64-sol2-tdep.c: Likewise.
8979         * amd64-windows-tdep.c: Likewise.
8980         * amd64-tdep.h (tdesc_amd64): Remove the declaration.
8981
8982 2017-09-04  Simon Marchi  <simon.marchi@ericsson.com>
8983
8984         * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
8985         (btrace_function) <insn>: Change type to use std::vector.
8986         * btrace.c (ftrace_debug, ftrace_call_num_insn,
8987         ftrace_find_call, ftrace_new_gap, ftrace_update_function,
8988         ftrace_update_insns, ftrace_compute_global_level_offset,
8989         btrace_stitch_bts, btrace_clear, btrace_insn_get,
8990         btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
8991         change to std::vector.
8992         (ftrace_update_insns): Adjust to change to std::vector, change
8993         type of INSN parameter.
8994         (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
8995         * record-btrace.c (btrace_call_history_insn_range,
8996         btrace_compute_src_line_range,
8997         record_btrace_frame_prev_register): Adjust to change to
8998         std::vector.
8999         * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
9000         to change to std::vector.
9001
9002 2017-09-03  Tom Tromey  <tom@tromey.com>
9003
9004         * corefile.c (reopen_exec_file): Use std::string.
9005
9006 2017-09-03  Tom Tromey  <tom@tromey.com>
9007
9008         * compile/compile.c (compile_register_name_mangled): Return
9009         std::string.
9010         * compile/compile-loc2c.c (pushf_register_address): Update.
9011         (pushf_register): Update.
9012         * compile/compile-c-types.c (convert_array): Update.
9013         * compile/compile-c-symbols.c (generate_vla_size): Update.
9014         (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
9015         (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
9016         (convert_one_symbol): Update.
9017         (generate_c_for_for_one_variable): Update.
9018         * compile/compile-c-support.c (c_get_range_decl_name): Return a
9019         std::string.
9020         (generate_register_struct): Update.
9021         * compile/compile-internal.h (c_get_range_decl_name): Return a
9022         std::string.
9023         (compile_register_name_mangled): Return std::string.
9024
9025 2017-09-03  Tom Tromey  <tom@tromey.com>
9026
9027         * utils.c (perror_string): Return a std::string.
9028         (throw_perror_with_name, perror_warning_with_name): Update.
9029
9030 2017-09-03  Tom Tromey  <tom@tromey.com>
9031
9032         * demangle.c (demangle_command): Use std::string,
9033         unique_xmalloc_ptr.
9034
9035 2017-09-03  Tom Tromey  <tom@tromey.com>
9036
9037         * cli/cli-setshow.c (do_set_command): Use std::string.
9038
9039 2017-09-03  Tom Tromey  <tom@tromey.com>
9040
9041         * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
9042
9043 2017-09-03  Tom Tromey  <tom@tromey.com>
9044
9045         * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
9046
9047 2017-09-03  Tom Tromey  <tom@tromey.com>
9048
9049         * mi/mi-cmd-env.c (env_execute_cli_command): Use
9050         gdb::unique_xmalloc_ptr.
9051
9052 2017-09-03  Tom Tromey  <tom@tromey.com>
9053
9054         * thread.c (print_thread_info_1): Use string_printf.
9055         (thread_apply_command, thread_apply_all_command): Use
9056         std::string.
9057
9058 2017-09-03  Tom Tromey  <tom@tromey.com>
9059
9060         * valprint.c (val_print_string): Update.
9061         * gdbcore.h (memory_error_message): Return std::string.
9062         * corefile.c (memory_error_message): Return std::string.
9063         (memory_error): Update.
9064         * breakpoint.c (insert_bp_location): Update.
9065
9066 2017-09-03  Simon Marchi  <simon.marchi@ericsson.com>
9067
9068         * target/waitstatus.h (target_waitstatus_to_string): Change
9069         return type to std::string.
9070         * target/waitstatus.c (target_waitstatus_to_string): Return
9071         std::string.
9072         * target.h (target_waitstatus_to_string): Remove declaration.
9073         * infrun.c (resume, clear_proceed_status_thread,
9074         print_target_wait_results, do_target_wait, save_waitstatus,
9075         stop_all_threads): Adjust.
9076         * record-btrace.c (record_btrace_wait): Adjust.
9077         * target-debug.h
9078         (target_debug_print_struct_target_waitstatus_p): Adjust.
9079
9080 2017-09-01  Jan Kratochvil  <jan.kratochvil@redhat.com>
9081
9082         PR gdb/22046
9083         * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
9084         detection.
9085
9086 2017-08-31  Sergio Durigan Junior  <sergiodj@redhat.com>
9087
9088         * NEWS (Changes since GDB 8.0): Add entry mentioning new support
9089         for setting/unsetting environment variables on the remote target.
9090         (New remote packets): Add entries for QEnvironmentHexEncoded,
9091         QEnvironmentUnset and QEnvironmentReset.
9092         * common/environ.c (gdb_environ::operator=): Extend method to
9093         handle m_user_set_env_list and m_user_unset_env_list.
9094         (gdb_environ::clear): Likewise.
9095         (match_var_in_string): Change type of first parameter from 'char
9096         *' to 'const char *'.
9097         (gdb_environ::set): Extend method to handle
9098         m_user_set_env_list and m_user_unset_env_list.
9099         (gdb_environ::unset): Likewise.
9100         (gdb_environ::clear_user_set_env): New method.
9101         (gdb_environ::user_set_envp): Likewise.
9102         (gdb_environ::user_unset_envp): Likewise.
9103         * common/environ.h (gdb_environ): Handle m_user_set_env_list and
9104         m_user_unset_env_list on move constructor/assignment.
9105         (unset): Add new default parameter 'update_unset_list = true'.
9106         (clear_user_set_env): New method.
9107         (user_set_envp): Likewise.
9108         (user_unset_envp): Likewise.
9109         (m_user_set_env_list): New std::set.
9110         (m_user_unset_env_list): Likewise.
9111         * common/rsp-low.c (hex2str): New function.
9112         (bin2hex): New overload for bin2hex function.
9113         * common/rsp-low.c (hex2str): New prototype.
9114         (str2hex): New overload prototype.
9115         * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
9116         QEnvironmentUnset and QEnvironmentReset.
9117         (remote_protocol_features): Add QEnvironmentHexEncoded,
9118         QEnvironmentUnset and QEnvironmentReset packets.
9119         (send_environment_packet): New function.
9120         (extended_remote_environment_support): Likewise.
9121         (extended_remote_create_inferior): Call
9122         extended_remote_environment_support.
9123         (_initialize_remote): Add QEnvironmentHexEncoded,
9124         QEnvironmentUnset and QEnvironmentReset packet configs.
9125         * unittests/environ-selftests.c (gdb_selftest_env_var):
9126         New variable.
9127         (test_vector_initialization): New function.
9128         (test_init_from_host_environ): Likewise.
9129         (test_reinit_from_host_environ): Likewise.
9130         (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
9131         Likewise.
9132         (test_unset_set_empty_vector): Likewise.
9133         (test_vector_clear): Likewise.
9134         (test_std_move): Likewise.
9135         (test_move_constructor):
9136         (test_self_move): Likewise.
9137         (test_set_unset_reset): Likewise.
9138         (run_tests): Rewrite in terms of the functions above.
9139
9140 2017-08-31  Weimin Pan  <weimin.pan@oracle.com>
9141
9142         * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
9143         (adi_available): Use a temp variable of type CORE_ADDR as argument
9144         3 when calling target_auxv_search.
9145         (adi_normalize_address): Use masks and xor operators to calculate
9146         normalized address.
9147         (adi_read_versions, adi_write_versions, adi_print_versions)
9148         (do_examine, do_assign): Use paddress.
9149
9150 2017-08-29  John Baldwin  <jhb@FreeBSD.org>
9151
9152         * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
9153         * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
9154         out of loop and add supply of FIR.
9155         (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
9156         add collect of FIR.
9157
9158 2017-08-28  Simon Marchi  <simon.marchi@ericsson.com>
9159
9160         PR gdb/21827
9161         * cli/cli-script.c (define_command): Don't convert command name
9162         to lower case.
9163
9164 2017-08-25  Joel Brobecker  <brobecker@adacore.com>
9165
9166         * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
9167         Update all callers accordingly. Remove all code blocks handling
9168         the case where DISPP is not NULL.
9169
9170 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
9171
9172         PR symtab/22003
9173         * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
9174         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
9175         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
9176
9177 2017-08-24  Jan Kratochvil  <jan.kratochvil@redhat.com>
9178
9179         * dwarf2read.c (build_type_psymtabs_reader): New prototype.
9180         (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
9181         (read_comp_units_from_section): New parameter abbrev_section, use
9182         read_and_check_comp_unit_head, allocate signatured_type if needed.
9183         (create_all_comp_units): Update read_comp_units_from_section caller.
9184
9185 2017-08-23  Pedro Alves  <palves@redhat.com>
9186
9187         PR remote/21852
9188         * remote.c (add_current_inferior_and_thread): Set inferior_ptid
9189         to null_ptid and switch to thread without reading the registers
9190         after adding the inferior.
9191
9192 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
9193
9194         * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
9195         compile-gcc.
9196         * compile/compile.c (compile_gcc, show_compile_gcc): New.
9197         (compile_to_object): Implement compile_gcc.
9198         (_initialize_compile): Install "set compile-gcc".  Initialize
9199         compile_gcc.
9200
9201 2017-08-23  Jan Kratochvil  <jan.kratochvil@redhat.com>
9202
9203         * compile/compile.c (compile_to_object): Conditionally call
9204         set_verbose.  Conditionally call compile or compile_v0.
9205
9206 2017-08-07  Weimin Pan  <weimin.pan@oracle.com>
9207
9208         * sparc64-tdep.h: (adi_normalize_address): New export.
9209         * sparc-nat.h: (open_adi_tag_fd): New export.
9210         * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
9211         * sparc64-linux-tdep.c:
9212         (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
9213         (sparc64_linux_handle_segmentation_fault): New function.
9214         (sparc64_linux_init_abi): Register
9215         sparc64_linux_handle_segmentation_fault
9216         * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
9217         (sparc64_addr_bits_remove): New function.
9218         (sparc64_init_abi): Register sparc64_addr_bits_remove.
9219         (MAX_PROC_NAME_SIZE): New macro.
9220         (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
9221         (sparc64adilist): New variable.
9222         (adi_proc_list): New variable.
9223         (find_adi_info): New function.
9224         (add_adi_info): New function.
9225         (get_adi_info_proc): New function.
9226         (get_adi_info): New function.
9227         (info_adi_command): New function.
9228         (read_maps_entry): New function.
9229         (adi_available): New function.
9230         (adi_normalize_address): New function.
9231         (adi_align_address): New function.
9232         (adi_convert_byte_count): New function.
9233         (adi_tag_fd): New function.
9234         (adi_is_addr_mapped): New function.
9235         (adi_read_versions): New function.
9236         (adi_write_versions): New function.
9237         (adi_print_versions): New function.
9238         (do_examine): New function.
9239         (do_assign): New function.
9240         (adi_examine_command): New function.
9241         (adi_assign_command): New function.
9242         (_initialize_sparc64_adi_tdep): New function.
9243
9244 2017-08-22  Simon Marchi  <simon.marchi@ericsson.com>
9245
9246         * breakpoint.c (breakpoints_info): Rename to ...
9247         (info_breakpoints_command): ... this.
9248         (watchpoints_info): Rename to ...
9249         (info_watchpoints_command): ... this.
9250         (tracepoints_info): Rename to ...
9251         (info_tracepoints_command): ... this.
9252         (_initialize_breakpoint): Adjust.
9253         * dcache.c (dcache_info): Rename to ...
9254         (info_display_command): ... this.
9255         (_initialize_dcache): Adjust.
9256         * frame.h (args_info): Rename to ...
9257         (info_args_command): ... this.
9258         (locals_info): Rename to ...
9259         (info_locals_command): ... this.
9260         * infcmd.c (nofp_registers_info): Rename to ...
9261         (info_registers_command): ... this.
9262         (float_info): Rename to ...
9263         (info_float_command): ... this.
9264         (program_info): Rename to ...
9265         (info_program_command): ... this.
9266         (all_registers_info): Rename to ...
9267         (info_all_registers_command): ... this.
9268         (vector_info): Rename to ...
9269         (info_vector_command): ... this.
9270         (float_info): Rename to ...
9271         (info_float_command): ... this.
9272         (_initialize_infcmd): Adjust.
9273         * inferior.h (term_info): Rename to ...
9274         (info_terminal_command): ... this.
9275         * inflow.c (term_info): Rename to ...
9276         (info_terminal_command): ... this.
9277         (_initialize_inflow): Adjust.
9278         * infrun.c (signals_info): Rename to ...
9279         (info_signals_command): ... this.
9280         (_initialize_infrun): Adjust.
9281         * objc-lang.c (classes_info): Rename to ...
9282         (info_classes_command): ... this.
9283         (selectors_info): Rename to ...
9284         (info_selectors_command): ... this.
9285         (_initialize_objc_language): Adjust.
9286         * printcmd.c (sym_info): Rename to ...
9287         (info_symbol_command): ... this.
9288         (address_info): Rename to ...
9289         (info_address_command): ... this.
9290         (display_info): Rename to ...
9291         (info_display_command): ... this.
9292         (_initialize_printcmd): Adjust.
9293         * reverse.c (bookmarks_info): Rename to ...
9294         (info_breakpoints_command): ... this.
9295         (_initialize_reverse): Adjust.
9296         * ser-go32.c (dos_info): Rename to ...
9297         (info_serial_command): ... this.
9298         (_initialize_ser_dos): Adjust.
9299         * skip.c (skip_info): Rename to ...
9300         (info_skip_command): ... this.
9301         (_initialize_step_skip): Adjust.
9302         * source.c (line_info): Rename to ...
9303         (info_line_command): ... this.
9304         (source_info): Rename to ...
9305         (info_source_command)
9306         * stack.c (frame_info): Rename to ...
9307         (info_frame_command): ... this.
9308         (locals_info): Rename to ...
9309         (info_locals_command): ... this.
9310         (args_info): Rename to ...
9311         (info_args_command): ... this.
9312         (_initialize_stack): Adjust.
9313         * symtab.c (sources_info): Rename to ...
9314         (info_sources_command): ... this.
9315         (variables_info): Rename to ...
9316         (info_variables_command): ... this.
9317         (functions_info): Rename to ...
9318         (info_functions_command): ... this.
9319         (types_info): Rename to ...
9320         (info_types_command): ... this.
9321         (_initialize_symtab): Adjust.
9322         * target.c (target_info): Rename to ...
9323         (info_target_command): ... this.
9324         (initialize_targets): Adjust.
9325         * tracepoint.c (tvariables_info): Rename to ...
9326         (info_tvariables_command): ... this.
9327         (scope_info): Rename to ...
9328         (info_scope_command): ... this.
9329         (trace_dump_actions): Adjust.
9330         (_initialize_tracepoint): Adjust.
9331
9332 2017-08-22  Tom Tromey  <tom@tromey.com>
9333
9334         * breakpoint.h (install_breakpoint): Update.
9335         * breakpoint.c (add_solib_catchpoint): Update.
9336         (install_breakpoint): Change argument to a std::unique_ptr.
9337         (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
9338         (create_breakpoint_sal, create_breakpoint): Update.
9339         (watch_command_1, catch_exec_command_1)
9340         (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
9341         (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
9342         Return the breakpoint.
9343         (set_raw_breakpoint_without_location, set_raw_breakpoint)
9344         (new_single_step_breakpoint): Update.
9345         * break-catch-throw.c (handle_gnu_v3_exceptions): Use
9346         std::unique_ptr.
9347         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
9348         std::unique_ptr.
9349         * break-catch-sig.c (create_signal_catchpoint): Use
9350         std::unique_ptr.
9351         * ada-lang.c (create_ada_exception_catchpoint): Use
9352         std::unique_ptr.
9353
9354 2017-08-22  Tom Tromey  <tom@tromey.com>
9355
9356         * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
9357
9358 2017-08-22  Tom Tromey  <tom@tromey.com>
9359
9360         * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
9361         (lookup_partial_symbol): Update.
9362
9363 2017-08-22  Tom Tromey  <tom@tromey.com>
9364
9365         * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
9366         * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
9367         (find_and_open_source, symtab_to_fullname): Update.
9368         * psymtab.c (psymtab_to_fullname): Update.
9369
9370 2017-08-22  Tom Tromey  <tom@tromey.com>
9371
9372         * exec.c (exec_file_attach): Update.
9373         * linux-thread-db.c (try_thread_db_load): Update.
9374         * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
9375         * utils.c (gdb_realpath): Change return type.
9376         (gdb_realpath_keepfile): Update.
9377         (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
9378         (_initialize_utils): Register the new self test.
9379         * source.c (openp): Update.
9380         (find_and_open_source): Update.
9381         * nto-tdep.c (nto_find_and_open_solib): Update.
9382         * main.c (set_gdb_data_directory): Update.
9383         (captured_main_1): Update.
9384         * dwarf2read.c (dwarf2_get_dwz_file): Update
9385         (dw2_map_symbol_filenames): Update.
9386         * auto-load.c (auto_load_safe_path_vec_update): Update.
9387         (filename_is_in_auto_load_safe_path_vec): Change type of
9388         "filename_realp".
9389         (auto_load_objfile_script): Update.
9390         (file_is_auto_load_safe): Update.  Use std::string.
9391         * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
9392
9393 2017-08-22  Tom Tromey  <tom@tromey.com>
9394
9395         * utils.c (gdb_realpath_keepfile): Return a
9396         gdb::unique_xmalloc_ptr.
9397         * exec.c (exec_file_attach): Update.
9398         * utils.h (gdb_realpath_keepfile): Return a
9399         gdb::unique_xmalloc_ptr.
9400
9401 2017-08-22  Tom Tromey  <tom@tromey.com>
9402
9403         * compile/compile.c (compile_file_command): Use
9404         gdb::unique_xmalloc_ptr, std::string.
9405         * utils.c (gdb_abspath): Change return type.
9406         * source.c (openp): Update.
9407         * objfiles.c (allocate_objfile): Update.
9408         * main.c (set_gdb_data_directory): Update.
9409         * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
9410
9411 2017-08-22  Zhouyi Zhou  <zhouzhouyi@gmail.com>
9412
9413         * cli-cmds.c (list_commands): List actual code around more than
9414         one location.
9415
9416 2017-08-21  John Baldwin  <jhb@FreeBSD.org>
9417
9418         * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
9419
9420 2017-08-21  Pedro Alves  <palves@redhat.com>
9421
9422         PR gdb/19487
9423         * c-exp.y (variable production): Handle function aliases.
9424         * minsyms.c (msymbol_is_text): New function.
9425         * minsyms.h (msymbol_is_text): Declare.
9426         * symtab.c (find_function_alias_target): New function.
9427         * symtab.h (find_function_alias_target): Declare.
9428
9429 2017-08-21  Pedro Alves  <palves@redhat.com>
9430
9431         * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
9432         typedefs.
9433         * typeprint.c (whatis_exp): If handling "whatis", and expression
9434         is OP_TYPE, strip one typedef level.  Otherwise don't strip
9435         typedefs here.
9436         * valops.c (value_cast): Save "to" type before resolving
9437         stubs/typedefs.  Use that type as resulting value's type.
9438
9439 2017-08-18  Tom Tromey  <tom@tromey.com>
9440             Pedro Alves  <palves@redhat.com>
9441
9442         * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
9443         * sol-thread.c (sol_thread_resume, sol_thread_wait)
9444         (sol_thread_xfer_partial, rw_common): Use scoped_restore.
9445         * procfs.c (procfs_do_thread_registers): Use scoped_restore.
9446         * proc-service.c (ps_xfer_memory): Use scoped_restore.
9447         * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
9448         (linux_get_siginfo_data): Add "thread" argument.  Use
9449         scoped_restore.
9450         * linux-nat.c (linux_child_follow_fork)
9451         (check_stopped_by_watchpoint): Use scoped_restore.
9452         * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
9453         (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
9454         (restore_inferior_ptid, save_inferior_ptid): Remove.
9455         * btrace.c (btrace_fetch): Use scoped_restore.
9456         * bsd-uthread.c (bsd_uthread_fetch_registers)
9457         (bsd_uthread_store_registers): Use scoped_restore.
9458         * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
9459         scoped_restore.
9460         * aix-thread.c (aix_thread_resume, aix_thread_wait)
9461         (aix_thread_xfer_partial): Use scoped_restore.
9462         * inferior.h (save_inferior_ptid): Remove.
9463
9464 2017-08-18  Yao Qi  <yao.qi@linaro.org>
9465
9466         PR tdep/21818
9467         * arm-tdep.c (gdb_print_insn_arm): Mark
9468         USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
9469
9470 2017-08-18  Yao Qi  <yao.qi@linaro.org>
9471
9472         * NEWS: Mention GDBserver's new option "--selftest".
9473         * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
9474         * selftest.c: Move it to common/selftest.c.
9475         * selftest.h: Move it to common/selftest.h.
9476         * selftest-arch.c (reset): New function.
9477         (tests_with_arch): Call reset.
9478
9479 2017-08-18  Yao Qi  <yao.qi@linaro.org>
9480
9481         * selftest.c (run_tests): Don't call QUIT.  Call debug_printf
9482         instead of exception_fprintf and printf_filtered.
9483
9484 2017-08-18  Yao Qi  <yao.qi@linaro.org>
9485
9486         * selftest.c (register_self_test): Rename it to
9487         selftests::register_test.
9488         (run_self_tests): selftest::run_tests.
9489         * selftest.h: Update declarations.
9490         * selftest-arch.c (register_self_test_foreach_arch): Rename it to
9491         selftests::register_test_foreach_arch.
9492         * selftest-arch.h: Update declaration.
9493         * aarch64-tdep.c: Update.
9494         * arm-tdep.c: Likewise.
9495         * disasm-selftests.c: Likewise.
9496         * dwarf2loc.c: Likewise.
9497         * dwarf2-frame.c: Likewise.
9498         * findvar.c: Likewise.
9499         * gdbarch-selftests.c: Likewise.
9500         * maint.c (maintenance_selftest): Likewise.
9501         * regcache.c: Likewise.
9502         * rust-exp.y: Likewise.
9503         * selftest-arch.c: Likewise.
9504         * unittests/environ-selftests.c: Likewise.
9505         * unittests/function-view-selftests.c: Likewise.
9506         * unittests/offset-type-selftests.c: Likewise.
9507         * unittests/optional-selftests.c: Likewise.
9508         * unittests/scoped_restore-selftests.c: Likewise.
9509         * utils-selftests.c: Likewise.
9510
9511 2017-08-17  Pedro Alves  <palves@redhat.com>
9512
9513         * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
9514         local.
9515
9516 2017-08-17  Pedro Alves  <palves@redhat.com>
9517
9518         * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
9519         field.
9520         (reset_die_in_process): Delete, replaced by ...
9521         (process_die_scope): ... this new class.  Make it responsible for
9522         freeing cu->line_header too.
9523         (process_die): Use process_die_scope.
9524         (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
9525         cu->line_header_die_owner.  Don't release the line header if it's
9526         owned by the CU.
9527         (setup_type_unit_groups): Make the CU/DIE own the line header.
9528         Don't release the line header here.
9529
9530 2017-08-17  Alex Lindsay  <alexlindsay239@gmail.com>  (tiny change)
9531
9532         * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
9533
9534 2017-08-17  Ruslan Kabatsayev  <b7.10110111@gmail.com>
9535
9536         * NEWS: Mention new shortcuts for nexti and stepi in TUI
9537         Single-Key mode
9538
9539 2017-08-16  Ruslan Kabatsayev  <b7.10110111@gmail.com>
9540
9541         * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
9542         mode command list.
9543
9544 2017-08-15  Stafford Horne  <shorne@gmail.com>
9545
9546         * MAINTAINERS (Write After Approval): Add Stafford Horne.
9547
9548 2017-08-15  Stafford Horne  <shorne@gmail.com>
9549
9550         * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
9551
9552 2017-08-15  Sergio Durigan Junior  <sergiodj@redhat.com>
9553
9554         PR gdb/21954
9555         * infcmd.c (unset_environment_command): Use the 'clear' method on
9556         the environment instead of resetting it.
9557
9558 2017-08-15  John Baldwin  <jhb@FreeBSD.org>
9559
9560         * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
9561         platforms.
9562
9563 2017-08-14  Tom Tromey  <tom@tromey.com>
9564
9565         * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
9566         (print_binary_chars): Likewise.
9567         (BITS_IN_BYTES): Remove.
9568
9569 2017-08-14  Tom Tromey  <tom@tromey.com>
9570
9571         PR gdb/21675
9572         * valprint.c (LOW_ZERO): Change value to 034.
9573         (print_octal_chars): Add static_asserts for octal constants.
9574         * printcmd.c (print_scalar_formatted): Add 'd' case.
9575
9576 2017-08-11  Tom Tromey  <tom@tromey.com>
9577
9578         * symfile.c (add_symbol_file_command): Use std::vector.
9579
9580 2017-08-14  Tom Tromey  <tom@tromey.com>
9581
9582         * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
9583         * break-catch-syscall.c (create_syscall_event_catchpoint): Use
9584         std::move.
9585         * break-catch-sig.c (create_signal_catchpoint): Use std::move.
9586
9587 2017-08-11  Pedro Alves  <palves@redhat.com>
9588
9589         * infrun.c (process_event_stop_test): Adjust
9590         function_name_is_marked_for_skip call.
9591         * skip.c: Include <list>.
9592         (skiplist_entry): Make it a class with private fields, and
9593         getters/setters.
9594         (skiplist_entry_chain): Delete.
9595         (skiplist_entries): New.
9596         (skiplist_entry_count): Delete.
9597         (highest_skiplist_entry_num): New.
9598         (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
9599         (add_skiplist_entry): Delete.
9600         (skiplist_entry::skiplist_entry): New.
9601         (skiplist_entry::add_entry): New.
9602         (skip_file_command, skip_function): Adjust.
9603         (compile_skip_regexp): Delete.
9604         (skip_command): Don't compile regexp here.  Adjust to use
9605         skiplist_entry::add_entry.
9606         (skip_info): Adjust to use range-for and getters.
9607         (skip_enable_command, skip_disable_command): Adjust to use
9608         range-for and setters.
9609         (skip_delete_command): Adjust to use std::list.
9610         (add_skiplist_entry): Delete.
9611         (skip_file_p): Delete, refactored as ...
9612         (skiplist_entry::do_skip_file_p): ... this new method.
9613         (skip_gfile_p): Delete, refactored as ...
9614         (skiplist_entry::do_gskip_file_p): ... this new method.
9615         (skip_function_p, skip_rfunction_p): Delete, refactored as ...
9616         (skiplist_entry::skip_function_p): ... this new method.
9617         (function_name_is_marked_for_skip): Now returns bool, and takes
9618         the function sal by const reference.  Adjust to use range-for and
9619         skiplist_entry methods.
9620         (_initialize_step_skip): Remove references to
9621         skiplist_entry_chain, skiplist_entry_count.
9622         * skip.h (function_name_is_marked_for_skip): Now returns bool, and
9623         takes the function sal by const reference.
9624
9625 2017-08-11  Yao Qi  <yao.qi@linaro.org>
9626
9627         * dwarf2-frame.c (clear_pointer_cleanup): Remove.
9628         (dwarf2_frame_cache): Remove reset_cache_cleanup.
9629         (dwarf2_frame_cache):
9630         * frame-unwind.c (frame_unwind_try_unwinder): Catch
9631         RETURN_MASK_ALL and set *this_case to NULL.
9632         * frame-unwind.h: Update comments.
9633
9634 2017-08-11  Yao Qi  <yao.qi@linaro.org>
9635
9636         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
9637         (dwarf2_frame_state_copy_regs): Remove.
9638         (dwarf2_frame_state_free_regs): Remove.
9639         (dwarf2_frame_state::~dwarf2_frame_state): Remove.
9640         (dwarf2_restore_rule): Call method .alloc_regs instead of
9641         dwarf2_frame_state_alloc_regs.
9642         (execute_cfa_program): Likewise.  Call dwarf2_frame_state_reg_info
9643         constructor.  Call std::move.
9644         (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
9645         (dwarf2_frame_cache): Likewise.
9646
9647         [GDB_SELF_TEST]: Include selftest.h and
9648         selftest-arch.h.
9649         [GDB_SELF_TEST] (execute_cfa_program_test): New function.
9650         (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
9651         execute_cfa_program_test.
9652
9653         * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
9654         copy ctor, assignment operator, move assignment.
9655         <alloc_regs>: New method.
9656         <swap>: New method.
9657         (struct dwarf2_frame_state): Delete dtor.
9658         (dwarf2_frame_state_alloc_regs): Remove declaration.
9659         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
9660         dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
9661
9662 2017-08-11  Yao Qi  <yao.qi@linaro.org>
9663
9664         * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
9665         (dwarf2_frame_state::dwarf2_frame_state): New.
9666         (dwarf2_frame_state::~dwarf2_frame_state): New.
9667         (dwarf2_fetch_cfa_info): Update.
9668         (dwarf2_frame_cache): Remove old_chain.  Change 'fs' to an object
9669         rather than a pointer.  Update code.
9670         * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
9671         dtor.
9672         <data_align, code_align, retaddr_column>: Change them to const.
9673         <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
9674         to bool.
9675
9676 2017-08-11  Yao Qi  <yao.qi@linaro.org>
9677
9678         * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
9679         <loc.exp>: New field.
9680         * dwarf2-frame.c (execute_cfa_program): Update.
9681         (dwarf2_frame_prev_register): Update.
9682
9683 2017-08-10  Pedro Alves  <palves@redhat.com>
9684
9685         * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
9686
9687 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
9688
9689         * fbsd-nat.c (struct fbsd_fork_info): Remove.
9690         (fbsd_pending_children): Use std::list.
9691         (fbsd_remember_child): Likewise.
9692         (fbsd_is_child_pending): Likewise.
9693         (fbsd_pending_vfork_done): Use std::forward_list.
9694         (fbsd_add_vfork_done): Likewise.
9695         (fbsd_is_vfork_done_pending): Likewise.
9696         (fbsd_next_vfork_done): Likewise.
9697
9698 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
9699
9700         * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
9701         (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
9702         [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
9703         for `mapfilename'.
9704         (fbsd_xfer_partial): Use gdb::byte_vector.
9705         (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
9706
9707 2017-08-09  John Baldwin  <jhb@FreeBSD.org>
9708
9709         * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
9710         "filestuff.h".
9711         (fbsd_find_memory_regions): Fix `mapfile' initialization.
9712
9713 2017-08-09  Tom Tromey  <tom@tromey.com>
9714
9715         * skip.c (skiplist_entry): New constructor.
9716         (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
9717         (skiplist_entry::file_is_glob): Now bool.
9718         (skiplist_entry::file, skiplist_entry::function): Now
9719         std::string.
9720         (make_skip_entry): Return a unique_ptr.  Use new.
9721         (free_skiplist_entry, free_skiplist_entry_cleanup)
9722         (make_free_skiplist_entry_cleanup): Remove.
9723         (skip_command, skip_disable_command, add_skiplist_entry)
9724         (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
9725         (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
9726         (function_name_is_marked_for_skip): Update.
9727         (skip_delete_command): Update.  Use delete.
9728
9729 2017-08-09  Jiong Wang  <jiong.wang@arm.com>
9730
9731         * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
9732         (aarch64_linux_core_read_description): New function.
9733         (aarch64_linux_init_abi): Register gdbarch_core_read_description.
9734
9735 2017-08-09  Pedro Alves  <palves@redhat.com>
9736
9737         * cp-name-parser.y (cp_comp_to_string): Return a
9738         gdb::unique_xmalloc_ptr<char>.
9739         * cp-support.c (replace_typedefs_qualified_name)
9740         (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
9741         (cp_canonicalize_string_full): Use op= instead of explicit
9742         convertion.
9743         (cp_class_name_from_physname, method_name_from_physname)
9744         (cp_func_name, cp_remove_params): Adjust to use
9745         gdb::unique_xmalloc_ptr<char>.
9746         * cp-support.h (cp_comp_to_string): Return a
9747         gdb::unique_xmalloc_ptr<char>.
9748         * python/py-type.c (typy_lookup_type): Adjust to use
9749         gdb::unique_xmalloc_ptr<char>.
9750
9751 2017-08-09  H.J. Lu  <hongjiu.lu@intel.com>
9752
9753         * dwarf2read.c (dwarf2_string_attr): Fix a typo.
9754
9755 2017-08-09  Alex Lindsay  <alexlindsay239@gmail.com>
9756             Yao Qi  <yao.qi@linaro.org>
9757
9758         * cp-support.c (cp_canonicalize_string_full): Use
9759         gdb::unique_xmalloc_ptr<char>.
9760         (cp_canonicalize_string): Likewise.
9761
9762 2017-08-09  Yao Qi  <yao.qi@linaro.org>
9763
9764         * features/Makefile (WHICH): Remove i386/ non-linux stuff.
9765         * regformats/i386/amd64-avx-avx512.dat: Remove.
9766         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
9767         * regformats/i386/amd64-avx-mpx.dat:Remove.
9768         * regformats/i386/amd64-avx.dat: Remove.
9769         * regformats/i386/amd64-mpx.dat: Remove.
9770         * regformats/i386/i386-avx-avx512.dat: Remove.
9771         * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
9772         * regformats/i386/i386-avx-mpx.dat: Remove.
9773         * regformats/i386/i386-mmx.dat: Remove.
9774         * regformats/i386/i386-mpx.dat: Remove.
9775
9776 2017-08-09  Yao Qi  <yao.qi@linaro.org>
9777
9778         * amd64-tdep.h (tdesc_x32): Remove the declaration.
9779         * amd64-tdep.c: Don't include features/i386/x32*.c.
9780         (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
9781         functions.
9782         * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
9783         and i386/x32-avx-avx512.
9784         (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
9785         and i386/x32.xml.
9786         * features/i386/x32-avx-avx512.c: Removed.
9787         * features/i386/x32-avx-avx512.xml: Removed.
9788         * features/i386/x32-avx.c: Removed.
9789         * features/i386/x32-avx.xml: Removed.
9790         * features/i386/x32.c: Removed.
9791         * features/i386/x32.xml: Removed.
9792         * regformats/i386/x32-avx-avx512.dat: Removed.
9793         * regformats/i386/x32-avx.dat: Removed.
9794         * regformats/i386/x32.dat: Removed.
9795
9796 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
9797
9798         PR breakpoints/21886
9799         * mem-break.c (default_memory_insert_breakpoint): Use
9800         `->placed_address' rather than `->reqstd_address' for the
9801         breakpoint location.
9802
9803 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
9804
9805         * arch-utils.c (default_print_insn): Remove arch/mach/endian
9806         assertions.
9807
9808 2017-08-07  Maciej W. Rozycki  <macro@imgtec.com>
9809
9810         * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
9811         a union of `tdep_info', `tdesc_data' and `id'.
9812         * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
9813         rather than `info.tdep_info'.
9814         * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
9815         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
9816         * i386-tdep.c (i386_gdbarch_init): Likewise.
9817         * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
9818         * mips-tdep.c (mips_gdbarch_init): Likewise.
9819         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
9820         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
9821         * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
9822         `info.tdep_info'.
9823         (ppc_linux_init_abi): Use `info.tdesc_data' rather than
9824         `info.tdep_info'.
9825         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
9826         * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
9827         `info.tdep_info'.
9828         * spu-tdep.c (spu_gdbarch_init): Likewise.
9829         * gdbarch.h: Regenerate.
9830
9831 2017-08-07  Leszek Swirski  <leszeks@google.com>
9832
9833         PR symtab/20899
9834         * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
9835
9836 2017-08-07  Simon Marchi  <simon.marchi@ericsson.com>
9837
9838         * remote-sim.c (gdbsim_load): Remove char **argv local variable.
9839         (gdbsim_open): Rename gdb_argv args object to argv.
9840
9841 2017-08-05  Tom Tromey  <tom@tromey.com>
9842
9843         * compile/compile-object-load.c (compile_object_load): Use
9844         gdb::unique_xmalloc_ptr.
9845         * cli/cli-dump.c (scan_filename): Rename from
9846         scan_filename_with_cleanup.  Change return type.
9847         (scan_expression): Rename from scan_expression_with_cleanup.
9848         Change return type.
9849         (dump_memory_to_file, dump_value_to_file, restore_command):
9850         Use gdb::unique_xmalloc_ptr.  Update.
9851         * cli/cli-cmds.c (find_and_open_script): Use
9852         gdb::unique_xmalloc_ptr.
9853         * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
9854         * symmisc.c (maintenance_print_symbols)
9855         (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
9856         * symfile.c (symfile_bfd_open, generic_load)
9857         (add_symbol_file_command, remove_symbol_file_command): Use
9858         gdb::unique_xmalloc_ptr.
9859         * source.c (openp): Use gdb::unique_xmalloc_ptr.
9860         * psymtab.c (maintenance_print_psymbols): Use
9861         gdb::unique_xmalloc_ptr.
9862         * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
9863         * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
9864         * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
9865         (reload_shared_libraries_1): Likewise.
9866
9867 2017-08-05  Tom Tromey  <tom@tromey.com>
9868
9869         * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
9870         (rust_op_vector, rust_set_vector): New typedefs.
9871         (current_parser): New global.
9872         (work_obstack): Change to pointer type.  Update all users.
9873         (rust_ast, pstate): Remove globals.
9874         (struct rust_parser): New.
9875         (%union) <params, field_inits>: Change type.
9876         (start, tuple_expr, unit_expr, struct_expr_list, literal)
9877         (field_expr, expr_list, maybe_expr_list, type_list): Update.
9878         (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
9879         (convert_params_to_types, convert_params_to_expression): Change
9880         type of "params".
9881         (ast_string): Change type of "fields".
9882         (rust_parse): Make a rust_parser.  Remove cleanups.
9883         (rust_lex_tests): Make and install an auto_obstack.
9884
9885 2017-08-04  Yao Qi  <yao.qi@linaro.org>
9886
9887         * configure.srv (ipa_x32_linux_regobj): New.
9888         * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
9889         instead of X86_TDESC_AVX512.
9890         (initialize_low_tracepoint): Call
9891         init_registers_x32_avx_avx512_linux.
9892
9893 2017-08-04  Yao Qi  <yao.qi@linaro.org>
9894
9895         * utils.h (gdb_argv): Add namespace std for nullptr_t.
9896
9897 2017-08-03  Ruslan Kabatsayev  <b7.10110111@gmail.com>
9898
9899         * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
9900
9901 2017-08-03  Tom Tromey  <tom@tromey.com>
9902
9903         * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
9904         Remove.
9905         * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
9906
9907 2017-08-03  Tom Tromey  <tom@tromey.com>
9908
9909         * python/py-param.c (compute_enum_values): Use gdb_argv.
9910
9911 2017-08-03  Tom Tromey  <tom@tromey.com>
9912
9913         * utils.h (struct gdb_argv_deleter): New.
9914         (gdb_argv): New class.
9915         * utils.c (gdb_argv::reset): New method.
9916         * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
9917         * tracefile.c (tsave_command): Use gdb_argv.
9918         * top.c (new_ui_command): Use gdb_argv.
9919         * symmisc.c (maintenance_print_symbols)
9920         (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
9921         * symfile.c (symbol_file_command, generic_load)
9922         (remove_symbol_file_command): Use gdb_argv.
9923         * stack.c (backtrace_command): Use gdb_argv.
9924         * source.c (add_path, show_substitute_path_command)
9925         (unset_substitute_path_command, set_substitute_path_command):
9926         Use gdb_argv.
9927         * skip.c (skip_command): Use gdb_argv.  Use gdb_buildargv.
9928         * ser-mingw.c (pipe_windows_open): Use gdb_argv.
9929         * remote.c (extended_remote_run, remote_put_command)
9930         (remote_get_command, remote_delete_command): Use gdb_argv.
9931         * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
9932         (gdbsim_open): Use gdb_argv.
9933         * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
9934         * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
9935         * procfs.c (procfs_info_proc): Use gdb_argv.
9936         * interps.c (interpreter_exec_cmd): Use gdb_argv.
9937         * infrun.c (handle_command): Use gdb_argv.
9938         * inferior.c (add_inferior_command, clone_inferior_command):
9939         Use gdb_argv.
9940         * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
9941         * exec.c (exec_file_command): Use gdb_argv.
9942         * cli/cli-cmds.c (alias_command): Use gdb_argv.
9943         * compile/compile.c (build_argc_argv): Use gdb_argv.
9944
9945 2017-08-03  Tom Tromey  <tom@tromey.com>
9946
9947         * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
9948
9949 2017-08-03  Tom Tromey  <tom@tromey.com>
9950
9951         * python/python.c (compute_python_string): Return std::string.
9952         (gdbpy_eval_from_control_command): Update.
9953         (do_start_initialization): Use std::string.
9954         * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
9955         xstrprintf.
9956         * python/py-breakpoint.c (local_setattro): Use string_printf, not
9957         xstrprintf.
9958
9959 2017-08-03  Tom Tromey  <tom@tromey.com>
9960
9961         * top.h (do_restore_instream_cleanup): Remove.
9962         * top.c (do_restore_instream_cleanup): Remove.
9963         (read_command_file): Use scoped_restore.
9964         * cli/cli-script.c (execute_user_command): Use scoped_restore.
9965
9966 2017-08-03  Tom Tromey  <tom@tromey.com>
9967
9968         * cli/cli-script.c (execute_user_command)
9969         (execute_control_command): Use scoped_restore.
9970
9971 2017-08-03  Tom Tromey  <tom@tromey.com>
9972
9973         * cli/cli-script.c (do_restore_user_call_depth): Remove.
9974         (execute_user_command): Remove user_call_depth; use
9975         user_args_stack's size instead.
9976
9977 2017-08-03  Tom Tromey  <tom@tromey.com>
9978
9979         * top.h (in_user_command): Remove.
9980         * top.c (in_user_command): Remove.
9981         * cli/cli-script.c (do_restore_user_call_depth)
9982         (execute_user_command): Update.
9983
9984 2017-08-03  Tom Tromey  <tom@tromey.com>
9985
9986         * valops.c (search_struct_method): Use gdb::byte_vector.
9987         * valarith.c (value_concat): Use std::vector.
9988         * target.c (memory_xfer_partial): Use gdb::byte_vector.
9989         (simple_search_memory): Likewise.
9990         * printcmd.c (find_string_backward): Use gdb::byte_vector.
9991         * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
9992         * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
9993         * elfread.c (elf_rel_plt_read): Use std::string.
9994         * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
9995         * cli/cli-dump.c (restore_section_callback): Use
9996         gdb::byte_vector.
9997
9998 2017-08-03  Tom Tromey  <tom@tromey.com>
9999
10000         * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
10001
10002 2017-08-03  Tom Tromey  <tom@tromey.com>
10003
10004         * tui/tui-regs.c (tui_restore_gdbout): Remove.
10005         (tui_register_format): Use scoped_restore.
10006
10007 2017-08-03  Tom Tromey  <tom@tromey.com>
10008
10009         * reverse.c (exec_direction_default): Remove.
10010         (exec_reverse_once): Use scoped_restore.
10011         * remote.c (restore_remote_timeout): Remove.
10012         (remote_flash_erase, remote_flash_write, remote_flash_done)
10013         (readchar, remote_serial_write): Use scoped_restore.
10014         * cli/cli-script.c (struct source_cleanup_lines_args)
10015         (source_cleanup_lines): Remove.
10016         (script_from_file): Use scoped_restore.
10017         * cli/cli-cmds.c (source_verbose_cleanup): Remove.
10018         (source_command): Use scoped_restore.
10019
10020 2017-08-03  Tom Tromey  <tom@tromey.com>
10021
10022         * utils.h (make_cleanup_free_so): Remove.
10023         * utils.c (do_free_so, make_cleanup_free_so): Remove.
10024         * solist.h (struct so_deleter): New.
10025         (so_list_up): New typedef.
10026         * solib-svr4.c (svr4_read_so_list): Use so_list_up.
10027
10028 2017-08-03  Tom Tromey  <tom@tromey.com>
10029
10030         * utils.h (make_cleanup_restore_current_language): Remove.
10031         * utils.c (do_restore_current_language)
10032         (make_cleanup_restore_current_language): Remove.
10033         * parse.c (parse_exp_in_context_1)
10034         (parse_expression_with_language): Use
10035         scoped_restore_current_language.
10036         * mi/mi-main.c (mi_cmd_execute): Use
10037         scoped_restore_current_language.
10038         * language.h (scoped_restore_current_language): New class.
10039
10040 2017-08-03  Tom Tromey  <tom@tromey.com>
10041
10042         * compile/compile.c (cleanup_unlink_file): Remove.
10043         (compile_to_object): Use gdb::unlinker.
10044         (eval_compile_command): Likewise.
10045
10046 2017-08-03  Tom Tromey  <tom@tromey.com>
10047
10048         * utils.h (make_cleanup_fclose): Remove.
10049         * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
10050
10051 2017-08-03  Tom Tromey  <tom@tromey.com>
10052
10053         * top.c (open_terminal_stream): Return gdb_file_up.
10054         (new_ui_command): Update.
10055
10056 2017-08-03  Tom Tromey  <tom@tromey.com>
10057
10058         * source.c (print_source_lines_base, forward_search_command)
10059         (reverse_search_command): Use gdb_file_up.
10060
10061 2017-08-03  Tom Tromey  <tom@tromey.com>
10062
10063         * fbsd-nat.c (fbsd_find_memory_regions): Update.
10064
10065 2017-08-03  Tom Tromey  <tom@tromey.com>
10066
10067         * cli/cli-cmds.c (find_and_open_script): Change return type.
10068         Remove "streamp" and "full_path" parameters.
10069         (source_script_with_search): Update.
10070         * auto-load.c (source_script_file): Update.
10071         * cli/cli-cmds.h (find_and_open_script): Change type.
10072         (open_script): New struct.
10073
10074 2017-08-03  Tom Tromey  <tom@tromey.com>
10075
10076         * xml-support.c (xml_fetch_content_from_file): Update.
10077         * ui-file.c (stdio_file::open): Update.
10078         * tracefile-tfile.c (tfile_start): Update.
10079         * remote.c (remote_file_put, remote_file_get): Update.
10080         * nat/linux-procfs.c (linux_proc_get_int)
10081         (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
10082         * nat/linux-osdata.c (linux_common_core_of_thread): Update.
10083         (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
10084         (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
10085         (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
10086         * nat/linux-btrace.c (linux_determine_kernel_start): Update.
10087         * linux-nat.c (linux_proc_pending_signals): Update.
10088         * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
10089         (file_closer): Remove.
10090         * compile/compile.c (compile_to_object): Update.
10091         * common/filestuff.h (struct gdb_file_deleter): New.
10092         (gdb_file_up): New typedef.
10093         (gdb_fopen_cloexec): Change return type.
10094         * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
10095         * cli/cli-dump.c (fopen_with_cleanup): Remove.
10096         (dump_binary_file, restore_binary_file): Update.
10097         * auto-load.c (auto_load_objfile_script_1): Update.
10098
10099 2017-08-03  Tom Tromey  <tom@tromey.com>
10100
10101         * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
10102         (info_static_tracepoint_markers_command): Likewise.
10103         * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
10104         * skip.c (skip_info): Use ui_out_emit_table.
10105         * progspace.c (print_program_space): Use ui_out_emit_table.
10106         * osdata.c (info_osdata): Use ui_out_emit_table.
10107         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
10108         ui_out_emit_table.
10109         * linux-thread-db.c (info_auto_load_libthread_db): Use
10110         ui_out_emit_table.
10111         * inferior.c (print_inferior): Use ui_out_emit_table.
10112         * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
10113         * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
10114         * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
10115         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
10116         * ui-out.h (class ui_out_emit_table): New.
10117
10118 2017-08-02  Maciej W. Rozycki  <macro@imgtec.com>
10119
10120         * mips-tdep.c (mips_fpu_type_str): New function.
10121         (mips_dump_tdep): Call it.
10122
10123 2017-08-01  Maciej W. Rozycki  <macro@imgtec.com>
10124
10125         * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
10126         `->mips_fpu_type'.
10127
10128 2017-07-31  Xavier Roirand  <roirand@adacore.com>
10129
10130         * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
10131
10132 2017-07-27  Xavier Roirand  <roirand@adacore.com>
10133
10134         * MAINTAINERS (Write After Approval): Add Xavier Roirand.
10135
10136 2017-07-26  Yao Qi  <yao.qi@linaro.org>
10137
10138         * cli/cli-cmds.c (maintenancechecklist): New variable.
10139         * gdbcmd.h (maintenancechecklist): Declare it.
10140         * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
10141         Call i386_linux_read_description with different masks.
10142         * maint.c (maintenance_check_command): New function.
10143         (_initialize_maint_cmds): Call add_prefix_cmd.
10144         * target-descriptions.c (tdesc_reg): override operator != and ==.
10145         (tdesc_type): Likewise.
10146         (tdesc_feature): Likewise.
10147         (target_desc): Likewise.
10148         [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
10149         (maintenance_check_xml_descriptions): New function.
10150         (_initialize_target_descriptions) Add command "xml-descriptions".
10151         * target-descriptions.h (selftests::record_xml_tdesc): Declare.
10152
10153 2017-07-26  Yao Qi  <yao.qi@linaro.org>
10154
10155         * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
10156         Include features/i386/32bit-*.c.
10157         (i386_linux_read_description): Generate target description if it
10158         doesn't exist.
10159         (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
10160         functions.
10161         * features/i386/32bit-linux.c: Re-generated.
10162         * features/i386/32bit-sse.c: Likewise.
10163         * target-descriptions.c (print_c_feature::visit): Print code to
10164         set register number if needed.
10165         (print_c_feature) <m_next_regnum>: New field.
10166
10167 2017-07-26  Yao Qi  <yao.qi@linaro.org>
10168
10169         * features/Makefile (CFILES): Rename with TDESC_CFILES.
10170         (FEATURE_XMLFILES): New.
10171         (FEATURE_CFILES): New.
10172         New rules.
10173         (clean-cfiles): Remove generated c files.
10174         * features/i386/32bit-avx.c: Generated.
10175         * features/i386/32bit-avx512.c: Generated.
10176         * features/i386/32bit-core.c: Generated.
10177         * features/i386/32bit-linux.c: Generated.
10178         * features/i386/32bit-mpx.c: Generated.
10179         * features/i386/32bit-pkeys.c: Generated.
10180         * features/i386/32bit-sse.c: Generated.
10181         * target-descriptions.c: Include algorithm.
10182         (tdesc_element_visitor): Add method visit_end.
10183         (print_c_tdesc): Implement visit_end.
10184         (print_c_tdesc:: m_filename_after_features): Move it to
10185         protected.
10186         (print_c_feature): New class.
10187         (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
10188         name starts with "i386/32bit-".
10189
10190 2017-07-26  Yao Qi  <yao.qi@linaro.org>
10191
10192         * target-descriptions.c (tdesc_element_visitor): New class.
10193         (tdesc_element): New class.
10194         (tdesc_reg): Inherit from tdesc_element.
10195         (tdesc_reg::accept): New function.
10196         (tdesc_type): Inherit from tdesc_element.
10197         (tdesc_type::accept): New function.
10198         (tdesc_feature): Inherit from tdesc_element.
10199         (tdesc_feature::accept): New function.
10200         (target_desc): Inherit from tdesc_element.
10201         (target_desc::target_desc): New.
10202         (target_desc::~target_desc): New.
10203         (target_desc::accept): New.
10204         (allocate_target_description): Use new.
10205         (free_target_description): Use delete.
10206         (print_c_tdesc): New class.
10207         (maint_print_c_tdesc_cmd): Adjust.
10208
10209         * features/aarch64.c: Re-generated.
10210         * features/arc-arcompact.c: Re-generated.
10211         * features/arc-v2.c: Re-generated.
10212         * features/arm/arm-with-iwmmxt.c: Re-generated.
10213         * features/arm/arm-with-m.c: Re-generated.
10214         * features/arm/arm-with-m-fpa-layout.c: Re-generated.
10215         * features/arm/arm-with-m-vfp-d16.c: Re-generated.
10216         * features/arm/arm-with-neon.c: Re-generated.
10217         * features/arm/arm-with-vfpv2.c: Re-generated.
10218         * features/arm/arm-with-vfpv3.c: Re-generated.
10219         * features/i386/amd64-avx-avx512.c: Re-generated.
10220         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
10221         * features/i386/amd64-avx.c: Re-generated.
10222         * features/i386/amd64-avx-linux.c: Re-generated.
10223         * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
10224         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
10225         * features/i386/amd64-avx-mpx.c: Re-generated.
10226         * features/i386/amd64-avx-mpx-linux.c: Re-generated.
10227         * features/i386/amd64.c: Re-generated.
10228         * features/i386/amd64-linux.c: Re-generated.
10229         * features/i386/amd64-mpx.c: Re-generated.
10230         * features/i386/amd64-mpx-linux.c: Re-generated.
10231         * features/i386/i386-avx-avx512.c: Re-generated.
10232         * features/i386/i386-avx-avx512-linux.c: Re-generated.
10233         * features/i386/i386-avx.c: Re-generated.
10234         * features/i386/i386-avx-linux.c: Re-generated.
10235         * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
10236         * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
10237         * features/i386/i386-avx-mpx.c: Re-generated.
10238         * features/i386/i386-avx-mpx-linux.c: Re-generated.
10239         * features/i386/i386.c: Re-generated.
10240         * features/i386/i386-linux.c: Re-generated.
10241         * features/i386/i386-mmx.c: Re-generated.
10242         * features/i386/i386-mmx-linux.c: Re-generated.
10243         * features/i386/i386-mpx.c: Re-generated.
10244         * features/i386/i386-mpx-linux.c: Re-generated.
10245         * features/i386/x32-avx-avx512.c: Re-generated.
10246         * features/i386/x32-avx-avx512-linux.c: Re-generated.
10247         * features/i386/x32-avx.c: Re-generated.
10248         * features/i386/x32-avx-linux.c: Re-generated.
10249         * features/i386/x32.c: Re-generated.
10250         * features/i386/x32-linux.c: Re-generated.
10251         * features/microblaze.c: Re-generated.
10252         * features/microblaze-with-stack-protect.c: Re-generated.
10253         * features/mips64-dsp-linux.c: Re-generated.
10254         * features/mips64-linux.c: Re-generated.
10255         * features/mips-dsp-linux.c: Re-generated.
10256         * features/mips-linux.c: Re-generated.
10257         * features/nds32.c: Re-generated.
10258         * features/nios2.c: Re-generated.
10259         * features/nios2-linux.c: Re-generated.
10260         * features/rs6000/powerpc-32.c: Re-generated.
10261         * features/rs6000/powerpc-32l.c: Re-generated.
10262         * features/rs6000/powerpc-403.c: Re-generated.
10263         * features/rs6000/powerpc-403gc.c : Re-generated.
10264         * features/rs6000/powerpc-405.c: Re-generated.
10265         * features/rs6000/powerpc-505.c: Re-generated.
10266         * features/rs6000/powerpc-601.c: Re-generated.
10267         * features/rs6000/powerpc-602.c: Re-generated.
10268         * features/rs6000/powerpc-603.c: Re-generated.
10269         * features/rs6000/powerpc-604.c: Re-generated.
10270         * features/rs6000/powerpc-64.c: Re-generated.
10271         * features/rs6000/powerpc-64l.c: Re-generated.
10272         * features/rs6000/powerpc-7400.c: Re-generated.
10273         * features/rs6000/powerpc-750.c: Re-generated.
10274         * features/rs6000/powerpc-860.c: Re-generated.
10275         * features/rs6000/powerpc-altivec32.c: Re-generated.
10276         * features/rs6000/powerpc-altivec32l.c: Re-generated.
10277         * features/rs6000/powerpc-altivec64.c: Re-generated.
10278         * features/rs6000/powerpc-altivec64l.c: Re-generated.
10279         * features/rs6000/powerpc-cell32l.c: Re-generated.
10280         * features/rs6000/powerpc-cell64l.c: Re-generated.
10281         * features/rs6000/powerpc-e500.c: Re-generated.
10282         * features/rs6000/powerpc-e500l.c: Re-generated.
10283         * features/rs6000/powerpc-isa205-32l.c: Re-generated.
10284         * features/rs6000/powerpc-isa205-64l.c: Re-generated.
10285         * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
10286         * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
10287         * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
10288         * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
10289         * features/rs6000/powerpc-vsx32.c: Re-generated.
10290         * features/rs6000/powerpc-vsx32l.c: Re-generated.
10291         * features/rs6000/powerpc-vsx64.c: Re-generated.
10292         * features/rs6000/powerpc-vsx64l.c: Re-generated.
10293         * features/rs6000/rs6000.c: Re-generated.
10294         * features/s390-linux32.c: Re-generated.
10295         * features/s390-linux32v1.c: Re-generated.
10296         * features/s390-linux32v2.c: Re-generated.
10297         * features/s390-linux64.c: Re-generated.
10298         * features/s390-linux64v1.c: Re-generated.
10299         * features/s390-linux64v2.c: Re-generated.
10300         * features/s390-te-linux64.c: Re-generated.
10301         * features/s390-tevx-linux64.c: Re-generated.
10302         * features/s390-vx-linux64.c: Re-generated.
10303         * features/s390x-linux64.c: Re-generated.
10304         * features/s390x-linux64v1.c: Re-generated.
10305         * features/s390x-linux64v2.c: Re-generated.
10306         * features/s390x-te-linux64.c: Re-generated.
10307         * features/s390x-tevx-linux64.c: Re-generated.
10308         * features/s390x-vx-linux64.c: Re-generated.
10309         * features/sparc/sparc32-solaris.c: Re-generated.
10310         * features/sparc/sparc64-solaris.c: Re-generated.
10311         * features/tic6x-c62x.c: Re-generated.
10312         * features/tic6x-c62x-linux.c: Re-generated.
10313         * features/tic6x-c64x.c: Re-generated.
10314         * features/tic6x-c64x-linux.c: Re-generated.
10315         * features/tic6x-c64xp.c: Re-generated.
10316         * features/tic6x-c64xp-linux.c: Re-generated.
10317
10318 2017-07-26  Yao Qi  <yao.qi@linaro.org>
10319
10320         * i386-linux-tdep.c (i386_linux_read_description): New function.
10321         (i386_linux_core_read_description): Call
10322         i386_linux_read_description.
10323         * i386-linux-tdep.h (i386_linux_read_description): Declare.
10324         (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
10325         (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
10326         (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
10327         (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
10328         * x86-linux-nat.c (x86_linux_read_description): Call
10329         i386_linux_read_description.
10330
10331 2017-07-26  Yao Qi  <yao.qi@linaro.org>
10332
10333         * NEWS: Mention it.
10334         * features/Makefile (%.c: %.xml): Pass the xml file name to
10335         command "maint print c-tdesc".
10336         * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
10337         name from 'arg'.
10338
10339 2017-07-26  Yao Qi  <yao.qi@linaro.org>
10340
10341         * target-descriptions.c (target_desc): Add ctor and dtor.  Do
10342         in-class initialization.
10343         (tdesc_create_feature): Call new instead of XCNEW.
10344         (free_target_description): Ue delete.
10345
10346 2017-07-25  John Baldwin  <jhb@FreeBSD.org>
10347
10348         * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
10349
10350 2017-07-25  Yao Qi  <yao.qi@linaro.org>
10351
10352         * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
10353         constant.
10354         (amd64_x32_init_abi): Likewise.
10355         * amd64-tdep.h (amd64_init_abi): Update declaration.
10356         (amd64_x32_init_abi): Likewise.
10357
10358 2017-07-25  Yao Qi  <yao.qi@linaro.org>
10359
10360         PR tdep/21717
10361         * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
10362         condition for FPSCR.
10363         (arm_linux_store_inferior_registers): Likewise.
10364
10365 2017-07-22  Tom Tromey  <tom@tromey.com>
10366
10367         * break-catch-syscall.c (struct catch_syscall_inferior_data)
10368         <syscalls_counts>: Now a std::vector.
10369         (get_catch_syscall_inferior_data): Use "new".
10370         (catch_syscall_inferior_data_cleanup): Use "delete".
10371         (insert_catch_syscall, remove_catch_syscall)
10372         (clear_syscall_counts): Update.
10373
10374 2017-07-22  Tom Tromey  <tom@tromey.com>
10375
10376         * break-catch-syscall.c (syscall_catchpoint)
10377         <syscalls_to_be_caught>: Now a std::vector<int>
10378         (~syscall_catchpoint): Remove.
10379         (insert_catch_syscall, remove_catch_syscall)
10380         (breakpoint_hit_catch_syscall, print_one_catch_syscall)
10381         (print_mention_catch_syscall, print_recreate_catch_syscall):
10382         Update.
10383         (create_syscall_event_catchpoint): Change type of "filter"
10384         parameter.
10385         (catch_syscall_split_args): Return a std::vector.
10386         (catch_syscall_command_1, catching_syscall_number_1): Update.
10387
10388 2017-07-22  Tom Tromey  <tom@tromey.com>
10389
10390         * break-catch-throw.c (struct exception_catchpoint)
10391         <exception_rx>: Now a std::string.
10392         (~exception_catchpoint): Remove.
10393         (print_one_detail_exception_catchpoint): Update.
10394         (handle_gnu_v3_exceptions): Change type of except_rx.
10395         (extract_exception_regexp): Return a std::string.
10396         (catch_exception_command_1): Update.
10397
10398 2017-07-22  Tom Tromey  <tom@tromey.com>
10399
10400         * break-catch-sig.c (gdb_signal_type): Remove typedef.
10401         (struct signal_catchpoint) <signals_to_be_caught>: Now a
10402         std::vector.
10403         <catch_all>: Now a bool.
10404         (~signal_catchpoint): Remove.
10405         (signal_catchpoint_insert_location)
10406         (signal_catchpoint_remove_location)
10407         (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
10408         (signal_catchpoint_print_mention)
10409         (signal_catchpoint_print_recreate)
10410         (signal_catchpoint_explains_signal): Update.
10411         (create_signal_catchpoint): Change type of "filter" and
10412         "catch_all".
10413         (catch_signal_split_args): Return a std::vector.  Change type of
10414         "catch_all".
10415         (catch_signal_command): Update.
10416
10417 2017-07-20  Pedro Alves  <palves@redhat.com>
10418
10419         * ada-lang.c (ada_language_defn): Make extern.
10420         (_initialize_ada_language): Remove add_language call.
10421         * c-lang.c (c_language_defn, cplus_language_defn)
10422         (asm_language_defn, minimal_language_defn): Make extern.
10423         (_initialize_c_language): Delete.
10424         * completer.c (compare_cstrings): Delete, moved to utils.h.
10425         * d-lang.c (d_language_defn): Make extern.
10426         (_initialize_d_language): Remove add_language calls.
10427         * defs.h (enum language): Add comment.
10428         * f-lang.c (f_language_defn): Make extern.
10429         (_initialize_f_language): Remove add_language call.
10430         * go-lang.c (go_language_defn): Make extern.
10431         (_initialize_go_language): Remove add_language call.
10432         * language.c: Include <algorithm>.
10433         (languages): Redefine as const array.
10434         (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
10435         (set_language_command): Handle "local".  Use for-range loop.
10436         (set_language): Remove loop.
10437         (language_enum): Rewrite.
10438         (language_def, language_str): Remove loops.
10439         (add_language): Delete.
10440         (add_set_language_command): New, based on add_languages.
10441         (skip_language_trampoline): Adjust.
10442         (local_language_defn): Delete.
10443         (language_gdbarch_post_init): Adjust.
10444         (_initialize_language): Remove add_language calls.  Call
10445         add_set_language_command.
10446         * language.h (add_language): Delete.
10447         (auto_language_defn)
10448         (unknown_language_defn, minimal_language_defn, ada_language_defn)
10449         (asm_language_defn, c_language_defn, cplus_language_defn)
10450         (d_language_defn, f_language_defn, go_language_defn)
10451         (m2_language_defn, objc_language_defn, opencl_language_defn)
10452         (pascal_language_defn, rust_language_defn): Declare.
10453         * m2-lang.c (m2_language_defn): Make extern.
10454         (_initialize_m2_language): Remove add_language call.
10455         * objc-lang.c (objc_language_defn): Make extern.
10456         (_initialize_objc_language): Remove add_language call.
10457         * opencl-lang.c (opencl_language_defn): Make extern.
10458         (_initialize_opencl_language): Remove add_language call.
10459         * p-lang.c (pascal_language_defn): Make extern.
10460         (_initialize_pascal_language): Delete.
10461         * rust-lang.c (rust_language_defn): Make extern.
10462         (_initialize_rust_language): Delete.
10463         * utils.h (compare_cstrings): New static inline function.
10464
10465 2017-07-20  Pedro Alves  <palves@redhat.com>
10466
10467         * ada-lang.c (ada_to_fixed_type_1): Adjust.
10468         (get_var_value): Constify parameters.
10469         (get_int_var_value): Change prototype.
10470         (to_fixed_range_type): Adjust.
10471         * ada-lang.h (get_int_var_value): Change prototype.
10472
10473 2017-07-20  Pedro Alves  <palves@redhat.com>
10474
10475         * dwarf2read.c (dw2_lookup_symbol): Use
10476         SYMBOL_MATCHES_SEARCH_NAME.
10477         * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
10478
10479 2017-07-20  Pedro Alves  <palves@redhat.com>
10480
10481         * block.c (block_iter_name_step, block_iter_name_first)
10482         (block_iter_name_next): Delete.
10483         (block_lookup_symbol_primary): Adjust to use
10484         dict_iter_match_first/dict_iter_match_next.
10485         * block.h (block_iter_name_first, block_iter_name_next): Delete
10486         declarations.
10487         (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
10488         dict_iter_match_first/dict_iter_match_next.
10489
10490 2017-07-20  Pedro Alves  <palves@redhat.com>
10491
10492         * cp-support.c (cp_find_first_component_aux): Add missing case for
10493         end of string.
10494
10495 2017-07-18  David Blaikie  <dblaikie@gmail.com>
10496
10497         * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
10498         of dwo_cu's dwo_file.
10499
10500 2017-07-18  Yao Qi  <yao.qi@linaro.org>
10501
10502         * remote.c (store_registers_using_G): Remove one line comment.
10503
10504 2017-07-18  Yao Qi  <yao.qi@linaro.org>
10505
10506         * regcache.c (regcache_cpy): Simplify it.
10507         (regcache::cpy_no_passthrough): Remove it.
10508         * regcache.h (cpy_no_passthrough): Remove it.
10509         (regcache_dup, regcache_cpy): Update comments.
10510
10511 2017-07-18  Pedro Alves  <palves@redhat.com>
10512
10513         * remote-sim.c (sim_command_completer): Adjust to work with a
10514         completion_tracker instead of a VEC.
10515
10516 2017-07-17  Pedro Alves  <palves@redhat.com>
10517
10518         * completer.c (complete_source_filenames): New function.
10519         (complete_address_and_linespec_locations): New function.
10520         (location_completer): Use complete_address_and_linespec_locations.
10521         (completion_tracker::build_completion_result): Honor the tracker's
10522         request to suppress append.
10523         * completer.h (completion_tracker::suppress_append_ws)
10524         (completion_tracker::set_suppress_append_ws): New methods.
10525         (completion_tracker::m_suppress_append_ws): New field.
10526         (complete_source_filenames): New declaration.
10527         * linespec.c (linespec_complete_what): New.
10528         (struct ls_parser) <complete_what, completion_word,
10529         completion_quote_char, completion_quote_end, completion_tracker>:
10530         New fields.
10531         (string_find_incomplete_keyword_at_end): New.
10532         (linespec_lexer_lex_string): Record quote char.  If in completion
10533         mode, don't throw.
10534         (linespec_lexer_consume_token): Advance the completion word point.
10535         (linespec_lexer_peek_token): Save/restore completion info.
10536         (save_stream_and_consume_token): New.
10537         (set_completion_after_number): New.
10538         (linespec_parse_basic): Set what to complete next depending on
10539         token.  Handle function and label completions specially.
10540         (parse_linespec): Disable objc shortcut in completion mode.  Set
10541         what to complete next depending on token type.  Skip keyword if in
10542         completion mode.
10543         (complete_linespec_component, linespec_complete): New.
10544         * linespec.h (linespec_complete): Declare.
10545
10546 2017-07-17  Pedro Alves  <palves@redhat.com>
10547
10548         * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
10549         Handle 'operator<' / 'operator<<'.
10550
10551 2017-07-17  Pedro Alves  <palves@redhat.com>
10552
10553         * completer.c (collect_explicit_location_matches): Handle
10554         MATCH_LABEL.
10555         (convert_explicit_location_to_linespec): New, factored out from
10556         ...
10557         (convert_explicit_location_to_sals): ... this.
10558         (complete_label): New.
10559         (linespec_complete_label, find_label_symbols_in_block): New.
10560         (find_label_symbols): Add completion_mode parameter and adjust to
10561         call find_label_symbols_in_block.
10562         * linespec.h (linespec_complete_label): Declare.
10563
10564 2017-07-17  Pedro Alves  <palves@redhat.com>
10565
10566         * ada-lang.c (ada_collect_symbol_completion_matches): Add
10567         complete_symbol_mode parameter.
10568         * cli/cli-cmds.c (complete_command): Get the completion result out
10569         of the handle_brkchars tracker if used a custom word point.
10570         * completer.c: Include "linespec.h".
10571         (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
10572         (advance_to_expression_complete_word_point): New.
10573         (completion_tracker::completes_to_completion_word): New.
10574         (complete_files_symbols): Pass down
10575         complete_symbol_mode::EXPRESSION.
10576         (explicit_options, probe_options): New.
10577         (collect_explicit_location_matches): Complete on the
10578         explictit_loc->foo instead of word.  Use
10579         linespec_complete_function.  Handle MATCH_LINE.  Handle offering
10580         keyword and options completions.
10581         (backup_text_ptr): Delete.
10582         (skip_keyword): New.
10583         (complete_explicit_location): Remove 'word' parameter.  Add
10584         language, quoted_arg_start and quoted_arg_end parameters.
10585         Rewrite, parsing left to right.
10586         (location_completer): Rewrite.
10587         (location_completer_handle_brkchars): New function.
10588         (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
10589         (enum complete_line_internal_reason): Adjust comments.
10590         (completion_tracker::discard_completions): New.
10591         (completer_handle_brkchars_func_for_completer): Handle
10592         location_completer.
10593         (gdb_custom_word_point_brkchars)
10594         (gdb_org_rl_basic_quote_characters): New.
10595         (gdb_completion_word_break_characters_throw)
10596         (completion_find_completion_word): Handle trackers that use a
10597         custom word point.
10598         (completion_tracker::advance_custom_word_point_by): New.
10599         (completion_tracker::build_completion_result): Don't rely on
10600         readline appending the quote char.
10601         (gdb_rl_attempted_completion_function_throw): Handle trackers that
10602         use a custom word point.
10603         (gdb_rl_attempted_completion_function): Restore
10604         rl_basic_quote_characters.
10605         * completer.h (class completion_tracker): Extend intro comment.
10606         (completion_tracker::set_quote_char)
10607         (completion_tracker::quote_char)
10608         (completion_tracker::set_use_custom_word_point)
10609         (completion_tracker::use_custom_word_point)
10610         (completion_tracker::custom_word_point)
10611         (completion_tracker::set_custom_word_point)
10612         (completion_tracker::advance_custom_word_point_by)
10613         (completion_tracker::completes_to_completion_word)
10614         (completion_tracker::discard_completions): New methods.
10615         (completion_tracker::m_quote_char)
10616         (completion_tracker::m_use_custom_word_point)
10617         (completion_tracker::m_custom_word_point): New fields.
10618         (advance_to_expression_complete_word_point): Declare.
10619         * f-lang.c (f_collect_symbol_completion_matches): Add
10620         complete_symbol_mode parameter.
10621         * language.h (struct language_defn)
10622         <la_collect_symbol_completion_matches>: Add complete_symbol_mode
10623         parameter.
10624         * linespec.c (linespec_keywords): Add NULL terminator.  Make extern.
10625         (linespec_complete_function): New function.
10626         (linespec_lexer_lex_keyword): Adjust.
10627         * linespec.h (linespec_keywords, linespec_complete_function): New
10628         declarations.
10629         * location.c (find_end_quote): New function.
10630         (explicit_location_lex_one): Add explicit_completion_info
10631         parameter.  Save quoting info.  Don't throw if being called for
10632         completion.  Don't handle Ada operators here.
10633         (is_cp_operator, skip_op_false_positives, first_of)
10634         (explicit_location_lex_one_function): New function.
10635         (string_to_explicit_location): Replace 'dont_throw' parameter with
10636         an explicit_completion_info pointer parameter.  Handle it.  Don't
10637         use explicit_location_lex_one to lex function names.  Use
10638         explicit_location_lex_one_function instead.
10639         * location.h (struct explicit_completion_info): New.
10640         (string_to_explicit_location): Replace 'dont_throw' parameter with
10641         an explicit_completion_info pointer parameter.
10642         * symtab.c (default_collect_symbol_completion_matches_break_on):
10643         Add complete_symbol_mode parameter.  Handle LINESPEC mode.
10644         (default_collect_symbol_completion_matches)
10645         (collect_symbol_completion_matches): Add complete_symbol_mode
10646         parameter.
10647         (collect_symbol_completion_matches_type): Pass down
10648         complete_symbol_mode::EXPRESSION.
10649         (collect_file_symbol_completion_matches): Add complete_symbol_mode
10650         parameter.  Handle LINESPEC mode.
10651         * symtab.h (complete_symbol_mode): New.
10652         (default_collect_symbol_completion_matches_break_on)
10653         (default_collect_symbol_completion_matches)
10654         (collect_symbol_completion_matches)
10655         (collect_file_symbol_completion_matches): Add complete_symbol_mode
10656         parameter.
10657
10658 2017-07-17  Pedro Alves  <palves@redhat.com>
10659
10660         * utils.c (enum class strncmp_iw_mode): New.
10661         (strcmp_iw): Rename to ...
10662         (strncmp_iw_with_mode): ... this.  Add string2_len and mode
10663         parameters.  Handle them.
10664         (strncmp_iw): New.
10665         (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
10666         * utils.h (strncmp_iw): Declare.
10667         (strcmp_iw): Move describing comments here.
10668
10669 2017-07-17  Pedro Alves  <palves@redhat.com>
10670
10671         * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
10672         CP_OPERATOR_STR.
10673         * c-typeprint.c (is_type_conversion_operator): Use
10674         CP_OPERATOR_STR.
10675         * cp-support.c (LENGTH_OF_OPERATOR): Delete.
10676         (cp_find_first_component_aux): Use CP_OPERATOR_STR and
10677         CP_OPERATOR_LEN.
10678         * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
10679         * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
10680         * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
10681         * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
10682         CP_OPERATOR_STR.
10683         * location.c: Include "cp-support.h".
10684         (explicit_location_lex_one): Use CP_OPERATOR_LEN and
10685         CP_OPERATOR_STR.
10686         * symtab.c (operator_chars): Use CP_OPERATOR_STR and
10687         CP_OPERATOR_LEN.
10688
10689 2017-07-17  Pedro Alves  <palves@redhat.com>
10690
10691         * cli/cli-cmds.c (complete_command): Use a completion tracker
10692         along with completion_find_completion_word for handle_brkchars
10693         phase.
10694         * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
10695         (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
10696         (struct gdb_rl_completion_word_info): New.
10697         (gdb_rl_find_completion_word): New.
10698         (completion_find_completion_word): New.
10699         * completer.h (completion_find_completion_word): Declare.
10700
10701 2017-07-17  Pedro Alves  <palves@redhat.com>
10702
10703         * ada-lang.c (symbol_completion_match): Adjust comments.
10704         (symbol_completion_add): Replace vector parameter with
10705         completion_tracker parameter.  Use it.
10706         (ada_make_symbol_completion_list): Rename to...
10707         (ada_collect_symbol_completion_matches): ... this.  Add
10708         completion_tracker parameter and use it.
10709         (ada_language_defn): Adjust.
10710         * break-catch-syscall.c (catch_syscall_completer): Adjust
10711         prototype and work with completion_tracker instead of VEC.
10712         * breakpoint.c (condition_completer): Adjust prototype and work
10713         with completion_tracker instead of VEC.
10714         * c-lang.c (c_language_defn, cplus_language_defn)
10715         (asm_language_defn, minimal_language_defn): Adjust to renames.
10716         * cli/cli-cmds.c (complete_command): Rework using
10717         completion_tracker.  Catch exceptions when completing.
10718         * cli/cli-decode.c (integer_unlimited_completer)
10719         (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
10720         with completion_tracker instead of VEC.
10721         * command.h (struct completion_tracker): Forward declare.
10722         (completer_ftype, completer_handle_brkchars_ftype): Change
10723         types.
10724         (complete_on_cmdlist, complete_on_enum): Adjust.
10725         * completer.c: Include <algorithm>.
10726         (struct gdb_completer_state): New.
10727         (current_completion): New global.
10728         (readline_line_completion_function): Delete.
10729         (noop_completer, filename_completer)
10730         (filename_completer_handle_brkchars, complete_files_symbols)
10731         (linespec_location_completer): Adjust to work with a
10732         completion_tracker instead of a VEC.
10733         (string_or_empty): New.
10734         (collect_explicit_location_matches): Adjust to work with a
10735         completion_tracker instead of a VEC.
10736         (explicit_location_completer): Rename to ...
10737         (complete_explicit_location): ... this and adjust to work with a
10738         completion_tracker instead of a VEC.
10739         (location_completer): Adjust to work with a completion_tracker
10740         instead of a VEC.
10741         (add_struct_fields): Adjust to work with a completion_list instead
10742         of VEC.
10743         (expression_completer): Rename to ...
10744         (complete_expression): ... this and adjust to work with a
10745         completion_tracker instead of a VEC.  Use complete_files_symbols.
10746         (expression_completer): Reimplement on top of complete_expression.
10747         (symbol_completer): Adjust to work with a completion_tracker
10748         instead of a VEC.
10749         (enum complete_line_internal_reason): Add describing comments.
10750         (complete_line_internal_normal_command): Adjust to work with a
10751         completion_tracker instead of a VEC.
10752         (complete_line_internal): Rename to ...
10753         (complete_line_internal_1): ... this and adjust to work with a
10754         completion_tracker instead of a VEC.  Assert TEXT is NULL in the
10755         handle_brkchars phase.
10756         (new_completion_tracker): Delete.
10757         (complete_line_internal): Reimplement as TRY/CATCH wrapper around
10758         complete_line_internal_1.
10759         (free_completion_tracker): Delete.
10760         (INITIAL_COMPLETION_HTAB_SIZE): New.
10761         (completion_tracker::completion_tracker)
10762         (completion_tracker::~completion_tracker): New.
10763         (maybe_add_completion): Delete.
10764         (completion_tracker::maybe_add_completion)
10765         (completion_tracker::add_completion)
10766         (completion_tracker::add_completions): New.
10767         (throw_max_completions_reached_error): Delete.
10768         (complete_line): Adjust to work with a completion_tracker instead
10769         of a VEC.  Don't create a completion_tracker_t or check for max
10770         completions here.
10771         (command_completer, command_completer_handle_brkchars)
10772         (signal_completer, reg_or_group_completer_1)
10773         (reg_or_group_completer, default_completer_handle_brkchars):
10774         Adjust to work with a completion_tracker.
10775         (gdb_completion_word_break_characters_throw): New.
10776         (gdb_completion_word_break_characters): Reimplement.
10777         (line_completion_function): Delete.
10778         (completion_tracker::recompute_lowest_common_denominator)
10779         (expand_preserving_ws)
10780         (completion_tracker::build_completion_result)
10781         (completion_result::completion_result)
10782         (completion_result::completion_result)
10783         (completion_result::~completion_result)
10784         (completion_result::completion_result)
10785         (completion_result::release_match_list, compare_cstrings)
10786         (completion_result::sort_match_list)
10787         (completion_result::reset_match_list)
10788         (gdb_rl_attempted_completion_function_throw)
10789         (gdb_rl_attempted_completion_function): New.
10790         * completer.h (completion_list, struct completion_result)
10791         (class completion_tracker): New.
10792         (complete_line): Add completion_tracker parameter.
10793         (readline_line_completion_function): Delete.
10794         (gdb_rl_attempted_completion_function): New.
10795         (noop_completer, filename_completer, expression_completer)
10796         (location_completer, symbol_completer, command_completer)
10797         (signal_completer, reg_or_group_completer): Update prototypes.
10798         (completion_tracker_t, new_completion_tracker)
10799         (make_cleanup_free_completion_tracker): Delete.
10800         (enum maybe_add_completion_enum): Delete.
10801         (maybe_add_completion): Delete.
10802         (throw_max_completions_reached_error): Delete.
10803         * corefile.c (complete_set_gnutarget): Adjust to work with a
10804         completion_tracker instead of a VEC.
10805         * cp-abi.c (cp_abi_completer): Adjust to work with a
10806         completion_tracker instead of a VEC.
10807         * d-lang.c (d_language_defn): Adjust.
10808         * disasm.c (disassembler_options_completer): Adjust to work with a
10809         completion_tracker instead of a VEC.
10810         * f-lang.c (f_make_symbol_completion_list): Rename to ...
10811         (f_collect_symbol_completion_matches): ... this.  Adjust to work
10812         with a completion_tracker instead of a VEC.
10813         (f_language_defn): Adjust.
10814         * go-lang.c (go_language_defn): Adjust.
10815         * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
10816         Adjust to work with a completion_tracker instead of a VEC.
10817         * infrun.c (handle_completer): Likewise.
10818         * interps.c (interpreter_completer): Likewise.
10819         * interps.h (interpreter_completer): Likewise.
10820         * language.c (unknown_language_defn, auto_language_defn)
10821         (local_language_defn): Adjust.
10822         * language.h (language_defn::la_make_symbol_completion_list):
10823         Rename to ...
10824         (language_defn::la_collect_symbol_completion_matches): ... this
10825         and adjust to work with a completion_tracker instead of a VEC.
10826         * m2-lang.c (m2_language_defn): Adjust.
10827         * objc-lang.c (objc_language_defn): Adjust.
10828         * opencl-lang.c (opencl_language_defn): Adjust.
10829         * p-lang.c (pascal_language_defn): Adjust.
10830         * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
10831         (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
10832         with a completion_tracker.
10833         * rust-lang.c (rust_language_defn): Adjust.
10834         * symtab.c (free_completion_list, do_free_completion_list)
10835         (return_val, completion_tracker): Delete.
10836         (completion_list_add_name, completion_list_add_symbol)
10837         (completion_list_add_msymbol, completion_list_objc_symbol)
10838         (completion_list_add_fields, add_symtab_completions): Add
10839         completion_tracker parameter and use it.
10840         (default_make_symbol_completion_list_break_on_1): Rename to...
10841         (default_collect_symbol_completion_matches_break_on): ... this.
10842         Add completion_tracker parameter and use it instead of allocating
10843         a completion tracker here.
10844         (default_make_symbol_completion_list_break_on): Delete old
10845         implementation.
10846         (default_make_symbol_completion_list): Delete.
10847         (default_collect_symbol_completion_matches): New.
10848         (make_symbol_completion_list): Delete.
10849         (collect_symbol_completion_matches): New.
10850         (make_symbol_completion_type): Rename to ...
10851         (collect_symbol_completion_matches_type): ... this.  Add
10852         completion_tracker parameter and use it instead of VEC.
10853         (make_file_symbol_completion_list_1): Rename to...
10854         (collect_file_symbol_completion_matches): ... this.  Add
10855         completion_tracker parameter and use it instead of VEC.
10856         (make_file_symbol_completion_list): Delete.
10857         (add_filename_to_list): Use completion_list instead of a VEC.
10858         (add_partial_filename_data::list): Now a completion_list.
10859         (make_source_files_completion_list): Work with a completion_list
10860         instead of a VEC.
10861         * symtab.h: Include "completer.h".
10862         (default_make_symbol_completion_list_break_on)
10863         (default_make_symbol_completion_list, make_symbol_completion_list)
10864         (make_symbol_completion_type, make_file_symbol_completion_list)
10865         (make_source_files_completion_list): Delete.
10866         (default_collect_symbol_completion_matches_break_on)
10867         (default_collect_symbol_completion_matches)
10868         (collect_symbol_completion_matches)
10869         (collect_symbol_completion_matches_type)
10870         (collect_file_symbol_completion_matches)
10871         (make_source_files_completion_list): New.
10872         * top.c (init_main): Don't install a rl_completion_entry_function
10873         hook.  Install a rl_attempted_completion_function hook instead.
10874         * tui/tui-layout.c (layout_completer): Adjust to work with a
10875         completion_tracker.
10876         * tui/tui-regs.c (tui_reggroup_completer):
10877         * tui/tui-win.c (window_name_completer, focus_completer)
10878         (winheight_completer): Adjust to work with a completion_tracker.
10879         * value.c: Include "completer.h".
10880         (complete_internalvar): Adjust to work with a completion_tracker.
10881         * value.h (complete_internalvar): Likewise.
10882
10883 2017-07-17  Pedro Alves  <palves@redhat.com>
10884
10885         * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
10886         renames.
10887         * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
10888         comments to completer_ftype's declaration.
10889         <completer_handle_brkchars>: Change type to
10890         completer_handle_brkchars_ftype.
10891         * command.h (completer_ftype): Add describing comment and give
10892         names to parameters.
10893         (completer_ftype_void): Rename to ...
10894         (completer_handle_brkchars_ftype) ... this.  Add describing comment.
10895         (set_cmd_completer_handle_brkchars): Adjust.
10896         * completer.c (filename_completer_handle_brkchars): New function.
10897         (complete_line_internal_normal_command): New function, factored
10898         out from ...
10899         (complete_line_internal): ... here.
10900         (command_completer_handle_brkchars)
10901         (default_completer_handle_brkchars)
10902         (completer_handle_brkchars_func_for_completer): New functions.
10903         * completer.h (set_gdb_completion_word_break_characters): Delete
10904         declaration.
10905         (completer_handle_brkchars_func_for_completer): New declaration.
10906         * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
10907         completer_handle_brkchars_func_for_completer.
10908
10909 2017-07-17  Pedro Alves  <palves@redhat.com>
10910
10911         * completer.c (symbol_completer): New function, based on
10912         make_symbol_completion_list_fn.
10913         * completer.h (symbol_completer): New declaration.
10914         * guile/scm-cmd.c (cmdscm_completers): Adjust.
10915         * python/py-cmd.c (completers): Adjust.
10916         * symtab.c (make_symbol_completion_list_fn): Delete.
10917         * symtab.h (make_symbol_completion_list_fn): Delete.
10918         * cli/cli-decode.c (add_cmd): Adjust.
10919
10920 2017-07-17  Pedro Alves  <palves@redhat.com>
10921
10922         * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
10923         * dwarf2read.c: Include "filename-seen-cache.h".
10924         * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
10925         (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
10926         * filename-seen-cache.c: New file.
10927         * filename-seen-cache.h: New file.
10928         * symtab.c: Include "filename-seen-cache.h".
10929         (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
10930         (create_filename_seen_cache, clear_filename_seen_cache)
10931         (delete_filename_seen_cache, filename_seen): Delete, parts moved
10932         to filename-seen-cache.h/filename-seen-cache.c.
10933         (output_source_filename, sources_info)
10934         (maybe_add_partial_symtab_filename)
10935         (make_source_files_completion_list): Adjust to use
10936         filename_seen_cache.
10937
10938 2017-07-17  Pedro Alves  <palves@redhat.com>
10939
10940         * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
10941         fields.
10942         (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
10943         dwarf2_debug_sections*)): New.
10944         (dwarf2_per_objfile::dwarf2_per_objfile(const
10945         dwarf2_per_objfile&)): Declare as deleted.
10946         (dwarf2_per_objfile::operator=): Declare as deleted.
10947         (dwarf2_per_objfile::dwarf2_per_objfile)
10948         (dwarf2_per_objfile::~dwarf2_per_objfile)
10949         (dwarf2_per_objfile::free_cached_comp_units): New.
10950         (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
10951         ctor.  Call dwarf2_per_objfile's ctor manually.
10952         (dwarf2_locate_sections): Deleted/refactored as ...
10953         (dwarf2_per_objfile::locate_sections): ... this new method.
10954         (free_cached_comp_units): Defer to
10955         dwarf2_per_objfile::free_cached_comp_units.
10956         (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
10957
10958 2017-07-14  Tom Tromey  <tom@tromey.com>
10959
10960         PR rust/21764:
10961         * rust-exp.y (convert_ast_to_expression): Add "want_type"
10962         parameter.
10963         <UNOP_SIZEOF>: Split into separate case.
10964         <UNOP_VAR_VALUE>: Handle want_type.  Add error case.
10965
10966 2017-07-14  Tom Tromey  <tom@tromey.com>
10967
10968         PR rust/21763:
10969         * symtab.c (symbol_matches_domain): Add language_rust to special
10970         case.
10971         * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
10972         treat LOC_TYPEDEF symbols as variables.
10973
10974 2017-07-14  Pedro Alves  <palves@redhat.com>
10975
10976         * symtab.c (make_file_symbol_completion_list_1): Iterate over
10977         symtabs matching all symtabs with SRCFILE as file name instead of
10978         only considering the first hit, with lookup_symtab.
10979
10980 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
10981
10982         * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
10983         operator_name parameters.
10984         (gen_expr): Update function call.
10985
10986 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
10987
10988         * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
10989         parameter.
10990         * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
10991         Likewise.
10992         * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
10993         parameter, use agent_expr::gdbarch instead, update function
10994         calls.
10995         (locexpr_tracepoint_var_ref): Likewise.
10996         (loclist_tracepoint_var_ref): Likewise.
10997         * ax-gdb.c (gen_trace_static_fields): Likewise.
10998         (gen_traced_pop): Likewise.
10999         (gen_frame_args_address): Likewise.
11000         (gen_frame_locals_address): Likewise.
11001         (gen_var_ref): Likewise.
11002         (gen_struct_ref_recursive): Likewise.
11003         (gen_static_field): Likewise.
11004         (gen_maybe_namespace_elt): Likewise.
11005         (gen_expr): Likewise.
11006         (gen_trace_for_var): Likewise.
11007         (gen_trace_for_expr): Likewise.
11008         (gen_trace_for_return_address): Likewise.
11009
11010 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
11011
11012         * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
11013         parameter.
11014         (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
11015
11016 2017-07-14  Simon Marchi  <simon.marchi@ericsson.com>
11017
11018         * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
11019         from ax, update calls.
11020         (gen_usual_arithmetic): Likewise.
11021         (gen_integral_promotions): Likewise.
11022         (gen_bitfield_ref): Likewise.
11023         (gen_primitive_field): Likewise.
11024         (gen_struct_ref_recursive): Likewise.
11025         (gen_struct_ref): Likewise.
11026         (gen_maybe_namespace_elt): Likewise.
11027         (gen_struct_elt_for_reference): Likewise.
11028         (gen_namespace_elt): Likewise.
11029         (gen_aggregate_elt_ref): Likewise.
11030         (gen_expr): Get gdbarch from ax, update calls.
11031         (gen_expr_binop_rest): Likewise.
11032
11033 2017-07-13  Pedro Alves  <palves@redhat.com>
11034
11035         * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
11036         as default tdesc.
11037         * amd64-dicos-tdep.c (amd64_dicos_init_abi):
11038         * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
11039         * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
11040         tdesc_amd64_linux as default tdesc.  Get final tdesc from the
11041         tdep.
11042         (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
11043         Get final tdesc from the tdep.
11044         * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
11045         default tdesc.
11046         * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
11047         * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
11048         * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
11049         Use it as default tdesc.
11050         (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
11051         down to amd_init_abi.  No longer handle fallback tdesc here.
11052         * amd64-tdep.h (tdesc_x32): Declare.
11053         (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
11054         parameter.
11055         * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
11056         as default tdesc.
11057
11058 2017-07-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11059
11060         * s390-linux-tdep.c (s390_process_record): Add support for
11061         instructions new in arch12.
11062
11063 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
11064
11065         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
11066         PT_GETFSBASE and PT_GETGSBASE.
11067         (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
11068         PT_SETGSBASE.
11069
11070 2017-07-11  John Baldwin  <jhb@FreeBSD.org>
11071
11072         * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
11073         (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
11074         (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
11075         those rules.
11076         * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
11077         * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
11078         * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
11079         * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
11080         * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
11081         * features/i386/amd64.xml: Add 64bit-segments.xml.
11082         * features/i386/amd64-avx-avx512.c: Regenerated.
11083         * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
11084         * features/i386/amd64-avx-mpx.c: Regenerated.
11085         * features/i386/amd64-avx.c: Regenerated.
11086         * features/i386/amd64-mpx.c: Regenerated.
11087         * features/i386/amd64.c: Regenerated.
11088         * regformats/i386/amd64-avx-avx512.dat: Regenerated.
11089         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
11090         * regformats/i386/amd64-avx-mpx.dat: Regenerated.
11091         * regformats/i386/amd64-avx.dat: Regenerated.
11092         * regformats/i386/amd64-mpx.dat: Regenerated.
11093         * regformats/i386/amd64.dat: Regenerated.
11094
11095 2017-07-10  Yao Qi  <yao.qi@linaro.org>
11096
11097         * features/i386/amd64-avx-avx512-linux.c: Re-generated.
11098         * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
11099
11100 2017-07-10  Anton Kolesov  <Anton.Kolesov@synopsys.com>
11101
11102         * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
11103         unsetenv.
11104         * gnulib/aclocal.m4: Regenerate.
11105         * gnulib/config.in: Regenerate.
11106         * gnulib/configure: Regenerate.
11107         * gnulib/import/Makefile.am: Regenerate.
11108         * gnulib/import/Makefile.in: Regenerate.
11109         * gnulib/import/m4/gnulib-cache.m4: Regenerate.
11110         * gnulib/import/m4/gnulib-comp.m4: Regenerate.
11111         * gnulib/import/m4/environ.m4: New file.
11112         * gnulib/import/m4/setenv.m4: New file.
11113         * gnulib/import/setenv.c: New file.
11114         * gnulib/import/unsetenv.c: New file.
11115
11116 2017-07-09  Simon Marchi  <simon.marchi@ericsson.com>
11117
11118         * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
11119         address when op is DW_OP_addr.
11120
11121 2017-07-09  Tom Tromey  <tom@tromey.com>
11122
11123         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
11124         check and apply to outer type.
11125
11126 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
11127
11128         * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
11129         (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
11130         (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
11131         (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
11132
11133 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
11134
11135         * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
11136
11137 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
11138
11139         * corelow.c (get_core_siginfo): Remove.
11140         (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
11141         instead of get_core_siginfo.
11142         * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
11143         * gdbarch.h: Re-generate.
11144         * gdbarch.c: Re-generate.
11145         * linux-tdep.c (linux_core_xfer_siginfo): New.
11146         (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
11147
11148 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
11149
11150         * corelow.c (thread_section_name): Move to ...
11151         * gdbcore.h (thread_section_name): ... here.
11152
11153 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
11154
11155         * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
11156         (struct siginfo32): New.
11157         [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
11158         (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
11159         via ptrace(PT_LWPINFO).
11160
11161 2017-07-07  John Baldwin  <jhb@FreeBSD.org>
11162
11163         * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
11164         (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
11165         (fbsd_get_siginfo_type): New.
11166         (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
11167         (_initialize_fbsd_tdep): New.
11168
11169 2017-07-06  David Blaikie  <dblaikie@gmail.com>
11170
11171         * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
11172         a singular dwo_unit*) to support multiple CUs in the same way that
11173         multiple TUs are supported.
11174         (create_cus_hash_table): Replace create_dwo_cu with a function for
11175         parsing multiple CUs from a DWO file.
11176         (open_and_init_dwo_file): Use create_cus_hash_table rather than
11177         create_dwo_cu.
11178         (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
11179         htab_find, rather than comparing the signature to a singleton CU in
11180         the dwo_file.
11181
11182 2017-07-06  Pedro Alves  <palves@redhat.com>
11183
11184         * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
11185
11186 2017-07-04  Pedro Alves  <palves@redhat.com>
11187
11188         * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
11189         * gdbtypes.h (TYPE_STATIC): Delete.
11190         (struct fn_field) <is_public, is_abstract, is_static, is_final,
11191         is_synchronized, is_native>: Delete.
11192         <dummy>: Bump.
11193         (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
11194         (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
11195         (TYPE_FN_FIELD_ABSTRACT): Delete.
11196
11197 2017-07-03  Simon Marchi  <simon.marchi@ericsson.com>
11198
11199         * buffer.h (buffer_finish): Fix spelling mistakes.
11200
11201 2017-07-01  Eli Zaretskii  <eliz@gnu.org>
11202
11203         * .dir-locals.el: Automatically switch to C-style comments in
11204         versions of Emacs that support the feature.
11205
11206 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
11207             Pedro Alves  <palves@redhat.com>
11208
11209         PR cli/21688
11210         * cli/cli-script.c (command_name_equals_not_inline): Remove function.
11211         (process_next_line): New variable 'inline_cmd'.
11212         Adjust 'if' clauses for "python", "compile" and "guile" to use
11213         'command_name_equals' and check for '!inline_cmd'.
11214
11215 2017-06-30  Sergio Durigan Junior  <sergiodj@redhat.com>
11216
11217         PR cli/21688
11218         * cli/cli-script.c (command_name_equals_not_inline): New function.
11219         (process_next_line): Adjust 'if' clauses for "python", "compile"
11220         and "guile" to use command_name_equals_not_inline.
11221
11222 2017-06-29  Pedro Alves  <palves@redhat.com>
11223
11224         * completer.c (expression_completer): Call
11225         linespec_location_completer instead of location_completer.
11226
11227 2017-06-29  Pedro Alves  <palves@redhat.com>
11228
11229         * completer.c (expression_completer): Remove code that recomputes
11230         'text' from 'word'.
11231
11232 2017-06-29  Yao Qi  <yao.qi@linaro.org>
11233
11234         * regformats/regdat.sh: Generate code with
11235         "ifndef IN_PROCESS_AGENT".
11236
11237 2017-06-28  Pedro Alves  <palves@redhat.com>
11238
11239         * command.h: Include "common/scoped_restore.h".
11240
11241 2017-06-28  Yao Qi  <yao.qi@linaro.org>
11242
11243         * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
11244         instead of obstack_grow.
11245
11246 2017-06-28  Doug Gilmore  <Doug.Gilmore@imgtec.com>
11247
11248         PR gdb/21337
11249         * symfile.c (reread_symbols): Call objfiles_changed just before
11250         read_symbols.
11251
11252 2017-06-27  Pedro Alves  <palves@redhat.com>
11253
11254         * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
11255         (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
11256         (completion_list_add_symbol, completion_list_add_msymbol):
11257         ... these new functions.
11258         (add_symtab_completions)
11259         (default_make_symbol_completion_list_break_on_1): Adjust.
11260
11261 2017-06-27  Pedro Alves  <palves@redhat.com>
11262
11263         * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
11264         bfd_zalloc.  Call objfile_per_bfd_storage's ctor.
11265         (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
11266         dtor.
11267         * objfiles.h (objfile_per_bfd_storage): Add ctor.  Make
11268         'storage_obstack' field an auto_obstack.  In-class initialize all
11269         non-bitfield fields.  Make minsyms_read bool.
11270         * symfile.c (read_symbols): Adjust.
11271
11272 2017-06-27  Alan Hayward  <alan.hayward@arm.com>
11273
11274         * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
11275         (gdbsim_store_register): Likewise.
11276
11277 2017-06-27  Pedro Alves  <palves@redhat.com>
11278
11279         * c-exp.y (name_obstack): Now an auto_obstack.
11280         (yylex): Use auto_obstack::clear.
11281         (c_parse): Use auto_obstack::clear instead of reinitializing and
11282         freeing the obstack.
11283         * c-lang.c (evaluate_subexp_c): Use auto_obstack.
11284         * d-exp.y (name_obstack): Now an auto_obstack.
11285         (yylex): Use auto_obstack::clear.
11286         (d_parse): Use auto_obstack::clear instead of reinitializing and
11287         freeing the obstack.
11288         * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
11289         auto_obstack.
11290         * dwarf2read.c (create_addrmap_from_index)
11291         (dwarf2_build_psymtabs_hard)
11292         (update_enumeration_type_from_children): Likewise.
11293         * gdb_obstack.h (auto_obstack): New type.
11294         * go-exp.y (name_obstack): Now an auto_obstack.
11295         (build_packaged_name): Use auto_obstack::clear.
11296         (go_parse): Use auto_obstack::clear instead of reinitializing and
11297         freeing the obstack.
11298         * linux-tdep.c (linux_make_mappings_corefile_notes): Use
11299         auto_obstack.
11300         * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
11301         * rust-exp.y (work_obstack): Now an auto_obstack.
11302         (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
11303         reinitializing and freeing the obstack.
11304         * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
11305         (host_char_to_target): Use auto_obstack.
11306         * utils.h (make_cleanup_obstack_free): Delete declaration.
11307         * valprint.c (generic_emit_char, generic_printstr): Use
11308         auto_obstack.
11309
11310 2017-06-27  Simon Marchi  <simon.marchi@ericsson.com>
11311
11312         * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
11313         thread.
11314         (darwin_init_thread_list): Don't update dummy thread.
11315         (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
11316
11317 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
11318
11319         * record-full.c (netorder16): Remove.
11320
11321 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
11322
11323         * common/diagnostics.h: Define macros for GCC.
11324         (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
11325         * common/vec.h: Include diagnostics.h.
11326         (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
11327         (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
11328         warning.
11329
11330 2017-06-26  Simon Marchi  <simon.marchi@ericsson.com>
11331
11332         * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
11333         New macro.
11334         * ada-lex.l: Ignore deprecated register warnings.
11335
11336 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
11337
11338         * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
11339         datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
11340
11341 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
11342
11343         * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
11344         its own line.
11345
11346 2017-06-25  Simon Marchi  <simon.marchi@ericsson.com>
11347
11348         * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
11349
11350 2017-06-23  Alan Hayward  <alan.hayward@arm.com>
11351
11352         * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
11353         (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
11354         (xtensa_register_read_masked): Likewise.
11355
11356 2017-06-22  Sergio Durigan Junior  <sergiodj@redhat.com>
11357
11358         * common/environ.c (gdb_environ::unset): Update comment.
11359
11360 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
11361
11362         * python/py-unwind.c (pyuw_sniffer): Allocate space for
11363         registers.
11364
11365 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
11366
11367         * record-full.c (record_full_exec_insn): Use byte_vector.
11368
11369 2017-06-22  Yao Qi  <yao.qi@linaro.org>
11370
11371         * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
11372         * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
11373
11374 2017-06-22  Alan Hayward  <alan.hayward@arm.com>
11375
11376         * remote.c (cached_reg): Move from here...
11377         * regcache.h (cached_reg): ...to here.
11378         * python/py-unwind.c (struct reg_info): Remove.
11379         (cached_frame_info): Use cached_reg_t.
11380         (pyuw_prev_register): Likewise.
11381         (pyuw_sniffer): Use cached_reg_t and allocate registers.
11382         (pyuw_dealloc_cache): Free all registers.
11383
11384 2017-06-22  Pedro Alves  <palves@redhat.com>
11385             Simon Marchi  <simon.marchi@ericsson.com>
11386
11387         * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
11388         warning.
11389         * common/diagnostics.h: New file.
11390
11391 2017-06-22  Pedro Alves  <palves@redhat.com>
11392
11393         * common/agent.h: Add include guards.
11394
11395 2017-06-21  Simon Marchi  <simon.marchi@ericsson.com>
11396
11397         * target.h (struct target_ops) <to_xfer_partial>: Update doc to
11398         talk about addressable units instead of bytes.
11399
11400 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
11401
11402         * common/environ.c (gdb_environ::unset): Use '::iterator' instead
11403         of '::const_iterator'.
11404
11405 2017-06-20  Sergio Durigan Junior  <sergiodj@redhat.com>
11406
11407         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11408         'unittests/environ-selftests.c'.
11409         (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
11410         * charset.c (find_charset_names): Declare object 'iconv_env'.
11411         Update code to use 'iconv_env' object.  Remove call to
11412         'free_environ'.
11413         * common/environ.c: Include <utility>.
11414         (make_environ): Delete function.
11415         (free_environ): Delete function.
11416         (gdb_environ::clear): New function.
11417         (gdb_environ::operator=): New function.
11418         (gdb_environ::get): Likewise.
11419         (environ_vector): Delete function.
11420         (set_in_environ): Delete function.
11421         (gdb_environ::set): New function.
11422         (unset_in_environ): Delete function.
11423         (gdb_environ::unset): New function.
11424         (gdb_environ::envp): Likewise.
11425         * common/environ.h: Include <vector>.
11426         (struct gdb_environ): Delete; transform into...
11427         (class gdb_environ): ... this class.
11428         (free_environ): Delete prototype.
11429         (init_environ, get_in_environ, set_in_environ, unset_in_environ,
11430         environ_vector): Likewise.
11431         * infcmd.c (run_command_1): Update code to call
11432         'envp' from 'gdb_environ' class.
11433         (environment_info): Update code to call methods from 'gdb_environ'
11434         class.
11435         (unset_environment_command): Likewise.
11436         (path_info): Likewise.
11437         (path_command): Likewise.
11438         * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
11439         (inferior::inferior): Initialize 'environment' using the host's
11440         information.
11441         * inferior.h: Remove forward declaration of 'struct gdb_environ'.
11442         Include "environ.h".
11443         (class inferior) <environment>: Change type from 'struct
11444         gdb_environ' to 'gdb_environ'.
11445         * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
11446         methods from 'gdb_environ' class.
11447         * solib.c (solib_find_1): Likewise
11448         * unittests/environ-selftests.c: New file.
11449
11450 2017-06-20  Yao Qi  <yao.qi@linaro.org>
11451
11452         * features/i386/i386-linux.xml: Exchange the order of including
11453         32bit-linux.xml and 32bit-sse.xml.
11454         * features/i386/i386-linux.c: Regenerated.
11455
11456 2017-06-20  Yao Qi  <yao.qi@linaro.org>
11457
11458         * target-descriptions.c (tdesc_reg): Add ctor, dtor.
11459         Delete copy ctor and assignment operator.
11460         (tdesc_type): Likewise.
11461         (tdesc_feature): Likewise.
11462         (tdesc_free_reg): Remove.
11463         (tdesc_create_reg): Use new.
11464         (tdesc_free_type): Remove.
11465         (tdesc_create_vector): Use new.
11466         (tdesc_create_union): Likewise.
11467         (tdesc_create_flags): Likewise.
11468         (tdesc_create_enum): Likewise.
11469         (tdesc_free_feature): Delete.
11470         (free_target_description): Use delete.
11471
11472 2017-06-19  John Baldwin  <jhb@FreeBSD.org>
11473
11474         * mips-tdep.c (print_gp_register_row): Don't error for unavailable
11475         registers.
11476
11477 2017-06-19  Pedro Alves  <palves@redhat.com>
11478
11479         * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
11480         after gdb::unlinker.
11481
11482 2017-06-19  Sergio Durigan Junior  <sergiodj@redhat.com>
11483
11484         * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
11485         gdb_environ to access an environment variable.
11486
11487 2017-06-18  Thomas Petazzoni  <thomas.petazzoni@free-electrons.com>
11488
11489         * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
11490         gdb_byte*.
11491
11492 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
11493
11494         * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
11495
11496 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
11497
11498         * configure: Re-generate.
11499         * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
11500
11501 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
11502
11503         * configure: Re-generate.
11504         * warning.m4: Pass -Werror to compiler when checking for
11505         supported warning flags.
11506
11507 2017-06-17  Simon Marchi  <simon.marchi@ericsson.com>
11508
11509         * Makefile.in (COMPILE.pre): Add "-x c++".
11510
11511 2017-06-16  Alan Hayward  <alan.hayward@arm.com>
11512             Pedro Alves  <palves@redhat.com>
11513             Yao Qi  <yao.qi@linaro.org>
11514
11515         * defs.h (RequireLongest): New.
11516         (extract_integer): Declare function template.
11517         (extract_signed_integer): Remove the declaration, but define it
11518         static inline.
11519         (extract_unsigned_integer): Likewise.
11520         (store_integer): Declare function template.
11521         (store_signed_integer): Remove the declaration, but define it
11522         static inline.
11523         (store_unsigned_integer): Likewise.
11524         * findvar.c (extract_integer): New function template.
11525         (extract_signed_integer): Remove.
11526         (extract_unsigned_integer): Remove.
11527         (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
11528         instantiations.
11529         (store_integer): New function template.
11530         (store_signed_integer): Remove.
11531         (store_unsigned_integer): Remove.
11532         (store_integer): Explicit instantiations.
11533         * regcache.c (regcache_raw_read_signed): Update.
11534         (regcache::raw_read): New function.
11535         (regcache::raw_read_signed): Remove.
11536         (regcache::raw_read_unsigned): Remove.
11537         (regcache_raw_read_unsigned): Update.
11538         (regcache_raw_write_unsigned): Update.
11539         (regcache::raw_write_signed): Remove.
11540         (regcache::raw_write): New function.
11541         (regcache_cooked_read_signed): Update.
11542         (regcache::raw_write_unsigned): Remove.
11543         (regcache::cooked_read_signed): Remove.
11544         (regcache_cooked_read_unsigned): Update.
11545         (regcache::cooked_read_unsigned): Remove.
11546         (regcache_cooked_write_signed): Update.
11547         (regcache_cooked_write_unsigned): Update.
11548         * regcache.h (regcache) <raw_read_signed>: Remove.
11549         <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
11550         <raw_read, raw_write>: New.
11551         <cooked_read_signed, cooked_write_signed>: Remove.
11552         <cooked_write_unsigned, cooked_read_unsigned>: Remove.
11553         <cooked_read, cooked_write>: New.
11554         * sh64-tdep.c (sh64_pseudo_register_read): Update.
11555         (sh64_pseudo_register_write): Update.
11556
11557 2017-06-16  Anton Kolesov  <anton.kolesov@synopsys.com>
11558
11559         * arc-tdep.c (arc_disassembler_options): New variable.
11560         (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
11561         of default_print_insn.
11562         (arc_delayed_print_insn): Set info->section when needed,
11563         use default_print_insn to retrieve a disassembler.
11564
11565 2017-06-14  Sergio Durigan Junior  <sergiodj@redhat.com>
11566
11567         PR gdb/21574
11568         * infcmd.c (_initialize_infcmd): Expand "help run" documentation
11569         to mention $SHELL and startup-with-shell.
11570
11571 2017-06-14  Max Filippov  <jcmvbkbc@gmail.com>
11572
11573         * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
11574
11575 2017-06-14  Yao Qi  <yao.qi@linaro.org>
11576
11577         * aarch64-tdep.c (aarch64_gdb_print_insn): Call
11578         default_print_insn instead of print_insn_aarch64.
11579         * arm-tdep.c (gdb_print_insn_arm): Call
11580         default_print_insn instead of print_insn_big_arm
11581         and print_insn_little_arm.
11582         * i386-tdep.c (i386_print_insn): Call default_print_insn
11583         instead of print_insn_i386.
11584         * ia64-tdep.c (ia64_print_insn): Call
11585         default_print_insn instead of print_insn_ia64.
11586         * mips-tdep.c (gdb_print_insn_mips): Call
11587         default_print_insn instead of print_insn_big_mips
11588         and print_insn_little_mips.
11589         * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
11590         instead of print_insn_spu.
11591
11592 2017-06-14  Pedro Alves  <palves@redhat.com>
11593
11594         * ada-lang.c: Include "common/byte-vector.h".
11595         (ada_value_primitive_packed_val): Use gdb::byte_vector.
11596         * charset.c (wchar_iterator::iterate): Resize the vector instead
11597         of reserving it.
11598         * common/byte-vector.h: Include "common/def-vector.h".
11599         (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
11600         * cli/cli-dump.c: Include "common/byte-vector.h".
11601         (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
11602         * common/byte-vector.h: New file.
11603         * common/def-vector.h: New file.
11604         * common/default-init-alloc.h: New file.
11605         * dwarf2loc.c: Include "common/byte-vector.h".
11606         (rw_pieced_value): Use gdb::byte_vector, and resize the vector
11607         instead of reserving it.
11608         * dwarf2read.c: Include "common/byte-vector.h".
11609         (data_buf::m_vec): Now a gdb::byte_vector.
11610         * gdb_regex.c: Include "common/def-vector.h".
11611         (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
11612         * mi/mi-main.c: Include "common/byte-vector.h".
11613         (mi_cmd_data_read_memory): Use gdb::byte_vector.
11614         * printcmd.c: Include "common/byte-vector.h".
11615         (print_scalar_formatted): Use gdb::byte_vector.
11616         * valprint.c: Include "common/byte-vector.h".
11617         (maybe_negate_by_bytes, print_decimal_chars): Use
11618         gdb::byte_vector.
11619
11620 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
11621
11622         * darwin-nat.c: Include "nat/fork-inferior.h".
11623
11624 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
11625
11626         * configure.nat: Factor out Darwin bits that are not
11627         architecture-specific.  Add fork-inferior.o.
11628
11629 2017-06-13  Simon Marchi  <simon.marchi@ericsson.com>
11630
11631         * configure.nat: Factor out AIX bits that are not
11632         architecture-specific.  Add fork-inferior.o.
11633
11634 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11635
11636         * dwarf2loc.c (rw_pieced_value): New.  Merge logic from...
11637         (read_pieced_value, write_pieced_value): ...here.  Reduce to
11638         wrappers that just call rw_pieced_value.
11639
11640 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11641
11642         * dwarf2loc.c (write_pieced_value): When writing the data for a
11643         memory piece, use write_memory_with_notification instead of
11644         write_memory.
11645
11646 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11647
11648         * valops.c (read_value_memory): Change embedded_offset to
11649         represent a bit offset instead of a byte offset.
11650         * value.h (read_value_memory): Adjust comment.
11651
11652 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11653
11654         * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
11655         dest_offset_bits and source_offset_bits.
11656         (write_pieced_value): Likewise.
11657
11658 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11659
11660         * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
11661         given by DW_OP_bit_piece.
11662         (write_pieced_value): Likewise.
11663
11664 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11665
11666         * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
11667         some other preparations to the places where sufficient information
11668         is available.
11669         (write_pieced_value): Likewise.
11670
11671 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11672
11673         * dwarf2loc.c (bits_to_bytes): New function.
11674         (read_pieced_value): Fix offset calculations for register pieces
11675         on big-endian targets.
11676         (write_pieced_value): Likewise.
11677
11678 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11679
11680         * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
11681         (write_pieced_value): Likewise.
11682
11683 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11684
11685         * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
11686         transfer the source value's least significant bits, instead of its
11687         lowest-addressed ones.  Rename type_len to max_offset.
11688         (read_pieced_value): Mirror above changes to write_pieced_value as
11689         applicable.
11690
11691 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11692
11693         * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
11694         truncate full bytes from dest_offset_bits before using it as an
11695         offset into the buffer.
11696
11697 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11698
11699         * dwarf2loc.c (write_pieced_value): Include transfer size in
11700         byte-wise check.
11701
11702 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11703
11704         * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
11705         calculation of this_size.
11706
11707 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11708
11709         * dwarf2loc.c (read_pieced_value): Respect parent value's offset
11710         when targeting a bit-field.
11711         (write_pieced_value): Likewise.
11712
11713 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11714
11715         * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
11716         (allocate_piece_closure): Drop addr_size parameter.
11717         (dwarf2_evaluate_loc_desc_full): Adjust call to
11718         allocate_piece_closure.
11719
11720 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11721
11722         PR gdb/21226
11723         * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
11724         the LSB end, independent of endianness.
11725
11726 2017-06-13  Andreas Arnez  <arnez@linux.vnet.ibm.com>
11727
11728         * dwarf2loc.c (write_pieced_value): Fix order of calculations for
11729         size capping.
11730
11731 2017-06-13  Yao Qi  <yao.qi@linaro.org>
11732
11733         * mips-linux-nat.c: Move include features/mips*-linux.c to
11734         mips-linux-tdep.c.
11735         (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
11736         to mips-linux-tdep.c.
11737         * mips-linux-tdep.c: Include features/mips*-linux.c
11738         (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
11739         functions.
11740         * mips-linux-tdep.h (tdesc_mips_linux): Declare.
11741         (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
11742         (tdesc_mips64_dsp_linux): Declare.
11743
11744 2017-06-12  Tom Tromey  <tom@tromey.com>
11745
11746         * valprint.h (val_print_type_code_int): Remove.
11747         * valprint.c (generic_val_print_int): Always call
11748         val_print_scalar_formatted.
11749         (val_print_type_code_int): Remove.
11750         * printcmd.c (print_scalar_formatted): Handle options->format==0.
11751         * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
11752         * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
11753         * ada-valprint.c (ada_val_print_num): Use
11754         val_print_scalar_formatted.
11755
11756 2017-06-12  Tom Tromey  <tom@tromey.com>
11757
11758         * printcmd.c (print_scalar_formatted): Unify the two switches.
11759         Don't convert scalars to LONGEST.
11760
11761 2017-06-12  Tom Tromey  <tom@tromey.com>
11762
11763         PR exp/16225:
11764         * valprint.h (print_decimal_chars): Update.
11765         * valprint.c (maybe_negate_by_bytes): New function.
11766         (print_decimal_chars): Add "is_signed" argument.
11767         * printcmd.c (print_scalar_formatted): Update.
11768
11769 2017-06-12  Tom Tromey  <tom@tromey.com>
11770
11771         PR exp/16225:
11772         * valprint.h (print_binary_chars, print_hex_chars): Update.
11773         * valprint.c (val_print_type_code_int): Update.
11774         (print_binary_chars): Add "zero_pad" argument.
11775         (emit_octal_digit): New function.
11776         (print_octal_chars): Don't zero-pad.
11777         (print_decimal_chars): Likewise.
11778         (print_hex_chars): Add "zero_pad" argument.
11779         * sh64-tdep.c (sh64_do_fp_register): Update.
11780         * regcache.c (regcache::dump): Update.
11781         * printcmd.c (print_scalar_formatted): Update.
11782         * infcmd.c (default_print_one_register_info): Update.
11783
11784 2017-06-12  Pedro Alves  <palves@redhat.com>
11785             Alan Hayward  <alan.hayward@arm.com>
11786
11787         * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
11788         (mips_eabi_push_dummy_call): Rename local 'regsize' to
11789         'abi_regsize'.  Rename local array 'valbuf' to 'ref_valbuf', and
11790         use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
11791         Assert that abi_regsize bytes fit in 'ref_valbuf'.
11792
11793 2017-06-12  Pedro Alves  <palves@redhat.com>
11794
11795         * dwarf2read.c (mapped_symtab::data): Now a vector of
11796         symtab_index_entry instead of vector of
11797         std::unique_ptr<symtab_index_entry>.  All users adjusted to check
11798         whether an element's name is NULL instead of checking whether the
11799         element itself is NULL.
11800         (find_slot): Change return type.  Adjust.
11801         (hash_expand, , add_index_entry, uniquify_cu_indices)
11802         (write_hash_table): Adjust.
11803
11804 2017-06-12  Pedro Alves  <palves@redhat.com>
11805
11806         * dwarf2read.c (recursively_count_psymbols): New function.
11807         (write_psymtabs_to_index): Call it to compute number of psyms and
11808         pass estimate size of psyms_seen to unordered_set's ctor.
11809
11810 2017-06-12  Pedro Alves  <palves@redhat.com>
11811
11812         * dwarf2read.c (write_hash_table): Check if key already exists
11813         before emplacing.
11814
11815 2017-06-12  Pedro Alves  <palves@redhat.com>
11816
11817         * dwarf2read.c (data_buf::append_space): Rename to...
11818         (data_buf::grow): ... this, and make private.  Adjust all callers.
11819         (data_buf::append_uint): New method.
11820         (add_address_entry, write_one_signatured_type)
11821         (write_psymtabs_to_index): Use it.
11822
11823 2017-06-12  Pedro Alves  <palves@redhat.com>
11824
11825         * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
11826         (file_write (FILE *, const std::vector<Elem>&)): Delete.
11827         (data_buf::file_write): Call ::fwrite directly.
11828
11829 2017-06-12  Pedro Alves  <palves@redhat.com>
11830
11831         * dwarf2read.c (uniquify_cu_indices): Use std::unique and
11832         std::vector::erase.
11833
11834 2017-06-12  Jan Kratochvil  <jan.kratochvil@redhat.com>
11835
11836         Code cleanup: C++ify .gdb_index producer.
11837         * dwarf2read.c: Include <unordered_set> and <unordered_map>.
11838         (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
11839         (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
11840         (create_strtab, add_string): Remove.
11841         (file_write, data_buf): New.
11842         (struct symtab_index_entry): Use std::vector for cu_indices.
11843         (struct mapped_symtab): Use std::vector for data.
11844         (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
11845         (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
11846         Remove.
11847         (find_slot): Change return type.  Update it to the new data structures.
11848         (hash_expand, add_index_entry): Update it to the new data structures.
11849         (offset_type_compare): Remove.
11850         (uniquify_cu_indices): Update it to the new data structures.
11851         (c_str_view, c_str_view_hasher, vector_hasher): New.
11852         (add_indices_to_cpool): Remove.
11853         (write_hash_table): Update it to the new data structures.
11854         (struct psymtab_cu_index_map, hash_psymtab_cu_index)
11855         (eq_psymtab_cu_index): Remove.
11856         (psym_index_map): New typedef.
11857         (struct addrmap_index_data): Change addr_obstack pointer to data_buf
11858         reference and std::unordered_map for cu_index_htab.
11859         (add_address_entry, add_address_entry_worker, write_address_map)
11860         (write_psymbols): Update it to the new data structures.
11861         (write_obstack): Remove.
11862         (struct signatured_type_index_data): Change types_list to a data_buf
11863         reference and psyms_seen to a std::unordered_set reference.
11864         (write_one_signatured_type, recursively_write_psymbols)
11865         (write_psymtabs_to_index): Update it to the new data structures.
11866
11867 2017-06-11  Simon Marchi  <simon.marchi@ericsson.com>
11868
11869         * NEWS (Changes since GDB 8.0): Announce {set,show} debug
11870         separate-debug-file commands.
11871         * symfile.h (separate_debug_file_debug): New global.
11872         * symfile.c (separate_debug_file_debug): New global.
11873         (separate_debug_file_exists, find_separate_debug_file): Add
11874         debug output.
11875         (_initialize_symfile): Add "set debug separate-debug-file"
11876         command.
11877         * build-id.c (build_id_to_debug_bfd,
11878         find_separate_debug_file_by_buildid): Add debug output.
11879
11880 2017-06-10  Simon Marchi  <simon.marchi@polymtl.ca>
11881
11882         * gdbarch.sh (displaced_step_free_closure): Remove.
11883         * gdbarch.h, gdbarch.c: Re-generate.
11884         * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
11885         displaced_step_free_closure.
11886         * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
11887         * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
11888         * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
11889         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
11890         * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
11891         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
11892         * arch-utils.h (simple_displaced_step_free_closure): Remove.
11893         * arch-utils.c (simple_displaced_step_free_closure): Remove.
11894         * infrun.c (displaced_step_clear): Call xfree instead of
11895         gdbarch_displaced_step_free_closure.
11896
11897 2017-06-08  Sergio Durigan Junior  <sergiodj@redhat.com>
11898
11899         * common/common-utils.c (stringify_argv): Check for "arg[0] !=
11900         NULL".
11901
11902 2017-06-08 Alan Hayward  <alan.hayward@arm.com>
11903
11904         * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
11905         (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
11906         (mn10300_push_dummy_call): Likewise.
11907
11908 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
11909
11910         * mi/mi-main.c (register_changed_p): Use value_contents_eq.
11911
11912 2017-06-08  Alan Hayward  <alan.hayward@arm.com>
11913
11914         * mi/mi-main.c (register_changed_p): Use cooked_read_value.
11915
11916 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
11917
11918         * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
11919         able to start inferiors using a shell.
11920         (New remote packets): Announce new packet "QStartupWithShell".
11921         * remote.c: Add PACKET_QStartupWithShell.
11922         (extended_remote_create_inferior): Handle new
11923         PACKET_QStartupWithShell.
11924         (remote_protocol_features) <QStartupWithShell>: New entry for
11925         PACKET_QStartupWithShell.
11926         (_initialize_remote): Call "add_packet_config_cmd" for
11927         QStartupShell.
11928
11929 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
11930             Pedro Alves  <palves@redhat.com>
11931
11932         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
11933         and "nat/fork-inferior.h".
11934         * common/common-inferior.h: New file, with contents from
11935         "gdb/inferior.h".
11936         * commom/common-utils.c: Include "common-utils.h".
11937         (stringify_argv): New function.
11938         * common/common-utils.h (stringify_argv): New prototype.
11939         * configure.nat: Add "fork-inferior.o" as a dependency for
11940         "*linux*", "fbsd*" and "nbsd*" hosts.
11941         * corefile.c (get_exec_file): Update comment.
11942         * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
11943         instead of "startup_inferior".
11944         (darwin_create_inferior): Call "add_thread_silent" after
11945         "fork_inferior".
11946         * fork-child.c: Cleanup unnecessary includes.
11947         (SHELL_FILE): Move to "common/common-fork-child.c".
11948         (environ): Likewise.
11949         (exec_wrapper): Initialize.
11950         (get_exec_wrapper): New function.
11951         (breakup_args): Move to "common/common-fork-child.c"; rename to
11952         "breakup_args_for_exec".
11953         (escape_bang_in_quoted_argument): Move to
11954         "common/common-fork-child.c".
11955         (saved_ui): New variable.
11956         (prefork_hook): New function.
11957         (postfork_hook): Likewise.
11958         (postfork_child_hook): Likewise.
11959         (gdb_startup_inferior): Likewise.
11960         (fork_inferior): Move to "common/common-fork-child.c".  Update
11961         function to support gdbserver.
11962         (startup_inferior): Likewise.
11963         * gdbcore.h (get_exec_file): Remove declaration.
11964         * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
11965         instead of "startup_inferior".  Call "add_thread_silent" after
11966         "fork_inferior".
11967         * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
11968         (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
11969         instead of "startup_inferior".  Call "add_thread_silent" after
11970         "fork_inferior".
11971         * inferior.h: Include "common-inferior.h".
11972         (trace_start_error): Move to "common/common-utils.h".
11973         (trace_start_error_with_name): Likewise.
11974         (fork_inferior): Move prototype to "nat/fork-inferior.h".
11975         (startup_inferior): Likewise.
11976         (gdb_startup_inferior): New prototype.
11977         * nat/fork-inferior.c: New file, with contents from "fork-child.c".
11978         * nat/fork-inferior.h: New file.
11979         * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
11980         instead of "startup_inferior".  Call "add_thread_silent" after
11981         "fork_inferior".
11982         * target.h (target_terminal_init): Move prototype to
11983         "target/target.h".
11984         (target_terminal_inferior): Likewise.
11985         (target_terminal_ours): Likewise.
11986         * target/target.h (target_terminal_init): New prototype, moved
11987         from "target.h".
11988         (target_terminal_inferior): Likewise.
11989         (target_terminal_ours): Likewise.
11990         * utils.c (gdb_flush_out_err): New function.
11991
11992 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
11993
11994         * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
11995         * common/common-gdbthread.h: New file, with parts from
11996         "gdb/gdbthread.h".
11997         * gdbthread.h: Include "common-gdbthread.h".
11998         (switch_to_thread): Moved to "common/common-gdbthread.h".
11999
12000 2017-06-07  Sergio Durigan Junior  <sergiodj@redhat.com>
12001
12002         * Makefile.in (SFILES): Add "common/job-control.c".
12003         (HFILES_NO_SRCDIR): Add "common/job-control.h".
12004         (COMMON_OBS): Add "job-control.o".
12005         * common/job-control.c: New file, with contents from
12006         "gdb/inflow.c".
12007         * common/job-control.h: New file, with contents from "terminal.h".
12008         * fork-child.c: Include "job-control.h".
12009         * inflow.c: Include "job-control.h".
12010         (gdb_setpgid): Move to "common/common-inflow.c".
12011         (_initialize_inflow): Move setting of "job_control" to
12012         "handle_job_control".
12013         * terminal.h (job_control): Moved to "common/common-terminal.h".
12014         (gdb_setpgid): Likewise.
12015         * top.c: Include "job_control.h".
12016         * utils.c: Likewise.
12017         (job_control): Moved to "job-control.c".
12018
12019 2017-06-07  Pedro Alves  <palves@redhat.com>
12020
12021         * Makefile.in (SFILES): Add gdb_regex.c.
12022         (COMMON_OBS): Add gdb_regex.o.
12023         * ada-lang.c (ada_add_standard_exceptions)
12024         (ada_add_exceptions_from_frame, name_matches_regex)
12025         (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
12026         parameter type to compiled_regex.  Adjust.
12027         (ada_exceptions_list): Use compiled_regex.
12028         * break-catch-throw.c (exception_catchpoint::pattern): Now a
12029         std::unique_ptr<compiled_regex>.
12030         (exception_catchpoint::~exception_catchpoint): Remove regfree
12031         call.
12032         (check_status_exception_catchpoint): Adjust to use compiled_regex.
12033         (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
12034         * breakpoint.c (solib_catchpoint::compiled): Now a
12035         std::unique_ptr<compiled_regex>.
12036         (solib_catchpoint::~solib_catchpoint): Remove regfree call.
12037         (check_status_catch_solib): Adjust to use compiled_regex.
12038         (add_solib_catchpoint): Adjust to use compiled_regex.
12039         * cli/cli-cmds.c (apropos_command): Use compiled_regex.
12040         * cli/cli-decode.c (apropos_cmd): Change regex parameter to
12041         compiled_regex reference.  Adjust to use it.
12042         * cli/cli-decode.h: Remove struct re_pattern_buffer forward
12043         declaration.  Include "gdb_regex.h".
12044         (apropos_cmd): Change regex parameter to compiled_regex reference.
12045         * gdb_regex.c: New file.
12046         * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
12047         declarations.
12048         (class compiled_regex): New.
12049         * linux-tdep.c: Include "common/gdb_optional.h".
12050         (struct mapping_regexes): New, factored out from
12051         mapping_is_anonymous_p, and adjusted to use compiled_regex.
12052         (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
12053         gdb::optional and remove cleanups.  Adjust to compiled_regex.
12054         * probe.c: Include "common/gdb_optional.h".
12055         (collect_probes): Use compiled_regex and gdb::optional and remove
12056         cleanups.
12057         * skip.c: Include "common/gdb_optional.h".
12058         (skiplist_entry::compiled_function_regexp): Now a
12059         gdb::optional<compiled_regex>.
12060         (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
12061         (free_skiplist_entry): Remove regfree call.
12062         (compile_skip_regexp, skip_rfunction_p): Adjust to use
12063         compiled_regex and gdb::optional.
12064         * symtab.c: Include "common/gdb_optional.h".
12065         (search_symbols): Use compiled_regex and gdb::optional.
12066         * utils.c (do_regfree_cleanup, make_regfree_cleanup)
12067         (get_regcomp_error, compile_rx_or_error): Delete.  Some bits moved
12068         to gdb_regex.c.
12069
12070 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
12071
12072         * regcache.c (regcache::save): Avoid buffer use.
12073         (regcache::dump): Likewise.
12074
12075 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
12076
12077         * sh-tdep.c (sh_pseudo_register_read): Remove
12078         MAX_REGISTER_SIZE.
12079         (sh_pseudo_register_write): Likewise.
12080         * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
12081         (sh64_pseudo_register_write): Likewise
12082
12083 2017-06-07  Alan Hayward  <alan.hayward@arm.com>
12084
12085         * aarch64-tdep.c (aarch64_store_return_value): Use
12086         V_REGISTER_SIZE.
12087         (aarch64_pseudo_read_value): Likewise.
12088         (aarch64_pseudo_write): Likewise.
12089
12090 2017-06-06  Yao Qi  <yao.qi@linaro.org>
12091
12092         * regformats/regdef.h (set_register_cache): Remove the
12093         declaration.
12094
12095 2017-06-06 Alan Hayward  <alan.hayward@arm.com>
12096
12097         * frame.c (frame_unwind_register_signed): Use
12098         frame_unwind_register_value.
12099
12100 2017-06-06  Pedro Alves  <palves@redhat.com>
12101
12102         PR breakpoints/21553
12103         * breakpoint.c (create_breakpoints_sal_default)
12104         (init_breakpoint_sal, create_breakpoint_sal): Use
12105         gdb::unique_xmalloc_ptr for string parameters.
12106         (create_breakpoint): Constify 'extra_string' and 'cond_string'
12107         parameters.  Replace cleanups with gdb::unique_xmalloc_ptr.
12108         (base_breakpoint_create_breakpoints_sal)
12109         (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
12110         (strace_marker_create_breakpoints_sal)
12111         (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
12112         string parameters.
12113         * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
12114         gdb::unique_xmalloc_ptr for string parameters.
12115         (create_breakpoint): Constify 'extra_string' and 'cond_string'
12116         parameters.
12117
12118 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
12119
12120         * alpha-tdep.c (alpha_register_to_value): Use
12121         get_frame_register_value.
12122         (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
12123
12124 2017-06-06  Alan Hayward  <alan.hayward@arm.com>
12125
12126         * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
12127         (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
12128         (ia64_value_to_register): Likewise.
12129         (ia64_extract_return_value): Likewise.
12130         (ia64_store_return_value): Likewise.
12131         (ia64_push_dummy_call): Likewise.
12132
12133 2017-06-04  Joel Brobecker  <brobecker@adacore.com>
12134
12135         GDB 8.0 released.
12136
12137 2017-06-03  Simon Marchi  <simon.marchi@ericsson.com>
12138
12139         * x86-linux-nat.c (struct arch_lwp_info): Remove.
12140
12141 2017-06-03  Simon Marchi  <simon.marchi@polymtl.ca>
12142
12143         * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
12144         parameter.
12145         (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
12146
12147 2017-06-02  Simon Marchi  <simon.marchi@ericsson.com>
12148
12149         * event-loop.c (poll_timers): Unallocate timer using delete
12150         instead of xfree.
12151
12152 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
12153
12154         * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
12155         (struct breakpoint) <~breakpoint>: New.
12156         (struct watchpoint): Inherit from breakpoint.
12157         <~watchpoint>: New.
12158         <base>: Remove.
12159         (struct tracepoint): Inherit from breakpoint.
12160         <base>: Remove.
12161         * breakpoint.c (longjmp_breakpoint_ops): Remove.
12162         (struct longjmp_breakpoint): Inherit from breakpoint.
12163         <~longjmp_breakpoint>: New.
12164         <base>: Remove.
12165         (new_breakpoint_from_type): Remove casts.
12166         (watchpoint_in_thread_scope): Remove reference to base field.
12167         (watchpoint_del_at_next_stop): Likewise.
12168         (update_watchpoint): Likewise.
12169         (watchpoint_check): Likewise.
12170         (bpstat_check_watchpoint): Likewise.
12171         (set_longjmp_breakpoint): Likewise.
12172         (struct fork_catchpoint): Inherit from breakpoint.
12173         <base>: Remove.
12174         (struct solib_catchpoint): Inherit from breakpoint.
12175         <~solib_catchpoint>: New.
12176         <base>: Remove.
12177         (dtor_catch_solib): Change to ...
12178         (solib_catchpoint::~solib_catchpoint): ... this.
12179         (breakpoint_hit_catch_solib): Remove reference to base field.
12180         (add_solib_catchpoint): Likewise.
12181         (create_fork_vfork_event_catchpoint): Likewise.
12182         (struct exec_catchpoint): Inherit from breakpoint.
12183         <~exec_catchpoint>: New.
12184         <base>: Remove.
12185         (dtor_catch_exec): Change to ...
12186         (exec_catchpoint::~exec_catchpoint): ... this.
12187         (dtor_watchpoint): Change to ...
12188         (watchpoint::~watchpoint): ... this.
12189         (watch_command_1): Remove reference to base field.
12190         (catch_exec_command_1): Likewise.
12191         (base_breakpoint_dtor): Change to ...
12192         (breakpoint::~breakpoint): ... this.
12193         (base_breakpoint_ops): Remove dtor field value.
12194         (longjmp_bkpt_dtor): Change to ...
12195         (longjmp_breakpoint::~longjmp_breakpoint): ... this.
12196         (strace_marker_create_breakpoints_sal): Remove reference to base
12197         field.
12198         (delete_breakpoint): Don't manually call breakpoint destructor.
12199         (create_tracepoint_from_upload): Remove reference to base field.
12200         (trace_pass_set_count): Likewise.
12201         (initialize_breakpoint_ops): Don't initialize
12202         momentary_breakpoint_ops, don't set dtors.
12203         * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
12204         <~ada_catchpoint>: New.
12205         <base>: Remove.
12206         (create_excep_cond_exprs): Remove reference to base field.
12207         (dtor_exception): Change to ...
12208         (ada_catchpoint::~ada_catchpoint): ... this.
12209         (dtor_catch_exception): Remove.
12210         (dtor_catch_exception_unhandled): Remove.
12211         (dtor_catch_assert): Remove.
12212         (create_ada_exception_catchpoint): Remove reference to base
12213         field.
12214         (initialize_ada_catchpoint_ops): Don't set dtors.
12215         * break-catch-sig.c (struct signal_catchpoint): Inherit from
12216         breakpoint.
12217         <~signal_catchpoint>: New.
12218         <base>: Remove.
12219         (signal_catchpoint_dtor): Change to ...
12220         (signal_catchpoint::~signal_catchpoint): ... this.
12221         (create_signal_catchpoint): Remove reference to base field.
12222         (initialize_signal_catchpoint_ops): Don't set dtor.
12223         * break-catch-syscall.c (struct syscall_catchpoint): Inherit
12224         from breakpoint.
12225         <~syscall_catchpoint>: New.
12226         <base>: Remove.
12227         (dtor_catch_syscall): Change to ...
12228         (syscall_catchpoint::~syscall_catchpoint): ... this.
12229         (create_syscall_event_catchpoint): Remove reference to base
12230         field.
12231         (initialize_syscall_catchpoint_ops): Don't set dtor.
12232         * break-catch-throw.c (struct exception_catchpoint): Inherit
12233         from breakpoint.
12234         <~exception_catchpoint>: New.
12235         <base>: Remove.
12236         (dtor_exception_catchpoint): Change to ...
12237         (exception_catchpoint::~exception_catchpoint): ... this.
12238         (handle_gnu_v3_exceptions): Remove reference to base field.
12239         (initialize_throw_catchpoint_ops): Don't set dtor.
12240         * ctf.c (ctf_get_traceframe_address): Remove reference to base
12241         field.
12242         * remote.c (remote_get_tracepoint_status): Likewise.
12243         * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
12244         * tracefile.c (tracefile_fetch_registers): Likewise.
12245         * tracepoint.c (actions_command): Likewise.
12246         (validate_actionline): Likewise.
12247         (tfind_1): Likewise.
12248         (get_traceframe_location): Likewise.
12249         (find_matching_tracepoint_location): Likewise.
12250         (parse_tracepoint_status): Likewise.
12251         * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
12252
12253 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
12254
12255         * breakpoint.c (struct longjmp_breakpoint): New struct.
12256         (is_tracepoint_type): Change return type to bool.
12257         (is_longjmp_type): New function.
12258         (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
12259         (set_raw_breakpoint_without_location): Use
12260         new_breakpoint_from_type.
12261         (set_raw_breakpoint): Likewise.
12262
12263 2017-06-02  Simon Marchi  <simon.marchi@polymtl.ca>
12264
12265         * breakpoint.c (new_breakpoint_from_type): New function.
12266         (create_breakpoint_sal): Use new_breakpoint_from_type and
12267         unique_ptr.
12268         (create_breakpoint): Likewise.
12269
12270 2017-05-31  Simon Marchi  <simon.marchi@ericsson.com>
12271
12272         * memattr.c (mem_info_command): Rename to ...
12273         (info_mem_command): ... this.
12274         (mem_enable_command): Rename to ...
12275         (enable_mem_command): ... this.
12276         (mem_disable_command): Rename to ...
12277         (disable_mem_command): ... this.
12278         (mem_delete_command): Rename to ...
12279         (delete_mem_command): ... this.
12280         (_initialize_mem): Adjust function names.
12281
12282 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
12283
12284         * btrace.c (handle_pt_insn_events): New.
12285         (ftrace_add_pt): Call handle_pt_insn_events.  Rename ERRCODE into
12286         STATUS.  Split into this and ...
12287         (handle_pt_insn_event_flags): ... this.
12288
12289 2017-05-31  Markus Metzger  <markus.t.metzger@intel.com>
12290
12291         * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
12292         and struct pt_insn.resynced.
12293         * configure: Regenerated.
12294         * config.in: Regenerated.
12295
12296 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
12297
12298         * btrace.c (ftrace_find_call_by_number): New function.
12299         (ftrace_new_function): Store objects, not pointers.
12300         (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
12301         ftrace_new_gap, ftrace_update_function,
12302         ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
12303         btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
12304         btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
12305         btrace_ends_with_single_insn, btrace_call_get): Account for
12306         btrace_thread_info::functions now storing objects.
12307         * btrace.h (struct btrace_thread_info): Add constructor.
12308         (struct btrace_thread_info) <functions>: Make std::vector.
12309         (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
12310         Initialize with default values.
12311         * record-btrace.c (record_btrace_frame_sniffer): Account for
12312         btrace_thread_info::functions now storing objects.
12313
12314 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
12315
12316         * btrace.c: Remove typedef bfun_s.
12317         (ftrace_new_gap): Directly add gaps to the list of gaps.
12318         (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
12319         ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
12320         btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
12321         instead of gdb VEC.
12322
12323 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
12324
12325         * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
12326         ftrace_bridge_gap): Replace references to btrace_thread_info::segment
12327         with btrace_thread_info::next_segment and
12328         btrace_thread_info::prev_segment.
12329         * btrace.h: Remove struct btrace_func_link.
12330         (struct btrace_function): Replace pair of function segment pointers
12331         with pair of indices.
12332         * python/py-record-btrace.c (btpy_call_prev_sibling,
12333         btpy_call_next_sibling): Replace references to
12334         btrace_thread_info::segment with btrace_thread_info::next_segment and
12335         btrace_thread_info::prev_segment.
12336         * record-btrace.c (record_btrace_frame_this_id): Use
12337         btrace_find_call_by_number.
12338
12339 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
12340
12341         * btrace.c (ftrace_new_function, ftrace_fixup_level,
12342         ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
12343         btrace_insn_next, btrace_insn_prev): Remove references to
12344         btrace_thread_info::flow.
12345         * btrace.h (struct btrace_function): Remove FLOW.
12346
12347 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
12348
12349         * btrace.c (ftrace_find_call_by_number): New function.
12350         (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
12351         ftrace_get_caller, ftrace_find_call, ftrace_new_return,
12352         ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
12353         ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
12354         index.
12355         * btrace.h (struct btrace_function): Turn UP into an index.
12356         * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
12357         as an index.
12358         * record-btrace.c (record_btrace_frame_unwind_stop_reason,
12359         record_btrace_frame_prev_register, record_btrace_frame_sniffer,
12360         record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
12361
12362 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
12363
12364         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
12365         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
12366         ftrace_update_function, ftrace_compute_global_level_offset,
12367         btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
12368         btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
12369         btrace_insn_end, btrace_is_empty): Remove references to
12370         btrace_thread_info::begin and btrace_thread_info::end.
12371         * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
12372         (struct btrace_thread_info) <functions>: Adjust comment.
12373         * record-btrace.c (record_btrace_start_replaying): Remove reference to
12374         btrace_thread_info::begin.
12375
12376 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
12377
12378         * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
12379         ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
12380         ftrace_update_function): Remove arguments that implicitly were always
12381         BTINFO->END.
12382         (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
12383         Don't pass BTINFO->END.
12384
12385 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
12386
12387         * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
12388         btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
12389         btrace_find_insn_by_number): Replace function segment pointer with
12390         index.
12391         (btrace_insn_cmp): Simplify.
12392         * btrace.h: (struct btrace_insn_iterator) Rename index to
12393         insn_index.  Replace function segment pointer with index into function
12394         segment vector.
12395         * record-btrace.c (record_btrace_call_history): Replace function
12396         segment pointer use with index.
12397         (record_btrace_frame_sniffer): Retrieve function call segment through
12398         vector.
12399         (record_btrace_set_replay): Remove defunc't safety check.
12400
12401 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
12402
12403         * btrace.c (btrace_ends_with_single_insn): New function.
12404         (btrace_call_get, btrace_call_number, btrace_call_begin,
12405         btrace_call_end, btrace_call_next, btrace_call_prev,
12406         btrace_find_call_by_number): Use index into call segment vector
12407         instead of pointer.
12408         (btrace_call_cmp): Simplify.
12409         * btrace.h (struct btrace_call_iterator): Replace function call segment
12410         pointer with index into vector.
12411         * record-btrace.c (record_btrace_call_history): Use index instead of
12412         pointer.
12413
12414 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
12415
12416         * btrace.c (btrace_insn_begin, btrace_insn_end,
12417         btrace_find_insn_by_number): Add btinfo to iterator.
12418         * btrace.h (struct btrace_insn_iterator): Add btinfo.
12419
12420 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
12421
12422         * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
12423         and save pointers directly.
12424         (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
12425         ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
12426         ftrace_add_pt): Add btrace_thread_info to arguments.  Adjust for
12427         changed signature of functions.
12428         (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
12429         (btrace_fetch): Remove code that adds btrace_function pointers to
12430         vector of btrace_functions.
12431         (btrace_clear): Simplify freeing vector of btrace_functions.
12432
12433 2017-05-30  Tim Wiederhake  <tim.wiederhake@intel.com>
12434
12435         * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
12436         Replace VEC_* with std::vector functions.
12437         * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
12438         (struct btrace_thread_info)<functions>: Change type to std::vector.
12439
12440 2017-05-30  Simon Marchi  <simon.marchi@ericsson.com>
12441
12442         * NEWS (Changes in GDB 8.0): Remove extra empty line.  Move
12443         "Removed targets and native configurations" up.  Merge duplicate
12444         "New commands" sub-sections.  Add "New options" sub-sections.
12445
12446 2017-05-26  Alan Hayward  <alan.hayward@arm.com>
12447
12448         * defs.h (copy_integer_to_size): New declaration.
12449         * findvar.c (copy_integer_to_size): New function.
12450         (do_cint_test): New selftest function.
12451         (copy_integer_to_size_test): Likewise.
12452         (_initialize_findvar): Likewise.
12453         * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
12454         (mips_fbsd_collect_reg): Use raw_collect_integer.
12455         * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
12456         (mips64_fill_gregset): Use raw_collect_integer
12457         (mips64_fill_fpregset): Use raw_supply_integer.
12458         * regcache.c (regcache::raw_supply_integer): New function.
12459         (regcache::raw_collect_integer): Likewise.
12460         * regcache.h: (regcache::raw_supply_integer): New declaration.
12461         (regcache::raw_collect_integer): Likewise.
12462
12463 2017-05-24  Yao Qi  <yao.qi@linaro.org>
12464
12465         * Makefile.in (SFILES): Add gdbarch-selftests.c.
12466         (COMMON_OBS): Add gdbarch-selftests.o.
12467         * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
12468         * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
12469         * gdbarch-selftests.c: New file.
12470         * regcache.h (regcache) <~regcache>: Mark it virtual if
12471         GDB_SELF_TEST.
12472         <raw_write>: Likewise.
12473
12474 2017-05-24  Yao Qi  <yao.qi@linaro.org>
12475
12476         * regcache.c (current_regcache): Change it to
12477         regcache::current_regcache.
12478         (regcache_observer_target_changed): Update.
12479         (regcache_thread_ptid_changed): Make it a regcache static
12480         method.
12481         (regcache_thread_ptid_changed): Update.
12482         (class regcache_access): New.
12483         (current_regcache_test): Update.
12484         (_initialize_regcache): Update.
12485         * regcache.h: Include forward_list.
12486         (regcache): Declare regcache_thread_ptid_changed and declare
12487         registers_changed_ptid as friend.
12488
12489 2017-05-24  Yao Qi  <yao.qi@linaro.org>
12490
12491         * i387-tdep.c (i387_register_to_value): Use register_size
12492         instead of TYPE_LENGTH.
12493         * m68k-tdep.c (m68k_register_to_value): Likewise.
12494
12495 2017-05-24  Yao Qi  <yao.qi@linaro.org>
12496
12497         * i387-tdep.c (i387_convert_register_p): Return false if type
12498         code isn't TYPE_CODE_FLT.
12499
12500 2017-05-24  Yao Qi  <yao.qi@linaro.org>
12501
12502         * alpha-tdep.c (alpha_convert_register_p): Return true if type
12503         length is 4.
12504         (alpha_register_to_value): Remove type length check.
12505         (alpha_value_to_register): Likewise.
12506
12507 2017-05-24  Yao Qi  <yao.qi@linaro.org>
12508
12509         * ia64-tdep.c (ia64_convert_register_p): Check type's code is
12510         TYPE_CODE_FLT.
12511
12512 2017-05-24  Yao Qi  <yao.qi@linaro.org>
12513
12514         * m68k-tdep.c (m68k_convert_register_p): Check type's code is
12515         TYPE_CODE_FLT or not.
12516
12517 2017-05-24  Yao Qi  <yao.qi@linaro.org>
12518
12519         * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
12520         * avr-tdep.c (avr_gdbarch_init): Likewise.
12521         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
12522         * cris-tdep.c (cris_gdbarch_init): Likewise.
12523         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
12524         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
12525         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
12526         * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
12527         * mep-tdep.c (mep_gdbarch_init): Likewise.
12528         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
12529         * mips-tdep.c (mips_gdbarch_init): Likewise.
12530         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
12531         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
12532         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
12533         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
12534         * v850-tdep.c (v850_gdbarch_init): Likewise.
12535
12536 2017-05-24  Yao Qi  <yao.qi@linaro.org>
12537
12538         * selftest-arch.c (tests_with_arch): Call registers_changed
12539         and reinit_frame_cache.
12540         * selftest.c (run_self_tests): Likewise.
12541
12542 2017-05-24  Yao Qi  <yao.qi@linaro.org>
12543
12544         * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
12545         (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
12546
12547 2017-05-24  Yao Qi  <yao.qi@linaro.org>
12548
12549         * rl78-tdep.c (rl78_gdbarch_init): Don't call
12550         set_gdbarch_print_insn.
12551
12552 2017-05-24  Yao Qi  <yao.qi@linaro.org>
12553
12554         * h8300-tdep.c (h8300_gdbarch_init): Don't call
12555         set_gdbarch_print_insn.
12556
12557 2017-05-24  Yao Qi  <yao.qi@linaro.org>
12558
12559         * alpha-tdep.c (alpha_gdbarch_init): Don't call
12560         set_gdbarch_print_insn.
12561         * arc-tdep.c (arc_gdbarch_init): Likewise.
12562         * arch-utils.c: include dis-asm.h.
12563         (default_print_insn): New function.
12564         * arch-utils.h (default_print_insn): Declare.
12565         * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
12566         * bfin-tdep.c (bfin_gdbarch_init): Likewise.
12567         * cris-tdep.c (cris_delayed_get_disassembler): Remove.
12568         (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
12569         * frv-tdep.c (frv_gdbarch_init): Likewise.
12570         * ft32-tdep.c (ft32_gdbarch_init): Likewise.
12571         * gdbarch.sh (print_insn): Use default_print_insn.
12572         * gdbarch.c: Regenerated.
12573         * hppa-tdep.c (hppa_gdbarch_init): Likewise.
12574         * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
12575         * lm32-tdep.c (lm32_gdbarch_init): Likewise.
12576         * m32c-tdep.c (m32c_gdbarch_init): Likewise.
12577         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
12578         * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
12579         (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
12580         * m68k-tdep.c (m68k_gdbarch_init): Likewise.
12581         * m88k-tdep.c (m88k_gdbarch_init): Likewise.
12582         * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
12583         * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
12584         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
12585         * msp430-tdep.c (msp430_gdbarch_init): Likewise.
12586         * mt-tdep.c (mt_gdbarch_init): Likewise.
12587         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
12588         * nios2-tdep.c (nios2_print_insn): Remove.
12589         (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
12590         * rx-tdep.c (rx_gdbarch_init): Likewise.
12591         * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
12592         * score-tdep.c (score_print_insn): Remove.
12593         (score_gdbarch_init): Don't call set_gdbarch_print_insn.
12594         * sh-tdep.c (sh_gdbarch_init): Likewise.
12595         * sh64-tdep.c (sh64_gdbarch_init): Likewise.
12596         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
12597         * tic6x-tdep.c (tic6x_print_insn): Remove.
12598         (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
12599         * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
12600         * v850-tdep.c (v850_gdbarch_init): Likewise.
12601         * vax-tdep.c (vax_gdbarch_init): Likewise.
12602         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
12603         * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
12604
12605 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
12606
12607         * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
12608         (MIPS_FP0_REGNUM): Remove.
12609         (MIPS_FSR_REGNUM): Remove.
12610         (mips_fbsd_supply_fpregs): Use mips_regnum.
12611         (mips_fbsd_supply_gregs): Likewise.
12612         (mips_fbsd_collect_fpregs): Likewise.
12613         (mips_fbsd_collect_gregs): Likewise.
12614
12615 2017-05-23  John Baldwin  <jhb@FreeBSD.org>
12616
12617         * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
12618         (getpfpregs_supplies): New function.
12619         (mips_fbsd_fetch_inferior_registers): Remove early exit and use
12620         getfpregs_supplies.
12621         (mips_fbsd_store_inferior_registers): Likewise.
12622
12623 2017-05-22  Pedro Alves <palves@redhat.com>
12624
12625         * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
12626         maintainer.
12627
12628 2017-05-22  Alan Hayward  <alan.hayward@arm.com>
12629
12630         * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
12631         (store_register): Likewise.
12632         * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
12633         (get_decimal_float_return_value): Likewise.
12634         (do_ppc_sysv_return_value): Likewise.
12635         (ppc64_sysv_abi_push_integer): Likewise.
12636         (ppc64_sysv_abi_push_freg): Likewise.
12637         (ppc64_sysv_abi_return_value_base): Likewise.
12638         (ppc64_sysv_abi_return_value): Likewise.
12639         * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
12640         * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
12641         * rs6000-nat.c: Likewise.
12642         * rs6000-tdep.c (rs6000_register_to_value): Likewise.
12643         (rs6000_value_to_register): Likewise.
12644         * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
12645
12646 2017-05-21  Tom Tromey  <tom@tromey.com>
12647
12648         PR rust/21466:
12649         * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
12650         arrays as "[T]", not "[T; ]".
12651
12652 2017-05-19  Tom Tromey  <tom@tromey.com>
12653
12654         PR rust/21484:
12655         * rust-lang.c (exp_descriptor_rust): New function.
12656         (rust_language_defn): Use it.
12657         * p-lang.c (pascal_language_defn): Update.
12658         * opencl-lang.c (opencl_language_defn): Update.
12659         * objc-lang.c (objc_language_defn): Update.
12660         * m2-lang.c (m2_language_defn): Update.
12661         * language.h (struct language_defn)
12662         <la_watch_location_expression>: New member.
12663         * language.c (unknown_language_defn, auto_language_defn)
12664         (local_language_defn): Update.
12665         * go-lang.c (go_language_defn): Update.
12666         * f-lang.c (f_language_defn): Update.
12667         * d-lang.c (d_language_defn): Update.
12668         * c-lang.h (c_watch_location_expression): Declare.
12669         * c-lang.c (c_watch_location_expression): New function.
12670         (c_language_defn, cplus_language_defn, asm_language_defn)
12671         (minimal_language_defn): Use it.
12672         * breakpoint.c (watch_command_1): Call
12673         la_watch_location_expression.
12674         * ada-lang.c (ada_language_defn): Update.
12675
12676 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12677
12678         PR tui/21482
12679         * gdb_curses.h (NOMACROS): Define.
12680         (NCURSES_NOMACROS): Define.
12681
12682 2017-05-19  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12683
12684         PR tui/21482
12685         * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
12686         arg to char *.
12687         * tui/tui-wingeneral.c (box_win): Likewise.
12688         * tui/tui-winsource.c (tui_erase_source_content): Likewise.
12689         (tui_show_source_line): Likewise.
12690         (tui_show_exec_info_content): Likewise.
12691
12692 2017-05-19  Vladimir Mezentsev  <vladimir.mezentsev@oracle.com>
12693
12694         * sparc-tdep.c (sparc_structure_return_p)
12695         (sparc_arg_on_registers_p): New functions.
12696         (sparc32_store_arguments): Use them.
12697         * sparc64-tdep.c (sparc64_16_byte_align_p)
12698         (sparc64_store_floating_fields, sparc64_extract_floating_fields):
12699         Handle TYPE_CODE_ARRAY.
12700
12701 2017-05-17  Yao Qi  <yao.qi@linaro.org>
12702
12703         * cli/cli-decode.c (add_alias_cmd): New function.
12704         * command.h (add_alias_cmd): Declare.
12705         * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
12706         instead call add_alias_cmd.
12707
12708 2017-05-17  Pedro Alves  <palves@redhat.com>
12709
12710         * Makefile.in (nat_extra_makefile_frag): Rename to ...
12711         (nat_makefile_frag): ... this.  All references updated.
12712         * configure.ac: Likewise.
12713         * configure.nat: Likewise.  Enhance comments.
12714         * configure: Regenerate.
12715
12716 2017-05-15  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
12717
12718         * procfs.c (procfs_create_inferior): Change prototype to match
12719         definition.
12720
12721 2017-05-13  Eli Zaretskii  <eliz@gnu.org>
12722
12723         * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
12724         C++ compiler warning.
12725
12726 2017-05-12  Tom Tromey  <tom@tromey.com>
12727
12728         PR rust/21483:
12729         * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
12730         recurse, just call value_struct_elt directly.
12731
12732 2017-05-12  Tom Tromey  <tom@tromey.com>
12733
12734         * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
12735         OP_RUST_ARRAY>: Fix.
12736
12737 2017-05-12  Tom Tromey  <tom@tromey.com>
12738
12739         * rust-lang.c (rust_print_subexp): Replace "return" with "break".
12740
12741 2017-05-09  Yao Qi  <yao.qi@linaro.org>
12742
12743         * regcache.c: Include <forward_list>.
12744         (struct regcache_list): Remove.
12745         (current_regcache): Update.
12746         (get_thread_arch_aspace_regcache): Update for std::forward_list.
12747         (regcache_thread_ptid_changed): Likewise.
12748         (registers_changed_ptid): Likewise.
12749         (current_regcache_size): Likewise.
12750
12751 2017-05-09  Yao Qi  <yao.qi@linaro.org>
12752
12753         * regcache.c [GDB_SELF_TEST]: Include selftest.h.
12754         (current_regcache_size): New function.
12755         (current_regcache_test): New function.
12756         (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
12757
12758 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
12759
12760         * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
12761         (print_gp_register_row): Use get_frame_register_value.
12762
12763 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
12764
12765         * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
12766         (mips_supply_fpregset): Likewise.
12767         (mips64_supply_gregset): Likewise.
12768
12769 2017-05-08  Alan Hayward  <alan.hayward@arm.com>
12770
12771         * mn10300-linux-tdep.c (am33_supply_gregset_method): Use 
12772         regcache->raw_supply_zeroed.
12773
12774 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
12775
12776         * configure.nat: Rearrange 'case' statements to match
12777         host before cpu.
12778
12779 2017-05-06  Sergio Durigan Junior  <sergiodj@redhat.com>
12780
12781         * Makefile.in: Remove "@host_makefile_frag@".  Add variables
12782         NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
12783         NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST.  Add
12784         "@nat_extra_makefile_frag@".
12785         (Makefile): Remove dependency on "@frags@".
12786         ($(GNULIB_BUILDDIR)/Makefile): Likewise.
12787         (data-directory/Makefile): Likewise.
12788         * config/aarch64/linux.mh: Deleted; moved contents to
12789         "gdb/configure.nat".
12790         * config/alpha/alpha-linux.mh: Likewise.
12791         * config/alpha/nbsd.mh: Likewise.
12792         * config/arm/linux.mh: Likewise.
12793         * config/arm/nbsdelf.mh: Likewise.
12794         * config/i386/cygwin.mh: Likewise.
12795         * config/i386/cygwin64.mh: Likewise.
12796         * config/i386/darwin.mh: Likewise.
12797         * config/i386/fbsd.mh: Likewise.
12798         * config/i386/fbsd64.mh: Likewise.
12799         * config/i386/go32.mh: Likewise.
12800         * config/i386/i386gnu.mh: Likewise.
12801         * config/i386/i386sol2.mh: Likewise.
12802         * config/i386/linux.mh: Likewise.
12803         * config/i386/linux64.mh: Likewise.
12804         * config/i386/mingw.mh: Likewise.
12805         * config/i386/mingw64.mh: Likewise.
12806         * config/i386/nbsd64.mh: Likewise.
12807         * config/i386/nbsdelf.mh: Likewise.
12808         * config/i386/nto.mh: Likewise.
12809         * config/i386/obsd.mh: Likewise.
12810         * config/i386/obsd64.mh: Likewise.
12811         * config/i386/sol2-64.mh: Likewise.
12812         * config/ia64/linux.mh: Likewise.
12813         * config/m32r/linux.mh: Likewise.
12814         * config/m68k/linux.mh: Likewise.
12815         * config/m68k/nbsdelf.mh: Likewise.
12816         * config/m68k/obsd.mh: Likewise.
12817         * config/m88k/obsd.mh: Likewise.
12818         * config/mips/fbsd.mh: Likewise.
12819         * config/mips/linux.mh: Likewise.
12820         * config/mips/nbsd.mh: Likewise.
12821         * config/mips/obsd64.mh: Likewise.
12822         * config/pa/linux.mh: Likewise.
12823         * config/pa/nbsd.mh: Likewise.
12824         * config/pa/obsd.mh: Likewise.
12825         * config/powerpc/aix.mh: Likewise.
12826         * config/powerpc/fbsd.mh: Likewise.
12827         * config/powerpc/linux.mh: Likewise.
12828         * config/powerpc/nbsd.mh: Likewise.
12829         * config/powerpc/obsd.mh: Likewise.
12830         * config/powerpc/ppc64-linux.mh: Likewise.
12831         * config/powerpc/spu-linux.mh: Likewise.
12832         * config/s390/linux.mh: Likewise.
12833         * config/sh/nbsd.mh: Likewise.
12834         * config/sparc/fbsd.mh: Likewise.
12835         * config/sparc/linux.mh: Likewise.
12836         * config/sparc/linux64.mh: Likewise.
12837         * config/sparc/nbsd64.mh: Likewise.
12838         * config/sparc/nbsdelf.mh: Likewise.
12839         * config/sparc/obsd64.mh: Likewise.
12840         * config/sparc/sol2.mh: Likewise.
12841         * config/tilegx/linux.mh: Likewise.
12842         * config/vax/nbsdelf.mh: Likewise.
12843         * config/vax/obsd.mh: Likewise.
12844         * config/xtensa/linux.mh: Likewise.
12845         * config/i386/i386gnu.mn: New file, with excerpts from
12846         "config/i386/i386gnu.mh".
12847         * configure: Regenerate.
12848         * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
12849         *.mh files under "gdb/config".
12850         * configure.nat: New file, with contents from the
12851         "gdb/config/*/*.mh" files.
12852
12853 2017-05-05  Tim Wiederhake  <tim.wiederhake@intel.com>
12854
12855         * btrace.c (btrace_clear): Free insn vector.
12856
12857 2017-05-05  Pedro Alves  <palves@redhat.com>
12858
12859         * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
12860         * configure: Regenerate.
12861
12862 2017-05-04  Pedro Alves  <palves@redhat.com>
12863
12864         * Makefile.in (SFILES): Add progspace-and-thread.c.
12865         (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
12866         (COMMON_OBS): Add progspace-and-thread.o.
12867         * breakpoint.c: Include "progspace-and-thread.h".
12868         (update_inserted_breakpoint_locations)
12869         (insert_breakpoint_locations, create_longjmp_master_breakpoint):
12870         Use scoped_restore_current_pspace_and_thread.
12871         (create_std_terminate_master_breakpoint): Use
12872         scoped_restore_current_program_space.
12873         (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
12874         (print_breakpoint_location): Use
12875         scoped_restore_current_program_space.
12876         (bp_loc_is_permanent): Use
12877         scoped_restore_current_pspace_and_thread.
12878         (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
12879         (download_tracepoint_locations): Use
12880         scoped_restore_current_pspace_and_thread.
12881         (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
12882         * exec.c (exec_close_1): Use scoped_restore_current_program_space.
12883         (enum step_over_calls_kind): Moved from inferior.h.
12884         (class scoped_restore_current_thread): New class.
12885         * gdbthread.h (make_cleanup_restore_current_thread): Delete
12886         declaration.
12887         (scoped_restore_current_thread): New class.
12888         * infcmd.c: Include "common/gdb_optional.h".
12889         (continue_1, proceed_after_attach): Use
12890         scoped_restore_current_thread.
12891         (notice_new_inferior): Use scoped_restore_current_thread.
12892         * inferior.c: Include "progspace-and-thread.h".
12893         (restore_inferior, save_current_inferior): Delete.
12894         (add_inferior_command, clone_inferior_command): Use
12895         scoped_restore_current_pspace_and_thread.
12896         * inferior.h (scoped_restore_current_inferior): New class.
12897         * infrun.c: Include "progspace-and-thread.h" and
12898         "common/gdb_optional.h".
12899         (follow_fork_inferior): Use
12900         scoped_restore_current_pspace_and_thread.
12901         (scoped_restore_exited_inferior): New class.
12902         (handle_vfork_child_exec_or_exit): Use
12903         scoped_restore_exited_inferior,
12904         scoped_restore_current_pspace_and_thread,
12905         scoped_restore_current_thread and scoped_restore.
12906         (fetch_inferior_event): Use scoped_restore_current_thread.
12907         * linespec.c (decode_line_full, decode_line_1): Use
12908         scoped_restore_current_program_space.
12909         * mi/mi-main.c: Include "progspace-and-thread.h".
12910         (exec_continue): Use scoped_restore_current_thread.
12911         (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
12912         (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
12913         * proc-service.c (ps_pglobal_lookup): Use
12914         scoped_restore_current_program_space.
12915         * progspace-and-thread.c: New file.
12916         * progspace-and-thread.h: New file.
12917         * progspace.c (release_program_space, clone_program_space): Use
12918         scoped_restore_current_program_space.
12919         (restore_program_space, save_current_program_space)
12920         (save_current_space_and_thread): Delete.
12921         (switch_to_program_space_and_thread): Moved to
12922         progspace-and-thread.c.
12923         * progspace.h (save_current_program_space)
12924         (save_current_space_and_thread): Delete declarations.
12925         (scoped_restore_current_program_space): New class.
12926         * remote.c (remote_btrace_maybe_reopen): Use
12927         scoped_restore_current_thread.
12928         * symtab.c: Include "progspace-and-thread.h".
12929         (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
12930         * thread.c (print_thread_info_1): Use
12931         scoped_restore_current_thread.
12932         (struct current_thread_cleanup): Delete.
12933         (do_restore_current_thread_cleanup)
12934         (restore_current_thread_cleanup_dtor): Rename/convert both to ...
12935         (scoped_restore_current_thread::~scoped_restore_current_thread):
12936         ... this new dtor.
12937         (make_cleanup_restore_current_thread): Rename/convert to ...
12938         (scoped_restore_current_thread::scoped_restore_current_thread):
12939         ... this new ctor.
12940         (thread_apply_all_command): Use scoped_restore_current_thread.
12941         (thread_apply_command): Use scoped_restore_current_thread.
12942         * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
12943         * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
12944
12945 2017-05-04  Pedro Alves  <palves@redhat.com>
12946
12947         * thread.c (make_cleanup_restore_current_thread): Move
12948         find_thread_ptid call before the is_stopped call.  Assert that the
12949         thread is found.  Replace is_stopped call by checking the thread's
12950         state directly.  Remove unnecessary NULL-thread check.
12951
12952 2017-05-04  Pedro Alves  <palves@redhat.com>
12953
12954         * corelow.c (thread_section_name): New class.
12955         (get_core_register_section, get_core_siginfo): Use it.
12956
12957 2017-05-04  Andreas Arnez  <arnez@linux.vnet.ibm.com>
12958
12959         * corelow.c (sniff_core_bfd): Remove extra semicolon.
12960         (get_core_register_section): Remove xfree of NULL pointer.
12961
12962 2017-05-03  Alan Hayward  <alan.hayward@arm.com>
12963
12964         * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
12965         * regcache.c (regcache::raw_supply_zeroed): New function.
12966         * regcache.h (regcache::raw_supply_zeroed): New declaration.
12967
12968 2017-05-03  Simon Marchi  <simon.marchi@ericsson.com>
12969
12970         * gdbarch.sh: Remove commented out definition of
12971         TARGET_CHAR_BIT.
12972         * gdbarch.h: Re-generate.
12973
12974 2017-05-03  Sergio Durigan Junior  <sergiodj@redhat.com>
12975
12976         * configure: Regenerate.
12977
12978 2017-05-02  Simon Marchi  <simon.marchi@ericsson.com>
12979
12980         * solib-target.c (solib_target_relocate_section_addresses):
12981         Remove num_section_bases, num_bases, segment_bases variables.
12982
12983 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
12984
12985         * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
12986
12987 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
12988
12989         * solib-target.c: Include <vector>
12990         (struct lm_info_target) <~lm_info_target>: Remove.
12991         <segment_bases, section_bases>: Change type to
12992         std::vector<CORE_ADDR>.
12993         (library_list_start_segment, library_list_start_section,
12994         library_list_end_library,
12995         solib_target_relocate_section_addresses): Adjust.
12996
12997 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
12998
12999         * gdbarch.sh (software_single_step): Change return type to
13000         std::vector<CORE_ADDR>.
13001         * gdbarch.c, gdbarch.h: Re-generate.
13002         * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
13003         Adjust.
13004         (arm_deal_with_atomic_sequence_raw): Adjust.
13005         (thumb_get_next_pcs_raw): Adjust.
13006         (arm_get_next_pcs_raw): Adjust.
13007         (arm_get_next_pcs): Adjust.
13008         * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
13009         * aarch64-tdep.c (aarch64_software_single_step): Adjust.
13010         * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
13011         (alpha_software_single_step): Adjust.
13012         * alpha-tdep.h (alpha_software_single_step): Adjust.
13013         * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
13014         * arm-tdep.c (arm_software_single_step): Adjust.
13015         (arm_breakpoint_kind_from_current_state): Adjust.
13016         * arm-tdep.h (arm_software_single_step): Adjust.
13017         * breakpoint.c (insert_single_step_breakpoint): Adjust.
13018         * cris-tdep.c (cris_software_single_step): Adjust.
13019         * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
13020         (micromips_deal_with_atomic_sequence): Adjust.
13021         (deal_with_atomic_sequence): Adjust.
13022         (mips_software_single_step): Adjust.
13023         * mips-tdep.h (mips_software_single_step): Adjust.
13024         * moxie-tdep.c (moxie_software_single_step): Adjust.
13025         * nios2-tdep.c (nios2_software_single_step): Adjust.
13026         * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
13027         * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
13028         * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
13029         * s390-linux-tdep.c (s390_software_single_step): Adjust.
13030         * sparc-tdep.c (sparc_software_single_step): Adjust.
13031         * spu-tdep.c (spu_software_single_step): Adjust.
13032         * tic6x-tdep.c (tic6x_software_single_step): Adjust.
13033
13034 2017-05-02  Simon Marchi  <simon.marchi@polymtl.ca>
13035
13036         * gdbarch.sh: Use semi-colon as field separator instead of colon.
13037         * gdbarch.h: Re-generate.
13038
13039 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
13040
13041         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
13042         (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
13043         * python/py-instruction.c, python/py-instruction.h: New file.
13044         * python/py-record.c: Add py-instruction.h include.
13045         (gdbpy_initialize_record): Make gdb.Instruction a super class of
13046         gdb.RecordInstruction.
13047         * python/python-internal.h: Add gdbpy_initialize_instruction
13048         declaration.
13049         * python/python.c (do_start_initialization): Add
13050         gdbpy_initialize_instruction.
13051
13052 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
13053
13054         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
13055         Remove.
13056         (btrace_func_from_recpy_func): New function.
13057         (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
13058         (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
13059         btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
13060         (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
13061         recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
13062         Also, use new helper functions.
13063         (btpy_list_item): Use new helper functions.
13064         (recpy_bt_function_call_history): Use new type name.
13065         (btpy_call_getset): Remove.
13066         (gdbpy_initialize_btrace): Remove code to initialize
13067         gdb.BtraceFunctionCall.
13068         * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
13069         recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
13070         recpy_bt_func_prev, recpy_bt_func_next): New export.
13071         * python/py-record.c (recpy_func_type): New static object.
13072         (recpy_func_new, recpy_func_level, recpy_func_symbol,
13073         recpy_func_instructions, recpy_func_up, recpy_func_prev,
13074         recpy_func_next): New function.
13075         (recpy_element_hash, recpy_element_richcompare): Updated comment.
13076         (recpy_func_getset): New static object.
13077         (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
13078         * python/py-record.h (recpy_func_type, recpy_func_new): New export.
13079
13080 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
13081
13082         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
13083         (btpy_object, btpy_insn_type, btpy_new): Remove.
13084         (btpy_list_object): Use gdb.RecordInstruction type instead of
13085         gdb.BtraceInstruction type.
13086         (btrace_insn_from_recpy_insn): New function.
13087         (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
13088         btpy_new.
13089         (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
13090         (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
13091         btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
13092         btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
13093         instead of btpy_object.
13094         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
13095         btpy_insn_data, btpy_insn_decode): Rename to ...
13096         (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
13097         recpy_bt_insn_is_speculative, recpy_bt_insn_data,
13098         recpy_bt_insn_decode): This.  Also, use new helper functions.
13099         (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
13100         recpy_insn_type.
13101         (btpy_insn_getset): Remove.
13102         (gdbpy_initialize_btrace): Remove code to initialize
13103         gdb.BtraceInstruction.  Use recpy_element_object.
13104         * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
13105         recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
13106         recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
13107         * python/py-record.c (recpy_insn_type): New static object.
13108         (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
13109         recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
13110         recpy_element_number, recpy_element_hash, recpy_element_richcompare):
13111         New function.
13112         (recpy_insn_getset): New static object.
13113         (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
13114         * python/py-record.h (recpy_element_object): New typedef.
13115         (recpy_insn_type, recpy_insn_new): New export.
13116
13117 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
13118
13119         * py-record-btrace.c (btpy_insn_new): Removed.
13120         (btpy_insn_or_gap_new): New function.
13121         (btpy_insn_error): Removed.
13122         (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
13123         btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
13124         (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
13125         btpy_insn_or_gap_new instead of btpy_insn_new.
13126         (btpy_insn_getset): Remove btpy_insn_error.
13127         * py-record.c (recpy_gap_type): New static object.
13128         (recpy_gap_object): New typedef.
13129         (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
13130         recpy_gap_reason_string): New function.
13131         (recpy_gap_getset): New static object.
13132         (gdbpy_initialize_record): Initialize gdb.RecordGap type.
13133         * py-record.h (recpy_gap_new): New export.
13134
13135 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
13136
13137         * python/py-record.c (recpy_ptid): Remove.
13138         (recpy_record_getset): Remove recpy_ptid.
13139
13140 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
13141
13142         * btrace.c (btrace_fetch): Set inferior_ptid.
13143         * python/py-record-btrace.c: Add "py-record.h" include.
13144         (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
13145         recpy_bt_end, recpy_bt_instruction_history,
13146         recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
13147         in gdb.Record object instead of current ptid.
13148         * python/py-record.c: Include new "py-record.h" file.
13149         (recpy_record_object): Moved to py-record.h.
13150         * python/py-record.h: New file.
13151
13152 2017-05-01  Tim Wiederhake  <tim.wiederhake@intel.com>
13153
13154         * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
13155         BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
13156         indentation.
13157
13158 2017-05-01  Joel Brobecker  <brobecker@adacore.com>
13159
13160         * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
13161         the past maintainers section.
13162
13163 2017-04-28  Yao Qi  <yao.qi@linaro.org>
13164
13165         * infcmd.c (get_return_value): Use regcache ctor, and remove
13166         cleanup.
13167
13168 2017-04-28  Yao Qi  <yao.qi@linaro.org>
13169             Pedro Alves  <palves@redhat.com>
13170
13171         * regcache.c (regcache::regcache): New tag dispatch ctor.
13172         (do_cooked_read): Moved above.
13173         (regcache_dup): Use the tag dispatch ctor..
13174         * regcache.h (regcache): Declare ctor, delete copy ctor and
13175         assignment operator, remove friend regcache_dup.
13176
13177 2017-04-28  Yao Qi  <yao.qi@linaro.org>
13178
13179         * regcache.c (regcache_dup): Assert !src->m_readonly_p and
13180         call method save instead of regcache_cpy.
13181         * regcache.h (struct regcache): Make regcache_dup a friend.
13182
13183 2017-04-28  Yao Qi  <yao.qi@linaro.org>
13184
13185         * regcache.c (struct regcache): Move to regcache.h
13186         (regcache::arch): New method.
13187         (regcache_get_ptid): Update.
13188         (get_regcache_arch): Call arch method.
13189         (get_regcache_aspace): Call method aspace.
13190         (register_buffer): Change it to method.
13191         (regcache_save): Change it to regcache::save.
13192         (regcache_restore): Likewise.
13193         (regcache_cpy_no_passthrough): Remove the declaration.
13194         (regcache_cpy): Call methods restore and cpy_no_passthrough.
13195         (regcache_cpy_no_passthrough): Change it to method
13196         cpy_no_passthrough.
13197         (regcache_register_status): Change it to method
13198         get_register_status.
13199         (regcache_invalidate): Change it to method invalidate.
13200         (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
13201         (regcache_raw_update): Change it to method raw_update.
13202         (regcache_raw_read): Likewise.
13203         (regcache_raw_read_signed): Likewise.
13204         (regcache_raw_read_unsigned): Likewise.
13205         (regcache_raw_write_signed): Likewise.
13206         (regcache_raw_write_unsigned): Likewise.
13207         (regcache_cooked_read): Likewise.
13208         (regcache_cooked_read_value): Likewise.
13209         (regcache_cooked_read_signed): Likewise.
13210         (regcache_cooked_read_unsigned): Likewise.
13211         (regcache_cooked_write_signed): Likewise.
13212         (regcache_cooked_write_unsigned): Likewise.
13213         (regcache_raw_set_cached_value): Likewise.
13214         (regcache_raw_write): Likewise.
13215         (regcache_cooked_write): Likewise.
13216         (regcache_xfer_part): Likewise.
13217         (regcache_raw_read_part): Likewise.
13218         (regcache_raw_write_part): Likewise.
13219         (regcache_cooked_read_part): Likewise.
13220         (regcache_cooked_write_part): Likewise.
13221         (regcache_raw_supply): Likewise.
13222         (regcache_raw_collect): Likewise.
13223         (regcache_transfer_regset): Likewise.
13224         (regcache_supply_regset): Likewise.
13225         (regcache_collect_regset): Likewise.
13226         (regcache_debug_print_register): Likewise.
13227         (enum regcache_dump_what): Move it to regcache.h.
13228         (regcache_dump): Change it to method dump.
13229         * regcache.h (enum regcache_dump_what): New.
13230         (class regcache): New.
13231         * target.c (target_fetch_registers): Call method
13232         debug_print_register.
13233         (target_store_registers): Likewise.
13234
13235 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
13236
13237         * windows-nat.c (struct lm_info_windows): Initialize field.
13238         (windows_make_so): Allocate lm_info_windows with new.
13239         (windows_free_so): Free lm_info_windows with delete.
13240
13241 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
13242
13243         * solib-darwin.c (struct lm_info_darwin): Initialize field.
13244         (darwin_current_sos): Allocate lm_info_darwin with new, remove
13245         cleanup.
13246         (darwin_free_so): Free lm_info_darwin with delete.
13247
13248 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
13249
13250         * solib-svr4.h (struct lm_info_svr4): Initialize fields.
13251         <l_addr_p>: Change type to bool.
13252         * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
13253         (svr4_free_so): Free lm_info_svr4 with delete.
13254         (svr4_copy_library_list): Replace memcpy with call to copy
13255         constructor.
13256         (library_list_start_library, svr4_default_sos): Allocate
13257         lm_info_svr4 with new.
13258
13259 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
13260
13261         * solib-target.c (struct lm_info_target): Add destructor,
13262         initialize fields.
13263         <name>: Change type to std::string.
13264         (library_list_start_library): Allocate lm_info_target with new.
13265         (solib_target_free_library_list): Free lm_info_target with
13266         delete.
13267         (solib_target_current_sos): Adapt to std::string.
13268         (solib_target_free_so): Free lm_info_target with delete.
13269
13270 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
13271
13272         * solib-frv.c (struct lm_info_frv): Add destructor, initialize
13273         fields.
13274         (frv_current_sos): Allocate lm_info_frv with new.
13275         (frv_relocate_main_executable): Free lm_info_frv with delete,
13276         allocate with new.
13277         (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
13278
13279 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
13280
13281         * solib-frv.c (struct lm_info_frv): Fix indentation.
13282
13283 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
13284
13285         * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
13286         map field.
13287         (dsbt_current_sos): Allocate lm_info_dsbt with new.
13288         (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
13289         and allocate with new.
13290         (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
13291
13292 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
13293
13294         * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
13295         <filename, member_name>: Change type to std::string.
13296         (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
13297         (library_list_start_library): Allocate lm_info_aix with new.
13298         (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
13299         (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
13300         with copy constructor.
13301
13302 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
13303
13304         * solist.h (struct lm_info): Remove.
13305         (struct lm_info_base): New class.
13306         (struct so_list) <lm_info>: Change type to lm_info_base *.
13307         * nto-tdep.c (struct lm_info): Remove.
13308         (lm_addr): Adjust.
13309         * solib-aix.c (struct lm_info): Rename to ...
13310         (struct lm_info_aix): ... this.  Extend lm_info_base.
13311         (lm_info_p): Rename to ...
13312         (lm_info_aix_p): ... this, and adjust.
13313         (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
13314         solib_aix_parse_libraries, library_list_start_library,
13315         solib_aix_free_library_list, solib_aix_parse_libraries,
13316         solib_aix_get_library_list,
13317         solib_aix_relocate_section_addresses, solib_aix_free_so,
13318         solib_aix_get_section_offsets,
13319         solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
13320         Adjust.
13321         (struct solib_aix_inferior_data) <library_list>: Adjust.
13322         * solib-darwin.c (struct lm_info): Rename to ...
13323         (struct lm_info_darwin): ... this.  Extend lm_info_base.
13324         (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
13325         * solib-dsbt.c (struct lm_info): Rename to ...
13326         (struct lm_info_dsbt): ... this.  Extend lm_info_base.
13327         (struct dsbt_info) <main_executable_lm_info): Adjust.
13328         (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
13329         dsbt_relocate_section_addresses): Adjust.
13330         * solib-frv.c (struct lm_info): Rename to ...
13331         (struct lm_info_frv): ... this.  Extend lm_info_base.
13332         (main_executable_lm_info): Adjust.
13333         (frv_current_sos, frv_relocate_main_executable, frv_free_so,
13334         frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
13335         find_canonical_descriptor_in_load_object,
13336         frv_fdpic_find_canonical_descriptor): Adjust.
13337         * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
13338         to lm_info_svr4.
13339         (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
13340         svr4_clear_so, svr4_copy_library_list,
13341         library_list_start_library, svr4_default_sos, svr4_read_so_list,
13342         svr4_current_sos, svr4_fetch_objfile_link_map,
13343         solist_update_incremental): Adjust.
13344         * solib-svr4.h (struct lm_info_svr4): Move here from
13345         solib-svr4.c.
13346         * solib-target.c (struct lm_info): Rename to ...
13347         (struct lm_info_target): ... this.  Extend lm_info_base.
13348         (lm_info_p): Rename to ...
13349         (lm_info_target_p): ... this.
13350         (solib_target_parse_libraries, library_list_start_segment,
13351         library_list_start_section, library_list_start_library,
13352         library_list_end_library, solib_target_free_library_list,
13353         solib_target_current_sos, solib_target_free_so,
13354         solib_target_relocate_section_addresses): Adjust.
13355         * windows-nat.c (struct lm_info): Rename to ...
13356         (struct lm_info_windows): ... this.  Extend lm_info_base.
13357         (windows_make_so, handle_load_dll, handle_unload_dll,
13358         windows_xfer_shared_libraries): Adjust.
13359
13360 2017-04-28  Simon Marchi  <simon.marchi@ericsson.com>
13361
13362         * solib-darwin.c (struct darwin_so_list): Remove.
13363         (darwin_current_sos): Allocate an so_list object instead of a
13364         darwin_so_list, separately allocate an lm_info object.
13365         (darwin_free_so): Free lm_info.
13366
13367 2017-04-28  John Baldwin  <jhb@FreeBSD.org>
13368
13369         * mips-tdep.c (print_gp_register_row): Replace printf_filtered
13370         with fprintf_filtered.
13371
13372 2017-04-28  Yao Qi  <yao.qi@linaro.org>
13373
13374         * regcache.c (regcache::regcache): New function.
13375         (regcache::~regcache): New function.
13376         (regcache_xmalloc_1): Remove.
13377         (regcache_xmalloc): Call new regcache.
13378         (regcache_xfree): Call delete regcache.
13379         (get_thread_arch_aspace_regcache): Call new regcache.
13380
13381 2017-04-28  Yao Qi  <yao.qi@linaro.org>
13382
13383         * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
13384         lwp instead of ptid_get_lwp.
13385
13386 2017-04-28  Yao Qi  <yao.qi@linaro.org>
13387
13388         * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
13389         lwp_info instead of getting from inferior_ptid.
13390
13391 2017-04-27  Keith Seitz  <keiths@redhat.com>
13392
13393         * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
13394         DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
13395         (CV_CONVERSION_BADNESS): Define.
13396         (rank_one_type): Remove overly restrictive rvalue reference
13397         rank checks.
13398         Add cv-qualifier checks and subranks for type equality.
13399         * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
13400         REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
13401         CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
13402
13403 2017-04-27  Simon Marchi  <simon.marchi@ericsson.com>
13404
13405         * python/py-inferior.c (inferior_to_inferior_object): Increment reference
13406         count when creating the object.
13407
13408 2017-04-27  Sangamesh Mallayya  <sangamesh.swamy@in.ibm.com>
13409             Ulrich Weigand  <uweigand@de.ibm.com>
13410
13411         * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
13412         entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
13413         is used in AIX.
13414         (read_xcoff_symtab): Handle C_WEAKEXT storage class.
13415         (process_xcoff_symbol): Likewise.
13416         (scan_xcoff_symtab): Likewise.
13417
13418 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
13419
13420         * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
13421         (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
13422         (ia64_access_reg): Use get_frame_register_unsigned.
13423         (ia64_access_rse_reg): Likewise.
13424         (ia64_libunwind_frame_prev_register): Likewise.
13425
13426 2017-04-26  Jiong Wang  <jiong.wang@arm.com>
13427
13428         * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
13429         * gdbarch.c: Regenerated.
13430         * gdbarch.h: Regenerated.
13431         * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
13432         visibility external.
13433         (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
13434         between DW_CFA_lo_user and DW_CFA_high_user inclusive.
13435         (enum cfa_how_kind): Move to ...
13436         (struct dwarf2_frame_state_reg_info): Likewise.
13437         (struct dwarf2_frame_state): Likewise.
13438         * dwarf2-frame.h: ... here.
13439         (dwarf2_frame_state_alloc_regs): New declaration.
13440         * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
13441         (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
13442
13443 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
13444
13445         * xtensa-tdep.c (xtensa_pseudo_register_read): Use
13446         regcache_raw_read_unsigned.
13447         (xtensa_pseudo_register_write): Likewise.
13448
13449 2017-04-26  Alan Hayward  <alan.hayward@arm.com>
13450
13451         * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
13452         (nds32_pseudo_register_write): Likewise.
13453
13454 2017-04-25  Yao Qi  <yao.qi@linaro.org>
13455
13456         * regcache.c (struct regcache) <readonly_p>: Change its type
13457         to bool.
13458         (regcache_xmalloc_1): Update parameter type and callers update.
13459
13460 2017-04-25  Yao Qi  <yao.qi@linaro.org>
13461
13462         * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
13463         set_gdbarch_wchar_bit.
13464         * arm-tdep.c (arm_gdbarch_init): Likewise.
13465
13466 2017-04-25  Pedro Alves  <palves@redhat.com>
13467
13468         * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
13469         (BothAreRelocatable, memcopy, memmove): Don't define.
13470         * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
13471         macros.
13472
13473 2017-04-25  Pedro Alves  <palves@redhat.com>
13474
13475         * common/common-defs.h: Include "common/poison.h".
13476         * common/function-view.h: (Not, Or, Requires): Move to traits.h
13477         and adjust.
13478         * common/poison.h: New file.
13479         * common/traits.h: Include <type_traits>.
13480         (Not, Or, Requires): New, moved from common/function-view.h.
13481
13482 2017-04-25  Pedro Alves  <palves@redhat.com>
13483
13484         * breakpoint.h (struct breakpoint): In-class initialize all
13485         fields.  Make boolean fields "bool".
13486         * breakpoint.c (init_raw_breakpoint_without_location): Remove
13487         memset call and initializations no longer necessary.
13488
13489 2017-04-25  Pedro Alves  <palves@redhat.com>
13490
13491         * btrace.c (pt_btrace_insn_flags): Change parameter type to
13492         reference.
13493         (pt_btrace_insn): New function.
13494         (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
13495
13496 2017-04-25  Pedro Alves  <palves@redhat.com>
13497
13498         * ada-lang.c (ada_catchpoint_location): Now a "class".  Remove
13499         "base" field and inherit from "bp_location" instead.  Add
13500         non-default ctor.
13501         (allocate_location_exception): Use new non-default ctor.
13502         * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
13503         (init_bp_location): Convert to ...
13504         (bp_location::bp_location): ... this new ctor, and remove memset
13505         call.
13506         (base_breakpoint_allocate_location): Use the new non-default ctor.
13507         * breakpoint.h (bp_location): Now a class.  Declare default and
13508         non-default ctors.  In-class initialize all members.
13509         (init_bp_location): Remove declaration.
13510
13511 2017-04-25  Pedro Alves  <palves@redhat.com>
13512
13513         * common/enum-flags.h (enum_flags): Don't implement copy ctor and
13514         assignment operator.
13515
13516 2017-04-24  Yao Qi  <yao.qi@linaro.org>
13517
13518         * doublest.c (convert_doublest_to_floatformat): Call
13519         floatformat_totalsize_bytes.
13520
13521 2017-04-22  Tom Tromey  <tom@tromey.com>
13522
13523         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
13524         ui_out_emit_list.
13525         * stack.c (print_frame): Use ui_out_emit_list.
13526         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
13527         ui_out_emit_list.
13528         * mi/mi-main.c (print_one_inferior)
13529         (mi_cmd_data_list_register_names)
13530         (mi_cmd_data_list_register_values, mi_cmd_list_features)
13531         (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
13532         ui_out_emit_list.
13533         * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
13534         (mi_output_solib_attribs): Use ui_out_emit_list,
13535         ui_out_emit_tuple.
13536         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
13537         * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
13538         (mi_cmd_stack_list_args, list_args_or_locals): Use
13539         ui_out_emit_list.
13540         * disasm.c (do_assembly_only): Use ui_out_emit_list.
13541         * breakpoint.c (print_solib_event, output_thread_groups): Use
13542         ui_out_emit_list.
13543
13544 2017-04-22  Tom Tromey  <tom@tromey.com>
13545
13546         * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
13547         * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
13548         * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
13549
13550 2017-04-22  Tom Tromey  <tom@tromey.com>
13551
13552         * tracepoint.c (tvariables_info_1)
13553         (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
13554
13555 2017-04-22  Tom Tromey  <tom@tromey.com>
13556
13557         * stack.c (print_frame_arg): Use ui_out_emit_tuple,
13558         annotate_arg_emitter.
13559         * breakpoint.c (print_mention_watchpoint)
13560         (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
13561         * annotate.h (struct annotate_arg_emitter): New.
13562
13563 2017-04-22  Tom Tromey  <tom@tromey.com>
13564
13565         * record-btrace.c (record_btrace_insn_history)
13566         (record_btrace_insn_history_range, record_btrace_call_history)
13567         (record_btrace_call_history_range): Use ui_out_emit_tuple.
13568         * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
13569         ui_out_emit_tuple.
13570         * stack.c (print_frame_info): Use ui_out_emit_tuple.
13571         * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
13572         * skip.c (skip_info): Use ui_out_emit_tuple.
13573         * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
13574         * progspace.c (print_program_space): Use ui_out_emit_tuple.
13575         * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
13576         * osdata.c (info_osdata): Use ui_out_emit_tuple.
13577         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
13578         ui_out_emit_tuple.
13579         * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
13580         (output_register, mi_cmd_data_read_memory)
13581         (mi_cmd_data_read_memory_bytes, mi_load_progress)
13582         (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
13583         * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
13584         Use ui_out_emit_tuple.
13585         * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
13586         ui_out_emit_tuple.
13587         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
13588         (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
13589         * linux-thread-db.c (info_auto_load_libthread_db): Use
13590         ui_out_emit_tuple.
13591         * inferior.c (print_inferior): Use ui_out_emit_tuple.
13592         * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
13593         * disasm.c (do_mixed_source_and_assembly_deprecated)
13594         (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
13595         * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
13596         * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
13597         * breakpoint.c (print_one_breakpoint_location)
13598         (print_one_breakpoint): Use ui_out_emit_tuple.
13599         * auto-load.c (print_script, info_auto_load_cmd): Use
13600         ui_out_emit_tuple.
13601         * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
13602
13603 2017-04-21  Simon Marchi  <simon.marchi@ericsson.com>
13604
13605         * thread.c (print_thread_info_1): Remove dead code.
13606
13607 2017-04-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
13608
13609         * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
13610         GDB_SELF_TEST.
13611         * arm-tdep.c (selftests::arm_record_test): Likewise.
13612
13613 2017-04-21  Yao Qi  <yao.qi@linaro.org>
13614
13615         * regcache.c (regcache_restore): Remove argument 2.  Replace
13616         argument 3 with regcache.  Get register status from
13617         src->register_status and get register contents from
13618         register_buffer (src, regnum).
13619         (regcache_cpy): Update.
13620
13621 2017-04-19  Pedro Alves  <palves@redhat.com>
13622
13623         * gdbthread.h (thread): Add missing closing parenthesis in
13624         comment.
13625
13626 2017-04-19  Pedro Alves  <palves@redhat.com>
13627
13628         * common/refcounted-object.h: New file.
13629         * gdbthread.h: Include "common/refcounted-object.h".
13630         (thread_info): Inherit from refcounted_object and add comments.
13631         (thread_info::incref, thread_info::decref)
13632         (thread_info::m_refcount): Delete.
13633         (thread_info::deletable): Use the refcounted_object::refcount()
13634         method.
13635         * inferior.c (current_inferior_): Add comment.
13636         (set_current_inferior): Increment/decrement refcounts.
13637         (prune_inferiors, remove_inferior_command): Skip inferiors marked
13638         not-deletable instead of comparing with the current inferior.
13639         (initialize_inferiors): Increment the initial inferior's refcount.
13640         * inferior.h (struct inferior): Forward declare.
13641         Include "common/refcounted-object.h".
13642         (current_inferior, set_current_inferior): Move declaration to
13643         before struct inferior's definition, and fix comment.
13644         (inferior): Inherit from refcounted_object.  Add comments.
13645         * thread.c (switch_to_thread_no_regs): Reference the thread's
13646         inferior pointer directly instead of doing a ptid lookup.
13647         (switch_to_no_thread): New function.
13648         (switch_to_thread(thread_info *)): New function, factored out
13649         from ...
13650         (switch_to_thread(ptid_t)): ... this.
13651         (restore_current_thread): Delete.
13652         (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
13653         fields, and add 'inf' field.
13654         (do_restore_current_thread_cleanup): Check whether old->inf is
13655         alive instead of looking up an inferior by ptid.  Use
13656         switch_to_thread and switch_to_no_thread.
13657         (restore_current_thread_cleanup_dtor): Use old->inf directly
13658         instead of lookup up an inferior by id.  Decref the inferior.
13659         Don't restore 'removable'.
13660         (make_cleanup_restore_current_thread): Same the inferior pointer
13661         in old, instead of the inferior number.  Incref the inferior.
13662         Don't save/clear 'removable'.
13663
13664 2017-04-19  Pedro Alves  <palves@redhat.com>
13665
13666         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13667         unittests/scoped_restore-selftests.c.
13668         (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
13669         * common/scoped_restore.h (scoped_restore_base): Make "class".
13670         (scoped_restore_base::release): New public method.
13671         (scoped_restore_base::scoped_restore_base): New protected ctor.
13672         (scoped_restore_base::m_saved_var): New protected field.
13673         (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
13674         scoped_restore_base base class instead of m_saved_var directly.
13675         (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
13676         (scoped_restore_tmpl::scoped_restore_tmpl(const
13677         scoped_restore_tmpl<T>&)): Likewise.
13678         (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
13679         method.
13680         (scoped_restore_tmpl::saved_var): New method.
13681         (scoped_restore_tmpl::m_saved_var): Delete.
13682         * inferior.h (inferior::detaching): Now a bool.
13683         * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
13684         cleanup.
13685         * unittests/scoped_restore-selftests.c: New file.
13686
13687 2017-04-19  Pedro Alves  <palves@redhat.com>
13688
13689         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
13690         Re-sort in alphabetic order.
13691
13692 2017-04-18  Pedro Alves  <palves@redhat.com>
13693
13694         * xml-support.c (obstack_xml_printf): Delete.
13695         * xml-support.h (obstack_xml_printf): Delete.
13696
13697 2017-04-18  Pedro Alves  <palves@redhat.com>
13698
13699         * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
13700         vdebug, verror, body_text, start_element, end_element, name,
13701         user_data, set_is_xinclude, set_error, expat_parser>: New methods.
13702         <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
13703         is_xinclude>: Make private and add m_ prefix.
13704         (gdb_xml_parser::body_text): New method, based on ...
13705         (gdb_xml_body_text): ... this.  Adjust.
13706         (gdb_xml_parser::vdebug): New method, based on ...
13707         (gdb_xml_debug): ... this.  Adjust.
13708         (gdb_xml_parser::verror): New method, based on ...
13709         (gdb_xml_error): ... this.  Adjust.
13710         (gdb_xml_parser::start_element): New method, based on ...
13711         (gdb_xml_start_element): ... this.  Adjust.
13712         (gdb_xml_start_element_wrapper): Defer to
13713         gdb_xml_parser::start_element and gdb_xml_parser::set_error.
13714         (gdb_xml_parser::end_element): New method, based on ...
13715         (gdb_xml_end_element_wrapper): ... this.  Adjust.
13716         (gdb_xml_parser::~gdb_xml_parser): Adjust.
13717         (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
13718         (gdb_xml_parser::use_dtd): New method, based on ...
13719         (gdb_xml_use_dtd): ... this.  Adjust.
13720         (gdb_xml_parser::parse): New method, based on ...
13721         (gdb_xml_parse): ... this.  Adjust.
13722         (gdb_xml_parse_quick): Adjust to call the parser's parse method.
13723         (xinclude_start_include): Adjust to call the parser's name method.
13724         (xml_xinclude_default, xml_xinclude_start_doctype)
13725         (xml_xinclude_end_doctype): Adjust to call the parser's user_data
13726         method.
13727         (xml_process_xincludes): Adjust to call parser methods.
13728         * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
13729         declarations.
13730
13731 2017-04-18  Pedro Alves  <palves@redhat.com>
13732
13733         * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
13734         gdb::optional<std::string>.
13735         * xml-support.c: Include <string>.
13736         (scope_level::scope_level(scope_level &&))
13737         (scope_level::~scope_level): Delete.
13738         (scope_level::body): Now a std::string.
13739         (gdb_xml_body_text, gdb_xml_end_element): Adjust.
13740         (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
13741         parameter.
13742         (xinclude_parsing_data::~xinclude_parsing_data): Delete.
13743         (xinclude_parsing_data::output): Now a std::string reference.
13744         (xinclude_start_include): Adjust.
13745         (xml_xinclude_default): Adjust.
13746         (xml_process_xincludes): Add 'output' parameter, and return bool.
13747         * xml-support.h (xml_process_xincludes): Add 'output' parameter,
13748         and return bool.
13749         * xml-tdesc.c: Include <unordered_map> and <string>.
13750         (tdesc_xml_cache): Delete.
13751         (tdesc_xml_cache_s): Delete.
13752         (xml_cache): Now an std::unordered_map.
13753         (tdesc_parse_xml): Adjust to use std::string and unordered_map.
13754         (target_fetch_description_xml): Change return type to
13755         gdb::optional<std::string>, and adjust.
13756         * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
13757         (target_fetch_description_xml): Change return type to
13758         gdb::optional<std::string>.
13759
13760 2017-04-18  Pedro Alves  <palves@redhat.com>
13761
13762         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13763         unittests/optional-selftests.c.
13764         (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
13765         * unittests/optional-selftests.c: New file.
13766         * unittests/optional/assignment/1.cc: New file.
13767         * unittests/optional/assignment/2.cc: New file.
13768         * unittests/optional/assignment/3.cc: New file.
13769         * unittests/optional/assignment/4.cc: New file.
13770         * unittests/optional/assignment/5.cc: New file.
13771         * unittests/optional/assignment/6.cc: New file.
13772         * unittests/optional/assignment/7.cc: New file.
13773         * unittests/optional/cons/copy.cc: New file.
13774         * unittests/optional/cons/default.cc: New file.
13775         * unittests/optional/cons/move.cc: New file.
13776         * unittests/optional/cons/value.cc: New file.
13777         * unittests/optional/in_place.cc: New file.
13778         * unittests/optional/observers/1.cc: New file.
13779         * unittests/optional/observers/2.cc: New file.
13780
13781 2017-04-18  Pedro Alves  <palves@redhat.com>
13782
13783         * common/gdb_optional.h: Include common/traits.h.
13784         (in_place_t): New type.
13785         (in_place): New constexpr variable.
13786         (optional::optional): Remove member initialization of
13787         m_instantiated.
13788         (optional::optional(in_place_t...)): New constructor.
13789         (optional::~optional): Use reset.
13790         (optional::optional(const optional&)): New.
13791         (optional::optional(const optional&&)): New.
13792         (optional::optional(T &)): New.
13793         (optional::optional(T &&)): New.
13794         (operator::operator=(const optional &)): New.
13795         (operator::operator=(optional &&)): New.
13796         (operator::operator= (const T &))
13797         (operator::operator= (T &&))
13798         (operator::emplace (Args &&... args)): Return a T&.  Use reset.
13799         (operator::reset): New.
13800         (operator::m_instantiated):: Add in-class initializer.
13801         * common/traits.h: Include <type_traits>.
13802         (struct And): New types.
13803
13804 2017-04-18  Pedro Alves  <palves@redhat.com>
13805
13806         * xml-support.c: Include <vector>.
13807         (scope_level::scope_level(const gdb_xml_element *))
13808         (scope_level::scope_level(scope_level&&)): New.
13809         (scope_level::~scope_level): New.
13810         (scope_level_s): Delete.
13811         (gdb_xml_parser::scopes): Now a std::vector.
13812         (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
13813         Use std::vector.
13814         (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
13815         scope cleanup code.
13816         (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
13817         of the scopes member.  Use std::vector::emplace_back.
13818
13819 2017-04-18  Pedro Alves  <palves@redhat.com>
13820
13821         * xml-support.c (gdb_xml_parser): Add ctor/dtor.  Make is_xinclude
13822         a bool.
13823         (gdb_xml_end_element): Change type of first parameter.
13824         (gdb_xml_cleanup): Rename to ...
13825         (gdb_xml_parser::~gdb_xml_parser): ... this.
13826         (gdb_xml_create_parser_and_cleanup): Delete with ...
13827         (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
13828         to this new ctor.
13829         (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
13830         using gdb_xml_create_parser_and_cleanup.
13831         (xinclude_parsing_data): Add ctor/dtor.
13832         (xml_xinclude_cleanup): Delete.
13833         (xml_process_xincludes): Create a local xinclude_parsing_data
13834         instead of heap-allocating one.  Create a local gdb_xml_parser
13835         instead of heap-allocating one with
13836         gdb_xml_create_parser_and_cleanup.
13837
13838 2017-04-18  John Baldwin  <jhb@FreeBSD.org>
13839
13840         PR threads/20743
13841         * fbsd-nat.c (resume_one_thread_cb): Remove.
13842         (resume_all_threads_cb): Remove.
13843         (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
13844         iterate_over_threads.
13845
13846 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
13847
13848         * NEWS: Create a new section for the next release branch.
13849         Rename the section of the current branch, now that it has
13850         been cut.
13851
13852 2017-04-17  Joel Brobecker  <brobecker@adacore.com>
13853
13854         GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
13855         * version.in: Bump version to 8.0.50.DATE-git.
13856
13857 2017-04-13  Sergio Durigan Junior  <sergiodj@redhat.com>
13858
13859         PR gdb/21385
13860         * windows-nat.c (windows_create_inferior): Declare 'allargs'
13861         independently of the host, and fix build breakage on Cygwin.
13862
13863 2017-04-13  Pedro Alves  <palves@redhat.com>
13864
13865         * inferior.c (free_inferior): Convert to ...
13866         (inferior::~inferior): ... this dtor.
13867         (inferior::inferior): New ctor, factored out from ...
13868         (add_inferior_silent): ... here.  Allocate the inferior with a new
13869         expression.
13870         (delete_inferior): Call delete instead of free_inferior.
13871         * inferior.h (gdb_environ, continuation): Forward declare.
13872         (inferior): Now a class.  Add in-class initialization to all
13873         members.  Make boolean fields bool, except 'detaching'.
13874         (inferior::inferior): New explicit ctor.
13875         (inferior::~inferior): New.
13876
13877 2017-04-13  Pedro Alves  <palves@redhat.com>
13878
13879         * inferior.c (init_inferior_list): Delete.
13880         * inferior.h (init_inferior_list): Delete.
13881
13882 2017-04-13  Pedro Alves  <palves@redhat.com>
13883
13884         PR threads/13217
13885         * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
13886         (top level): Call it twice, with different thread sets.
13887
13888 2017-04-13  Pedro Alves  <palves@redhat.com>
13889
13890         * thread.c: Include <algorithm>.
13891         (thread_array_cleanup): Delete.
13892         (scoped_inc_dec_ref): New class.
13893         (live_threads_count): New function.
13894         (set_thread_refcount): Delete.
13895         (tp_array_compar_ascending): Now a bool.
13896         (tp_array_compar): Convert to a std::sort comparison function.
13897         (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
13898         and live_threads_count.
13899
13900 2017-04-13  Pedro Alves  <palves@redhat.com>
13901
13902         * infrun.c (follow_fork_inferior): Also switch the current
13903         inferior.
13904
13905 2017-04-13  Pedro Alves  <palves@redhat.com>
13906
13907         * breakpoint.c (watch_command_1): Save watchpoint-frame info
13908         before calling create_internal_breakpoint.
13909
13910 2017-04-13  Pedro Alves  <palves@redhat.com>
13911
13912         * fork-child.c (execv_argv): New class.
13913         (breakup_args): Refactored as ...
13914         (execv_argv::init_for_no_shell): .. this method of execv_argv.
13915         Copy arguments to storage and replace separators with NULL
13916         terminators in place.
13917         (escape_bang_in_quoted_argument): Adjust to return bool.
13918         (execv_argv::execv_argv): New ctor.
13919         (execv_argv::init_for_shell): New method, factored out from
13920         fork_inferior.  Don't strdup strings into the vector.
13921         (fork_inferior): Eliminate "shell" local and use execv_argv.  Use
13922         Remove free_vector_argv call.
13923
13924 2017-04-13  Yao Qi  <yao.qi@linaro.org>
13925
13926         * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
13927         tdep->rx_psw_type.
13928
13929 2017-04-13  Yao Qi  <yao.qi@linaro.org>
13930
13931         * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
13932         * rx-tdep.c (rx_gdbarch_init): Likewise.
13933
13934 2017-04-13  Pedro Alves  <palves@redhat.com>
13935
13936         * breakpoint.h (struct breakpoint): Reindent.
13937
13938 2017-04-13  Pedro Alves  <palves@redhat.com>
13939
13940         * breakpoint.c (bp_location): Rename to ...
13941         (bp_locations): ... this.  All references updated.
13942         (bp_location_count): Rename to ...
13943         (bp_locations_count): ... this.  All references updated.
13944         (bp_location_placed_address_before_address_max): Rename to ...
13945         (bp_locations_placed_address_before_address_max): ... this.  All
13946         references updated.
13947         (bp_location_shadow_len_after_address_max): Rename to ...
13948         (bp_locations_shadow_len_after_address_max): ... this.  All
13949         references updated.
13950         (bp_location_compare_addrs): Rename to ...
13951         (bp_locations_compare_addrs): ... this.  All references updated.
13952         (bp_location_compare):Rename to ...
13953         (bp_locations_compare): ... this.  All references updated.
13954         (bp_location_target_extensions_update): Rename to ...
13955         (bp_locations_target_extensions_update): ... this.  All references
13956         updated.
13957
13958 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
13959
13960         * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
13961         * common/common.m4: Check headers 'termios.h', 'termio.h' and
13962         'sgtty.h'.
13963         * common/gdb_termios.h: New file, with parts of "terminal.h".
13964         * inflow.c: Include "gdb_termios.h".
13965         * ser-unix.c: Include "gdb_termios.h".
13966         * terminal.h: Move terminal-related defines to
13967         "common/gdb_termios.h".
13968
13969 2017-04-12  Tom Tromey  <tom@tromey.com>
13970
13971         * probe.c (parse_probes): Update.
13972         * location.h (delete_event_location): Don't declare.
13973         (event_location_deleter::operator()): Update.
13974         * location.c (event_location_deleter::operator()): Rename from
13975         delete_event_location.
13976         * linespec.h (linespec_result) <location>: Change type to
13977         event_location_up.
13978         * linespec.c (canonicalize_linespec, event_location_to_sals)
13979         (decode_objc): Update.
13980         (linespec_result): Don't call delete_event_location.
13981         * breakpoint.c (create_breakpoints_sal)
13982         (bkpt_probe_create_sals_from_location)
13983         (strace_marker_create_sals_from_location): Update.
13984
13985 2017-04-12  Tom Tromey  <tom@tromey.com>
13986
13987         * linespec.h (struct linespec_result): Add constructor and
13988         destructor.
13989         (init_linespec_result, destroy_linespec_result)
13990         (make_cleanup_destroy_linespec_result): Don't declare.
13991         * linespec.c (init_linespec_result): Remove.
13992         (linespec_result::~linespec_result): Rename from
13993         destroy_linespec_result.  Update.
13994         (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
13995         Remove.
13996         * breakpoint.c (create_breakpoint, break_range_command)
13997         (decode_location_default): Update.
13998         * ax-gdb.c (agent_command_1): Update.
13999
14000 2017-04-12  Tom Tromey  <tom@tromey.com>
14001
14002         * remote.c (remote_download_tracepoint): Update.
14003         * python/py-breakpoint.c (bppy_get_location): Update.
14004         * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
14005         (gdbscm_breakpoint_location): Update.
14006         * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
14007         * breakpoint.h (struct breakpoint) <location, location_range_end>:
14008         Change type to event_location_up.
14009         * breakpoint.c (create_overlay_event_breakpoint)
14010         (create_longjmp_master_breakpoint)
14011         (create_std_terminate_master_breakpoint)
14012         (create_exception_master_breakpoint)
14013         (breakpoint_event_location_empty_p, print_breakpoint_location)
14014         (print_one_breakpoint_location, create_thread_event_breakpoint)
14015         (init_breakpoint_sal, create_breakpoint)
14016         (print_recreate_ranged_breakpoint, break_range_command)
14017         (init_ada_exception_breakpoint, say_where): Update.
14018         (base_breakpoint_dtor): Don't call delete_event_location.
14019         (bkpt_print_recreate, tracepoint_print_recreate)
14020         (dprintf_print_recreate, update_static_tracepoint)
14021         (breakpoint_re_set_default): Update.
14022
14023 2017-04-12  Tom Tromey  <tom@tromey.com>
14024
14025         * compile/compile-loc2c.c (compute_stack_depth_worker): Change
14026         type of "to_do".  Update.
14027         (compute_stack_depth): Use std::vector.
14028
14029 2017-04-12  Tom Tromey  <tom@tromey.com>
14030
14031         * printcmd.c (find_instruction_backward): Use std::vector.
14032
14033 2017-04-12  Tom Tromey  <tom@tromey.com>
14034
14035         * symfile.c (objfilep): Remove typedef.
14036         (reread_symbols): Use a std::vector.
14037
14038 2017-04-12  Tom Tromey  <tom@tromey.com>
14039
14040         * mi/mi-main.c (exec_direction_forward): Remove.
14041         (exec_reverse_continue, mi_execute_command): Use scoped_restore.
14042         * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
14043         scoped_restore.
14044         * guile/guile.c (guile_repl_command, guile_command)
14045         (gdbscm_execute_gdb_command): Use scoped_restore.
14046         * go-exp.y (go_parse): Use scoped_restore.
14047         * d-exp.y (d_parse): Use scoped_restore.
14048         * cli/cli-decode.c (cmd_func): Use scoped_restore.
14049         * c-exp.y (c_parse): Use scoped_restore.
14050
14051 2017-04-12  Tom Tromey  <tom@tromey.com>
14052
14053         * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
14054         (mi_parse): Update return type.
14055         (mi_parse_free): Remove.
14056         * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
14057         (mi_parse::~mi_parse): Rename from mi_parse_free.
14058         (mi_parse_cleanup): Remove.
14059         (mi_parse): Return a unique_ptr.  Use new.
14060         * mi/mi-main.c (mi_execute_command): Update.
14061
14062 2017-04-12  Tom Tromey  <tom@tromey.com>
14063
14064         * location.c (explicit_location_lex_one): Return a
14065         unique_xmalloc_ptr.
14066         (string_to_explicit_location): Update.  Remove cleanups.
14067
14068 2017-04-12  Tom Tromey  <tom@tromey.com>
14069
14070         * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
14071         (compare_value_and_voffset): Change type.  Update.
14072         (compute_vtable_size): Change type of "offset_vec".
14073         (gnuv3_print_vtable): Use std::vector.  Remove cleanups.
14074         (gnuv3_get_typeid): Remove extraneous declaration.
14075
14076 2017-04-12  Tom Tromey  <tom@tromey.com>
14077
14078         * charset.h (wchar_iterator): Fix comment.
14079
14080 2017-04-12  Tom Tromey  <tom@tromey.com>
14081
14082         * charset.c (iconv_wrapper): New class.
14083         (cleanup_iconv): Remove.
14084         (convert_between_encodings): Use it.
14085
14086 2017-04-12  Tom Tromey  <tom@tromey.com>
14087
14088         * symfile.h (increment_reading_symtab): Update type.
14089         * symfile.c (decrement_reading_symtab): Remove.
14090         (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
14091         * psymtab.c (psymtab_to_symtab): Update.
14092         * dwarf2read.c (dw2_instantiate_symtab): Update.
14093
14094 2017-04-12  Tom Tromey  <tom@tromey.com>
14095
14096         * jit.c (struct jit_reader): Declare separately.  Add constructor
14097         and destructor.  Change type of "handle".
14098         (loaded_jit_reader): Define separately.
14099         (jit_reader_load): Update.  New "new".
14100         (jit_reader_unload_command): Use "delete".
14101         * gdb-dlfcn.h (struct dlclose_deleter): New.
14102         (gdb_dlhandle_up): New typedef.
14103         (gdb_dlopen, gdb_dlsym): Update types.
14104         (gdb_dlclose): Remove.
14105         * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
14106         (gdb_dlsym): Change type of "handle".
14107         (make_cleanup_dlclose): Remove.
14108         (dlclose_deleter::operator()): Rename from gdb_dlclose.
14109         * compile/compile-c-support.c (load_libcc): Update.
14110
14111 2017-04-12  Tom Tromey  <tom@tromey.com>
14112
14113         * symtab.h (find_pcs_for_symtab_line): Change return type.
14114         * symtab.c (find_pcs_for_symtab_line): Change return type.
14115         * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
14116         type of "vec".  Update.
14117         (ltpy_get_pcs_for_line): Update.
14118         * linespec.c (decode_digits_ordinary): Update.
14119
14120 2017-04-12  Tom Tromey  <tom@tromey.com>
14121
14122         * tracepoint.c (actions_command): Update.
14123         * python/python.c (python_command, python_interactive_command):
14124         Update.
14125         * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
14126         * guile/guile.c (guile_command): Update.
14127         * defs.h (read_command_lines, read_command_lines_1): Return
14128         command_line_up.
14129         (command_lines_deleter): New struct.
14130         (command_line_up): New typedef.
14131         * compile/compile.c (compile_code_command)
14132         (compile_print_command): Update.
14133         * cli/cli-script.h (get_command_line, copy_command_lines): Return
14134         command_line_up.
14135         (make_cleanup_free_command_lines): Remove.
14136         * cli/cli-script.c (get_command_line, read_command_lines_1)
14137         (copy_command_lines): Return command_line_up.
14138         (while_command, if_command, read_command_lines, define_command)
14139         (document_command): Update.
14140         (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
14141         Remove.
14142         * breakpoint.h (breakpoint_set_commands): Change type of
14143         "commands".
14144         * breakpoint.c (breakpoint_set_commands): Change type of
14145         "commands".  Update.
14146         (do_map_commands_command, update_dprintf_command_list)
14147         (create_tracepoint_from_upload): Update.
14148
14149 2017-04-12  Tom Tromey  <tom@tromey.com>
14150
14151         * tracepoint.c (scope_info): Update.
14152         * spu-tdep.c (spu_catch_start): Update.
14153         * python/python.c (gdbpy_decode_line): Update.
14154         * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
14155         * python/py-breakpoint.c (bppy_init): Update.
14156         * probe.c (parse_probes): Update.
14157         * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
14158         * location.h (event_location_deleter): New struct.
14159         (event_location_up): New typedef.
14160         (new_linespec_location, new_address_location, new_probe_location)
14161         (new_explicit_location, copy_event_location)
14162         (string_to_event_location, string_to_event_location_basic)
14163         (string_to_explicit_location): Update return type.
14164         (make_cleanup_delete_event_location): Remove.
14165         * location.c (new_linespec_location, new_address_location)
14166         (new_probe_location, new_explicit_location, copy_event_location):
14167         Return event_location_up.
14168         (delete_event_location_cleanup)
14169         (make_cleanup_delete_event_location): Remove.
14170         (string_to_explicit_location, string_to_event_location_basic)
14171         (string_to_event_location): Return event_location_up.
14172         * linespec.c (canonicalize_linespec, event_location_to_sals)
14173         (decode_line_with_current_source)
14174         (decode_line_with_last_displayed, decode_objc): Update.
14175         * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
14176         * completer.c (location_completer): Update.
14177         * cli/cli-cmds.c (edit_command, list_command): Update.
14178         * breakpoint.c (create_overlay_event_breakpoint)
14179         (create_longjmp_master_breakpoint)
14180         (create_std_terminate_master_breakpoint)
14181         (create_exception_master_breakpoint)
14182         (create_thread_event_breakpoint): Update.
14183         (init_breakpoint_sal): Update.  Remove some dead code.
14184         (create_breakpoint_sal): Change type of "location".  Update.
14185         (create_breakpoints_sal, create_breakpoint, break_command_1)
14186         (dprintf_command, break_range_command, until_break_command)
14187         (init_ada_exception_breakpoint)
14188         (strace_marker_create_sals_from_location)
14189         (update_static_tracepoint, trace_command, ftrace_command)
14190         (strace_command, create_tracepoint_from_upload): Update.
14191         * break-catch-throw.c (re_set_exception_catchpoint): Update.
14192         * ax-gdb.c (agent_command_1): Update.
14193
14194 2017-04-12  Pedro Alves  <palves@redhat.com>
14195
14196         * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
14197         * configure.tgt: Handle i[34567]86-*-go32* and
14198         i[34567]86-*-msdosdjgpp*.
14199         * i386-tdep.c (i386_svr4_reg_to_regnum):
14200         Make extern.
14201         (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
14202         i386-go32-tdep.c.
14203         (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
14204         * i386-go32-tdep.c: New file.
14205         * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
14206         declarations.
14207
14208 2017-04-12  Simon Marchi  <simon.marchi@ericsson.com>
14209
14210         * aix-thread.c (pd_status2str): Change return type to const char *.
14211
14212 2017-04-12  Pedro Alves  <palves@redhat.com>
14213
14214         * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
14215         calls to set_gdbarch_gnu_triplet_regexp.
14216
14217 2017-04-12  Pedro Alves  <palves@redhat.com>
14218
14219         PR gdb/21323
14220         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
14221         New enum value.
14222         (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
14223         * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
14224         * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
14225         * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
14226         * gdbarch.h, gdbarch.c: Regenerate.
14227         * aarch64-tdep.c (aarch64_gdbarch_init): Override
14228         gdbarch_wchar_bit and gdbarch_wchar_signed.
14229         * alpha-tdep.c (alpha_gdbarch_init): Likewise.
14230         * arm-tdep.c (arm_gdbarch_init): Likewise.
14231         * avr-tdep.c (avr_gdbarch_init): Likewise.
14232         * h8300-tdep.c (h8300_gdbarch_init): Likewise.
14233         * i386-nto-tdep.c (i386nto_init_abi): Likewise.
14234         * i386-tdep.c (i386_go32_init_abi): Likewise.
14235         * m32r-tdep.c (m32r_gdbarch_init): Likewise.
14236         * moxie-tdep.c (moxie_gdbarch_init): Likewise.
14237         * nds32-tdep.c (nds32_gdbarch_init): Likewise.
14238         * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
14239         * sh-tdep.c (sh_gdbarch_init): Likewise.
14240         * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
14241         * sparc64-tdep.c (sparc64_init_abi): Likewise.
14242         * windows-tdep.c (windows_init_abi): Likewise.
14243         * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
14244
14245 2017-04-12  Pedro Alves  <palves@redhat.com>
14246
14247         PR c++/21323
14248         * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
14249         cplus_primitive_type_char32_t>: New enum values.
14250         (cplus_language_arch_info): Register cplus_primitive_type_char16_t
14251         and cplus_primitive_type_char32_t.
14252         * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
14253         32, use the archtecture's built-in type for char16_t and char32_t,
14254         respectively.  Otherwise, fallback to init_integer_type as before,
14255         but make the type unsigned, and issue a complaint.
14256         * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
14257
14258 2017-04-12  Alan Hayward  <alan.hayward@arm.com>
14259
14260         * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
14261         (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
14262
14263 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
14264
14265         * windows-nat.c (windows_create_inferior): Declare 'toexec' as
14266         'const char *'.
14267
14268 2017-04-12  Sergio Durigan Junior  <sergiodj@redhat.com>
14269
14270         * common/common-utils.c (free_vector_argv): New function.
14271         * common/common-utils.h: Include <vector>.
14272         (free_vector_argv): New prototype.
14273         * darwin-nat.c (darwin_create_inferior): Rewrite function
14274         prototype in order to constify "exec_file" and accept a
14275         "std::string" for "allargs".
14276         * fork-child.c: Include <vector>.
14277         (breakup_args): Rewrite function, using C++.
14278         (fork_inferior): Rewrite function header, constify "exec_file_arg"
14279         and accept "std::string" for "allargs".  Update the code to
14280         calculate "argv" based on "allargs".  Update calls to "exec_fun"
14281         and "execvp".
14282         * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
14283         order to constify "exec_file" and accept a "std::string" for
14284         "allargs".
14285         * go32-nat.c (go32_create_inferior): Likewise.
14286         * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
14287         * infcmd.c (run_command_1): Constify "exec_file".  Use
14288         "std::string" for inferior arguments.
14289         * inferior.h (fork_inferior): Update prototype.
14290         * linux-nat.c (linux_nat_create_inferior): Rewrite function
14291         prototype in order to constify "exec_file" and accept a
14292         "std::string" for "allargs".
14293         * nto-procfs.c (procfs_create_inferior): Likewise.
14294         * procfs.c (procfs_create_inferior): Likewise.
14295         * remote-sim.c (gdbsim_create_inferior): Likewise.
14296         * remote.c (extended_remote_run): Update code to accept
14297         "std::string" as argument.
14298         (extended_remote_create_inferior): Rewrite function prototype in
14299         order to constify "exec_file" and accept a "std::string" for
14300         "allargs".
14301         * rs6000-nat.c (super_create_inferior): Likewise.
14302         (rs6000_create_inferior): Likewise.
14303         * target.h (struct target_ops) <to_create_inferior>: Likewise.
14304         * windows-nat.c (windows_create_inferior): Likewise.
14305
14306 2017-04-11  Pedro Alves  <palves@redhat.com>
14307
14308         * thread.c: Fix whitespace throughout.
14309
14310 2017-04-11  Philipp Rudo  <prudo@linux.vnet.ibm.com>
14311
14312         * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
14313
14314 2017-04-11  Alan Hayward  <alan.hayward@arm.com>
14315
14316         * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
14317
14318 2017-04-10  Sergio Durigan Junior  <sergiodj@redhat.com>
14319
14320         PR gdb/21364
14321         * osdata.c (info_osdata): Check if 'type' is an empty string
14322         instead of NULL.
14323
14324 2017-04-10  Pedro Alves  <palves@redhat.com>
14325
14326         * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
14327         (ptid_to_global_thread_id, in_thread_list)
14328         (do_captured_list_thread_ids, set_resumed, set_running)
14329         (set_executing, set_stop_requested, finish_thread_state)
14330         (validate_registers_access, can_access_registers_ptid)
14331         (print_thread_info_1, switch_to_thread)
14332         (do_restore_current_thread_cleanup)
14333         (make_cleanup_restore_current_thread, thread_command)
14334         (thread_name_command): Use operator== instead of ptid_equal.
14335
14336 2017-04-10  Pedro Alves  <palves@redhat.com>
14337
14338         * thread.c (struct current_thread_cleanup) <next>: Delete field.
14339         (current_thread_cleanup_chain): Delete.
14340         (restore_current_thread_cleanup_dtor)
14341         (make_cleanup_restore_current_thread): Remove references to
14342         current_thread_cleanup_chain.
14343
14344 2017-04-10  Alan Hayward  <alan.hayward@arm.com>
14345
14346         * msp430-tdep.c (msp430_pseudo_register_read): Never return
14347         REG_UNKNOWN.
14348
14349 2017-04-10  Yao Qi  <yao.qi@linaro.org>
14350
14351         PR gdb/19942
14352         * gdbthread.h (thread_info::deletable): New method.
14353         (thread_info::incref): New method.
14354         (thread_info::decref): New method.
14355         (thread_info::refcount): Move it to private.
14356         * infrun.c (save_stop_context): Call inc_refcount.
14357         (release_stop_context_cleanup): Likewise.
14358         * thread.c (set_thread_exited): New function.
14359         (init_thread_list): Delete "tp" only it is deletable, otherwise
14360         call set_thread_exited.
14361         (delete_thread_1): Call set_thread_exited.
14362         (current_thread_cleanup) <inferior_pid>: Remove.
14363         <thread>: New field.
14364         (restore_current_thread_ptid_changed): Removed.
14365         (do_restore_current_thread_cleanup): Adjust.
14366         (restore_current_thread_cleanup_dtor): Don't call
14367         find_thread_ptid.
14368         (set_thread_refcount): Use dec_refcount.
14369         (make_cleanup_restore_current_thread): Adjust.
14370         (thread_apply_all_command): Call inc_refcount.
14371         (_initialize_thread): Don't call
14372         observer_attach_thread_ptid_changed.
14373
14374 2017-04-10  Yao Qi  <yao.qi@linaro.org>
14375
14376         * thread.c (delete_thread_1): Hoist code on marking thread as
14377         exited.
14378
14379 2017-04-09  Simon Marchi  <simon.marchi@polymtl.ca>
14380
14381         * windows-nat.c (windows_detach): Initialize ptid with
14382         minus_one_ptid.
14383
14384 2017-04-07  Simon Marchi  <simon.marchi@ericsson.com>
14385
14386         * unittests/ptid-selftests.c: Fix erroneous assert messages.
14387
14388 2017-04-07  Alan Hayward  <alan.hayward@arm.com>
14389
14390         * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
14391         (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
14392         (bfin_pseudo_register_write): Likewise
14393
14394 2017-04-06  Simon Marchi  <simon.marchi@ericsson.com>
14395
14396         * common/ptid.h (struct ptid): Change to...
14397         (class ptid_t): ... this.
14398         <ptid_t>: New constructors.
14399         <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
14400         matches>: New methods.
14401         <make_null, make_minus_one>: New static methods.
14402         <pid>: Rename to...
14403         <m_pid>: ...this.
14404         <lwp>: Rename to...
14405         <m_lwp>: ...this.
14406         <tid>: Rename to...
14407         <m_tid>: ...this.
14408         (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
14409         ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
14410         as references, move comment to class ptid_t.
14411         * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
14412         ptid_t static methods.
14413         (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
14414         ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
14415         Take ptid arguments as references, implement using ptid_t methods.
14416         * unittests/ptid-selftests.c: New file.
14417         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14418         unittests/ptid-selftests.c.
14419         (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
14420
14421 2017-04-06  Thomas Preud'homme  <thomas.preudhomme@arm.com>
14422
14423         * python/python.c (python_run_simple_file): Cast mode literal to
14424         non-const char pointer as expected by PyFile_FromString.
14425
14426 2017-04-05  Simon Marchi  <simon.marchi@ericsson.com>
14427
14428         * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
14429         minus_one_ptid and null_ptid.
14430
14431 2017-04-05  Pedro Alves  <palves@redhat.com>
14432
14433         * warning.m4 (build_warnings): Remove -Wno-write-strings.
14434         * configure: Regenerate.
14435
14436 2017-04-05  Pedro Alves  <palves@redhat.com>
14437
14438         * ada-exp.y (yyerror): Constify.
14439         * ada-lang.c (bound_name, get_selections)
14440         (ada_variant_discrim_type)
14441         (ada_variant_discrim_name, ada_value_struct_elt)
14442         (ada_lookup_struct_elt_type, is_unchecked_variant)
14443         (ada_which_variant_applies, standard_exc, ada_get_next_arg)
14444         (catch_ada_exception_command_split)
14445         (catch_ada_assert_command_split, catch_assert_command)
14446         (ada_op_name): Constify.
14447         * ada-lang.h (ada_yyerror, get_selections)
14448         (ada_variant_discrim_name, ada_value_struct_elt): Constify.
14449         * arc-tdep.c (arc_print_frame_cache): Constify.
14450         * arm-tdep.c (arm_skip_stub): Constify.
14451         * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
14452         (gen_aggregate_elt_ref): Constify.
14453         * bcache.c (print_bcache_statistics): Constify.
14454         * bcache.h (print_bcache_statistics): Constify.
14455         * break-catch-throw.c (catch_exception_command_1):
14456         * breakpoint.c (struct ep_type_description::description):
14457         Constify.
14458         (add_solib_catchpoint): Constify.
14459         (catch_fork_command_1): Add cast.
14460         (add_catch_command): Constify.
14461         * breakpoint.h (add_catch_command, add_solib_catchpoint):
14462         Constify.
14463         * bsd-uthread.c (bsd_uthread_state): Constify.
14464         * buildsym.c (patch_subfile_names): Constify.
14465         * buildsym.h (next_symbol_text_func, patch_subfile_names):
14466         Constify.
14467         * c-exp.y (yyerror): Constify.
14468         (token::oper): Constify.
14469         * c-lang.h (c_yyerror, cp_print_class_member): Constify.
14470         * c-varobj.c (cplus_describe_child): Constify.
14471         * charset.c (find_charset_names): Add cast.
14472         (find_charset_names): Constify array and add const_cast.
14473         * cli/cli-cmds.c (complete_command, cd_command): Constify.
14474         (edit_command): Constify.
14475         * cli/cli-decode.c (lookup_cmd): Constify.
14476         * cli/cli-dump.c (dump_memory_command, dump_value_command):
14477         Constify.
14478         (struct dump_context): Constify.
14479         (add_dump_command, restore_command): Constify.
14480         * cli/cli-script.c (get_command_line): Constify.
14481         * cli/cli-script.h (get_command_line): Constify.
14482         * cli/cli-utils.c (check_for_argument): Constify.
14483         * cli/cli-utils.h (check_for_argument): Constify.
14484         * coff-pe-read.c (struct read_pe_section_data): Constify.
14485         * command.h (lookup_cmd): Constify.
14486         * common/print-utils.c (decimal2str): Constify.
14487         * completer.c (gdb_print_filename): Constify.
14488         * corefile.c (set_gnutarget): Constify.
14489         * cp-name-parser.y (yyerror): Constify.
14490         * cp-valprint.c (cp_print_class_member): Constify.
14491         * cris-tdep.c (cris_register_name, crisv32_register_name):
14492         Constify.
14493         * d-exp.y (yyerror): Constify.
14494         (struct token::oper): Constify.
14495         * d-lang.h (d_yyerror): Constify.
14496         * dbxread.c (struct header_file_location::name): Constify.
14497         (add_old_header_file, add_new_header_file, last_function_name)
14498         (dbx_next_symbol_text, add_bincl_to_list)
14499         (find_corresponding_bincl_psymtab, set_namestring)
14500         (find_stab_function_addr, read_dbx_symtab, start_psymtab)
14501         (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
14502         * defs.h (command_line_input, print_address_symbolic)
14503         (deprecated_readline_begin_hook): Constify.
14504         * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
14505         Constify.
14506         * event-top.c (handle_line_of_input): Constify and add cast.
14507         * exceptions.c (catch_errors): Constify.
14508         * exceptions.h (catch_errors): Constify.
14509         * expprint.c (print_subexp_standard, op_string, op_name)
14510         (op_name_standard, dump_raw_expression, dump_raw_expression):
14511         * expression.h (op_name, op_string, dump_raw_expression):
14512         Constify.
14513         * f-exp.y (yyerror): Constify.
14514         (struct token::oper): Constify.
14515         (struct f77_boolean_val::name): Constify.
14516         * f-lang.c (f_word_break_characters): Constify.
14517         * f-lang.h (f_yyerror): Constify.
14518         * fork-child.c (fork_inferior): Add cast.
14519         * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
14520         (new_variant): Constify.
14521         * gdbarch.sh (pstring_ptr, pstring_list): Constify.
14522         * gdbarch.c: Regenerate.
14523         * gdbcore.h (set_gnutarget): Constify.
14524         * go-exp.y (yyerror): Constify.
14525         (token::oper): Constify.
14526         * go-lang.h (go_yyerror): Constify.
14527         * go32-nat.c (go32_sysinfo): Constify.
14528         * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
14529         * guile/scm-cmd.c (cmdscm_function): Constify.
14530         * guile/scm-param.c (pascm_param_value): Constify.
14531         * h8300-tdep.c (h8300_register_name, h8300s_register_name)
14532         (h8300sx_register_name): Constify.
14533         * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
14534         Constify.
14535         * ia64-tdep.c (ia64_register_names): Constify.
14536         * infcmd.c (construct_inferior_arguments): Constify.
14537         (path_command, attach_post_wait): Constify.
14538         * language.c (show_range_command, show_case_command)
14539         (unk_lang_error): Constify.
14540         * language.h (language_defn::la_error)
14541         (language_defn::la_name_of_this): Constify.
14542         * linespec.c (decode_line_2): Constify.
14543         * linux-thread-db.c (thread_db_err_str): Constify.
14544         * lm32-tdep.c (lm32_register_name): Constify.
14545         * m2-exp.y (yyerror): Constify.
14546         * m2-lang.h (m2_yyerror): Constify.
14547         * m32r-tdep.c (m32r_register_names): Constify and make static.
14548         * m68hc11-tdep.c (m68hc11_register_names): Constify.
14549         * m88k-tdep.c (m88k_register_name): Constify.
14550         * macroexp.c (appendmem): Constify.
14551         * mdebugread.c (fdr_name, add_data_symbol, parse_type)
14552         (upgrade_type, parse_external, parse_partial_symbols)
14553         (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
14554         (new_symbol): Constify.
14555         * memattr.c (mem_info_command): Constify.
14556         * mep-tdep.c (register_name_from_keyword): Constify.
14557         * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
14558         Constify.
14559         * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
14560         * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
14561         * mi/mi-main.c (captured_mi_execute_command): Constify and add
14562         cast.
14563         (mi_execute_async_cli_command): Constify.
14564         * mips-tdep.c (mips_register_name): Constify.
14565         * mn10300-tdep.c (register_name, mn10300_generic_register_name)
14566         (am33_register_name, am33_2_register_name)
14567         * moxie-tdep.c (moxie_register_names): Constify.
14568         * nat/linux-osdata.c (osdata_type): Constify fields.
14569         * nto-tdep.c (nto_parse_redirection): Constify.
14570         * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
14571         (lookup_child_selector): Constify.
14572         (objc_methcall::name): Constify.
14573         * objc-lang.h (lookup_objc_class, lookup_child_selector)
14574         (lookup_struct_typedef): Constify.
14575         * objfiles.c (pc_in_section): Constify.
14576         * objfiles.h (pc_in_section): Constify.
14577         * p-exp.y (struct token::oper): Constify.
14578         (yyerror): Constify.
14579         * p-lang.h (pascal_yyerror): Constify.
14580         * parser-defs.h (op_name_standard): Constify.
14581         (op_print::string): Constify.
14582         (exp_descriptor::op_name): Constify.
14583         * printcmd.c (print_address_symbolic): Constify.
14584         * psymtab.c (print_partial_symbols): Constify.
14585         * python/py-breakpoint.c (stop_func): Constify.
14586         (bppy_get_expression): Constify.
14587         * python/py-cmd.c (cmdpy_completer::name): Constify.
14588         (cmdpy_function): Constify.
14589         * python/py-event.c (evpy_add_attribute)
14590         (gdbpy_initialize_event_generic): Constify.
14591         * python/py-event.h (evpy_add_attribute)
14592         (gdbpy_initialize_event_generic): Constify.
14593         * python/py-evts.c (add_new_registry): Constify.
14594         * python/py-finishbreakpoint.c (outofscope_func): Constify.
14595         * python/py-framefilter.c (get_py_iter_from_func): Constify.
14596         * python/py-inferior.c (get_buffer): Add cast.
14597         * python/py-param.c (parm_constant::name): Constify.
14598         * python/py-unwind.c (fprint_frame_id): Constify.
14599         * python/python.c (gdbpy_parameter_value): Constify.
14600         * remote-fileio.c (remote_fio_func_map): Make 'name' const.
14601         * remote.c (memory_packet_config::name): Constify.
14602         (show_packet_config_cmd, remote_write_bytes)
14603         (remote_buffer_add_string):
14604         * reverse.c (exec_reverse_once): Constify.
14605         * rs6000-tdep.c (variant::name, variant::description): Constify.
14606         * rust-exp.y (rustyyerror): Constify.
14607         * rust-lang.c (rust_op_name): Constify.
14608         * rust-lang.h (rustyyerror): Constify.
14609         * serial.h (serial_ops::name): Constify.
14610         * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
14611         (sh_sh3e_register_name, sh_sh2e_register_name)
14612         (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
14613         (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
14614         (sh_sh4_register_name, sh_sh4_nofpu_register_name)
14615         (sh_sh4al_dsp_register_name): Constify.
14616         * sh64-tdep.c (sh64_register_name): Constify.
14617         * solib-darwin.c (lookup_symbol_from_bfd): Constify.
14618         * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
14619         * stabsread.c (patch_block_stabs, read_type_number)
14620         (ref_map::stabs, ref_add, process_reference)
14621         (symbol_reference_defined, define_symbol, define_symbol)
14622         (error_type, read_type, read_member_functions, read_cpp_abbrev)
14623         (read_one_struct_field, read_struct_fields, read_baseclasses)
14624         (read_tilde_fields, read_struct_type, read_array_type)
14625         (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
14626         (read_huge_number, read_range_type, read_args, common_block_start)
14627         (find_name_end): Constify.
14628         * stabsread.h (common_block_start, define_symbol)
14629         (process_one_symbol, symbol_reference_defined, ref_add):
14630         * symfile.c (get_section_index, add_symbol_file_command):
14631         * symfile.h (get_section_index): Constify.
14632         * target-descriptions.c (tdesc_type::name): Constify.
14633         (tdesc_free_type): Add cast.
14634         * target.c (find_default_run_target):
14635         (add_deprecated_target_alias, find_default_run_target)
14636         (target_announce_detach): Constify.
14637         (do_option): Constify.
14638         * target.h (add_deprecated_target_alias): Constify.
14639         * thread.c (print_thread_info_1): Constify.
14640         * top.c (deprecated_readline_begin_hook, command_line_input):
14641         Constify.
14642         (init_main): Add casts.
14643         * top.h (handle_line_of_input): Constify.
14644         * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
14645         * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
14646         (tfind_command): Rename to ...
14647         (tfind_command_1): ... this and constify.
14648         (tfind_command): New function.
14649         (tfind_end_command, tfind_start_command): Adjust.
14650         (encode_source_string): Constify.
14651         * tracepoint.h (encode_source_string): Constify.
14652         * tui/tui-data.c (tui_partial_win_by_name): Constify.
14653         * tui/tui-data.h (tui_partial_win_by_name): Constify.
14654         * tui/tui-source.c (tui_set_source_content_nil): Constify.
14655         * tui/tui-source.h (tui_set_source_content_nil): Constify.
14656         * tui/tui-win.c (parse_scrolling_args): Constify.
14657         * tui/tui-windata.c (tui_erase_data_content): Constify.
14658         * tui/tui-windata.h (tui_erase_data_content): Constify.
14659         * tui/tui-winsource.c (tui_erase_source_content): Constify.
14660         * tui/tui.c (tui_enable): Add cast.
14661         * utils.c (defaulted_query): Constify.
14662         (init_page_info): Add cast.
14663         (puts_debug, subset_compare): Constify.
14664         * utils.h (subset_compare): Constify.
14665         * varobj.c (varobj_format_string): Constify.
14666         * varobj.h (varobj_format_string): Constify.
14667         * vax-tdep.c (vax_register_name): Constify.
14668         * windows-nat.c (windows_detach): Constify.
14669         * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
14670         * xml-support.c (gdb_xml_end_element): Constify.
14671         * xml-tdesc.c (tdesc_start_reg): Constify.
14672         * xstormy16-tdep.c (xstormy16_register_name): Constify.
14673         * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
14674         * xtensa-tdep.h (xtensa_register_t::name): Constify.
14675
14676 2017-04-05  Pedro Alves  <palves@redhat.com>
14677
14678         * proc-api.c (struct trans): Constify.
14679         (procfs_note): Constify.
14680         * proc-events.c (struct trans, syscall_table):
14681         * proc-flags.c (struct trans): Constify.
14682         * proc-utils.h (procfs_note): Constify.
14683         * proc-why.c (struct trans): Constify.
14684         * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
14685         (procfs_detach): Constify.
14686         * sol-thread.c (struct string_map): Constify.
14687         (td_err_string, td_state_string): Constify.
14688
14689 2017-04-05  Pedro Alves  <palves@redhat.com>
14690
14691         * proc-api.c (procfs_filename): Don't initialize
14692         procfs_filename.
14693         (prepare_to_trace): Assume procfs_filename is non-NULL.
14694         (_initialize_proc_api): Give procfs_filename a default value here.
14695
14696 2017-04-05  Pedro Alves  <palves@redhat.com>
14697
14698         * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
14699         'cond_string' parameter.
14700         (extract_exception_regexp): Constify 'string' parameter.
14701         (catch_exception_command_1): Constify.
14702         * breakpoint.c (init_catchpoint)
14703         (create_fork_vfork_event_catchpoint): Constify 'cond_string'
14704         parameter.
14705         (ep_parse_optional_if_clause, catch_fork_command_1)
14706         (catch_exec_command_1): Constify.
14707         * breakpoint.h (init_catchpoint): Constify 'cond_string'
14708         parameter.
14709         (ep_parse_optional_if_clause): Constify.
14710         * cli/cli-utils.c (remove_trailing_whitespace)
14711         (check_for_argument): Constify.
14712         * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
14713         non-const overload.
14714         (check_for_argument): Likewise.
14715
14716 2017-04-05  Pedro Alves  <palves@redhat.com>
14717
14718         * event-top.c (command_line_handler): Add cast to execute_command
14719         call.
14720         * record-btrace.c (cmd_record_btrace_bts_start)
14721         (cmd_record_btrace_pt_start, cmd_record_btrace_start)
14722         (cmd_record_btrace_start): Add cast to execute_command call.
14723         * record-full.c (record_full_goto_insn):
14724         * record.c (record_start, record_stop): Add cast to
14725         execute_command_to_string calls.
14726         (cmd_record_start): Add cast to execute_command calls.
14727
14728 2017-04-05  Pedro Alves  <palves@redhat.com>
14729
14730         * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
14731         static inline function.
14732         * python/py-arch.c (archpy_disassemble): Constify 'keywords'
14733         array and use gdb_PyArg_ParseTupleAndKeywords.
14734         * python/py-cmd.c (cmdpy_init): Likewise.
14735         * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
14736         * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
14737         (infpy_search_memory): Likewise.
14738         * python/py-objfile.c (objfpy_add_separate_debug_file)
14739         (gdbpy_lookup_objfile): Likewise.
14740         * python/py-symbol.c (gdbpy_lookup_symbol)
14741         (gdbpy_lookup_global_symbol): Likewise.
14742         * python/py-type.c (gdbpy_lookup_type): Likewise.
14743         * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
14744         * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
14745         Likewise.
14746
14747 2017-04-05  Pedro Alves  <palves@redhat.com>
14748
14749         * python/python-internal.h (gdb_PyGetSetDef): New type.
14750         * python/py-block.c (block_object_getset)
14751         (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
14752         * python/py-event.c (event_object_getset)
14753         (finish_breakpoint_object_getset): Likewise.
14754         * python/py-inferior.c (inferior_object_getset): Likewise.
14755         * python/py-infthread.c (thread_object_getset): Likewise.
14756         * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
14757         * python/py-linetable.c (linetable_entry_object_getset): Likewise.
14758         * python/py-objfile.c (objfile_getset): Likewise.
14759         * python/py-progspace.c (pspace_getset): Likewise.
14760         * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
14761         Likewise.
14762         * python/py-record.c (recpy_record_getset): Likewise.
14763         * python/py-symbol.c (symbol_object_getset): Likewise.
14764         * python/py-symtab.c (symtab_object_getset, sal_object_getset):
14765         Likewise.
14766         * python/py-type.c (type_object_getset, field_object_getset):
14767         Likewise.
14768         * python/py-value.c (value_object_getset): Likewise.
14769
14770 2017-04-05  Pedro Alves  <palves@redhat.com>
14771
14772         * python/python-internal.h (gdb_PyObject_CallMethod)
14773         (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
14774         New functions.
14775         (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
14776         (PySys_GetObject, PySys_SetPath): New macros.
14777
14778 2017-04-05  Pedro Alves  <palves@redhat.com>
14779
14780         * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
14781         info_osdata_command.
14782         * osdata.c (info_osdata_command): Rename to ...
14783         (info_osdata): ... this.  Constify 'type' parameter, and remove
14784         the 'from_tty' parameter.  Accept NULL TYPE.
14785         (info_osdata_command): New function.
14786         * osdata.h (info_osdata_command): Remove declaration.
14787         (info_osdata): New declaration.
14788
14789 2017-04-05  Pedro Alves  <palves@redhat.com>
14790
14791         * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
14792         (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
14793         (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
14794         parameter.
14795         * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
14796         (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
14797         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
14798         parameter.
14799         * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
14800         (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
14801         * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
14802         (mi_cmd_file_list_exec_source_files)
14803         (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
14804         * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
14805         (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
14806         parameter.
14807         * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
14808         (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
14809         (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
14810         (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
14811         (mi_cmd_stack_info_frame): Constify 'command' parameter.
14812         * mi/mi-cmd-target.c (mi_cmd_target_file_get)
14813         (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
14814         'command' parameter.
14815         * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
14816         (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
14817         (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
14818         (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
14819         (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
14820         (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
14821         (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
14822         (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
14823         (mi_cmd_var_set_update_range): Constify 'command' parameter.
14824         * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
14825         * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
14826         parameter.
14827         * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
14828         (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
14829         (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
14830         (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
14831         (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
14832         (mi_cmd_target_flash_erase, mi_cmd_thread_select)
14833         (mi_cmd_thread_list_ids, mi_cmd_thread_info)
14834         (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
14835         (mi_cmd_data_list_changed_registers)
14836         (mi_cmd_data_write_register_values)
14837         (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
14838         (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
14839         (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
14840         (mi_cmd_list_features, mi_cmd_list_target_features)
14841         (mi_cmd_add_inferior, mi_cmd_remove_inferior)
14842         (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
14843         (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
14844         (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
14845         (mi_cmd_trace_frame_collected): Constify 'command'
14846         parameter.
14847         * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
14848         'command' parameter.
14849
14850 2017-04-05  Pedro Alves  <palves@redhat.com>
14851
14852         * ada-lang.c (ada_completer_word_break_characters): Now a const
14853         array.
14854         (ada_get_gdb_completer_word_break_characters): Constify.
14855         * completer.c (gdb_completer_command_word_break_characters)
14856         (gdb_completer_file_name_break_characters)
14857         (gdb_completer_quote_characters): Now const arrays.
14858         (get_gdb_completer_quote_characters): Constify.
14859         (set_rl_completer_word_break_characters): New function.
14860         (set_gdb_completion_word_break_characters)
14861         (complete_line_internal): Use it.
14862         * completer.h (get_gdb_completer_quote_characters): Constify.
14863         (set_rl_completer_word_break_characters): Declare.
14864         * f-lang.c (f_word_break_characters): Constify.
14865         * language.c (default_word_break_characters): Constify.
14866         * language.h (language_defn::la_word_break_characters): Constify.
14867         (default_word_break_characters): Constify.
14868         * top.c (init_main): Use set_rl_completer_word_break_characters.
14869
14870 2017-04-05  Pedro Alves  <palves@redhat.com>
14871
14872         * aix-thread.c (aix_thread_pid_to_str)
14873         (aix_thread_extra_thread_info): Constify.
14874         * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
14875         * bsd-uthread.c (bsd_uthread_extra_thread_info)
14876         (bsd_uthread_pid_to_str): Constify.
14877         * corelow.c (core_pid_to_str): Constify.
14878         * darwin-nat.c (darwin_pid_to_str): Constify.
14879         * fbsd-nat.c (fbsd_pid_to_str): Constify.
14880         * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
14881         Constify.
14882         * gnu-nat.c (gnu_pid_to_str): Constify.
14883         * go32-nat.c (go32_pid_to_str): Constify.
14884         * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
14885         * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
14886         * inferior.c (inferior_pid_to_str): Constify.
14887         * linux-nat.c (linux_nat_pid_to_str): Constify.
14888         * linux-tdep.c (linux_core_pid_to_str): Constify.
14889         * linux-thread-db.c (thread_db_pid_to_str)
14890         (thread_db_extra_thread_info): Constify.
14891         * nto-tdep.c (nto_extra_thread_info): Constify.
14892         * nto-tdep.h (nto_extra_thread_info): Constify.
14893         * obsd-nat.c (obsd_pid_to_str): Constify.
14894         * procfs.c (procfs_pid_to_str): Constify.
14895         * ravenscar-thread.c (ravenscar_extra_thread_info)
14896         (ravenscar_pid_to_str): Constify.
14897         * remote-sim.c (gdbsim_pid_to_str): Constify.
14898         * remote.c (remote_threads_extra_info, remote_pid_to_str):
14899         Constify.
14900         * sol-thread.c (solaris_pid_to_str): Constify.
14901         * sol2-tdep.c (sol2_core_pid_to_str): Constify.
14902         * sol2-tdep.h (sol2_core_pid_to_str): Constify.
14903         * target.c (default_pid_to_str, target_pid_to_str)
14904         (normal_pid_to_str, default_pid_to_str): Constify.
14905         * target.h (target_ops::to_pid_to_str)
14906         (target_ops::to_extra_thread_info): Constify.
14907         (target_pid_to_str, normal_pid_to_str): Constify.
14908         * windows-nat.c (windows_pid_to_str): Constify.
14909         * gdbarch.sh (core_pid_to_str): Constify.
14910         * target-delegates.c: Regenerate.
14911         * gdbarch.h, gdbarch.c: Regenerate.
14912
14913 2017-04-05  Pedro Alves  <palves@redhat.com>
14914
14915         * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
14916         the memory of the temporary warning_pre_print override.
14917         * utils.c (warning_pre_print): Constify.
14918         * utils.h (warning_pre_print): Constify.
14919
14920 2017-04-05  Pedro Alves  <palves@redhat.com>
14921
14922         * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
14923         (shell_command): New function.
14924         (make_command): Use std::string.
14925         (init_cli_cmds): Register shell_command instead of shell_escape.
14926
14927 2017-04-05  Pedro Alves  <palves@redhat.com>
14928
14929         * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
14930         * tracepoint.c (default_collect): Don't initialize.
14931
14932 2017-04-05  Pedro Alves  <palves@redhat.com>
14933
14934         * macroexp.c (macro_buffer::shared): Now a bool.
14935         (init_buffer): Update.
14936         (init_shared_buffer): Constify 'addr' parameter.
14937         (substitute_args, expand, macro_expand, macro_expand_next): Remove
14938         casts.
14939
14940 2017-04-05  Pedro Alves  <palves@redhat.com>
14941
14942         * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
14943         * disasm.c (set_disassembler_options): Constify local.
14944         * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
14945
14946 2017-04-05  Sergio Durigan Junior  <sergiodj@redhat.com>
14947
14948         PR gdb/21352
14949         * tracefile.c (tsave_command): Fix argument parsing for '-r'
14950         option.
14951
14952 2017-04-05  Yao Qi  <yao.qi@linaro.org>
14953
14954         * frame.c (frame_unwind_register_unsigned): Call
14955         frame_unwind_register_value.
14956
14957 2017-04-05  Yao Qi  <yao.qi@linaro.org>
14958
14959         * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
14960         Use gdb_test_multiple, and don't match anchor.
14961
14962 2017-04-05  Pedro Alves  <palves@redhat.com>
14963
14964         * MAINTAINERS (Global Maintainers): Add Simon Marchi.
14965         (Write After Approval): Remove Simon Marchi.
14966
14967 2017-04-05  Pedro Alves  <palves@redhat.com>
14968
14969         * common/gdb_optional.h (optional::optional): Make constexpr and
14970         initialize m_dummy.
14971
14972 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
14973
14974         * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
14975         (amd64fbsd_jmp_buf_reg_offset): Remove.
14976         (amd64fbsd_supply_uthread): Remove function.
14977         (amd64fbsd_collect_uthread): Remove function.
14978         (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
14979         * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
14980         (x86_64-*-freebsd*): Remove bsd-uthread.o.
14981         (fbsd-nat.c): Update comment.
14982         * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
14983         (i386fbsd_jmp_buf_reg_offset): Remove.
14984         (i386fbsd_supply_uthread): Remove function.
14985         (i386fbsd_collect_uthread): Remove function.
14986         (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
14987
14988 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
14989
14990         * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
14991         (ALLDEPFILES): Remove alpha-fbsd-tdep.c
14992         * NEWS: Mention that support for FreeBSD/alpha was removed.
14993         * alpha-fbsd-tdep.c: Delete file.
14994         * config/alpha/fbsd.mh: Delete file.
14995         * configure.host: Delete alpha*-*-freebsd* and
14996         alpha*-*-kfreebsd*-gnu.
14997         * configure.tgt: Delete alpha*-*-freebsd* and
14998         alpha*-*-kfreebsd*-gnu.
14999
15000 2017-04-04  John Baldwin  <jhb@FreeBSD.org>
15001
15002         * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
15003         amd64bsd_store_inferior_registers): Use ptid from regcache.
15004
15005 2017-04-04  Pedro Alves  <palves@redhat.com>
15006
15007         * dwarf2read.c (lnp_state_machine): Now a class.  Initialize all
15008         data fields, make them private and add "m_" prefixes.
15009         (lnp_state_machine::lnp_state_machine): New ctor.
15010         (record_line, check_line_address, handle_set_discriminator)
15011         (handle_set_address, handle_advance_pc, handle_special_opcode)
15012         (handle_advance_line, handle_set_file, handle_negate_stmt)
15013         (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
15014         (end_sequence, advance_line): New methods.
15015         (m_gdbarch, m_record_lines_p): New fields.
15016         (lnp_reader_state): Delete.
15017         (dwarf_record_line): Rename to ...
15018         (lnp_state_machine::record_line): ... adjust.
15019         (init_lnp_state_machine): Delete.
15020         (lnp_state_machine::lnp_state_machine): New.
15021         (check_line_address): Rename to ...
15022         (lnp_state_machine::check_line_address): This.
15023         (dwarf_decode_lines_1): Remove reference to "reader_state".
15024         Adjust lnp_state_machine having a non-default ctor.  Use bool.
15025         State machine internal state manipulation moved to
15026         lnp_state_machine methods.
15027
15028 2017-04-04  Pedro Alves  <palves@redhat.com>
15029
15030         * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
15031         unittests/offset-type-selftests.c.
15032         (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
15033         * common/offset-type.h: New file.
15034         * common/preprocessor.h: New file.
15035         * common/traits.h: New file.
15036         * common/valid-expr.h: New file.
15037         * dwarf2expr.c: Include "common/underlying.h".  Adjust to use
15038         sect_offset and cu_offset strong typedefs throughout.
15039         * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
15040         typedefs throughout.
15041         * dwarf2loc.c: Include "common/underlying.h".  Adjust to use
15042         sect_offset and cu_offset strong typedefs throughout.
15043         * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
15044         typedefs throughout.
15045         * gdbtypes.h: Include "common/offset-type.h".
15046         (cu_offset): Now an offset type (strong typedef) instead of a
15047         struct.
15048         (sect_offset): Likewise.
15049         (union call_site_parameter_u): Rename "param_offset" field to
15050         "param_cu_off".
15051         * unittests/offset-type-selftests.c: New file.
15052
15053 2017-04-04  Pedro Alves  <palves@redhat.com>
15054
15055         * common/underlying.h: New file.
15056         * dwarf2read.c: Include "common/gdb_optional.h" and
15057         "common/underlying.h".
15058         (dir_index, file_name_index): New types.
15059         (file_entry): Use them.
15060         (file_entry::include): Use to_underlying.
15061         (line_header::add_file_name): Use dir_index.
15062         (read_formatted_entries): Use gdb::optional.  Read form before
15063         writting to file_entry.
15064         (dwarf_decode_line_header): Use dir_index.
15065         (lnp_state_machine::current_file): Use to_underlying.
15066         (lnp_state_machine::file): Change type to file_name_index.
15067         (dwarf_record_line): Use to_underlying.
15068         (init_lnp_state_machine): Use file_name_index.
15069         (dwarf_decode_lines_1): Use dir_index and file_name_index.
15070
15071 2017-04-04  Pedro Alves  <palves@redhat.com>
15072
15073         * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
15074         operator bool, has_value and get methods.
15075
15076 2017-04-04  Pedro Alves  <palves@redhat.com>
15077
15078         * dwarf2read.c (struct file_entry): Add ctors, and initialize all
15079         fields.
15080         (line_header): Initialize all data fields.  Change type of
15081         standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
15082         Change type of include_dirs to std::vector<const char *>.  Remove
15083         num_include_dirs, include_dirs_size.  Change type of file_names to
15084         std::vector<file_entry>.  Remove num_file_names, file_names_size.
15085         (line_header::line_header): New.
15086         (line_header::add_include_dir, line_header::add_file_name): New
15087         methods.
15088         (line_header::include_dir_at): Remove NULL check.
15089         (line_header::file_name_at): Add const overload.
15090         (line_header_up): New unique_ptr typedef.
15091         (dw2_get_file_names_reader): Use line_header_up.  Adjust to use
15092         std::vector.  Remove free_line_header call.
15093         (dwarf2_build_include_psymtabs): Use line_header_up.  Remove
15094         free_line_header call.
15095         (free_cu_line_header): Delete.
15096         (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
15097         (setup_type_unit_groups): Use line_header_up instead of cleanups.
15098         Adjust to use std::vector.
15099         (free_line_header): Delete.
15100         (free_line_header_voidp): Use delete.
15101         (add_include_dir): Replace with ...
15102         (line_header::add_include_dir): ... this method.  Use std::vector.
15103         (add_file_name): Replace with ...
15104         (line_header::add_file_name): ... this method.  Use std::vector.
15105         (add_include_dir_stub): Delete.
15106         (read_formatted_entries): Remove memset.
15107         (dwarf_decode_line_header): Return a line_header_up instead of a
15108         raw pointer.  Remove cleanup handling.  Pass lambdas to
15109         read_formatted_entries.  Adjust to use line_header methods.
15110         (dwarf_decode_lines_1): Adjust to use line_header methods.
15111         (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
15112         use std::vector.
15113
15114 2017-04-04  Simon Marchi  <simon.marchi@polymtl.ca>
15115
15116         * remote.c (set_general_thread, set_continue_thread): Use ptid_t
15117         instead of struct ptid.
15118
15119 2017-05-04  Alan Hayward  <alan.hayward@arm.com>
15120
15121         * frame.c (get_frame_register_bytes): Unwind using value.
15122         (put_frame_register_bytes): Likewise.
15123
15124 2017-03-30  Iain Buclaw  <ibuclaw@gdcproject.org>
15125
15126         * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
15127         aggregate-like.
15128
15129 2017-03-29  Jan Kratochvil  <jan.kratochvil@redhat.com>
15130
15131         * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
15132
15133 2017-03-29  Yao Qi  <yao.qi@linaro.org>
15134
15135         * gdbthread.h (struct thread_info): Declare constructor and
15136         destructor.  Add some in-class member initializers.
15137         * thread.c (free_thread): Remove.
15138         (init_thread_list): Call delete instead of free_thread.
15139         (new_thread): Call thread_info constructor.
15140         (thread_info::thread_info): New function.
15141         (thread_info::~thread_info): New function.
15142         (delete_thread_1): Call delete instead of free_thread.
15143         (make_cleanup_restore_current_thread): Move tp and frame to
15144         inner block.
15145
15146 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
15147
15148         * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
15149         (arc_skip_prologue): Likewise.
15150         (arc_make_frame_cache): Likewise.
15151         (arc_pv_get_operand): New function.
15152         (arc_is_in_prologue): Likewise.
15153         (arc_analyze_prologue): Likewise.
15154         (arc_print_frame_cache): Likewise.
15155         (MAX_PROLOGUE_LENGTH): New constant.
15156
15157 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
15158
15159         * configure.tgt: Add arc-insn.o.
15160         * arc-tdep.c (arc_delayed_print_insn): Make non-static.
15161         (dump_arc_instruction_command): New function.
15162         (arc_fprintf_disasm): Likewise.
15163         (arc_disassemble_info): Likewise.
15164         (arc_insn_get_operand_value): Likewise.
15165         (arc_insn_get_operand_value_signed): Likewise.
15166         (arc_insn_get_memory_base_reg): Likewise.
15167         (arc_insn_get_memory_offset): Likewise.
15168         (arc_insn_get_branch_target): Likewise.
15169         (arc_insn_dump): Likewise.
15170         (arc_insn_get_linear_next_pc): Likewise.
15171         * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
15172         (arc_disassemble_info): Likewise.
15173         (arc_insn_get_branch_target): Likewise.
15174         (arc_insn_get_linear_next_pc): Likewise.
15175         * NEWS: Mention new "maint print arc arc-instruction".
15176
15177 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
15178
15179         * arc-tdep (maintenance_print_arc_list): New variable.
15180         (maintenance_print_arc_command): New function.
15181
15182 2017-03-28  Anton Kolesov  <anton.kolesov@synopsys.com>
15183
15184         * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
15185         Add "limm" and "reserved".
15186         (arc_cannot_fetch_register, arc_cannot_store_register): Add
15187         ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
15188         * arc-tdep.h (arc_regnum): Likewise.
15189
15190 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
15191
15192         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
15193         for THREADPTR register.
15194         (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
15195         register.
15196         * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
15197         (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
15198         * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
15199
15200 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
15201
15202         * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
15203         registers above gdbarch_num_regs (gdbarch) as privileged in
15204         call0 ABI.
15205
15206 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
15207
15208         * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
15209         for a single specified register or for all registers in
15210         a0_base..a0_base + C0_NREGS range.
15211         (supply_gregset_reg): Call regcache_raw_supply for a single
15212         specified register or for all registers in a0_base..a0_base +
15213         C0_NREGS range.
15214
15215 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
15216
15217         * arch/xtensa.h (C0_NREGS): Add definition.
15218         * xtensa-tdep.c (C0_NREGS): Remove definition.
15219
15220 2017-03-27  Max Filippov  <jcmvbkbc@gmail.com>
15221
15222         * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
15223         Drop xtensa_default_isa initialization.
15224         (xtensa_gdbarch_init): Initialize xtensa_default_isa.
15225
15226 2017-03-27  Pedro Alves  <palves@redhat.com>
15227
15228         * dwarf2read.c (file_entry) <dir_index>: Add comment.
15229         (file_entry::include_dir): New method.
15230         (line_header::include_dir_at, line_header::file_name_at): New
15231         methods.
15232         (setup_type_unit_groups, setup_type_unit_groups)
15233         (psymtab_include_file_name): Simplify using the new methods.
15234         (lnp_state_machine) <the_line_header>: New field.
15235         <file>: Add comment.
15236         (lnp_state_machine::current_file): New method.
15237         (dwarf_record_line): Simplify using the new methods.
15238         (init_lnp_state_machine): Initialize the "the_line_header" field.
15239         (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
15240         Simplify using the new methods.
15241
15242 2017-03-27  Pedro Alves  <palves@redhat.com>
15243
15244         * cp-name-parser.y (make_empty): Delete.
15245         (demangler_special, nested_name, ptr_operator, array_indicator)
15246         (direct_declarator, declarator_1): Use fill_comp instead of
15247         make_empty.
15248
15249 2017-03-27  Pedro Alves  <palves@redhat.com>
15250
15251         * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
15252         to ATTRIBUTE_PRINTF.
15253         * solib-target.c (library_list_start_list): Print "string" not
15254         "version".
15255         * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
15256         gdb_xml_error call.
15257
15258 2017-03-27  Pedro Alves  <palves@redhat.com>
15259
15260         * dwarf2read.c (struct file_and_directory): New.
15261         (dwarf2_get_dwz_file): Adjust to use std::string.
15262         (dw2_get_file_names_reader): Adjust to use file_and_directory.
15263         (find_file_and_directory): Adjust to return a file_and_directory
15264         object.
15265         (read_file_scope): Adjust to use file_and_directory.  Remove
15266         make_cleanup/do_cleanups calls.
15267         (open_and_init_dwp_file): Adjust to use std::string.  Remove
15268         make_cleanup/do_cleanups calls.
15269         * python/python.c (do_start_initialization): Adjust to ldirname
15270         returning a std::string.
15271         * utils.c (ldirname): Now returns a std::string.
15272         * utils.h (ldirname): Change return type to std::string.
15273         * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
15274         returning a std::string.
15275         * xml-tdesc.c (file_read_description_xml): Likewise.
15276
15277 2017-03-24  Alan Hayward  <alan.hayward@arm.com>
15278
15279         * regcache.c (regcache_debug_print_register): New function.
15280         * regcache.h (regcache_debug_print_register): New declaration.
15281         * target.c (debug_print_register): Remove.
15282         (target_fetch_registers): Call regcache_debug_print_register.
15283         (target_store_registers): Likewise.
15284
15285 2017-03-24  Pádraig Brady  <pbrady@fb.com>
15286
15287         * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
15288         reference beyond the 'lh->include_dirs' array before accessing to
15289         it.
15290         (psymtab_include_file_name): Likewise.
15291         (dwarf_decode_lines_1): Likewise.
15292         (dwarf_decode_lines): Likewise.
15293         (file_file_name): Likewise.
15294
15295 2017-03-23  Simon Marchi  <simon.marchi@ericsson.com>
15296
15297         * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
15298         inferior_ptid.
15299         * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
15300         ps_lsetfpregs): Likewise.
15301         * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
15302         * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
15303         ps_lsetfpregs): Likewise.
15304         * target.c (target_fetch_registers, target_store_registers):
15305         Remove asserts.
15306
15307 2017-03-23  Alan Hayward  <alan.hayward@arm.com>
15308
15309         * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
15310
15311 2017-03-23  Yao Qi  <yao.qi@linaro.org>
15312
15313         * aarch64-tdep.c (aarch64_process_record_test): Declare.
15314         (_initialize_aarch64_tdep): Register it.
15315         (aarch64_record_load_store): Handle PRFM instruction.
15316         (aarch64_process_record_test): New function.
15317
15318 2017-03-23  Yao Qi  <yao.qi@linaro.org>
15319
15320         * aarch64-tdep.c (aarch64_record_load_store): Fix code
15321         indentation.
15322
15323 2017-03-23  Yao Qi  <yao.qi@linaro.org>
15324
15325         * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
15326
15327 2017-03-23  Philipp Rudo  <prudo@linux.vnet.ibm.com>
15328
15329         python/python.c (do_start_initialization): Fix memory leak.
15330
15331 2017-03-22  Simon Marchi  <simon.marchi@polymtl.ca>
15332
15333         * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
15334         using get_ptrace_pid.
15335         * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
15336         inferior_ptid.
15337         (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
15338         inferior_ptid instead of pid.
15339
15340 2017-03-22  Yao Qi  <yao.qi@linaro.org>
15341
15342         * aarch64-tdep.c: Wrap locally used classes in anonymous
15343         namespace.
15344         * arm-tdep.c: Likewise.
15345         * linespec.c: Likewise.
15346         * ui-out.c: Likewise.
15347
15348 2017-03-22  Jonah Graham  <jonah@kichwacoders.com>
15349
15350         PR gdb/19637
15351         * python/lib/gdb/printer/bound_registers.py: Import sys.
15352
15353 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
15354
15355         * windows-nat.c (do_windows_fetch_inferior_registers): Add
15356         windows_thread_info parameter and use it instead of
15357         current_thread.
15358         (windows_fetch_inferior_registers): Don't set current_thread,
15359         pass the thread to do_windows_fetch_inferior_registers.  Use
15360         ptid from regcache instead of inferior_ptid.
15361         (do_windows_store_inferior_registers): Add windows_thread_info
15362         parameter and use it instead of current_thread.
15363         (windows_store_inferior_registers): Don't set current_thread,
15364         pass the thread to do_windows_store_inferior_registers.  Use
15365         ptid from regcache instead of inferior_ptid.
15366
15367 2017-03-21  Simon Marchi  <simon.marchi@ericsson.com>
15368
15369         * ser-mingw.c (ser_windows_raw): Remove reference to
15370         struct serial::current_timeout.
15371
15372 2017-03-21  Ivo Raisr  <ivo.raisr@oracle.com>
15373
15374         PR tdep/20928
15375         * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
15376         * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
15377         (sparc64_fsr_type): Fix %fsr decoding.
15378
15379 2017-03-21  Tim Wiederhake  <tim.wiederhake@intel.com>
15380
15381         * python/py-record-btrace.c (btpy_insn_data): Change return type
15382         for Python 2.
15383
15384 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
15385
15386         * spu-linux-nat.c (spu_fetch_inferior_registers,
15387         spu_store_inferior_registers): Use ptid from regcache, set and
15388         restore inferior_ptid.
15389         * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
15390         Likewise.
15391
15392 2017-03-20  Simon Marchi  <simon.marchi@polymtl.ca>
15393
15394         * i386-linux-nat.c (fetch_register, store_register,
15395         i386_linux_fetch_inferior_registers,
15396         i386_linux_store_inferior_registers): Use ptid from regcache.
15397         * ia64-linux-nat.c (ia64_linux_fetch_register,
15398         ia64_linux_store_register): Likewise.
15399         * inf-ptrace.c (inf_ptrace_fetch_register,
15400         inf_ptrace_store_register): Likewise.
15401         * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
15402         m32r_linux_store_inferior_registers): Likewise.
15403         * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
15404         m68kbsd_store_inferior_registers): Likewise.
15405         * m68k-linux-nat.c (fetch_register, store_register,
15406         m68k_linux_fetch_inferior_registers,
15407         m68k_linux_store_inferior_registers): Likewise.
15408         * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
15409         m88kbsd_store_inferior_registers): Likewise.
15410         * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
15411         mips_fbsd_store_inferior_registers): Likewise.
15412         * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
15413         mips64_linux_regsets_store_registers): Likewise.
15414         * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
15415         mipsnbsd_store_inferior_registers): Likewise.
15416         * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
15417         mips64obsd_store_inferior_registers): Likewise.
15418         * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
15419         Likewise.
15420         * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
15421         ppcfbsd_store_inferior_registers): Likewise.
15422         * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
15423         ppc_linux_store_inferior_registers): Likewise.
15424         * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
15425         ppcnbsd_store_inferior_registers): Likewise.
15426         * ppc-obsd-nat.c (ppcobsd_fetch_registers,
15427         ppcobsd_store_registers): Likewise.
15428         * procfs.c (procfs_fetch_registers, procfs_store_registers):
15429         Likewise.
15430         * ravenscar-thread.c (ravenscar_fetch_registers,
15431         ravenscar_store_registers, ravenscar_prepare_to_store):
15432         Likewise.
15433         * record-btrace.c (record_btrace_fetch_registers,
15434         record_btrace_store_registers, record_btrace_prepare_to_store):
15435         Likewise.
15436         * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
15437         Lookup inferior using ptid from regcache, instead of
15438         current_inferior.
15439         * remote.c (remote_fetch_registers, remote_store_registers): Use
15440         ptid from regcache.
15441         * rs6000-nat.c (fetch_register, store_register): Likewise.
15442         * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
15443         s390_linux_store_inferior_registers): Likewise.
15444         * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
15445         shnbsd_store_inferior_registers): Likewise.
15446         * sol-thread.c (sol_thread_fetch_registers,
15447         sol_thread_store_registers): Likewise.
15448         * sparc-nat.c (sparc_fetch_inferior_registers,
15449         sparc_store_inferior_registers): Likewise.
15450         * tilegx-linux-nat.c (fetch_inferior_registers,
15451         store_inferior_registers): Likewise.
15452         * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
15453         vaxbsd_store_inferior_registers): Likewise.
15454         * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
15455         store_xtregs): Likewise.
15456
15457 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
15458
15459         PR gdb/14441
15460         * NEWS: Mention support for rvalue references in GDB and python.
15461         * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
15462         supports both lvalue and rvalue references.
15463
15464 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
15465
15466         PR gdb/14441
15467         * gdbtypes.c (rank_one_type): Implement overloading
15468         resolution rules regarding rvalue references.
15469
15470 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
15471
15472         PR gdb/14441
15473         * aarch64-tdep.c (aarch64_type_align)
15474         (aarch64_extract_return_value, aarch64_store_return_value): Change
15475         lvalue reference type checks to general reference type checks.
15476         * amd64-tdep.c (amd64_classify): Likewise.
15477         * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
15478         Likewise.
15479         * arm-tdep.c (arm_type_align, arm_extract_return_value)
15480         (arm_store_return_value): Likewise.
15481         * ax-gdb.c (gen_fetch, gen_cast): Likewise.
15482         * c-typeprint.c (c_print_type): Likewise.
15483         * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
15484         (cplus_number_of_children, cplus_describe_child): Likewise.
15485         * compile/compile-c-symbols.c (generate_vla_size): Likewise.
15486         * completer.c (expression_completer): Likewise.
15487         * cp-support.c (make_symbol_overload_list_adl_namespace):
15488         Likewise.
15489         * darwin-nat-info.c (info_mach_region_command): Likewise.
15490         * dwarf2loc.c (entry_data_value_coerce_ref)
15491         (value_of_dwarf_reg_entry): Likewise.
15492         * eval.c (ptrmath_type_p, evaluate_subexp_standard)
15493         (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
15494         Likewise.
15495         * findvar.c (extract_typed_address, store_typed_address):
15496         Likewise.
15497         * gdbtypes.c (rank_one_type): Likewise.
15498         * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
15499         * infcall.c (value_arg_coerce): Likewise.
15500         * language.c (pointer_type): Likewise.
15501         * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
15502         Likewise.
15503         * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
15504         * mn10300-tdep.c (mn10300_type_align): Likewise.
15505         * msp430-tdep.c (msp430_push_dummy_call): Likewise.
15506         * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
15507         (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
15508         Likewise.
15509         * printcmd.c (print_formatted, x_command): Likewise.
15510         * python/py-type.c (typy_get_composite, typy_template_argument):
15511         Likewise.
15512         * python/py-value.c (valpy_referenced_value)
15513         (valpy_get_dynamic_type, value_has_field): Likewise.
15514         * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
15515         * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
15516         * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
15517         * spu-tdep.c (spu_scalar_value_p): Likewise.
15518         * symtab.c (lookup_symbol_aux): Likewise.
15519         * typeprint.c (whatis_exp, print_type_scalar): Likewise.
15520         * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
15521         Likewise.
15522         * valops.c (value_cast_pointers, value_cast)
15523         (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
15524         (value_struct_elt, value_struct_elt_bitpos)
15525         (value_find_oload_method_list, find_overload_match)
15526         (value_rtti_indirect_type): Likewise.
15527         * valprint.c (val_print_scalar_type_p, generic_val_print):
15528         Likewise.
15529         * value.c (value_actual_type, value_as_address, unpack_long)
15530         (pack_long, pack_unsigned_long, coerce_ref_if_computed)
15531         (coerce_ref): Likewise.
15532         * varobj.c (varobj_get_value_type): Likewise.
15533
15534 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
15535
15536         PR gdb/14441
15537         * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
15538         table of constants.
15539         * python/lib/gdb/command/explore.py: Support exploring values
15540         of rvalue reference types.
15541         * python/lib/gdb/types.py: Implement get_basic_type() for
15542         rvalue reference types.
15543         * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
15544         constant.
15545         * python/py-value.c (valpy_getitem): Add an rvalue reference
15546         check.
15547         (valpy_reference_value): Add new parameter "refcode".
15548         (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
15549         New wrappers for valpy_reference_value().
15550         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
15551         (gdbpy_invoke_xmethod): Likewise.
15552
15553 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
15554
15555         PR gdb/14441
15556         * dwarf2read.c (process_die, read_type_die_1): Handle the
15557         DW_TAG_rvalue_reference_type DIE.
15558         (read_tag_reference_type): Add new parameter "refcode".
15559
15560 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
15561
15562         PR gdb/14441
15563         * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
15564         (c_type_print_modifier, c_type_print_varspec_suffix)
15565         (c_type_print_base): Support printing rvalue reference types.
15566         * c-valprint.c (c_val_print, c_value_print): Support printing
15567         rvalue reference values.
15568
15569 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
15570
15571         PR gdb/14441
15572         * cp-name-parser.y (ptr_operator): Handle the '&&' token in
15573         typename.
15574         * cp-support.c (replace_typedefs): Handle
15575         DEMANGLE_COMPONENT_RVALUE_REFERENCE.
15576         * python/py-type.c (typy_lookup_type): Likewise.
15577
15578 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
15579
15580         PR gdb/14441
15581         * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
15582         * parse.c (insert_type): Change assert statement.
15583         (follow_types): Handle rvalue reference types.
15584         * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
15585         constant.
15586
15587 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
15588
15589         PR gdb/14441
15590         * ada-lang.c (ada_evaluate_subexp): Adhere to the new
15591         value_ref() interface.
15592         * c-valprint.c (c_value_print): Likewise.
15593         * infcall.c (value_arg_coerce): Likewise.
15594         * python/py-value.c (valpy_reference_value): Likewise.
15595         * valops.c (value_cast, value_reinterpret_cast)
15596         (value_dynamic_cast, typecmp): Likewise.
15597         (value_ref): Parameterize by kind of return value reference type.
15598         * value.h (value_ref): Add new parameter "refcode".
15599
15600 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
15601
15602         PR gdb/14441
15603         * dwarf2read.c (read_tag_reference_type): Use
15604         lookup_lvalue_reference_type() instead of lookup_reference_type().
15605         * eval.c (evaluate_subexp_standard): Likewise.
15606         * f-exp.y: Likewise.
15607         * gdbtypes.c (make_reference_type, lookup_reference_type):
15608         Generalize with rvalue reference types.
15609         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
15610         convenience wrappers for lookup_reference_type().
15611         * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
15612         reference kind parameter.
15613         (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
15614         wrappers for lookup_reference_type().
15615         * guile/scm-type.c (gdbscm_type_reference): Use
15616         lookup_lvalue_reference_type() instead of lookup_reference_type().
15617         * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
15618         * parse.c (follow_types): Likewise.
15619         * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
15620         * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
15621         Likewise.
15622         * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
15623         (gdbpy_invoke_xmethod): Likewise.
15624         * stabsread.c: Provide extra argument to make_reference_type()
15625         call.
15626         * valops.c (value_ref, value_rtti_indirect_type): Use
15627         lookup_lvalue_reference_type() instead of lookup_reference_type().
15628
15629 2017-03-20  Artemiy Volkov  <artemiyv@acm.org>
15630
15631         PR gdb/14441
15632         * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
15633         (TYPE_IS_REFERENCE): New macro.
15634         (struct type): Add rvalue_reference_type field.
15635         (TYPE_RVALUE_REFERENCE_TYPE): New macro.
15636
15637 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
15638
15639         * NEWS: Add an entry about new '-file-list-shared-libraries' command.
15640         * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
15641         New function definition.
15642         * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
15643         * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
15644         New function declaration.
15645         * mi/mi-interp.c (mi_output_solib_attribs): New Function.
15646         * mi/mi-interp.h: New file.
15647         * solib.c (info_sharedlibrary_command): Replace for loop with
15648         ALL_SO_LIBS macro
15649         * solib.h (update_solib_list): New function declaration.
15650         (so_list_head): Move macro.
15651         * solist.h (ALL_SO_LIBS): New macro.
15652
15653 2017-03-20  Marc-Andre Laperle  <marc-andre.laperle@ericsson.com>
15654
15655         * infcmd.c (post_create_inferior): Remove unused argument in
15656         call to solib_add.
15657         * remote.c (remote_start_remote): Likewise.
15658         * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
15659         * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
15660         (enable_break): Likewise.
15661         * solib.c (update_solib_list): Remove unused target argument
15662         and its documentation.
15663         (solib_add): Remove unused target argument.  Remove unused
15664         argument in call to update_solib_list.
15665         (info_sharedlibrary_command): Remove unused argument in call
15666         to update_solib_list.
15667         (sharedlibrary_command): Remove unused argument in call to
15668         solib_add.
15669         (handle_solib_event): Likewise.
15670         (reload_shared_libraries): Likewise.
15671         * solib.h (solib_add): Remove unused target argument.
15672
15673 2017-03-20  Andreas Arnez  <arnez@linux.vnet.ibm.com>
15674
15675         * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
15676         (s390_displaced_step_fixup): Cover relative branches with the
15677         default fixup handling.  This fixes lack of support for some
15678         relative branch instructions.
15679
15680 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
15681
15682         * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
15683         ptid from regcache.
15684
15685 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
15686
15687         * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
15688         i386_darwin_store_inferior_registers): Use ptid from regcache.
15689
15690 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
15691
15692         * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
15693         i386bsd_store_inferior_registers): Use ptid from regcache.
15694
15695 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
15696
15697         * hppa-obsd-nat.c (hppaobsd_fetch_registers,
15698         hppaobsd_store_registers): Use ptid from regcache.
15699
15700 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
15701
15702         * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
15703         hppanbsd_store_registers): Use ptid from regcache.
15704
15705 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
15706
15707         * hppa-linux-nat.c (fetch_register, store_register): Use ptid
15708         from regcache.  Use get_ptrace_pid.
15709
15710 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
15711
15712         * corelow.c (get_core_register_section): Use ptid from regcache,
15713         update doc.
15714
15715 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
15716
15717         * bsd-uthread.c (bsd_uthread_fetch_registers,
15718         bsd_uthread_store_registers): Use ptid from regcache, set and
15719         restore inferior_ptid.
15720
15721 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
15722
15723         * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
15724         fetch_fp_regs, store_register, store_regs, store_fp_register,
15725         store_fp_regs): Use ptid from regcache.
15726
15727 2017-03-17  Simon Marchi  <simon.marchi@polymtl.ca>
15728
15729         * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
15730         store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
15731         store_vfp_regs): Use ptid from regcache.
15732
15733 2017-03-17  Pedro Alves  <palves@redhat.com>
15734
15735         PR remote/21188
15736         * ser-base.c (ser_base_wait_for): Add comment.
15737         (do_ser_base_readchar): Improve comment based on the ser-unix.c's
15738         version.
15739         * ser-unix.c (hardwire_raw): Remove reference to
15740         scb->current_timeout.
15741         (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
15742         (hardwire_ops): Install ser_base_readchar instead of
15743         hardwire_readchar.
15744         * serial.h (struct serial) <current_timeout, timeout_remaining>:
15745         Remove fields.
15746
15747 2017-03-17  Jonah Graham  <jonah@kichwacoders.com>
15748
15749         PR gdb/19637
15750         * python/lib/gdb/printer/bound_registers.py: Add support for
15751         Python 3.
15752
15753 2017-03-16  Andreas Arnez  <arnez@linux.vnet.ibm.com>
15754
15755         * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
15756         pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
15757         (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
15758         byte_offset to subobj_byte_offset.  Fix the handling of
15759         DWARF_VALUE_STACK on big-endian targets when coming via an
15760         implicit pointer.
15761         (dwarf2_evaluate_loc_desc): Adjust call to
15762         dwarf2_evaluate_loc_desc_full.
15763         * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
15764         * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
15765
15766 2017-03-16  Yao Qi  <yao.qi@linaro.org>
15767
15768         * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
15769         and REVSH instructions.
15770
15771 2017-03-16  Yao Qi  <yao.qi@linaro.org>
15772
15773         * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
15774         (arm_record_test): Declare.
15775         (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
15776         (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
15777         align with the manual.
15778         (thumb_record_misc): Adjust the code order to align with the
15779         manual.
15780         (thumb2_record_decode_insn_handler): Fix instruction matching.
15781         (instruction_reader_thumb): New class.
15782         (arm_record_test): New function.
15783
15784 2017-03-16  Yao Qi  <yao.qi@linaro.org>
15785
15786         * arm-tdep.c (abstract_memory_reader): New class.
15787         (instruction_reader): New class.
15788         (extract_arm_insn): Add argument 'reader'.  Callers updated.
15789         (decode_insn): Likewise.
15790
15791 2017-03-16  Doug Evans  <dje@google.com>
15792
15793         * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
15794         member.  Change type of TYPE member to SCM.  All uses updated.
15795         (lsscm_make_lazy_string_smob): Add assert.
15796         (lsscm_make_lazy_string): Flag bad length values.
15797         (lsscm_elt_type): New function.
15798         (gdbscm_lazy_string_to_value): Rewrite to use
15799         lsscm_safe_lazy_string_to_value.
15800         (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
15801         * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
15802         values.  Fix TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle typedefs
15803         in incoming type.
15804         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
15805         * guile/scm-type.c (tyscm_scm_to_type): New function.
15806
15807 2017-03-15  Doug Evans  <dje@google.com>
15808
15809         PR python/17728, python/18439, python/18779
15810         * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
15811         member.  Change type of TYPE member to PyObject *.  All uses updated.
15812         (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
15813         (gdbpy_create_lazy_string_object): Flag bad length values.
15814         Handle TYPE_CODE_ARRAY with possibly different user-provided length.
15815         Handle typedefs in incoming type.
15816         (stpy_lazy_string_elt_type): New function.
15817         (gdbpy_extract_lazy_string): Call it.
15818         * python/py-value.c (valpy_lazy_string): Flag bad length values.
15819         Fix handling of TYPE_CODE_PTR.  Handle TYPE_CODE_ARRAY.  Handle
15820         typedefs in incoming type.
15821
15822 2017-03-16  Doug Evans  <dje@google.com>
15823
15824         * guile/guile-internal.h (tyscm_scm_to_type): Declare.
15825         * guile/scm-type.c (tyscm_scm_to_type): New function.
15826
15827 2017-03-16  Jiong Wang  <jiong.wang@arm.com>
15828
15829         * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
15830         "ULONGEST" for "skip".
15831
15832 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
15833
15834         PR gdb/21220
15835         * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
15836         TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
15837         (inf_ptrace_peek_poke): ...here.  New function.  Now also loop
15838         over ptrace peek/poke until end of buffer or error.
15839
15840 2017-03-14  Simon Marchi  <simon.marchi@ericsson.com>
15841
15842         * parse.c (length_of_subexp): Make static.
15843         * parser-defs.h (length_of_subexp): Remove.
15844
15845 2017-03-14  Andreas Arnez  <arnez@linux.vnet.ibm.com>
15846
15847         * linux-nat.c (linux_proc_xfer_partial): Handle write operations
15848         as well.
15849
15850 2017-03-14  Pedro Alves  <palves@redhat.com>
15851
15852         * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
15853         (main): Use std::unique_ptr.  Remove calls to
15854         cp_demangled_name_parse_free.
15855
15856 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
15857
15858         * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
15859         alphabsd_store_inferior_registers): Use regcache->ptid instead
15860         of inferior_ptid.
15861
15862 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
15863
15864         * aix-thread.c (aix_thread_fetch_registers,
15865         aix_thread_store_registers): Use regcache->ptid instead of
15866         inferior_ptid.
15867
15868 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
15869
15870         * aarch64-linux-nat.c (fetch_gregs_from_thread,
15871         store_gregs_to_thread, fetch_fpregs_from_thread,
15872         store_fpregs_to_thread): Use regcache->ptid instead of
15873         inferior_ptid.
15874
15875 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
15876
15877         * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
15878         amd64_linux_fetch_inferior_registers): Use regcache->ptid
15879         instead of inferior_ptid.
15880
15881 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
15882
15883         * target.c (target_fetch_registers, target_store_registers): Add
15884         assert.
15885
15886 2017-03-13  Simon Marchi  <simon.marchi@polymtl.ca>
15887
15888         * regcache.h (regcache_get_ptid): New function.
15889         * regcache.c (regcache_get_ptid): New function.
15890
15891 2017-03-13  Mark Wielaard  <mark@klomp.org>
15892
15893         * cp-name-parser.y (make_empty): Initialize d_printing to zero.
15894
15895 2017-03-10  Keith Seitz  <keiths@redhat.com>
15896
15897         PR c++/8218
15898         * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
15899
15900 2017-03-08  Pedro Alves  <palves@redhat.com>
15901
15902         PR gdb/18360
15903         * infrun.c (start_step_over, do_target_resume, resume)
15904         (restart_threads): Assert we're not resuming a thread that is
15905         meant to be stopped.
15906         (infrun_thread_stop_requested_callback): Delete.
15907         (infrun_thread_stop_requested): If the thread is internally
15908         stopped, queue a pending stop event and clear the thread's
15909         inline-frame state.
15910         (handle_stop_requested): New function.
15911         (handle_syscall_event, handle_inferior_event_1): Use
15912         handle_stop_requested.
15913         (handle_stop_requested): New function.
15914         (handle_signal_stop): Set the thread's stop_signal here instead of
15915         at caller.
15916         (finish_step_over): Clear step over info unconditionally.
15917         (handle_signal_stop): If the user had interrupted the event
15918         thread, consider the stop a random signal.
15919         (handle_signal_stop) <signal arrived while stepping over
15920         breakpoint>: Don't restart threads here.
15921         (stop_waiting): Don't clear step-over info here.
15922
15923 2017-03-08  Pedro Alves  <palves@redhat.com>
15924
15925         PR 21206
15926         * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
15927         goes to argument 2, not 1.
15928
15929 2017-03-08  Pedro Alves  <palves@redhat.com>
15930
15931         PR cli/21218
15932         * top.c (gdb_readline_wrapper): Avoid passing NULL to
15933         display_gdb_prompt.
15934         (command_line_input): Add comment.
15935
15936 2017-03-08  Pedro Alves  <palves@redhat.com>
15937
15938         PR tui/21216
15939         * tui/tui-file.c (tui_file::write): New.
15940         * tui/tui-file.h (tui_file): Override "write".
15941         * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
15942         factored out from ...
15943         (tui_puts): ... here.
15944         (tui_putc): Use them.
15945         (tui_write): New function.
15946         * tui/tui-io.h (tui_write): Declare.
15947
15948 2017-03-07  Sergio Durigan Junior  <sergiodj@redhat.com>
15949
15950         * Makefile.in (SFILES): Replace "environ.c" with
15951         "common/environ.c".
15952         (HFILES_NO_SRCDIR): Likewise, for "environ.h".
15953         * environ.c: Include "common-defs.h" instead of "defs.h.  Moved
15954         to...
15955         * common/environ.c: ... here.
15956         * environ.h: Moved to...
15957         * common/environ.h: ... here.
15958
15959 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
15960
15961         * gdbarch.sh (pstring_ptr): New static function.
15962         (gdbarch_disassembler_options): Use it.
15963         (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
15964         not valid_disassembler_option->name.
15965         * gdbarch.c: Regenerate.
15966
15967 2017-03-07  Peter Bergner  <bergner@vnet.ibm.com>
15968
15969         * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
15970
15971 2017-03-07  Pedro Alves  <palves@redhat.com>
15972
15973         * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
15974
15975 2017-03-07  Walfred Tedeschi  <walfred.tedeschi@intel.com>
15976
15977         * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
15978         * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
15979         * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
15980         * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
15981
15982 2017-03-06  Simon Marchi  <simon.marchi@ericsson.com>
15983
15984         * xtensa-linux-nat.c (fetch_gregs): Remove const.
15985
15986 2017-03-03  Simon Marchi  <simon.marchi@ericsson.com>
15987
15988         * remote.c (remote_add_target_side_commands): Use range-based
15989         for loop.
15990
15991 2017-03-03  Yao Qi  <yao.qi@linaro.org>
15992
15993         PR gdb/21165
15994         * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
15995         value is lazy.
15996         * valprint.c (common_val_print): Likewise.
15997
15998 2017-02-28  Peter Bergner  <bergner@vnet.ibm.com>
15999
16000         * NEWS: Mention new set/show disassembler-options commands.
16001         * doc/gdb.texinfo: Document new set/show disassembler-options commands.
16002         * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
16003         (prospective_options): New static variable.
16004         (gdb_disassembler::gdb_disassembler): Initialize
16005         m_di.disassembler_options.
16006         (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
16007         (get_disassembler_options): New function.
16008         (set_disassembler_options): Likewise.
16009         (set_disassembler_options_sfunc): Likewise.
16010         (show_disassembler_options_sfunc): Likewise.
16011         (disassembler_options_completer): Likewise.
16012         (_initialize_disasm): Likewise.
16013         * disasm.h (get_disassembler_options): New prototype.
16014         (set_disassembler_options): Likewise.
16015         * gdbarch.sh (gdbarch_disassembler_options): New variable.
16016         (gdbarch_verify_disassembler_options): Likewise.
16017         * gdbarch.c: Regenerate.
16018         * gdbarch.h: Likewise.
16019         * arm-tdep.c (num_disassembly_options): Delete.
16020         (set_disassembly_style): Likewise.
16021         (arm_disassembler_options): New static variable.
16022         (set_disassembly_style_sfunc): Convert short style name into long
16023         option name.  Call set_disassembler_options.
16024         (show_disassembly_style_sfunc): New function.
16025         (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
16026         set_gdbarch_verify_disassembler_options.
16027         (_initialize_arm_tdep): Delete regnames variable and update callers.
16028         (arm_disassembler_options): Initialize.
16029         (disasm_options): New variable.
16030         (num_disassembly_options): Rename from this...
16031         (num_disassembly_styles): ...to this.  Compute by scanning through
16032         disasm_options.
16033         (valid_disassembly_styles): Initialize using disasm_options.
16034         Remove calls to parse_arm_disassembler_option, get_arm_regnames and
16035         set_arm_regname_option.
16036         Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
16037         * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
16038         (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
16039         set_gdbarch_verify_disassembler_options.
16040         * s390-tdep.c (s390_disassembler_options): New static variable.
16041         (s390_gdbarch_init):all set_gdbarch_disassembler_options and
16042         set_gdbarch_verify_disassembler_options.
16043
16044 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
16045
16046         * remote.c (remote_add_target_side_condition): Remove "struct"
16047         keyword from range-based for loop.
16048
16049 2017-02-27  Simon Marchi  <simon.marchi@ericsson.com>
16050
16051         * remote.c (remote_add_target_side_condition): Use range-based
16052         for loop.  Update comment.
16053
16054 2017-02-27  Yao Qi  <yao.qi@linaro.org>
16055
16056         * f-typeprint.c (f_print_type): Check "varstring" is empty first.
16057
16058 2017-02-26  Alan Hayward  <alan.hayward@arm.com>
16059
16060         * regcache.c (regcache_raw_update): New function.
16061         (regcache_raw_read): Move code to regcache_raw_update.
16062         * regcache.h (regcache_raw_update): New declaration.
16063         * remote.c (remote_prepare_to_store): Call regcache_raw_update.
16064
16065 2017-02-26  Jan Kratochvil  <jan.kratochvil@redhat.com>
16066
16067         * dwarf2read.c (create_debug_type_hash_table): Initialize
16068         header.signature and header.type_offset_in_tu.
16069
16070 2017-02-24  Pedro Alves  <palves@redhat.com>
16071
16072         * symtab.c (make_file_symbol_completion_list_1): Use
16073         add_symtab_completions.
16074
16075 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
16076
16077         * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
16078
16079 2017-02-24  Alan Hayward  <alan.hayward@arm.com>
16080
16081         * i386-tdep.c (i386_pseudo_register_read_into_value): Use
16082         I386_MAX_REGISTER_SIZE.
16083         (i386_pseudo_register_write): Likewise.
16084         (i386_process_record): Likewise.
16085         * i387-tdep.c (i387_supply_xsave): Likewise.
16086         * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
16087         (store_register): Likewise.
16088
16089 2017-02-23  Pedro Alves  <palves@redhat.com>
16090
16091         * ada-lang.c: Include "common/function-view.h".
16092         (ada_iterate_over_symbols): Adjust to use function_view as
16093         callback type.
16094         (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
16095         (ada_make_symbol_completion_list): Use a lambda.
16096         (ada_exc_search_name_matches): Delete.
16097         (name_matches_regex): New.
16098         (ada_add_global_exceptions): Use a lambda and name_matches_regex.
16099         * compile/compile-c-support.c: Include "common/function-view.h".
16100         (print_one_macro): Change prototype to accept a ui_file pointer.
16101         (write_macro_definitions): Use a lambda.
16102         * dwarf2read.c: Include "common/function-view.h".
16103         (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
16104         (dw2_expand_symtabs_matching): Adjust to use function_view as
16105         callback type.
16106         * language.h: Include "common/function-view.h".
16107         (struct language_defn) <la_iterate_over_symbols>: Adjust to use
16108         function_view as callback type.
16109         (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
16110         * linespec.c: Include "common/function-view.h".
16111         (collect_info::add_symbol): New method.
16112         (struct symbol_and_data_callback, iterate_inline_only, struct
16113         symbol_matcher_data, iterate_name_matcher): Delete.
16114         (iterate_over_all_matching_symtabs): Adjust to use function_view
16115         as callback type and lambdas.
16116         (iterate_over_file_blocks): Adjust to use function_view as
16117         callback type.
16118         (decode_compound_collector): Now a class with private fields.
16119         (decode_compound_collector::release_symbols): New method.
16120         (collect_one_symbol): Rename to...
16121         (decode_compound_collector::operator()): ... this and adjust.
16122         (lookup_prefix_sym): decode_compound_collector construction bits
16123         move to decode_compound_collector ctor.  Pass the
16124         decode_compound_collector object directly as callback.  Remove
16125         cleanups and use decode_compound_collector::release_symbols
16126         instead.
16127         (symtab_collector): Now a class with private fields.
16128         (symtab_collector::release_symtabs): New method.
16129         (add_symtabs_to_list): Rename to...
16130         (symtab_collector::operator()): ... this and adjust.
16131         (collect_symtabs_from_filename): symtab_collector construction
16132         bits move to symtab_collector ctor.  Pass the symtab_collector
16133         object directly as callback.  Remove cleanups and use
16134         symtab_collector::release_symtabs instead.
16135         (collect_symbols): Delete.
16136         (add_matching_symbols_to_info): Use lambdas.
16137         * macrocmd.c (print_macro_callback): Delete.
16138         (info_macro_command): Use a lambda.
16139         (info_macros_command): Pass print_macro_definition as callable
16140         directly.
16141         (print_one_macro): Remove 'ignore' parameter.
16142         (macro_list_command): Adjust.
16143         * macrotab.c (macro_for_each_data::fn): Now a function_view.
16144         (macro_for_each_data::user_data): Delete field.
16145         (foreach_macro): Adjust to call the function_view.
16146         (macro_for_each): Adjust to use function_view as callback type.
16147         (foreach_macro_in_scope): Adjust to call the function_view.
16148         (macro_for_each_in_scope): Adjust to use function_view as callback
16149         type.
16150         * macrotab.h: Include "common/function-view.h".
16151         (macro_callback_fn): Declare a prototype instead of a pointer.
16152         Remove "user_data" parameter.
16153         (macro_for_each, macro_for_each_in_scope): Adjust to use
16154         function_view as callback type.
16155         * psymtab.c (partial_map_expand_apply)
16156         (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
16157         Adjust to use function_view as callback type and to return bool.
16158         (psym_expand_symtabs_matching): Adjust to use function_view as
16159         callback types.
16160         * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
16161         to use function_view as callback type and to return bool.
16162         (debug_qf_expand_symtabs_matching): Adjust to use function_view as
16163         callback types.
16164         * symfile.c (expand_symtabs_matching): Adjust to use function_view
16165         as callback types.
16166         * symfile.h: Include "common/function-view.h".
16167         (expand_symtabs_file_matcher_ftype)
16168         (expand_symtabs_symbol_matcher_ftype)
16169         (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
16170         return bool.
16171         (quick_symbol_functions::map_symtabs_matching_filename)
16172         (quick_symbol_functions::expand_symtabs_matching): Adjust to use
16173         function_view as callback type and return bool.
16174         (expand_symtabs_matching): Adjust to use function_view as callback
16175         type.
16176         (maintenance_expand_name_matcher)
16177         (maintenance_expand_file_matcher): Delete.
16178         (maintenance_expand_symtabs): Use lambdas.
16179         * symtab.c (iterate_over_some_symtabs): Adjust to use
16180         function_view as callback types and return bool.
16181         (iterate_over_symtabs): Likewise.  Use unique_xmalloc_ptr instead
16182         of a cleanup.
16183         (lookup_symtab_callback): Delete.
16184         (lookup_symtab): Use a lambda.
16185         (iterate_over_symbols): Adjust to use function_view as callback
16186         type.
16187         (struct search_symbols_data, search_symbols_file_matches)
16188         (search_symbols_name_matches): Delete.
16189         (search_symbols): Use a pair of lambdas.
16190         (struct add_name_data, add_macro_name, symbol_completion_matcher)
16191         (symtab_expansion_callback): Delete.
16192         (default_make_symbol_completion_list_break_on_1): Use lambdas.
16193         * symtab.h: Include "common/function-view.h".
16194         (iterate_over_some_symtabs): Adjust to use function_view as
16195         callback type and return bool.
16196         (iterate_over_symtabs): Adjust to use function_view as callback
16197         type.
16198         (symbol_found_callback_ftype): Remove 'data' parameter and return
16199         bool.
16200         (iterate_over_symbols): Adjust to use function_view as callback
16201         type.
16202
16203 2017-02-23  Pedro Alves  <palves@redhat.com>
16204
16205         * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
16206         (%.o) <unittests/%.c>: New pattern.
16207         * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
16208         CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
16209         * common/function-view.h: New file.
16210         * unittests/function-view-selftests.c: New file.
16211         * configure: Regenerate.
16212
16213 2017-02-23  Simon Marchi  <simon.marchi@ericsson.com>
16214
16215         * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
16216         inferior_ptid.
16217         * go32-nat.c (go32_thread_alive): Likewise.
16218
16219 2017-02-23  Yao Qi  <yao.qi@linaro.org>
16220
16221         * varobj-iter.h (varobj_iter_delete): Call xfree instead of
16222         delete.
16223
16224 2017-02-23  Yao Qi  <yao.qi@linaro.org>
16225
16226         * varobj.c (varobj_clear_saved_item): Use delete instead of
16227         xfree.
16228         (update_dynamic_varobj_children): Likewise.
16229
16230 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
16231
16232         * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
16233
16234 2017-02-21  Simon Marchi  <simon.marchi@ericsson.com>
16235
16236         * common/enum-flags.h (enum_flags::enum_flags): Initialize
16237         m_enum_value to 0 in default constructor.
16238
16239 2017-02-21  Edjunior Barbosa Machado  <emachado@linux.vnet.ibm.com>
16240
16241         * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
16242         (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
16243         (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
16244         STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
16245         (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
16246         (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
16247         (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
16248         IS_STORE_CONDITIONAL_INSN.
16249
16250 2017-02-21  Jan Kratochvil  <jan.kratochvil@redhat.com>
16251
16252         * dwarf2_rnglists_process: Initialize range_beginning and range_end.
16253
16254 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
16255
16256         * NEWS (Changes since GDB 7.12): Add DWARF-5.
16257
16258 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
16259
16260         * dwarf2read.c (skip_one_die, read_attribute_value)
16261         (dwarf2_const_value_attr, dump_die_shallow)
16262         (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
16263         (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
16264
16265 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
16266
16267         * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
16268         (dwarf_parse_macro_header): Accept DWARF version 5.
16269         (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
16270
16271 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
16272
16273         * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
16274         DW_AT_GNU_*.
16275         * common/common-exceptions.h (enum errors): Likewise.
16276         * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
16277         * dwarf2expr.c (dwarf_block_to_dwarf_reg)
16278         (dwarf_expr_context::execute_stack_op): Likewise.
16279         * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
16280         Likewise.
16281         * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
16282         (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
16283         (show_entry_values_debug, call_site_to_target_addr)
16284         (func_addr_to_tail_call_list, func_verify_no_selftailcall)
16285         (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
16286         (entry_data_value_free_closure, value_of_dwarf_reg_entry)
16287         (value_of_dwarf_block_entry, indirect_pieced_value)
16288         (symbol_needs_eval_context::push_dwarf_reg_entry_value):
16289         (disassemble_dwarf_expression): Likewise.
16290         * dwarf2read.c (process_die, inherit_abstract_dies)
16291         (read_call_site_scope): Likewise.
16292         * gdbtypes.h (struct func_type, struct call_site_parameter)
16293         (struct call_site): Likewise.
16294         * stack.c (read_frame_arg): Likewise.
16295         * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
16296
16297 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
16298
16299         * defs.h (read_unsigned_leb128): New declaration.
16300         * dwarf2loc.c (decode_debug_loclists_addresses): New function.
16301         (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
16302         (dwarf2_find_location_expression): Call also
16303         decode_debug_loclists_addresses.  Handle DWARF-5 ULEB128 length.
16304         * dwarf2loc.h (dwarf2_version): New declaration.
16305         * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
16306         rnglists.
16307         (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
16308         .debug_rnglists.
16309         (struct dwop_section_names): Add loclists_dwo.
16310         (dwop_section_names): Add .debug_loclists.dwo.
16311         (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
16312         (struct dwarf2_per_cu_data): Add dwarf_version.
16313         (struct dwo_sections): Add loclists.
16314         (struct attr_abbrev): Add implicit_const.
16315         (read_indirect_line_string): New declaration.
16316         (read_unsigned_leb128): Delete declaration.
16317         (rcuh_kind): New definition.
16318         (read_and_check_comp_unit_head): Change parameter
16319         is_debug_types_section to section_kind.
16320         (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
16321         (read_comp_unit_head): Change parameter abfd to section, add parameter
16322         section_kind.  Handle DWARF-5.
16323         (error_check_comp_unit_head): Accept also DWARF version 5.
16324         (read_and_check_comp_unit_head): Change parameter
16325         is_debug_types_section to section_kind.
16326         (read_and_check_type_unit_head): Delete function.
16327         (read_abbrev_offset): Handle DWARF-5.
16328         (create_debug_type_hash_table): Add parameter section_kind.  Process
16329         only DW_UT_type.  Use signature and type_offset_in_tu from struct
16330         comp_unit_head.
16331         (create_debug_types_hash_table): Update create_debug_type_hash_table
16332         caller.
16333         (create_all_type_units): Call create_debug_type_hash_table.
16334         (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
16335         read_and_check_type_unit_head caller to read_and_check_comp_unit_head
16336         caller.
16337         (skip_one_die): Handle DW_FORM_implicit_const.
16338         (dwarf2_rnglists_process): New function.
16339         (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
16340         (abbrev_table_read_table): Handle DW_FORM_implicit_const.
16341         (read_attribute_value): Handle DW_FORM_implicit_const,
16342         DW_FORM_line_strp.
16343         (read_attribute): Handle DW_FORM_implicit_const.
16344         (read_indirect_string_at_offset_from): New function from
16345         read_indirect_string_at_offset.
16346         (read_indirect_string_at_offset): Call
16347         read_indirect_string_at_offset_from.
16348         (read_indirect_line_string_at_offset): New function.
16349         (read_indirect_string): New function comment.
16350         (read_indirect_line_string): New function.
16351         (read_unsigned_leb128): Make it global.
16352         (dwarf2_string_attr): Handle DWARF-5.
16353         (add_include_dir_stub, read_formatted_entries): New functions.
16354         (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
16355         Handle DWARF-5.
16356         (per_cu_header_read_in): Update read_comp_unit_head caller.
16357         (dwarf2_version): New function.
16358         * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
16359         rnglists.
16360         * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
16361         fields.
16362
16363 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
16364
16365         * dwarf2read.c (abbrev_table_read_table): Read the data only once.
16366
16367 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
16368
16369         * dwarf2read.c (dwarf2_ranges_process): New function from
16370         dwarf2_ranges_read.
16371         (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
16372         dwarf2_ranges_process.
16373
16374 2017-02-20  Jan Kratochvil  <jan.kratochvil@redhat.com>
16375
16376         * dwarf2read.c (create_debug_type_hash_table): New function from
16377         create_debug_types_hash_table.
16378         (create_debug_types_hash_table): Call create_debug_type_hash_table.
16379         (create_all_type_units, open_and_init_dwo_file): Update
16380         create_debug_types_hash_table callers.
16381
16382 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
16383
16384         PR gdb/16188
16385         * fork-child.c (trace_start_error): Fix thinko.  va_end should
16386         refer to 'ap', not 'args'.
16387
16388 2017-02-20  Sergio Durigan Junior  <sergiodj@redhat.com>
16389             Pedro Alves  <palves@redhat.com>
16390
16391         PR gdb/16188
16392         * darwin-nat.c (darwin_ptrace_me): Check if calls to system
16393         calls succeeded.
16394         * fork-child.c (trace_start_error): New function.
16395         (trace_start_error_with_name): Likewise.
16396         * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
16397         * inf-ptrace.c (inf_ptrace_me): Likewise.
16398         * inferior.h (trace_start_error): New prototype.
16399         (trace_start_error_with_name): Likewise.
16400
16401 2017-02-15  Sergio Durigan Junior  <sergiodj@redhat.com>
16402
16403         PR gdb/21164
16404         * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
16405         NULL before using it.
16406         * symmisc.c (maintenance_print_symbols): Likewise.
16407         (maintenance_print_msymbols): Likewise.
16408
16409 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
16410
16411         * NEWS: Add record Python bindings entry.
16412
16413 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
16414
16415         * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
16416         py-record-full.o.
16417         (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
16418         * python/py-record-btrace.c, python/py-record-btrace.h,
16419         python/py-record-full.c, python/py-record-full.h: New file.
16420         * python/py-record.c: Add include for py-record-btrace.h and
16421         py-record-full.h.
16422         (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
16423         recpy_instruction_history, recpy_function_call_history, recpy_begin,
16424         recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
16425         * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
16426         New definition.
16427         (gdbpy_initialize_btrace): New export.
16428         * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
16429
16430 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
16431
16432         * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
16433         (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
16434         * python/py-record.c: New file.
16435         * python/python-internal.h (gdbpy_start_recording,
16436         gdbpy_current_recording, gdpy_stop_recording,
16437         gdbpy_initialize_record): New export.
16438         * python/python.c (_initialize_python): Add gdbpy_initialize_record.
16439         (python_GdbMethods): Add gdbpy_start_recording,
16440         gdbpy_current_recording and gdbpy_stop_recording.
16441
16442 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
16443
16444         * record-btrace.c (record_btrace_record_method): New function.
16445         (init_record_btrace_ops): Initialize to_record_method.
16446         * record-full.c (record_full_record_method): New function.
16447         (init_record_full_ops, init_record_full_core_ops): Add
16448         record_full_record_method.
16449         * record.h (enum record_method): New enum.
16450         * target-debug.h (target_debug_print_enum_record_method: New define.
16451         * target-delegates.c: Regenerate.
16452         * target.c (target_record_method): New function.
16453         * target.h: Include record.h.
16454         (struct target_ops) <to_record_method>: New field.
16455         (target_record_method): New export.
16456
16457 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
16458
16459         * record.h (record_start, record_stop): New export.
16460         * record.c (record_start, record_stop): New function.
16461
16462 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
16463
16464         * btrace.c (btrace_fetch): Copy function call segments pointer
16465         into a vector.
16466         (btrace_clear): Clear the vector.
16467         (btrace_find_insn_by_number): Use binary search to find the correct
16468         function call segment.
16469         * btrace.h (brace_fun_p): New typedef.
16470         (struct btrace_thread_info) <functions>: New field.
16471
16472 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
16473
16474         * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
16475         * btrace.c (btrace_decode_error): ... here.  New function.
16476         * btrace.h (btrace_decode_error): New export.
16477
16478 2017-02-14  Tim Wiederhake  <tim.wiederhake@intel.com>
16479
16480         * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
16481         (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
16482         btrace_find_insn_by_number): Remove special case for gaps.
16483         * btrace.h (btrace_insn_get_error): New export.
16484         (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
16485         * record-btrace.c (btrace_insn_history): Print number for gaps.
16486         (record_btrace_info, record_btrace_goto): Handle gaps.
16487
16488 2017-02-14  Tom Tromey  <tom@tromey.com>
16489
16490         PR python/13598:
16491         * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
16492         event.
16493         * python/py-evts.c (gdbpy_initialize_py_events): Add
16494         before_prompt registry.
16495         * python/py-events.h (events_object) <before_prompt>: New field.
16496
16497 2017-02-14  Markus Metzger  <markus.t.metzger@intel.com>
16498
16499         * btrace.c (ftrace_new_switch): Preserve up link and flags.
16500
16501 2017-02-13  Luis Machado  <lgustavo@codesourcery.com>
16502
16503         * symfile (_initialize_symfile): Add usage text to the load command's
16504         help text.
16505
16506 2017-02-10  Simon Marchi  <simon.marchi@ericsson.com>
16507
16508         * utils.c (defaulted_query): Don't query on secondary UIs.
16509
16510 2017-02-10  Tom Tromey  <tom@tromey.com>
16511
16512         * rust-lang.c (rust_get_disr_info): Remove unused variable.
16513
16514 2017-02-10  Tom Tromey  <tom@tromey.com>
16515
16516         * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
16517         "cleanup" local.
16518         * python/py-type.c (typy_legacy_template_argument): Remove
16519         unnecessary "cleanup" local.
16520
16521 2017-02-10  Tom Tromey  <tom@tromey.com>
16522
16523         * python/python.c (do_start_initialization): New function, from
16524         _initialize_python.
16525         (_initialize_python): Call do_start_initialization.
16526         * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
16527         goto.
16528
16529 2017-02-10  Tom Tromey  <tom@tromey.com>
16530
16531         * python/py-prettyprint.c (pretty_print_one_value): Use
16532         gdbpy_ref.
16533
16534 2017-02-10  Tom Tromey  <tom@tromey.com>
16535
16536         * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
16537         * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
16538         gdbpy_ref.
16539         * python/py-type.c (field_new): Use gdbpy_ref.
16540         * python/py-symtab.c (symtab_and_line_to_sal_object): Use
16541         gdbpy_ref.
16542         * python/py-progspace.c (pspy_new): Use gdbpy_ref.
16543         (py_free_pspace): Likewise.
16544         (pspace_to_pspace_object): Likewise.
16545         * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
16546         (py_free_objfile): Likewise.
16547         (objfile_to_objfile_object): Likewise.
16548         * python/py-inferior.c (delete_thread_object): Use
16549         gdbpy_ref.
16550         (infpy_read_memory): Likewise.
16551         (py_free_inferior): Likewise.
16552         * python/py-evtregistry.c (create_eventregistry_object): Use
16553         gdbpy_ref.
16554         * python/py-event.c (create_event_object): Use gdbpy_ref.
16555
16556 2017-02-10  Tom Tromey  <tom@tromey.com>
16557
16558         * python/py-ref.h (gdbpy_ref_policy): Now a template.
16559         (gdbpy_ref): Now a template; allow subclasses of PyObject to be
16560         used.
16561         * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
16562         python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
16563         python/py-exitedevent.c, python/py-finishbreakpoint.c,
16564         python/py-framefilter.c, python/py-function.c,
16565         python/py-inferior.c, python/py-infevents.c,
16566         python/py-linetable.c, python/py-newobjfileevent.c,
16567         python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
16568         python/py-signalevent.c, python/py-stopevent.c,
16569         python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
16570         python/py-unwind.c, python/py-utils.c, python/py-value.c,
16571         python/py-varobj.c, python/py-xmethods.c, python/python.c,
16572         varobj.c: Change gdbpy_ref to gdbpy_ref<>.
16573
16574 2017-02-10  Tom Tromey  <tom@tromey.com>
16575
16576         * ui-out.h (ui_out_emit_type): New class.
16577         (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
16578         * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
16579         and ui_out_emit_tuple.
16580         (enumerate_locals): Likewise.
16581         (py_mi_print_variables, py_print_locals, py_print_args): Use
16582         ui_out_emit_list.
16583         (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
16584         ui_out_emit_list.
16585         * common/gdb_optional.h: New file.
16586
16587 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
16588
16589         * MAINTAINERS (Write After Approval): Update my e-mail address.
16590
16591 2017-02-10  Martin Galvan  <martingalvan@sourceware.org>
16592
16593         PR gdb/21122
16594         * breakpoint.c (_initialize_breakpoint): Update the help description
16595         of the 'commands' command to indicate that it takes a list argument.
16596
16597 2017-02-09  Simon Marchi  <simon.marchi@ericsson.com>
16598
16599         * interps.c (current_interp_set_logging): Remove "return".
16600
16601 2017-02-09  Gary Benson  <gbenson@redhat.com>
16602
16603         * symtab.c (add_symtab_completions): Prevent NULL pointer
16604         dereference.
16605
16606 2017-02-08  Pedro Alves  <palves@redhat.com>
16607
16608         * interps.c (interp::interp): Remove reference to quiet_p.
16609         (interp_set): Make static.  Remove dead "Switching to" output
16610         code.
16611         (interp_quiet_p, interp_set_quiet): Delete.
16612         (interpreter_exec_cmd): Don't set the interpreter quiet.
16613         * interps.h (interp_quiet_p): Make static.
16614         (class interp) <quiet_p>: Remove field
16615
16616 2017-02-08  Jerome Guitton  <guitton@adacore.com>
16617
16618         * cli/cli-decode.c (find_command_name_length): Make it extern.
16619         * cli/cli-decode.h (find_command_name_length): Declare.
16620         * cli/cli-script.c (command_name_equals, line_first_arg):
16621         New functions.
16622         (process_next_line): Use cli-decode to parse command names.
16623         (build_command_line): Make args a constant pointer.
16624
16625 2017-02-08  Jerome Guitton  <guitton@adacore.com>
16626
16627         * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
16628         Remove case-insensitive search.
16629
16630 2017-02-07  Jose E. Marchesi  <jose.marchesi@oracle.com>
16631
16632         * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
16633         at the end of the line.  Avoids an ARI warning.
16634
16635 2017-02-06  Luis Machado  <lgustavo@codesourcery.com>
16636
16637         * NEWS: Mention support for record/replay of Intel 64 rdrand and
16638         rdseed instructions.
16639         i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
16640
16641 2017-02-06  Ivo Raisr  <ivo.raisr@oracle.com>
16642
16643         PR tdep/20936
16644         Provide and use sparc32 and sparc64 target description XML files.
16645         * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
16646         features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
16647         * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
16648         features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
16649         * features/sparc/sparc32-solaris.xml: New file.
16650         * features/sparc/sparc64-solaris.xml: New file.
16651         * features/sparc/sparc32-solaris.c: Generated.
16652         * features/sparc/sparc64-solaris.c: Generated.
16653         * sparc-tdep.h: Account for differences in target descriptions.
16654         * sparc-tdep.c (sparc32_register_name): Use target provided registers.
16655         (sparc32_register_type): Use target provided registers.
16656         (validate_tdesc_registers): New function.
16657         (sparc32_gdbarch_init): Use tdesc_has_registers.
16658         Set pseudoregister functions.
16659         * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
16660         (sparc64_register_type): Use target provided registers.
16661         (sparc64_init_abi): Set pseudoregister functions.
16662
16663 2017-02-03  Tom Tromey  <tom@tromey.com>
16664
16665         PR rust/21097:
16666         * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
16667         with a single member.
16668
16669 2017-02-03  Pedro Alves  <palves@redhat.com>
16670
16671         * cli/cli-interp.c (cli_interp_base::cli_interp_base)
16672         (cli_interp_base::~cli_interp_base): New.
16673         (cli_interp): New struct.
16674         (as_cli_interp): Cast the interp itself to cli_interp.
16675         (cli_interpreter_pre_command_loop): Rename to ...
16676         (cli_interp_base::pre_command_loop): ... this.  Remove 'self'
16677         parameter.
16678         (cli_interpreter_init): Rename to ...
16679         (cli_interp::init): ... this.  Remove 'self' parameter.  Use
16680         boolean.  Make extern.
16681         (cli_interpreter_resume): Rename to ...
16682         (cli_interp::resume): ... this.  Remove 'data' parameter.  Make
16683         extern.
16684         (cli_interpreter_suspend): Rename to ...
16685         (cli_interp::suspend): ... this.  Remove 'data' parameter.  Make
16686         extern.
16687         (cli_interpreter_exec): Rename to ...
16688         (cli_interp::exec): ... this.  Remove 'data' parameter.  Make
16689         extern.
16690         (cli_interpreter_supports_command_editing): Rename to ...
16691         (cli_interp_base::supports_command_editing): ... this.  Remove
16692         'interp' parameter.  Make extern.
16693         (cli_ui_out): Rename to ...
16694         (cli_interp::interp_ui_out): ... this.  Remove 'interp' parameter.
16695         Make extern.
16696         (cli_set_logging): Rename to ...
16697         (cli_interp_base::set_logging): ... this.  Remove 'interp'
16698         parameter.  Make extern.
16699         (cli_interp_procs): Delete.
16700         (cli_interp_factory): Adjust to use "new".
16701         * cli/cli-interp.h: Include "interps.h".
16702         (struct cli_interp_base): New struct.
16703         * interps.c (struct interp): Delete.  Fields moved to interps.h.
16704         (interp_new): Delete.
16705         (interp::interp, interp::~interp): New.
16706         (interp_set): Use bool, and return void.  Assume the interpreter
16707         has suspend, init and resume methods, and that the all return
16708         void.
16709         (set_top_level_interpreter): interp_set returns void.
16710         (interp_ui_out): Adapt.
16711         (current_interp_set_logging): Adapt.
16712         (interp_data): Delete.
16713         (interp_pre_command_loop, interp_supports_command_editing): Adapt.
16714         (interp_exec): Adapt.
16715         (top_level_interpreter_data): Delete.
16716         * interps.h (interp_init_ftype, interp_resume_ftype)
16717         (interp_suspend_ftype, interp_exec_ftype)
16718         (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
16719         (class interp): New.
16720         (interp_new): Delete.
16721         (interp_set): Now returns void.  Use bool.
16722         (interp_data, top_level_interpreter_data): Delete.
16723         * mi/mi-common.h: Include interps.h.
16724         (class mi_interp): Inherit from interp.  Define a ctor.  Declare
16725         init, resume, suspect, exec, interp_ui_out, set_logging and
16726         pre_command_loop methods.
16727         * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
16728         (mi_interpreter_init): Rename to ...
16729         (mi_interp::init): ... this.  Remove the 'interp' parameter, use
16730         bool, return void and make extern.  Adjust.
16731         (mi_interpreter_resume): ... Rename to ...
16732         (mi_interp::resume): ... this.  Remove the 'data' parameter,
16733         return void and make extern.  Adjust.
16734         (mi_interpreter_suspend): ... Rename to ...
16735         (mi_interp::suspend): ... this.  Remove the 'data' parameter,
16736         return void and make extern.  Adjust.
16737         (mi_interpreter_exec): ... Rename to ...
16738         (mi_interp::exec): ... this.  Remove the 'data' parameter and make
16739         extern.  Adjust.
16740         (mi_interpreter_pre_command_loop): ... Rename to ...
16741         (mi_interp::pre_command_loop): ... this.  Remove the 'self'
16742         parameter and make extern.
16743         (mi_on_normal_stop_1): Adjust.
16744         (mi_ui_out): Rename to ...
16745         (mi_interp::interp_ui_out): ... this.  Remove the 'interp'
16746         parameter and make extern.  Adjust.
16747         (mi_set_logging): Rename to ...
16748         (mi_interp::set_logging): ... this.  Remove the 'interp'
16749         parameter and make extern.  Adjust.
16750         (mi_interp_procs): Delete.
16751         (mi_interp_factory): Adjust to use 'new'.
16752         * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
16753         (mi_print_exception, mi_execute_command, mi_load_progress):
16754         Adjust.
16755         * tui/tui-interp.c (tui_interp): New class.
16756         (as_tui_interp): Return a tui_interp pointer.
16757         (tui_on_normal_stop, tui_on_signal_received)
16758         (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
16759         (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
16760         to use interp::interp_ui_out.
16761         (tui_init): Rename to ...
16762         (tui_interp::init): ... this.  Remove the 'self' parameter, use
16763         bool, return void and make extern.  Adjust.
16764         (tui_resume): Rename to ...
16765         (tui_interp::resume): ... this.  Remove the 'data' parameter,
16766         return void and make extern.  Adjust.
16767         (tui_suspend): Rename to ...
16768         (tui_interp::suspend): ... this.  Remove the 'data' parameter,
16769         return void and make extern.  Adjust.
16770         (tui_ui_out): Rename to ...
16771         (tui_interp::interp_ui_out): ... this.  Remove the 'self'
16772         parameter, and make extern.  Adjust.
16773         (tui_exec): Rename to ...
16774         (tui_interp::exec): ... this.  Remove the 'data' parameter and
16775         make extern.
16776         (tui_interp_procs): Delete.
16777         (tui_interp_factory): Use "new".
16778
16779 2017-02-02  Tom Tromey  <tom@tromey.com>
16780
16781         * rust-exp.y (ends_raw_string, space_then_number)
16782         (rust_identifier_start_p): Return bool.
16783         * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
16784         (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
16785         (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
16786         (rust_chartype_p): Return bool.
16787         (val_print_struct, rust_print_struct_def, rust_print_type):
16788         Update.
16789         * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
16790         Return bool.
16791
16792 2017-02-02  Tom Tromey  <tom@tromey.com>
16793
16794         * rust-lang.c: Reindent.
16795
16796 2017-02-02  Tom Tromey  <tom@tromey.com>
16797
16798         * rust-lang.h (rust_crate_for_block): Update.
16799         * rust-lang.c (rust_crate_for_block): Return std::string.
16800         (rust_get_disr_info): Use std:;string, not
16801         gdb::unique_xmalloc_ptr.
16802         * rust-exp.y (crate_name): Update.
16803
16804 2017-02-02  Pedro Alves  <palves@redhat.com>
16805
16806         * disasm-selftests.c (print_one_insn_test): Move the "verbose"
16807         field out of gdb_disassembler_test and make it static.
16808
16809 2017-02-02  Pedro Alves  <palves@redhat.com>
16810
16811         * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
16812         mi1_interp and mi_interp fields.
16813
16814 2017-02-02  Pedro Alves  <palves@redhat.com>
16815
16816         * cli/cli-interp.c (struct saved_output_files, saved_output):
16817         Moved from cli/cli-logging.c.
16818         (cli_set_logging): New function.
16819         (cli_interp_procs): Install cli_set_logging.
16820         * cli/cli-interp.h (make_logging_output, cli_set_logging):
16821         Declare.
16822         * cli/cli-logging.c (struct saved_output_files, saved_output):
16823         Moved to cli/cli-interp.c.
16824         (pop_output_files): Don't save outputs here.
16825         (make_logging_output): New function.
16826         (handle_redirections): Don't build tee nor save previous outputs
16827         here.
16828         * interps.c (current_interp_set_logging): Change prototype.
16829         Assume there's always a set_logging_proc method installed.
16830         * interps.h (interp_set_logging_ftype): Change prototype.
16831         (current_interp_set_logging): Change prototype and adjust comment.
16832         * mi/mi-interp.c (mi_set_logging): Change protototype.  Adjust to
16833         use make_logging_output.
16834         * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
16835 2017-02-02  Pedro Alves  <palves@redhat.com>
16836
16837         * cli/cli-logging.c (maybe_warn_already_logging): New factored out
16838         from ...
16839         (set_logging_overwrite): ... here.
16840         (logging_no_redirect_file): Delete.
16841         (set_logging_redirect): Don't handle redirection on the fly.
16842         Instead warn that "logging off" / "logging on" is necessary.
16843         (pop_output_files): Delete references to logging_no_redirect_file.
16844         (show_logging_command): Always speak in terms of what will happen
16845         once logging is reenabled.
16846
16847 2017-02-02  Pedro Alves  <palves@redhat.com>
16848
16849         * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
16850
16851 2017-02-02  Pedro Alves  <palves@redhat.com>
16852
16853         * disasm.c (gdb_pretty_print_insn): Rename to ...
16854         (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
16855         Remove gdbarch parameter.  Adapt to clear the object's buffers
16856         instead of allocating new buffers, and to print using the object's
16857         gdb_disassembler instead of calling gdb_print_insn.
16858         (dump_insns): Use gdb_pretty_print_disassembler.
16859         * disasm.h (gdb_pretty_print_insn): Delete declaration.
16860         (gdb_pretty_print_disassembler): New class.
16861         * record-btrace.c (btrace_insn_history): Use
16862         gdb_pretty_print_disassembler.
16863
16864 2017-02-02  Pedro Alves  <palves@redhat.com>
16865
16866         * ada-lang.c (type_as_string): Use string_file.
16867         * ada-valprint.c (ada_print_floating): Use string_file.
16868         * ada-varobj.c (ada_varobj_scalar_image)
16869         (ada_varobj_get_value_image): Use string_file.
16870         * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
16871         * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
16872         * breakpoint.c (update_inserted_breakpoint_locations)
16873         (insert_breakpoint_locations, reattach_breakpoints)
16874         (print_breakpoint_location, print_one_detail_ranged_breakpoint)
16875         (print_it_watchpoint): Use string_file.
16876         (save_breakpoints): Use stdio_file.
16877         * c-exp.y (oper): Use string_file.
16878         * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
16879         tee_file.
16880         (pop_output_files): Use delete.
16881         (handle_redirections): Use stdio_file and tee_file.
16882         * cli/cli-setshow.c (do_show_command): Use string_file.
16883         * compile/compile-c-support.c (c_compute_program): Use
16884         string_file.
16885         * compile/compile-c-symbols.c (generate_vla_size): Take a
16886         'string_file &' instead of a 'ui_file *'.
16887         (generate_c_for_for_one_variable): Take a 'string_file &' instead
16888         of a 'ui_file *'.  Use string_file.
16889         (generate_c_for_variable_locations): Take a 'string_file &'
16890         instead of a 'ui_file *'.
16891         * compile/compile-internal.h (generate_c_for_for_one_variable):
16892         Take a 'string_file &' instead of a 'ui_file *'.
16893         * compile/compile-loc2c.c (push, pushf, unary, binary)
16894         (print_label, pushf_register_address, pushf_register)
16895         (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
16896         'ui_file *'.  Adjust.
16897         * compile/compile.c (compile_to_object): Use string_file.
16898         * compile/compile.h (compile_dwarf_expr_to_c)
16899         (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
16900         'ui_file *'.
16901         * cp-support.c (inspect_type): Use string_file and obstack_copy0.
16902         (replace_typedefs_qualified_name): Use string_file and
16903         obstack_copy0.
16904         * disasm.c (gdb_pretty_print_insn): Use string_file.
16905         (gdb_disassembly): Adjust reference the null_stream global.
16906         (do_ui_file_delete): Delete.
16907         (gdb_insn_length): Use null_stream.
16908         * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
16909         * dwarf2loc.c (dwarf2_compile_property_to_c)
16910         (locexpr_generate_c_location, loclist_generate_c_location): Take a
16911         'string_file &' instead of a 'ui_file *'.
16912         * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
16913         * dwarf2read.c (do_ui_file_peek_last): Delete.
16914         (dwarf2_compute_name): Use string_file.
16915         * event-top.c (gdb_setup_readline): Use stdio_file.
16916         * gdbarch.sh (verify_gdbarch): Use string_file.
16917         * gdbtypes.c (safe_parse_type): Use null_stream.
16918         * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
16919         string_file.
16920         * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
16921         'string_file *' instead of a 'ui_file *'.
16922         (gdbscm_arch_disassemble): Use string_file.
16923         * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
16924         * guile/scm-ports.c (class ioscm_file_port): Now a class that
16925         inherits from ui_file.
16926         (ioscm_file_port_delete, ioscm_file_port_rewind)
16927         (ioscm_file_port_put): Delete.
16928         (ioscm_file_port_write): Rename to ...
16929         (ioscm_file_port::write): ... this.  Remove file_port_magic
16930         checks.
16931         (ioscm_file_port_new): Delete.
16932         (ioscm_with_output_to_port_worker): Use ioscm_file_port and
16933         ui_file_up.
16934         * guile/scm-type.c (tyscm_type_name): Use string_file.
16935         * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
16936         Use string_file.
16937         * infcmd.c (print_return_value_1): Use string_file.
16938         * infrun.c (print_target_wait_results): Use string_file.
16939         * language.c (add_language): Use string_file.
16940         * location.c (explicit_to_string_internal): Use string_file.
16941         * main.c (captured_main_1): Use null_file.
16942         * maint.c (maintenance_print_architecture): Use stdio_file.
16943         * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
16944         * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
16945         event_channel>: Change type to mi_console_file pointer.
16946         * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
16947         (mi_console_file_delete): Delete.
16948         (struct mi_console_file): Delete.
16949         (mi_console_file_magic): Delete.
16950         (mi_console_file_new): Delete.
16951         (mi_console_file::mi_console_file): New.
16952         (mi_console_file_delete): Delete.
16953         (mi_console_file_fputs): Delete.
16954         (mi_console_file::write): New.
16955         (mi_console_raw_packet): Delete.
16956         (mi_console_file::flush): New.
16957         (mi_console_file_flush): Delete.
16958         (mi_console_set_raw): Rename to ...
16959         (mi_console_file::set_raw): ... this.
16960         * mi/mi-console.h (class mi_console_file): New class.
16961         (mi_console_file_new, mi_console_set_raw): Delete.
16962         * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
16963         (mi_set_logging): Use delete and tee_file.  Adjust.
16964         * mi/mi-main.c (output_register): Use string_file.
16965         (mi_cmd_data_evaluate_expression): Use string_file.
16966         (mi_cmd_data_read_memory): Use string_file.
16967         (mi_cmd_execute, print_variable_or_computed): Use string_file.
16968         * mi/mi-out.c (mi_ui_out::main_stream): New.
16969         (mi_ui_out::rewind): Use main_stream and
16970         string_file.
16971         (mi_ui_out::put): Use main_stream and string_file.
16972         (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
16973         Allocate a 'string_file' instead.
16974         (mi_out_new): Don't allocate a mem_fileopen stream here.
16975         * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
16976         (mi_ui_out::main_stream): Declare method.
16977         * printcmd.c (eval_command): Use string_file.
16978         * psymtab.c (maintenance_print_psymbols): Use stdio_file.
16979         * python/py-arch.c (archpy_disassemble): Use string_file.
16980         * python/py-breakpoint.c (bppy_get_commands): Use string_file.
16981         * python/py-frame.c (frapy_str): Use string_file.
16982         * python/py-framefilter.c (py_print_type, py_print_single_arg):
16983         Use string_file.
16984         * python/py-type.c (typy_str): Use string_file.
16985         * python/py-unwind.c (unwind_infopy_str): Use string_file.
16986         * python/py-value.c (valpy_str): Use string_file.
16987         * record-btrace.c (btrace_insn_history): Use string_file.
16988         * regcache.c (regcache_print): Use stdio_file.
16989         * reggroups.c (maintenance_print_reggroups): Use stdio_file.
16990         * remote.c (escape_buffer): Use string_file.
16991         * rust-lang.c (rust_get_disr_info): Use string_file.
16992         * serial.c (serial_open_ops_1): Use stdio_file.
16993         (do_serial_close): Use delete.
16994         * stack.c (print_frame_arg): Use string_file.
16995         (print_frame_args): Remove local mem_fileopen stream, not used.
16996         (print_frame): Use string_file.
16997         * symmisc.c (maintenance_print_symbols): Use stdio_file.
16998         * symtab.h (struct symbol_computed_ops) <generate_c_location>:
16999         Take a 'string_file *' instead of a 'ui_file *'.
17000         * top.c (new_ui): Use stdio_file and stderr_file.
17001         (free_ui): Use delete.
17002         (execute_command_to_string): Use string_file.
17003         (quit_confirm): Use string_file.
17004         * tracepoint.c (collection_list::append_exp): Use string_file.
17005         * tui/tui-disasm.c (tui_disassemble): Use string_file.
17006         * tui/tui-file.c: Don't include "ui-file.h".
17007         (enum streamtype, struct tui_stream): Delete.
17008         (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
17009         (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
17010         (tui_file::tui_file): New method.
17011         (tui_file_fputs): Delete.
17012         (tui_file_get_strbuf): Delete.
17013         (tui_file::puts): New method.
17014         (tui_file_adjust_strbuf): Delete.
17015         (tui_file_flush): Delete.
17016         (tui_file::flush): New method.
17017         * tui/tui-file.h: Tweak intro comment.
17018         Include ui-file.h.
17019         (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
17020         (tui_file_adjust_strbuf): Delete declarations.
17021         (class tui_file): New class.
17022         * tui/tui-io.c (tui_initialize_io): Use tui_file.
17023         * tui/tui-regs.c (tui_restore_gdbout): Use delete.
17024         (tui_register_format): Use string_stream.
17025         * tui/tui-stack.c (tui_make_status_line): Use string_file.
17026         (tui_get_function_from_frame): Use string_file.
17027         * typeprint.c (type_to_string): Use string_file.
17028         * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
17029         (null_stream): New global.
17030         (ui_file_delete): Delete.
17031         (ui_file::ui_file): New.
17032         (null_file_isatty): Delete.
17033         (ui_file::~ui_file): New.
17034         (null_file_rewind): Delete.
17035         (ui_file::printf): New.
17036         (null_file_put): Delete.
17037         (null_file_flush): Delete.
17038         (ui_file::putstr): New.
17039         (null_file_write): Delete.
17040         (ui_file::putstrn): New.
17041         (null_file_read): Delete.
17042         (ui_file::putc): New.
17043         (null_file_fputs): Delete.
17044         (null_file_write_async_safe): Delete.
17045         (ui_file::vprintf): New.
17046         (null_file_delete): Delete.
17047         (null_file::write): New.
17048         (null_file_fseek): Delete.
17049         (null_file::puts): New.
17050         (ui_file_data): Delete.
17051         (null_file::write_async_safe): New.
17052         (gdb_flush, ui_file_isatty): Adjust.
17053         (ui_file_put, ui_file_rewind): Delete.
17054         (ui_file_write): Adjust.
17055         (ui_file_write_for_put): Delete.
17056         (ui_file_write_async_safe, ui_file_read): Adjust.
17057         (ui_file_fseek): Delete.
17058         (fputs_unfiltered): Adjust.
17059         (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
17060         (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
17061         (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
17062         (set_ui_file_data): Delete.
17063         (string_file::~string_file, string_file::write)
17064         (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
17065         (do_ui_file_as_string, ui_file_as_string): Delete.
17066         (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
17067         (struct mem_file): Delete.
17068         (mem_file_new): Delete.
17069         (stdio_file::stdio_file): New.
17070         (mem_file_delete): Delete.
17071         (stdio_file::stdio_file): New.
17072         (mem_fileopen): Delete.
17073         (stdio_file::~stdio_file): New.
17074         (mem_file_rewind): Delete.
17075         (stdio_file::set_stream): New.
17076         (mem_file_put): Delete.
17077         (stdio_file::open): New.
17078         (mem_file_write): Delete.
17079         (stdio_file_magic, struct stdio_file): Delete.
17080         (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
17081         (stdio_file::flush): New.
17082         (stdio_file_read): Rename to ...
17083         (stdio_file::read): ... this.  Adjust.
17084         (stdio_file_write): Rename to ...
17085         (stdio_file::write): ... this.  Adjust.
17086         (stdio_file_write_async_safe): Rename to ...
17087         (stdio_file::write_async_safe) ... this.  Adjust.
17088         (stdio_file_fputs): Rename to ...
17089         (stdio_file::puts) ... this.  Adjust.
17090         (stdio_file_isatty): Delete.
17091         (stdio_file_fseek): Delete.
17092         (stdio_file::isatty): New.
17093         (stderr_file_write): Rename to ...
17094         (stderr_file::write) ... this.  Adjust.
17095         (stderr_file_fputs): Rename to ...
17096         (stderr_file::puts) ... this.  Adjust.
17097         (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
17098         (stderr_file::stderr_file): New.
17099         (tee_file_magic): Delete.
17100         (struct tee_file): Delete.
17101         (tee_file::tee_file): New.
17102         (tee_file_new): Delete.
17103         (tee_file::~tee_file): New.
17104         (tee_file_delete): Delete.
17105         (tee_file_flush): Rename to ...
17106         (tee_file::flush): ... this.  Adjust.
17107         (tee_file_write): Rename to ...
17108         (tee_file::write): ... this.  Adjust.
17109         (tee_file::write_async_safe): New.
17110         (tee_file_fputs): Rename to ...
17111         (tee_file::puts): ... this.  Adjust.
17112         (tee_file_isatty): Rename to ...
17113         (tee_file::isatty): ... this.  Adjust.
17114         * ui-file.h (struct obstack, struct ui_file): Don't
17115         forward-declare.
17116         (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
17117         (ui_file_write_ftype)
17118         (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
17119         (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
17120         (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
17121         (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
17122         (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
17123         (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
17124         (set_ui_file_fseek): Delete.
17125         (ui_file_data, ui_file_delete, ui_file_rewind)
17126         (struct ui_file): New.
17127         (ui_file_up): New.
17128         (class null_file): New.
17129         (null_stream): Declare.
17130         (ui_file_write_for_put, ui_file_put): Delete.
17131         (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
17132         Delete.
17133         (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
17134         (gdb_fopen, tee_file_new): Delete.
17135         (struct string_file): New.
17136         (struct stdio_file): New.
17137         (stdio_file_up): New.
17138         (struct stderr_file): New.
17139         (class tee_file): New.
17140         * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
17141         of a 'ui_file *'.  Adjust.
17142         * ui-out.h (class ui_out) <field_stream>: Likewise.
17143         * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
17144         (null_stream): Delete.
17145         (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
17146         Adjust.
17147         * utils.h (struct ui_file): Delete forward declaration..
17148         (make_cleanup_ui_file_delete, null_stream): Delete declarations.
17149         (error_stream): Take a 'string_file &' instead of a
17150         'ui_file *'.
17151         * varobj.c (varobj_value_get_print_value): Use string_file.
17152         * xtensa-tdep.c (xtensa_verify_config): Use string_file.
17153         * gdbarch.c: Regenerate.
17154
17155 2017-02-02  Pedro Alves  <palves@redhat.com>
17156
17157         * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
17158         (gdb_pretty_print_insn): ... this.  Now a free function.  Add back
17159         a 'gdbarch' parameter.  Allocate a mem_fileopen stream here.
17160         Adjust to call gdb_print_insn instead of
17161         gdb_disassembler::print_insn.
17162         (dump_insns, do_mixed_source_and_assembly_deprecated)
17163         (do_mixed_source_and_assembly, do_assembly_only): Add back a
17164         'gdbarch' parameter.  Remove gdb_disassembler parameter.
17165         (gdb_disassembly): Don't allocate a gdb_disassembler here.
17166         * disasm.h (gdb_disassembler::pretty_print_insn): Delete
17167         declaration.
17168         (gdb_pretty_print_insn): Re-add declaration.
17169         * record-btrace.c (btrace_insn_history): Don't allocate a
17170         gdb_disassembler here.  Adjust to call gdb_pretty_print_insn.
17171
17172 2017-02-01  Simon Marchi  <simon.marchi@polymtl.ca>
17173
17174         * disasm.h (gdb_disassembly): Remove file_string parameter.
17175         * disasm.c (gdb_disassembly): Likewise.
17176         * cli/cli-cmds.c (print_disassembly): Adapt.
17177         * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
17178         * stack.c (do_gdb_disassembly): Likewise.
17179
17180 2017-02-01  Andreas Arnez  <arnez@linux.vnet.ibm.com>
17181
17182         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
17183         DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
17184         targets.  And if the implicit value is longer than needed, extract
17185         the first bytes instead of the "least significant" ones.
17186
17187 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
17188
17189         * btrace.c (btrace_enable): Do not call btrace_add_pc for
17190         BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
17191         (btrace_fetch): Assert can_access_registers_ptid.
17192         * record-btrace.c (require_btrace_thread, record_btrace_info): Call
17193         validate_registers_access.
17194
17195 2017-02-01  Markus Metzger  <markus.t.metzger@intel.com>
17196
17197         * gdbthread.h (can_access_registers_ptid): New.
17198         * thread.c (can_access_registers_ptid): New.
17199
17200 2017-02-01  Pedro Alves  <palves@redhat.com>
17201
17202         * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
17203
17204 2017-01-31  Pedro Alves  <palves@redhat.com>
17205
17206         * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
17207         Fix typos.
17208
17209 2017-01-31  Pedro Alves  <palves@redhat.com>
17210
17211         * stack.c (print_frame_args): Remove local mem_fileopen stream,
17212         not used.
17213
17214 2017-01-31  Pedro Alves  <palves@redhat.com>
17215
17216         * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
17217
17218 2017-01-31  Pedro Alves  <palves@redhat.com>
17219
17220         * common/scoped_restore.h
17221         (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
17222         change the value's parameter type to T2.
17223         (make_scoped_restore): Likewise.
17224
17225 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
17226             Richard Henderson  <rth@redhat.com>
17227
17228         * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
17229         (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
17230         GS_BASE for older kernels.
17231         (amd64_linux_store_inferior_registers): Add case to store FS_BASE
17232         GS_BASE for older kernels.
17233         * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
17234         and GS_BASE to the offset table.
17235         (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
17236         system register group.
17237         * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
17238         for older kernels.
17239         * amd64-tdep.c (amd64_init_abi): Add segment registers for the
17240         amd64 ABI.
17241         * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
17242         AMD64_GSBASE_REGNUM.
17243         (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
17244         * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
17245         (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
17246         (x32-avx-linux.dat, x32-avx512-linux.dat): Add
17247         i386/64bit-segments.xml in those rules.
17248         * features/i386/64bit-segments.xml: New file.
17249         * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
17250         * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
17251         * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
17252         * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
17253         * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
17254         * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
17255         * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
17256         * features/i386/amd64-avx-linux.c: Regenerated.
17257         * features/i386/amd64-avx-mpx-linux.c: Regenerated.
17258         * features/i386/amd64-avx-mpx.c: Regenerated.
17259         * features/i386/amd64-avx512-linux.c: Regenerated.
17260         * features/i386/amd64-linux.c: Regenerated.
17261         * features/i386/amd64-mpx-linux.c: Regenerated.
17262         * features/i386/i386-avx-mpx-linux.c: Regenerated.
17263         * features/i386/i386-avx-mpx.c: Regenerated.
17264         * features/i386/x32-avx-linux.c: Regenerated.
17265         * features/i386/x32-avx512-linux.c: Regenerated.
17266         * regformats/i386/amd64-avx-linux.dat: Regenerated.
17267         * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
17268         * regformats/i386/amd64-avx512-linux.dat: Regenerated.
17269         * regformats/i386/amd64-linux.dat: Regenerated.
17270         * regformats/i386/amd64-mpx-linux.dat: Regenerated.
17271         * regformats/i386/x32-avx-linux.dat: Regenerated.
17272         * regformats/i386/x32-avx512-linux.dat: Regenerated.
17273         * regformats/i386/x32-linux.dat: Regenerated.
17274
17275 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
17276
17277         * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
17278         Set to AMD64_NUM_REGS.
17279
17280 2017-01-27  Walfred Tedeschi  <walfred.tedeschi@intel.com>
17281
17282         * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
17283         that checks validity of a register number.
17284
17285 2017-01-27  Kees Cook  <keescook@google.com>
17286
17287         * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
17288         fetch_fpregs if target has fpa registers.
17289         (arm_linux_store_inferior_registers): Call store_fpregs if target
17290         has fpa registers.
17291
17292 2017-01-26  Andreas Arnez  <arnez@linux.vnet.ibm.com>
17293
17294         * cris-tdep.c (cris_gdbarch_init): Remove check for
17295         info.byte_order and force it to BFD_ENDIAN_LITTLE.
17296
17297 2017-01-26  Antoine Tremblay  <antoine.tremblay@ericsson.com>
17298
17299         * corelow.c (get_core_register_section): Check for regset
17300         existence before checking for REGSET_VARIABLE_SIZE.
17301
17302 2017-01-26  Yao Qi  <yao.qi@linaro.org>
17303             Pedro Alves  <palves@redhat.com>
17304
17305         PR gdb/20939
17306         * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
17307         call memory_error, save memaddr instead.
17308         (gdb_disassembler::print_insn): If gdbarch_print_insn returns
17309         negative, cal memory_error.
17310         * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
17311
17312 2017-01-26  Yao Qi  <yao.qi@linaro.org>
17313
17314         * disasm-selftests.c (memory_error_test): New function.
17315         (_initialize_disasm_selftests): Register memory_error_test.
17316
17317 2017-01-26  Yao Qi  <yao.qi@linaro.org>
17318
17319         * Makefile.in (SFILES): Add disasm-selftests.c and
17320         selftest-arch.c.
17321         (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
17322         * disasm-selftests.c: New file.
17323         * selftest-arch.c: New file.
17324         * selftest-arch.h: New file.
17325
17326 2017-01-26  Yao Qi  <yao.qi@linaro.org>
17327
17328         * mep-tdep.c (mep_gdb_print_insn): Set info->arch
17329         to bfd_arch_mep.  Don't return 0 if section is not
17330         found.  Call print_insn_mep.
17331
17332 2017-01-26  Pedro Alves  <palves@redhat.com>
17333             Yao Qi  <yao.qi@linaro.org>
17334
17335         * arm-tdep.c: Include "disasm.h".
17336         (gdb_print_insn_arm): Update code to get gdbarch.
17337         * disasm.c (dis_asm_read_memory): Change it to
17338         gdb_disassembler::dis_asm_read_memory.
17339         (dis_asm_memory_error): Likewise.
17340         (dis_asm_print_address): Likewise.
17341         (gdb_pretty_print_insn): Change it to
17342         gdb_disassembler::pretty_print_insn.
17343         (dump_insns): Add one argument gdb_disassemlber.  All
17344         callers updated.
17345         (do_mixed_source_and_assembly_deprecated): Likewise.
17346         (do_mixed_source_and_assembly): Likewise.
17347         (do_assembly_only): Likewise.
17348         (gdb_disassembler::gdb_disassembler): New.
17349         (gdb_disassembler::print_insn): New.
17350         * disasm.h (class gdb_disassembler): New.
17351         (gdb_pretty_print_insn): Remove declaration.
17352         (gdb_disassemble_info): Likewise.
17353         * guile/scm-disasm.c (class gdbscm_disassembler): New.
17354         (gdbscm_disasm_read_memory_worker): Update.
17355         (gdbscm_disasm_read_memory): Update.
17356         (gdbscm_disasm_memory_error): Remove.
17357         (gdbscm_disasm_print_address): Remove.
17358         (gdbscm_disassembler::gdbscm_disassembler): New.
17359         (gdbscm_print_insn_from_port): Update.
17360         * mips-tdep.c: Include disasm.h.
17361         (gdb_print_insn_mips): Update code to get gdbarch.
17362         * record-btrace.c (btrace_insn_history): Update.
17363         * spu-tdep.c: Include disasm.h.
17364         (struct spu_dis_asm_data): Remove.
17365         (struct spu_dis_asm_info): New.
17366         (spu_dis_asm_print_address): Use spu_dis_asm_info to get
17367         SPU id.
17368         (gdb_print_insn_spu): Cast disassemble_info to
17369         spu_dis_asm_info.
17370
17371 2017-01-26  Yao Qi  <yao.qi@linaro.org>
17372
17373         * disasm.c (do_ui_file_delete): Delete.
17374         (gdb_insn_length): Move code creating stream to ...
17375         * utils.c (null_stream): ... here.  New function.
17376         * utils.h (null_stream): Declare.
17377
17378 2017-01-23  Simon Marchi  <simon.marchi@polymtl.ca>
17379
17380         * python/py-inferior.c (find_thread_object): Return directly
17381         from the loop.  Remove "found" variable.
17382
17383 2017-01-21  Joel Brobecker  <brobecker@adacore.com>
17384
17385         GDB 7.12.1 released.
17386
17387 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
17388
17389         * python/py-function.c (fnpy_call): Reorder declarations to have
17390         the gdbpy_enter object declared first.
17391         * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
17392
17393 2017-01-20  Simon Marchi  <simon.marchi@ericsson.com>
17394
17395         PR python/21068
17396         * python/python-internal.h (PyMem_RawMalloc): Define for
17397         Python < 3.4.
17398         * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
17399         PyMem_RawMalloc instead of PyMem_Malloc.
17400
17401 2017-01-20  Mike Wrighton  <mike_wrighton@codesourcery.com>
17402             Luis Machado  <lgustavo@codesourcery.com>
17403
17404         * NEWS (New commands): Mention flash-erase.
17405         (New MI commands): Mention target-flash-erase.
17406         * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
17407         command.
17408         * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
17409         * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
17410         * target.c (flash_erase_command): New function.
17411         (initialize_targets): Add new flash-erase command.
17412         * target.h (flash_erase_command): New declaration.
17413
17414 2017-01-20  Joel Brobecker  <brobecker@adacore.com>
17415
17416         * nat/linux-ptrace.c: Only include <sys/procfs.h> if
17417         HAVE_SYS_PROCFS_H is defined.
17418
17419 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
17420
17421         * remote.c (struct cached_reg): Change data into a pointer.
17422         * (stop_reply_dtr): Free data pointers before deleting vector.
17423         (process_stop_reply): Likewise.
17424         (remote_parse_stop_reply): Allocate space for data
17425
17426 2017-01-18  Alan Hayward  <alan.hayward@arm.com>
17427
17428         * amd64-tdep.c (amd64_pseudo_register_read_value): remove
17429         MAX_REGISTER_SIZE.
17430         (amd64_pseudo_register_read_value): Likewise.
17431         * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
17432         (store_register_using_P): Likewise.
17433         * regcache.c (regcache_xfer_part): Likewise.
17434
17435 2017-01-16  Ivo Raisr  <ivo.raisr@oracle.com>
17436
17437         Split real and pseudo registers.
17438         * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
17439         (sparc32_pseudo_regnum): New enum.
17440         * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
17441         * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
17442         (SPARC32_CP0_REGISTERS): New macro.
17443         (sparc32_pseudo_register_name): New function.
17444         (sparc32_register_name): Use sparc32_pseudo_register_name.
17445         (sparc32_pseudo_register_type): New function.
17446         (sparc32_register_type): Use sparc32_pseudo_register_type.
17447         (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
17448         pseudo register numbers.
17449         * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
17450         (SPARC64_CP0_REGISTERS): New macro.
17451         (sparc64_pseudo_register_name): New function.
17452         (sparc64_register_name): Use sparc64_pseudo_register_name.
17453         (sparc64_pseudo_register_type): New function.
17454         (sparc64_register_type): Use sparc64_pseudo_register_type.
17455         (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
17456         pseudo register numbers.
17457         (sparc64_store_floating_fields, sparc64_extract_floating_fields,
17458         sparc64_store_arguments): Handle pseudo register numbers.
17459
17460 2017-01-13  Yao Qi  <yao.qi@linaro.org>
17461
17462         * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
17463         (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
17464         output.
17465         (getpkt_or_notif_sane_1): Likewise.
17466
17467 2017-01-13  Yao Qi  <yao.qi@linaro.org>
17468
17469         * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
17470         of CC.  Pass "-x c++-header" instead of "-x c".
17471
17472 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
17473
17474         * remote.c (remote_can_async_p): Update comment.
17475
17476 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
17477
17478         * linux-nat.c (linux_nat_can_async_p): Update comment.
17479
17480 2017-01-12  Simon Marchi  <simon.marchi@ericsson.com>
17481
17482         * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
17483
17484 2017-01-11  Simon Marchi  <simon.marchi@ericsson.com>
17485
17486         * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
17487
17488 2017-01-10  Tom Tromey  <tom@tromey.com>
17489
17490         * python/py-type.c (typy_legacy_template_argument): Update.
17491         * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
17492         ~demangle_parse_info): Declare new members.
17493         (cp_demangled_name_to_comp): Return unique_ptr.
17494         (cp_demangled_name_parse_free)
17495         (make_cleanup_cp_demangled_name_parse_free)
17496         (cp_new_demangle_parse_info): Remove.
17497         * cp-support.c (do_demangled_name_parse_free_cleanup)
17498         (make_cleanup_cp_demangled_name_parse_free): Remove.
17499         (inspect_type, cp_canonicalize_string_full)
17500         (cp_canonicalize_string): Update.
17501         (mangled_name_to_comp): Change return type.
17502         (cp_class_name_from_physname, method_name_from_physname)
17503         (cp_func_name, cp_remove_params): Update.
17504         * cp-name-parser.y (demangle_parse_info): New constructor, from
17505         cp_new_demangle_parse_info.
17506         (~demangle_parse_info): New destructor, from
17507         cp_demangled_name_parse_free.
17508         (cp_merge_demangle_parse_infos): Update.
17509         (cp_demangled_name_to_comp): Change return type.
17510
17511 2017-01-10  Tom Tromey  <tom@tromey.com>
17512
17513         * top.c (prevent_dont_repeat): Change return type.
17514         * python/python.c (execute_gdb_command): Use std::string.
17515         Update.
17516         * guile/guile.c (gdbscm_execute_gdb_command): Update.
17517         * command.h (prevent_dont_repeat): Change return type.
17518         * breakpoint.c (bpstat_do_actions_1): Update.
17519
17520 2017-01-10  Tom Tromey  <tom@tromey.com>
17521
17522         * value.h (scoped_value_mark::~scoped_value_mark): Call
17523         free_to_mark.
17524         (scoped_value_mark::free_to_mark): New method.
17525         * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
17526         scoped_value_mark.
17527
17528 2017-01-10  Tom Tromey  <tom@tromey.com>
17529
17530         * python/py-value.c (valpy_dereference, valpy_referenced_value)
17531         (valpy_reference_value, valpy_const_value, valpy_get_address)
17532         (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
17533         (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
17534         (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
17535         * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
17536         scoped_value_mark.
17537         * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
17538         * value.h (scoped_value_mark): New class.
17539
17540 2017-01-10  Tom Tromey  <tom@tromey.com>
17541
17542         * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
17543         * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
17544         * psymtab.c (discard_psymtabs_upto): Remove.
17545         (make_cleanup_discard_psymtabs): Remove.
17546         (struct psymtab_state): Remove.
17547
17548 2017-01-10  Tom Tromey  <tom@tromey.com>
17549
17550         * record-full.c (record_full_save_cleanups): Remove.
17551         (record_full_save): Use gdb::unlinker.
17552         * gcore.c (do_bfd_delete_cleanup): Remove.
17553         (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr.  Remove
17554         cleanups.
17555         * dwarf2read.c (unlink_if_set): Remove.
17556         (write_psymtabs_to_index): Use gdb::unlinker.
17557         * common/gdb_unlinker.h: New file.
17558
17559 2017-01-10  Tom Tromey  <tom@tromey.com>
17560
17561         * windows-tdep.c (windows_xfer_shared_library): Update.
17562         * windows-nat.c (windows_make_so): Update.
17563         * utils.h (make_cleanup_bfd_unref): Remove.
17564         * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
17565         * symfile.h (symfile_bfd_open)
17566         (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
17567         * symfile.c (read_symbols, symbol_file_add)
17568         (separate_debug_file_exists): Update.
17569         (symfile_bfd_open): Return gdb_bfd_ref_ptr.
17570         (generic_load, reread_symbols): Update.
17571         * symfile-mem.c (symbol_file_add_from_memory): Update.
17572         * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
17573         (spu_symbol_file_add_from_memory): Update.
17574         * solist.h (struct target_so_ops) <bfd_open>: Return
17575         gdb_bfd_ref_ptr.
17576         (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
17577         * solib.c (solib_bfd_fopen, solib_bfd_open): Return
17578         gdb_bfd_ref_ptr.
17579         (solib_map_sections, reload_shared_libraries_1): Update.
17580         * solib-svr4.c (enable_break): Update.
17581         * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
17582         * solib-frv.c (enable_break2): Update.
17583         * solib-dsbt.c (enable_break): Update.
17584         * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
17585         gdb_bfd_ref_ptr.
17586         (darwin_solib_get_all_image_info_addr_at_init): Update.
17587         (darwin_bfd_open): Return gdb_bfd_ref_ptr.
17588         * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
17589         * record-full.c (record_full_save): Update.
17590         * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
17591         * procfs.c (insert_dbx_link_bpt_in_file): Update.
17592         * minidebug.c (find_separate_debug_file_in_section): Return
17593         gdb_bfd_ref_ptr.
17594         * machoread.c (macho_add_oso_symfile): Change abfd to
17595         gdb_bfd_ref_ptr.
17596         (macho_symfile_read_all_oso): Update.
17597         (macho_check_dsym): Return gdb_bfd_ref_ptr.
17598         (macho_symfile_read): Update.
17599         * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
17600         (jit_bfd_try_read_symtab): Update.
17601         * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
17602         (gdb_bfd_openw, gdb_bfd_openr_iovec)
17603         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
17604         gdb_bfd_ref_ptr.
17605         (gdb_bfd_ref_policy): New struct.
17606         (gdb_bfd_ref_ptr): New typedef.
17607         * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
17608         (gdb_bfd_openw, gdb_bfd_openr_iovec)
17609         (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
17610         gdb_bfd_ref_ptr.
17611         * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
17612         * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
17613         (gcore_command): Update.
17614         * exec.c (exec_file_attach): Update.
17615         * elfread.c (elf_symfile_read): Update.
17616         * dwarf2read.c (dwarf2_get_dwz_file): Update.
17617         (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
17618         (open_and_init_dwo_file): Update.
17619         (open_dwp_file): Return gdb_bfd_ref_ptr.
17620         (open_and_init_dwp_file): Update.
17621         * corelow.c (core_open): Update.
17622         * compile/compile-object-load.c (compile_object_load): Update.
17623         * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
17624         * coffread.c (coff_symfile_read): Update.
17625         * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
17626         gdb_bfd_ref_ptr.  Rename.
17627         (dump_bfd_file, restore_command): Update.
17628         * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
17629         * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
17630         (find_separate_debug_file_by_buildid): Update.
17631
17632 2017-01-10  Tom Tromey  <tom@tromey.com>
17633
17634         * common/gdb_ref_ptr.h: New file.
17635         * python/py-ref.h (struct gdbpy_ref_policy): New.
17636         (gdbpy_ref): Now a typedef.
17637
17638 2017-01-10  Tom Tromey  <tom@tromey.com>
17639
17640         * utils.h (make_cleanup_htab_delete): Don't declare.
17641         * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
17642         Remove.
17643         * linespec.c (decode_compound_collector): Add constructor,
17644         destructor.
17645         (lookup_prefix_sym): Remove cleanup.
17646         (symtab_collector): Add constructor, destructor.
17647         (collect_symtabs_from_filename): Remove cleanup.
17648         * disasm.c (do_mixed_source_and_assembly): Use htab_up.
17649         * compile/compile-c-symbols.c (generate_c_for_variable_locations):
17650         Use htab_up.
17651         * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
17652         * dwarf2read.c (dw2_expand_symtabs_matching)
17653         (dw2_map_symbol_filenames, dwarf_decode_macros)
17654         (write_psymtabs_to_index): Use htab_up.
17655         * dwarf2loc.c (func_verify_no_selftailcall)
17656         (call_site_find_chain_1, func_verify_no_selftailcall)
17657         (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
17658         std::vector, gdb::unique_xmalloc_ptr.
17659         (call_sitep): Remove typedef.
17660         (dwarf2_locexpr_baton_eval): Remove unused variable.
17661
17662 2017-01-10  Tom Tromey  <tom@tromey.com>
17663
17664         * python/python-internal.h (make_cleanup_py_decref)
17665         (make_cleanup_py_xdecref): Don't declare.
17666         * python/py-utils.c (py_decref, make_cleanup_py_decref)
17667         (py_xdecref, make_cleanup_py_xdecref): Remove.
17668
17669 2017-01-10  Tom Tromey  <tom@tromey.com>
17670
17671         * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
17672         (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
17673
17674 2017-01-10  Tom Tromey  <tom@tromey.com>
17675
17676         * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
17677
17678 2017-01-10  Tom Tromey  <tom@tromey.com>
17679
17680         * python/py-utils.c (unicode_to_encoded_string)
17681         (python_string_to_target_string)
17682         (python_string_to_target_python_string)
17683         (python_string_to_host_string, gdbpy_obj_to_string)
17684         (get_addr_from_python): Use gdbpy_ref.
17685
17686 2017-01-10  Tom Tromey  <tom@tromey.com>
17687
17688         * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
17689         gdbpy_ref.
17690
17691 2017-01-10  Tom Tromey  <tom@tromey.com>
17692
17693         * python/python.c (eval_python_command, gdbpy_decode_line)
17694         (gdbpy_run_events, gdbpy_start_type_printers)
17695         (gdbpy_apply_type_printers): Use gdbpy_ref.
17696
17697 2017-01-10  Tom Tromey  <tom@tromey.com>
17698
17699         * python/py-param.c (get_doc_string, compute_enum_values): Use
17700         gdbpy_ref.
17701
17702 2017-01-10  Tom Tromey  <tom@tromey.com>
17703
17704         * python/py-inferior.c (find_thread_object, build_inferior_list):
17705         Use gdbpy_ref.
17706
17707 2017-01-10  Tom Tromey  <tom@tromey.com>
17708
17709         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
17710
17711 2017-01-10  Tom Tromey  <tom@tromey.com>
17712
17713         * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
17714         gdbpy_ref.
17715
17716 2017-01-10  Tom Tromey  <tom@tromey.com>
17717
17718         * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref.  Remove
17719         extra incref.
17720         (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
17721         Use gdbpy_ref.
17722
17723 2017-01-10  Tom Tromey  <tom@tromey.com>
17724
17725         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
17726         gdbpy_ref.
17727
17728 2017-01-10  Tom Tromey  <tom@tromey.com>
17729
17730         * python/py-arch.c (archpy_disassemble): Use gdbpy_ref.  Don't
17731         decref results of PyArg_ParseTupleAndKeywords.
17732
17733 2017-01-10  Tom Tromey  <tom@tromey.com>
17734
17735         * python/python.c (python_run_simple_file): Use
17736         unique_xmalloc_ptr, gdbpy_ref.
17737
17738 2017-01-10  Tom Tromey  <tom@tromey.com>
17739
17740         * python/py-prettyprint.c (print_stack_unless_memory_error)
17741         (print_string_repr, print_children): Use gdbpy_ref.
17742         (dummy_python_frame): New class.
17743         (dummy_python_frame::dummy_python_frame): Rename from
17744         push_dummy_python_frame.
17745         (py_restore_tstate): Remove.
17746
17747 2017-01-10  Tom Tromey  <tom@tromey.com>
17748
17749         * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
17750
17751 2017-01-10  Tom Tromey  <tom@tromey.com>
17752
17753         * python/python.c (ensure_python_env, restore_python_env):
17754         Remove.
17755         * python/python-internal.h (ensure_python_env): Don't declare.
17756         * varobj.h (varobj_ensure_python_env): Don't declare.
17757         * varobj.c (varobj_ensure_python_env): Remove.
17758
17759 2017-01-10  Tom Tromey  <tom@tromey.com>
17760
17761         * varobj.c (varobj_value_get_print_value): Use
17762         gdbpy_enter_varobj.
17763
17764 2017-01-10  Tom Tromey  <tom@tromey.com>
17765
17766         * python/py-prettyprint.c (print_string_repr, print_children):
17767         Update.
17768         * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
17769         of "encoding".
17770         * varobj.c (varobj_value_get_print_value): Update.
17771         * python/python-internal.h (gdbpy_extract_lazy_string): Update.
17772
17773 2017-01-10  Tom Tromey  <tom@tromey.com>
17774
17775         * varobj.c (varobj_get_display_hint)
17776         (dynamic_varobj_has_child_method, install_new_value_visualizer)
17777         (varobj_set_visualizer, free_variable): Use
17778         gdbpy_enter_varobj.
17779
17780 2017-01-10  Tom Tromey  <tom@tromey.com>
17781
17782         * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
17783         (do_finish_initialization): New function.  Use gdbpy_ref.
17784         (gdbpy_finish_initialization): Use gdbpy_enter.  Call
17785         do_finish_initialization.
17786
17787 2017-01-10  Tom Tromey  <tom@tromey.com>
17788
17789         * python/py-param.c (get_set_value, get_show_value): Use
17790         gdbpy_enter, gdbpy_ref.
17791
17792 2017-01-10  Tom Tromey  <tom@tromey.com>
17793
17794         * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
17795
17796 2017-01-10  Tom Tromey  <tom@tromey.com>
17797
17798         * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
17799
17800 2017-01-10  Tom Tromey  <tom@tromey.com>
17801
17802         * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
17803         Use gdbpy_enter_varobj.
17804
17805 2017-01-10  Tom Tromey  <tom@tromey.com>
17806
17807         * varobj.c (gdbpy_enter_varobj): New constructor.
17808         * python/python-internal.h (gdbpy_enter_varobj): New class.
17809         * python/py-varobj.c (py_varobj_get_iterator): Use
17810         gdbpy_enter_varobj.
17811
17812 2017-01-10  Tom Tromey  <tom@tromey.com>
17813
17814         * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
17815         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
17816         (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
17817         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
17818         unique_xmalloc_ptr.
17819         (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
17820
17821 2017-01-10  Tom Tromey  <tom@tromey.com>
17822
17823         * python/py-xmethods.c (invoke_match_method): Use
17824         gdbpy_ref.
17825
17826 2017-01-10  Tom Tromey  <tom@tromey.com>
17827
17828         * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
17829         gdbpy_enter, gdbpy_ref.
17830
17831 2017-01-10  Tom Tromey  <tom@tromey.com>
17832
17833         * python/python.c (python_interactive_command): Use gdbpy_enter.
17834
17835 2017-01-10  Tom Tromey  <tom@tromey.com>
17836
17837         * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
17838         gdbpy_ref.
17839
17840 2017-01-10  Tom Tromey  <tom@tromey.com>
17841
17842         * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
17843         gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
17844
17845 2017-01-10  Tom Tromey  <tom@tromey.com>
17846
17847         * utils.h (htab_deleter): New struct.
17848         (htab_up): New typedef.
17849         * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
17850         gdbpy_enter, gdbpy_ref, htab_up.
17851
17852 2017-01-10  Tom Tromey  <tom@tromey.com>
17853
17854         * python/py-unwind.c (pending_frame_invalidate): Remove.
17855         (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
17856
17857 2017-01-10  Tom Tromey  <tom@tromey.com>
17858
17859         * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
17860         (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
17861
17862 2017-01-10  Tom Tromey  <tom@tromey.com>
17863
17864         * python/py-type.c (save_objfile_types): Use gdbpy_enter.
17865
17866 2017-01-10  Tom Tromey  <tom@tromey.com>
17867
17868         * python/python.c (gdbpy_eval_from_control_command)
17869         (gdbpy_source_script, gdbpy_run_events)
17870         (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
17871         (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
17872         gdbpy_enter.
17873
17874 2017-01-10  Tom Tromey  <tom@tromey.com>
17875
17876         * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
17877
17878 2017-01-10  Tom Tromey  <tom@tromey.com>
17879
17880         * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
17881
17882 2017-01-10  Tom Tromey  <tom@tromey.com>
17883
17884         * python/py-inferior.c (python_on_normal_stop, python_on_resume)
17885         (python_on_inferior_call_pre, python_on_inferior_call_post)
17886         (python_on_memory_change, python_on_register_change)
17887         (python_inferior_exit, python_new_objfile, add_thread_object)
17888         (delete_thread_object, py_free_inferior): Use gdbpy_enter.
17889
17890 2017-01-10  Tom Tromey  <tom@tromey.com>
17891
17892         * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
17893         (bpfinishpy_handle_exit): Use gdbpy_enter.
17894
17895 2017-01-10  Tom Tromey  <tom@tromey.com>
17896
17897         * python/py-cmd.c (cmdpy_destroyer)
17898         (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
17899         gdbpy_enter.
17900
17901 2017-01-10  Tom Tromey  <tom@tromey.com>
17902
17903         * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
17904         gdbpy_enter.
17905         (gdbpy_breakpoint_has_cond): Likewise.
17906
17907 2017-01-10  Tom Tromey  <tom@tromey.com>
17908
17909         * python/python.c (gdbpy_enter): New constructor.
17910         (~gdbpy_enter): New destructor.
17911         (restore_python_env, ensure_python_env): Rewrite.
17912         * python/python-internal.h (gdbpy_enter): New class.
17913
17914 2017-01-10  Tom Tromey  <tom@tromey.com>
17915
17916         * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
17917
17918 2017-01-10  Tom Tromey  <tom@tromey.com>
17919
17920         * python/py-value.c (value_has_field, get_field_flag)
17921         (get_field_type, valpy_getitem, convert_value_from_python): Use
17922         gdbpy_ref.
17923
17924 2017-01-10  Tom Tromey  <tom@tromey.com>
17925
17926         * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
17927         gdbpy_ref.
17928
17929 2017-01-10  Tom Tromey  <tom@tromey.com>
17930
17931         * python/py-prettyprint.c (search_pp_list)
17932         (find_pretty_printer_from_objfiles)
17933         (find_pretty_printer_from_progspace)
17934         (find_pretty_printer_from_gdb, find_pretty_printer)
17935         (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
17936         gdbpy_ref.
17937
17938 2017-01-10  Tom Tromey  <tom@tromey.com>
17939
17940         * python/py-param.c (call_doc_function): Use gdbpy_ref.
17941
17942 2017-01-10  Tom Tromey  <tom@tromey.com>
17943
17944         * python/py-linetable.c (build_line_table_tuple_from_pcs)
17945         (ltpy_get_all_source_lines): Use gdbpy_ref.
17946
17947 2017-01-10  Tom Tromey  <tom@tromey.com>
17948
17949         * python/py-framefilter.c (extract_sym, extract_value)
17950         (get_py_iter_from_func, bootstrap_python_frame_filters): Use
17951         gdbpy_ref.
17952
17953 2017-01-10  Tom Tromey  <tom@tromey.com>
17954
17955         * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
17956
17957 2017-01-10  Tom Tromey  <tom@tromey.com>
17958
17959         * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
17960
17961 2017-01-10  Tom Tromey  <tom@tromey.com>
17962
17963         * python/py-function.c (convert_values_to_python, fnpy_init): Use
17964         gdbpy_ref.
17965
17966 2017-01-10  Tom Tromey  <tom@tromey.com>
17967
17968         * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
17969
17970 2017-01-10  Tom Tromey  <tom@tromey.com>
17971
17972         * python/py-type.c (convert_field, make_fielditem, typy_fields)
17973         (typy_range): Use gdbpy_ref.
17974
17975 2017-01-10  Tom Tromey  <tom@tromey.com>
17976
17977         * python/py-threadevent.c (create_thread_event_object): Use
17978         gdbpy_ref.
17979         * python/py-stopevent.c (create_stop_event_object): Simplify.
17980         (emit_stop_event): Use gdbpy_ref.
17981         * python/py-signalevent.c (create_signal_event_object): Use
17982         gdbpy_ref.
17983         * python/py-newobjfileevent.c (create_new_objfile_event_object)
17984         (emit_new_objfile_event, create_clear_objfiles_event_object)
17985         (emit_clear_objfiles_event): Use gdbpy_ref.
17986         * python/py-infevents.c (create_inferior_call_event_object)
17987         (create_register_changed_event_object)
17988         (create_memory_changed_event_object, emit_inferior_call_event)
17989         (emit_memory_changed_event, emit_register_changed_event): Use
17990         gdbpy_ref.
17991         * python/py-exitedevent.c (create_exited_event_object)
17992         (emit_exited_event): Use gdbpy_ref.
17993         * python/py-event.h (evpy_emit_event): Remove
17994         CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
17995         * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
17996         * python/py-continueevent.c (emit_continue_event): Use
17997         gdbpy_ref.
17998         * python/py-breakpoint.c (gdbpy_breakpoint_created)
17999         (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
18000         gdbpy_ref.
18001         * python/py-bpevent.c (create_breakpoint_event_object): Use
18002         gdbpy_ref.
18003
18004 2017-01-10  Tom Tromey  <tom@tromey.com>
18005
18006         * python/py-ref.h: New file.
18007
18008 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
18009
18010         * cli-out.c (cli_ui_out::do_redirect): Change return type to
18011         void.
18012         * cli-out.h (cli_ui_out::do_redirect): Likewise.
18013         * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
18014         * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
18015         * ui-out.c (ui_out::redirect): Likewise.
18016         * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
18017         * cli/cli-logging.c (set_logging_redirect): Update call site of
18018         ui_out::redirect.
18019         (handle_redirections): Likewise.
18020         * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
18021         * top.c (execute_command_to_string): Likewise.
18022         * utils.c (do_ui_out_redirect_pop): Likewise.
18023
18024 2017-01-10  Simon Marchi  <simon.marchi@ericsson.com>
18025
18026         * stack.c (_initialize_stack): Update "frame" command help message.
18027
18028 2017-01-08  Iain Buclaw  <ibuclaw@gdcproject.org>
18029
18030         * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
18031
18032 2017-01-06  Yao Qi  <yao.qi@linaro.org>
18033
18034         * x86-linux-nat.h: Include gdb_proc_service.h.
18035
18036 2017-01-06  Yao Qi  <yao.qi@linaro.org>
18037
18038         * ser-base.h: Include serial.h.
18039
18040 2017-01-06  Yao Qi  <yao.qi@linaro.org>
18041
18042         * ppc-linux-tdep.h: Include ppc-tdep.h.
18043
18044 2017-01-06  Yao Qi  <yao.qi@linaro.org>
18045
18046         * nat/amd64-linux-siginfo.h: Include signal.h.
18047
18048 2017-01-06  Yao Qi  <yao.qi@linaro.org>
18049
18050         * nat/aarch64-linux-hw-point.h: Include break-common.h.
18051
18052 2017-01-06  Yao Qi  <yao.qi@linaro.org>
18053
18054         * mi/mi-parse.h: Include mi-cmds.h.
18055
18056 2017-01-06  Yao Qi  <yao.qi@linaro.org>
18057
18058         * inf-loop.c: Don't include "target.h".
18059         * inf-loop.h: Include it here.
18060
18061 2017-01-06  Yao Qi  <yao.qi@linaro.org>
18062
18063         * dfp.h: Include "dboulest.h" and "expression.h".
18064
18065 2017-01-06  Yao Qi  <yao.qi@linaro.org>
18066
18067         * ax-gdb.h: Include "ax.h".
18068
18069 2017-01-06  Yao Qi  <yao.qi@linaro.org>
18070
18071         * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
18072         with nat/gdb_ptrace.h.
18073
18074 2017-01-05  Yao Qi  <yao.qi@linaro.org>
18075
18076         * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
18077         new line.
18078         (mips64_fbsd_sigframe_init): Likewise.
18079
18080 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
18081
18082         * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
18083         GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
18084
18085 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
18086
18087         * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
18088         * NEWS: Mention new FreeBSD/mips native configuration.
18089         * config/mips/fbsd.mh: New file.
18090         * configure.host: Add mips*-*-freebsd*.
18091         * mips-fbsd-nat.c: New file.
18092
18093 2017-01-04  John Baldwin  <jhb@FreeBSD.org>
18094
18095         * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
18096         (ALLDEPFILES): Add mips-fbsd-tdep.c.
18097         * NEWS: Mention new FreeBSD/mips target.
18098         * configure.tgt: Add mips*-*-freebsd*.
18099         * mips-fbsd-tdep.c: New file.
18100         * mips-fbsd-tdep.h: New file.
18101
18102 2017-01-04  Yao Qi  <yao.qi@linaro.org>
18103
18104         * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
18105         use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
18106
18107 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
18108
18109         Update copyright year range in all GDB files.
18110
18111 2017-01-01  Joel Brobecker  <brobecker@adacore.com>
18112
18113         * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
18114
18115 For older changes see ChangeLog-2016.
18116 \f
18117 Local Variables:
18118 mode: change-log
18119 left-margin: 8
18120 fill-column: 74
18121 version-control: never
18122 coding: utf-8
18123 End: