python: Add qualified parameter to gdb.Breakpoint
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2017-12-13 Simon Marchi <simon.marchi@ericsson.com>
2
3 * location.h (string_to_event_location): Add match_type
4 parameter.
5 * location.c (string_to_event_location): Likewise.
6 * python/py-breakpoint.c (bppy_init): Handle qualified
7 parameter.
8
9 2017-12-13 Pedro Alves <palves@redhat.com>
10
11 * completer.c (completion_tracker::maybe_add_completion): New
12 'text' and 'word' parameters. Use make_completion_match_str.
13 (completion_tracker::add_completion): New 'text' and 'word'
14 parameters. Pass down.
15 (completion_tracker::recompute_lowest_common_denominator): Change
16 parameter type to gdb::unique_xmalloc_ptr rval ref. Adjust.
17 * completer.h (completion_tracker::add_completion): New 'text' and
18 'word' parameters.
19 (completion_tracker::recompute_lowest_common_denominator): Change
20 parameter type to gdb::unique_xmalloc_ptr rval ref.
21 (completion_tracker::recompute_lowest_common_denominator): Change
22 parameter type to gdb::unique_xmalloc_ptr rval ref.
23 * symtab.c (completion_list_add_name): Pass down 'text' and 'word'
24 as well.
25
26 2017-12-13 Pedro Alves <palves@redhat.com>
27
28 * cli/cli-decode.c (complete_on_cmdlist, complete_on_enum): Use
29 make_completion_match_str.
30 * completer.c: Use gdb::unique_xmalloc_ptr and
31 make_completion_match_str.
32 (make_completion_match_str_1): New.
33 (make_completion_match_str(const char *, const char *,
34 const char *)): New.
35 (make_completion_match_str(gdb::unique_xmalloc_ptr<char> &&,
36 const char *, const char *)): New.
37 * completer.h (make_completion_match_str(const char *,
38 const char *, const char *)): New.
39 (make_completion_match_str(gdb::unique_xmalloc_ptr<char> &&,
40 const char *, const char *)): New.
41 * interps.c (interpreter_completer): Use make_completion_match_str.
42 * symtab.c (completion_list_add_name, add_filename_to_list): Use
43 make_completion_match_str.
44
45 2017-12-13 Stafford Horne <shorne@gmail.com>
46
47 * or1k-tdep.c (or1k_analyse_inst): Use _() wrapper for message
48 strings.
49 (or1k_unwind_pc): Use paddress() instead of %p.
50 (or1k_unwind_sp): Likewise.
51 (or1k_frame_cache): Use host_address_to_string()/paddress()
52 instead of %p and use _() wrapper for message strings.
53
54 2017-12-13 Simon Marchi <simon.marchi@ericsson.com>
55
56 * contrib/ari/gdb_ari.sh: Fix typo in help.
57
58 2017-12-13 Joel Brobecker <brobecker@adacore.com>
59
60 * event-top.c (handle_line_of_input): Set server_command.
61
62 2017-12-12 Stafford Horne <shorne@gmail.com>
63 Stefan Wallentowitz <stefan@wallentowitz.de>
64 Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
65 Franck Jullien <franck.jullien@gmail.com>
66 Jeremy Bennett <jeremy.bennett@embecosm.com>
67
68 * configure.tgt: Add targets for or1k and or1knd.
69 * or1k-tdep.c: New file.
70 * or1k-tdep.h: New file.
71 * features/Makefile: Add or1k.xml to build.
72 * features/or1k.xml: New file.
73 * features/or1k-core.xml: New file.
74 * features/or1k.c: Generated.
75
76 2017-12-12 Alan Modra <amodra@gmail.com>
77
78 PR tdep/22576
79 * ppc64-tdep.c (ppc64_plt_entry_point): Rewrite to take TOC-relative
80 PLT offset, and retrieve r2 from stack when executing in reverse.
81 (ppc64_standard_linkage1_target): Drop pc param. Calculate offset
82 rather than PLT address.
83 (ppc64_standard_linkage2_target): Likewise.
84 (ppc64_standard_linkage3_target): Likewise.
85 (ppc64_standard_linkage4_target): Likewise.
86 (ppc64_skip_trampoline_code_1): Adjust to suit.
87
88 2017-12-11 Simon Marchi <simon.marchi@ericsson.com>
89
90 PR gdb/22556
91 * remote.c (remote_thread_name): Return NULL if name is empty.
92 (remote_threads_extra_info): Return NULL if extra info is empty.
93
94 2017-12-11 Pedro Alves <palves@redhat.com>
95
96 * defs.h (elf_sym_fns_lazy_psyms, elf_sym_fns_gdb_index)
97 (elf_sym_fns_debug_names): Move to elfread.c.
98 * dwarf2read.c (dwarf2_initialize_objfile): Return a boolean
99 instead of a sym_fns and add 'index_kind' output parameter. Fill
100 the latter in with the index variant kind if using an index.
101 (enum dw_index_kind): Moved to symfile.h.
102 * elfread.c (elf_sym_fns_gdb_index, elf_sym_fns_debug_names)
103 (elf_sym_fns_lazy_psyms): Move from defs.h.
104 (elf_symfile_read): Adjust to new dwarf2_initialize_objfile
105 interface.
106 * symfile.h (enum class dw_index_kind): New, moved from
107 dwarf2read.c.
108 (dwarf2_initialize_objfile): Change prototype.
109
110 2017-12-11 Ulrich Weigand <uweigand@de.ibm.com>
111
112 * target-float.c (mpfr_float_ops::from_target): Use mpfr_set_ui
113 instead of mpfr_set_si to convert mantissa bits.
114
115 2017-12-11 Xavier Roirand <roirand@adacore.com>
116 Joel Brobecker <brobecker@adacore.com>
117
118 * ada-lang.c (ada_tag_value_at_base_address): Change the way
119 tagged type base address is computed.
120 (enum ada_primitive_types) <ada_primitive_type_storage_offset>:
121 New enumerate.
122 (ada_language_arch_info): Set the ada_primitive_type_storage_offset
123 element of lai->primitive_type_vector.
124
125 2017-12-08 Pedro Alves <palves@redhat.com>
126
127 * dwarf2read.c (mock_mapped_index): Reimplement as an extension of
128 mapped_index_base.
129 (check_match): Adjust to use mock_index directly.
130 (check_find_bounds_finds)
131 (test_mapped_index_find_name_component_bounds): Adjust to work
132 with a mapped_index_base.
133
134 2017-12-08 Pedro Alves <palves@redhat.com>
135
136 * dwarf2read.c (struct mapped_index_base): New, partially factored
137 out from ...
138 (struct mapped_index): ... this. Inherit mapped_index_base.
139 (mapped_index::symbol_name_slot_invalid):
140 (mapped_index::symbol_name_at): Add override marker.
141 (mapped_index::symbol_name_count): New.
142 (struct mapped_debug_names): Inherit mapped_index_base.
143 (mapped_debug_names::symbol_name_at): New.
144 (mapped_debug_names::symbol_name_count): New.
145 (mapped_index::find_name_components_bounds): Rename to ...
146 (mapped_index_base::find_name_components_bounds): ... this.
147 (mapped_index::build_name_components): Rename to ...
148 (mapped_index_base::build_name_components): ... this. Adjust to
149 use mapped_index_base::symbol_name_count and
150 mapped_index_base::symbol_name_slot_invalid.
151 (dw2_expand_symtabs_matching_symbol): Take a mapped_index_base
152 instead of a mapped_index. Use
153 dw2_expand_symtabs_matching_symbol.
154
155 2017-12-08 Pedro Alves <palves@redhat.com>
156
157 * dwarf2read.c (mapped_index::symbol_table_slot): New.
158 (mapped_index::address_table): Now a gdb::array_view of const
159 gdb_byte.
160 (mapped_index::symbol_table): Now a gdb::array_view of
161 symbol_table_slot.
162 (mapped_index::address_table_size)
163 (mapped_index::symbol_table_slots): Delete.
164 (create_addrmap_from_index): Adjust.
165 (find_slot_in_mapped_hash): Adjust.
166 (read_index_from_section): Adjust.
167 (dwarf2_read_index): Adjust.
168
169 2017-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
170 Pedro Alves <palves@redhat.com>
171
172 * defs.h (elf_sym_fns_debug_names): New declaration.
173 * dwarf2read.c: Include "hash_enum.h".
174 (mapped_debug_names): New.
175 (struct dwarf2_per_objfile): Add debug_names, debug_aranges and
176 debug_names_table.
177 (dwarf2_elf_names): Add ".debug_names" and ".debug_aranges".
178 (struct dwz_file): Add debug_names.
179 (dwarf2_per_objfile::locate_sections): Handle debug_names and
180 debug_aranges.
181 (locate_dwz_sections): Handle debug_names.
182 (create_signatured_type_table_from_debug_names)
183 (create_addrmap_from_aranges): New.
184 (dwarf2_read_index): Update function comment.
185 (dwarf5_augmentation): Moved up.
186 (read_debug_names_from_section, create_cus_from_debug_names_list)
187 (create_cus_from_debug_names, dwarf2_read_debug_names): New.
188 (dwarf5_djb_hash): Moved up.
189 (dw2_debug_names_iterator): New.
190 (read_indirect_string_at_offset): New declaration.
191 (mapped_debug_names::namei_to_name)
192 (dw2_debug_names_iterator::find_vec_in_debug_names)
193 (dw2_debug_names_iterator::next, dw2_debug_names_lookup_symbol)
194 (dw2_debug_names_dump, dw2_debug_names_expand_symtabs_for_function)
195 (dw2_debug_names_expand_symtabs_matching, dwarf2_debug_names_functions):
196 New.
197 (dwarf2_initialize_objfile): Return also elf_sym_fns_debug_names.
198 (debug_names::djb_hash): Rename it to dwarf5_djb_hash.
199 (debug_names::build): Update djb_hash caller.
200 (write_debug_names): Move out and rename augmentation to
201 dwarf5_augmentation.
202 * elfread.c (elf_sym_fns_debug_names): New.
203 * psymtab.h (dwarf2_debug_names_functions): New declaration.
204 * symfile.h (struct dwarf2_debug_sections): Add debug_names and
205 debug_aranges.
206 * xcoffread.c (dwarf2_xcoff_names): Add debug_names and debug_aranges.
207
208 2017-12-08 Pedro Alves <palves@redhat.com>
209
210 * common/hash_enum.h: New file.
211
212 2017-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
213
214 * dwarf2read.c (create_cu_from_index_list): New from ...
215 (create_cus_from_index_list): ... this function, use it.
216 (dw_expand_symtabs_matching_file_matcher)
217 (dw2_expand_symtabs_matching_one): New from ...
218 (dw2_expand_symtabs_matching): ... this function, use them.
219
220 2017-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
221
222 * defs.h (elf_sym_fns_lazy_psyms, elf_sym_fns_gdb_index): Move here
223 declarations from elfread.c.
224 (dwarf2_initialize_objfile): Change return value.
225 * elfread.c (elf_sym_fns_lazy_psyms, elf_sym_fns_gdb_index): Move these
226 declarations to defs.h.
227 (elf_symfile_read): Adjust dwarf2_initialize_objfile caller.
228 * symfile.h (dwarf2_initialize_objfile): Change return type.
229
230 2017-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
231 Pedro Alves <palves@redhat.com>
232
233 * contrib/gdb-add-index.sh (index): Rename to ...
234 (index4): ... here.
235 (index5, debugstr, debugstrmerge, debugstrerr): New variables.
236 Support also .debug_names and .debug_str.
237 * dwarf2read.c: Include cmath, set, list.
238 (INDEX_SUFFIX): Rename to ...
239 (INDEX4_SUFFIX): ... here.
240 (INDEX5_SUFFIX, DEBUG_STR_SUFFIX): New.
241 (file_write(FILE *, const void *, size_t)): New.
242 (file_write(FILE *, const std::vector<Elem, Alloc> &)): New.
243 (data_buf::append_unsigned_leb128, data_buf::empty): New.
244 (data_buf::file_write): Use ::file_write.
245 (data_buf::c_str, dwarf5_djb_hash, debug_names)
246 (check_dwarf64_offsets): New.
247 (psyms_seen_size, write_gdbindex): New from
248 write_psymtabs_to_index code.
249 (dwarf5_gdb_augmentation, write_debug_names, assert_file_size)
250 (enum dw_index_kind): New.
251 (write_psymtabs_to_index): New parameter index_kind. Support
252 filename_str and out_file_str. Move code to write_gdbindex,
253 possibly call write_debug_names.
254 (save_gdb_index_command): New parameter -dwarf-5.
255 (_initialize_dwarf2_read): Document the new parameter -dwarf-5.
256
257 2017-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
258 Pedro Alves <palves@redhat.com>
259
260 * contrib/cc-with-tweaks.sh: Change interpreter to bash, incl. initial
261 comment.
262 (GDB_ADD_INDEX): New variable.
263 <$want_index>: Call $GDB_ADD_INDEX.
264
265 2017-12-08 Sergio Durigan Junior <sergiodj@redhat.com>
266
267 * dtrace-probe.c (dtrace_process_dof_probe): Do not declare a new
268 "expression_up" inside the TRY block.
269
270 2017-12-08 Yao Qi <yao.qi@linaro.org>
271
272 * breakpoint.c (update_watchpoint): Call
273 address_significant.
274
275 2017-12-08 Yao Qi <yao.qi@linaro.org>
276
277 * breakpoint.c (adjust_breakpoint_address): Call
278 address_significant.
279
280 2017-12-08 Yao Qi <yao.qi@linaro.org>
281
282 * aarch64-tdep.c (aarch64_gdbarch_init): Install gdbarch
283 significant_addr_bit.
284 * gdbarch.sh (significant_addr_bit): New.
285 * gdbarch.c, gdbarch.h: Re-generated.
286 * target.c (memory_xfer_partial): Call address_significant.
287 * utils.c (address_significant): New function.
288 * utils.h (address_significant): Declare.
289
290 2017-12-08 Tom Tromey <tom@tromey.com>
291
292 * printcmd.c (ui_printf): Update. Use std::vector.
293 * common/format.h (struct format_piece): Add constructor.
294 <string>: Now const.
295 (class format_pieces): New class.
296 (parse_format_string, free_format_pieces)
297 (free_format_pieces_cleanup): Remove.
298 * common/format.c (format_pieces::format_pieces): Rename from
299 parse_format_string. Update.
300 (free_format_pieces, free_format_pieces_cleanup): Remove.
301 * breakpoint.c (parse_cmd_to_aexpr): Update. Use std::vector.
302 * ax-gdb.h (gen_printf): Remove argument.
303 * ax-gdb.c (gen_printf): Remove "frags" argument.
304 (maint_agent_printf_command): Update. Use std::vector.
305
306 2017-12-08 Yao Qi <yao.qi@linaro.org>
307
308 PR breakpionts/22567
309 * linespec.c (minsym_found): Set sal.section.
310
311 2017-12-08 Andreas Arnez <arnez@linux.vnet.ibm.com>
312
313 * configure.tgt (s390*-*-linux*): Add symfile-mem.o.
314
315 2017-12-07 Keith Seitz <keiths@redhat.com>
316
317 PR breakpoints/22569
318 * location.c (string_to_explicit_location): When terminating
319 parsing early, break out of enclosing loop instead of returning.
320
321 2017-12-07 Keith Seitz <keiths@redhat.com>
322
323 * NEWS (New commands): Mention set/show print type nested-type-limit.
324 * c-typeprint.c (c_type_print_base): Print out nested types.
325 * dwarf2read.c (struct typedef_field_list): Rename to ...
326 (struct decl_field_list): ... this. Change all uses.
327 (struct field_info) <nested_types_list, nested_types_list_count>:
328 New fields.
329 (add_partial_symbol): Look for nested type definitions in C++, too.
330 (dwarf2_add_typedef): Rename to ...
331 (dwarf2_add_type_defn): ... this.
332 (type_can_define_types): New function.
333 Update assertion to use type_can_define_types.
334 Permit NULL for a field's name.
335 (process_structure_scope): Handle child DIEs of types that can
336 define types.
337 Copy the list of nested types into the type struct.
338 * gdbtypes.h (struct typedef_field): Rename to ...
339 (struct decl_field): ... this. Change all uses.
340 [is_protected, is_private]: New fields.
341 (struct cplus_struct_type) <nested_types, nested_types_count>: New
342 fields.
343 (TYPE_NESTED_TYPES_ARRAY, TYPE_NESTED_TYPES_FIELD)
344 (TYPE_NESTED_TYPES_FIELD_NAME, TYPE_NESTED_TYPES_FIELD_TYPE)
345 (TYPE_NESTED_TYPES_COUNT, TYPE_NESTED_TYPES_FIELD_PROTECTED)
346 (TYPE_NESTED_TYPES_FIELD_PRIVATE): New macros.
347 * typeprint.c (type_print_raw_options, default_ptype_flags): Add
348 default value for print_nested_type_limit.
349 (print_nested_type_limit): New static variable.
350 (set_print_type_nested_types, show_print_type_nested_types): New
351 functions.
352 (_initialize_typeprint): Register new commands for set/show
353 `print-nested-type-limit'.
354 * typeprint.h (struct type_print_options) [print_nested_type_limit]:
355 New field.
356
357 2017-12-07 Tom Tromey <tom@tromey.com>
358
359 PR breakpoints/22511:
360 * breakpoint.c (commands_command_1): Don't throw an exception when
361 no commands have been read.
362
363 2017-12-07 Adam Stylinski <adam.stylinski@etegent.com>
364
365 PR c++/21222
366 * target-descriptions.c (print_c_tdesc::visit_pre): Change type of
367 range-for variable.
368
369 2017-12-07 Simon Marchi <simon.marchi@ericsson.com>
370
371 * common/selftest.h (struct selftest): Add virtual destructor.
372
373 2017-12-07 Phil Muldoon <pmuldoon@redhat.com>
374
375 * python/py-breakpoint.c (bppy_init): Use string_to_event_location
376 over basic location code. Implement explicit location keywords.
377 (bppy_init_validate_args): New function.
378 * NEWS: Document Python explicit breakpoint locations.
379
380 2017-12-07 Joel Brobecker <brobecker@adacore.com>
381
382 * MAINTAINERS: Restore target entries for m68hc11-elf,
383 score-elf and xstormy16-elf, incorrectly removed in a previous
384 patch meant to only update the list of active maintainers.
385
386 2017-12-06 Pedro Alves <palves@redhat.com>
387
388 * break-catch-syscall.c (insert_catch_syscall)
389 (remove_catch_syscall): Adjust to pass reference to
390 inf_data->syscalls_counts directly via gdb::array_view.
391 * fbsd-nat.c (fbsd_set_syscall_catchpoint): Adjust to use bool
392 and gdb::array_view.
393 * linux-nat.c (linux_child_set_syscall_catchpoint): Likewise.
394 * remote.c (remote_set_syscall_catchpoint): Likewise.
395 * target-debug.h (target_debug_print_bool): New.
396 (define target_debug_print_gdb_array_view_const_int): New.
397 * target-delegates.c: Regenerate.
398 * target.h (target_ops) <to_set_syscall_catchpoint>: Use
399 gdb::array_view and bool.
400 (target_set_syscall_catchpoint): Likewise.
401
402 2017-12-06 Simon Marchi <simon.marchi@ericsson.com>
403
404 * break-catch-syscall.c (catch_syscall_completer): Get pointers
405 to syscall group strings after building the string vector.
406
407 2017-12-06 Pedro Alves <palves@redhat.com>
408
409 * remote.c (remote_query_supported): Don't send "xmlRegisters=" if
410 "qXfer:features:read"" is disabled.
411 (remote_write_qxfer, remote_read_qxfer, remote_search_memory):
412 Check packet_config_support instead of packet->support directly.
413
414 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
415
416 * target-descriptions.c (struct tdesc_feature) <registers>: Use
417 tdesc_reg_up typedef.
418 (struct target_desc) <features>: Use tdesc_feature_up typedef.
419
420 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
421
422 * target-descriptions.c (struct tdesc_type): Use default
423 destructor.
424 <u>: Remove.
425 <accept>: Remove.
426 (struct tdesc_type_builtin): New.
427 (struct tdesc_type_vector): New.
428 (struct tdesc_type_with_fields): New.
429 (tdesc_predefined_types): Change type to tdesc_type_builtin[].
430 (tdesc_gdb_type): Remove.
431 (tdesc_register_type): Adjust.
432 (tdesc_create_vector): Create tdesc_type_vector.
433 (tdesc_create_struct): Create tdesc_type_with_fields.
434 (tdesc_set_struct_size): Change parameter type.
435 (tdesc_create_union): Create tdesc_type_with_fields.
436 (tdesc_create_flags): Likewise.
437 (tdesc_create_enum): Likewise.
438 (tdesc_add_field): Change parameter type.
439 (tdesc_add_typed_bitfield): Likewise.
440 (tdesc_add_bitfield): Likewise.
441 (tdesc_add_flag): Likewise.
442 (tdesc_add_enum_value): Likewise.
443 (print_c_tdesc) <visit>: Remove overload with tdesc_type
444 parameter, add overloads for tdesc_type_builtin,
445 tdesc_type_with_fields and tdesc_type_vector.
446 <m_printed_type>: Remove.
447 <m_printed_element_type, m_printed_type_with_fields>: Add.
448 * target-descriptions.h (tdesc_create_enum): Change return type.
449 (tdesc_add_typed_bitfield): Change parameter type.
450 (tdesc_add_enum_value): Change parameter type.
451 * xml-tdesc.c (struct tdesc_parsing_data) <current_type>: Change
452 type to tdesc_type_with_fields.
453 (tdesc_start_struct): Adjust.
454 (tdesc_start_flags): Adjust.
455 (tdesc_start_enum): Adjust.
456 (tdesc_start_field): Adjust.
457 * arch/tdesc.h (struct tdesc_type_builtin): Forward-declare.
458 (struct tdesc_type_vector): Forward-declare.
459 (struct tdesc_type_with_fields): Forward-declare.
460 (tdesc_create_struct): Change return type.
461 (tdesc_create_union): Likewise.
462 (tdesc_create_flags): Likewise.
463 (tdesc_add_field): Change parameter type.
464 (tdesc_set_struct_size): Likewise.
465 (tdesc_add_bitfield): Likewise.
466 (tdesc_add_flag): Likewise.
467 * features: Re-generate C files.
468
469 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
470
471 * target-descriptions.c (tdesc_arch_reg): Remove typedef.
472 (struct tdesc_arch_reg): Add constructor.
473 (DEF_VEC_O (tdesc_arch_reg)): Remove.
474 (struct tdesc_arch_data): Initialize fields.
475 <arch_regs>: Change type to std::vector.
476 (target_find_description): Adjust.
477 (tdesc_find_type): Adjust.
478 (tdesc_data_init): Call tdesc_arch_data constructor.
479 (tdesc_data_alloc): Allocate tdesc_arch_data with new.
480 (tdesc_data_cleanup): Free data with delete.
481 (tdesc_numbered_register): Adjust.
482 (tdesc_find_arch_register): Adjust.
483 (tdesc_use_registers): Adjust.
484
485 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
486
487 * target-descriptions.c (tdesc_type_field): Remove typedef.
488 (DEF_VEC_O (tdesc_type_field)): Remove.
489 (struct tdesc_type_field): Add constructor.
490 <name>: Change type to std::string.
491 (struct tdesc_type) <tdesc_type>: Instantiate vector if the type
492 kind uses it.
493 <~tdesc_type>: Destroy vector if the type kind uses it.
494 <u::u::fields>: Change type to std::vector.
495 (tdesc_gdb_type): Adjust.
496 (tdesc_add_field): Adjust.
497 (tdesc_add_typed_bitfield): Adjust.
498 (tdesc_add_field): Adjust.
499 (tdesc_add_enum_value): Adjust.
500 (class print_c_tdesc) <visit>: Adjust.
501
502 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
503
504 * target-descriptions.c (struct tdesc_type) <name>: Change type
505 to std::string.
506 <~tdesc_type>: Don't manually free name.
507 <operator==>: Adjust.
508 (tdesc_named_type): Adjust.
509 (tdesc_find_type): Adjust.
510 (tdesc_gdb_type): Adjust.
511 (class print_c_tdesc) <visit>: Adjust.
512
513 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
514
515 * target-descriptions.c (tdesc_type_p): Remove typedef.
516 (DEF_VEC_P (tdesc_type_p)): Remove.
517 (struct tdesc_feature) <types>: Change type to std::vector.
518 <~tdesc_feature>: Replace with default implementation.
519 <accept>: Adjust.
520 (tdesc_named_type): Adjust.
521 (tdesc_create_vector): Adjust.
522 (tdesc_create_struct): Adjust.
523 (tdesc_create_union): Adjust.
524 (tdesc_create_flags): Adjust.
525 (tdesc_create_enum): Adjust.
526
527 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
528
529 * target-descriptions.c (struct tdesc_reg) <tdesc_reg>: Change
530 type of name_ parameter, adjust to std::string change.
531 <name, group, type>: Change type to std::string.
532 <~tdesc_reg>: Replace with default implementation.
533 <operator==>: Adjust.
534 (tdesc_find_register_early): Adjust.
535 (tdesc_register_name): Adjust.
536 (tdesc_register_type): Adjust.
537 (tdesc_register_in_reggroup_p): Adjust.
538 (class print_c_tdesc) <visit>: Adjust.
539 (class print_c_feature) <visit>: Adjust.
540 * features/arc-arcompact.c: Re-generate.
541 * features/arc-v2.c: Re-generate.
542
543 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
544
545 * target-descriptions.c (tdesc_reg_p): Remove typedef.
546 (DEF_VEC_P (tdesc_reg_p)): Remove.
547 (struct tdesc_feature) <registers>: Change type to std::vector.
548 <~tdesc_feature>: Don't manually free registers.
549 <accept>: Adjust.
550 <operator==>: Adjust.
551 (tdesc_has_registers): Adjust.
552 (tdesc_find_register_early): Adjust.
553 (tdesc_use_registers): Adjust.
554 (tdesc_create_reg): Adjust.
555
556 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
557
558 * target-descriptions.c (tdesc_feature) <name>: Change type to
559 std::string.
560 <~tdesc_feature>: Don't manually free name.
561 <operator==>: Adjust.
562 (tdesc_find_feature): Adjust.
563 (tdesc_feature_name): Adjust.
564 (class print_c_tdesc) <visit_pre>: Adjust.
565 (class print_c_feature) <visit_pre>: Adjust.
566
567 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
568
569 * target-descriptions.c (tdesc_feature_p): Remove typedef.
570 (DEF_VEC_P (tdesc_feature_p)): Remove.
571 (struct target_desc) <features>: Change type to std::vector.
572 <~target_desc>: Replace with default implementation.
573 <accept>: Adjust.
574 <operator==>: Adjust.
575 (tdesc_has_registers): Adjust.
576 (tdesc_find_feature): Adjust.
577 (tdesc_use_registers): Adjust.
578 (tdesc_create_feature): Adjust.
579
580 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
581
582 * target-descriptions.c (arch_p): Remove typedef.
583 (DEF_VEC_P (arch_p)): Remove.
584 (struct target_desc) <compatible>: Change type to std::vector.
585 <~target_desc>: Don't manually free compatible.
586 (tdesc_compatible_p): Adjust.
587 (tdesc_add_compatible): Adjust.
588 (class print_c_tdesc) <visit_pre>: Adjust.
589
590 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
591
592 * target-descriptions.c (property_s): Remove typedef.
593 (DEF_VEC_O (property_s)): Remove.
594 (struct target_desc) <properties>: Make an std::vector.
595 <~target_desc>: Don't manually free properties.
596 (tdesc_property): Adjust.
597 (set_tdesc_property): Adjust.
598 (class print_c_tdesc) <visit_pre>: Adjust.
599
600 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
601
602 * common/gdb_assert.h (gdb_static_assert): Redefine using
603 static_assert.
604
605 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
606
607 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
608 unused variables.
609 (ada_is_redundant_range_encoding): Likewise.
610 * ada-varobj.c (ada_varobj_get_value_of_array_variable):
611 Likewise.
612 * alpha-tdep.c (alpha_software_single_step): Likewise.
613 * arm-tdep.c (_initialize_arm_tdep): Likewise.
614 * auto-load.c (info_auto_load_cmd): Likewise.
615 * break-catch-syscall.c (insert_catch_syscall): Likewise.
616 (remove_catch_syscall): Likewise.
617 * breakpoint.c (condition_completer): Likewise.
618 (clear_command): Likewise.
619 (update_breakpoint_locations): Likewise.
620 * btrace.c (btrace_disable): Likewise.
621 (btrace_teardown): Likewise.
622 (btrace_maint_update_pt_packets): Likewise.
623 (maint_btrace_clear_cmd): Likewise.
624 * cli/cli-decode.c (lookup_cmd_1): Likewise.
625 (lookup_cmd_composition): Likewise.
626 * cli/cli-dump.c (scan_filename): Likewise.
627 (restore_command): Likewise.
628 * compile/compile-loc2c.c (compute_stack_depth): Likewise.
629 * compile/compile-object-load.c (compile_object_load): Likewise.
630 * compile/compile-object-run.c (compile_object_run): Likewise.
631 * compile/compile.c (compile_to_object): Likewise.
632 * completer.c (filename_completer): Likewise.
633 (complete_files_symbols): Likewise.
634 (complete_expression): Likewise.
635 * corelow.c (core_open): Likewise.
636 * ctf.c (ctf_start): Likewise.
637 (ctf_write_status): Likewise.
638 (ctf_write_uploaded_tsv): Likewise.
639 (ctf_write_definition_end): Likewise.
640 (ctf_open_dir): Likewise.
641 (ctf_xfer_partial): Likewise.
642 (ctf_trace_find): Likewise.
643 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
644 Likewise.
645 * dwarf2loc.c (allocate_piece_closure): Likewise.
646 (indirect_pieced_value): Likewise.
647 (dwarf2_evaluate_loc_desc_full): Likewise.
648 * dwarf2read.c (dw2_expand_marked_cus): Likewise.
649 (dw2_expand_symtabs_matching): Likewise.
650 (dw2_map_symbol_filenames): Likewise.
651 (read_and_check_comp_unit_head): Likewise.
652 (read_cutu_die_from_dwo): Likewise.
653 (lookup_dwo_unit): Likewise.
654 (read_comp_units_from_section): Likewise.
655 (dwarf2_compute_name): Likewise.
656 (handle_DW_AT_stmt_list): Likewise.
657 (create_cus_hash_table): Likewise.
658 (create_dwp_v2_section): Likewise.
659 (dwarf2_rnglists_process): Likewise.
660 (dwarf2_ranges_process): Likewise.
661 (dwarf2_record_block_ranges): Likewise.
662 (is_vtable_name): Likewise.
663 (read_formatted_entries): Likewise.
664 (skip_form_bytes): Likewise.
665 * elfread.c (elf_symtab_read): Likewise.
666 * exec.c (exec_file_command): Likewise.
667 * f-valprint.c (f_val_print): Likewise.
668 (info_common_command_for_block): Likewise.
669 * guile/guile.c (initialize_scheme_side): Likewise.
670 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Likewise.
671 * guile/scm-cmd.c (cmdscm_completer): Likewise.
672 (gdbscm_register_command_x): Likewise.
673 * guile/scm-frame.c (gdbscm_frame_read_var): Likewise.
674 * guile/scm-param.c (gdbscm_parameter_value): Likewise.
675 * guile/scm-ports.c (file_port_magic): Likewise.
676 * guile/scm-pretty-print.c (ppscm_search_pp_list): Likewise.
677 (ppscm_pretty_print_one_value): Likewise.
678 (ppscm_print_children): Likewise.
679 * guile/scm-string.c (gdbscm_string_to_argv): Likewise.
680 * guile/scm-symtab.c (gdbscm_sal_symtab): Likewise.
681 * guile/scm-type.c (gdbscm_type_next_field_x): Likewise.
682 * guile/scm-utils.c (gdbscm_parse_function_args): Likewise.
683 * i386-tdep.c (i386_register_reggroup_p): Likewise.
684 * infcmd.c (run_command_1): Likewise.
685 (until_next_fsm_clean_up): Likewise.
686 * linespec.c (linespec_complete): Likewise.
687 (find_label_symbols): Likewise.
688 * m2-valprint.c (m2_val_print): Likewise.
689 * memattr.c (require_user_regions): Likewise.
690 (lookup_mem_region): Likewise.
691 (disable_mem_command): Likewise.
692 (mem_delete): Likewise.
693 * mep-tdep.c (mep_register_name): Likewise.
694 (mep_analyze_prologue): Likewise.
695 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Likewise.
696 * mi/mi-interp.c (mi_on_sync_execution_done): Likewise.
697 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
698 * microblaze-linux-tdep.c (microblaze_linux_init_abi): Likewise.
699 * minidebug.c (lzma_open): Likewise.
700 * minsyms.c (lookup_minimal_symbol): Likewise.
701 * mips-linux-tdep.c (mips64_fill_fpregset): Likewise.
702 * mips-tdep.c (mips_stub_frame_sniffer): Likewise.
703 (mips_o64_return_value): Likewise.
704 (mips_single_step_through_delay): Likewise.
705 (_initialize_mips_tdep): Likewise.
706 * nios2-tdep.c (nios2_push_dummy_call): Likewise.
707 (nios2_software_single_step): Likewise.
708 * parse.c (find_minsym_type_and_address): Likewise.
709 * psymtab.c (psym_relocate): Likewise.
710 * python/py-breakpoint.c (bppy_get_commands): Likewise.
711 (gdbpy_breakpoint_modified): Likewise.
712 * python/py-infevents.c (create_inferior_call_event_object):
713 Likewise.
714 * python/py-record-btrace.c (btpy_list_item): Likewise.
715 * python/py-type.c (typy_str): Likewise.
716 * python/py-value.c (valpy_call): Likewise.
717 * python/python.c (do_start_initialization): Likewise.
718 * record-btrace.c (record_btrace_insn_history_range): Likewise.
719 (record_btrace_call_history_range): Likewise.
720 (record_btrace_record_method): Likewise.
721 (record_btrace_xfer_partial): Likewise.
722 (btrace_get_frame_function): Likewise.
723 * record-full.c (record_full_open): Likewise.
724 * record.c (get_context_size): Likewise.
725 * registry.h (DEFINE_REGISTRY): Likewise.
726 * remote-fileio.c (remote_fileio_request): Likewise.
727 * remote.c (remote_update_thread_list): Likewise.
728 (remote_check_symbols): Likewise.
729 (remote_commit_resume): Likewise.
730 (remote_interrupt): Likewise.
731 (remote_insert_breakpoint): Likewise.
732 (compare_sections_command): Likewise.
733 * rust-exp.y (super_name): Likewise.
734 (lex_string): Likewise.
735 (convert_ast_to_type): Likewise.
736 (convert_ast_to_expression): Likewise.
737 * rust-lang.c (rust_print_struct_def): Likewise.
738 (rust_print_type): Likewise.
739 (rust_evaluate_subexp): Likewise.
740 * rx-tdep.c (rx_register_type): Likewise.
741 * ser-event.c (serial_event_clear): Likewise.
742 * serial.c (serial_open): Likewise.
743 * spu-tdep.c (spu_overlay_new_objfile): Likewise.
744 * symfile.c (section_is_overlay): Likewise.
745 (overlay_unmapped_address): Likewise.
746 (overlay_mapped_address): Likewise.
747 (simple_overlay_update_1): Likewise.
748 (simple_overlay_update): Likewise.
749 * symtab.c (symbol_find_demangled_name): Likewise.
750 (search_symbols): Likewise.
751 * target-descriptions.c (tdesc_predefined_type): Likewise.
752 * target.c (target_commit_resume): Likewise.
753 * thread.c (print_selected_thread_frame): Likewise.
754 * top.c (new_ui_command): Likewise.
755 (gdb_readline_no_editing): Likewise.
756 * tracefile-tfile.c (tfile_open): Likewise.
757 * tracepoint.c (create_tsv_from_upload): Likewise.
758 * utils.c (quit): Likewise.
759 (defaulted_query): Likewise.
760 * valarith.c (value_concat): Likewise.
761 * xml-syscall.c (xml_list_syscalls_by_group): Likewise.
762 * xml-tdesc.c (target_fetch_description_xml): Likewise.
763 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
764 (xtensa_pseudo_register_write): Likewise.
765
766 2017-12-04 Tom Tromey <tom@tromey.com>
767
768 * NEWS: Mention Rust trait object inspection.
769
770 2017-12-04 Pedro Alves <palves@redhat.com>
771
772 PR gdb/22499
773 * amd64-tdep.c (amd64_insn::rex_offset): Rename to...
774 (amd64_insn::enc_prefix_offset): ... this, and tweak comment.
775 (vex2_prefix_p, vex3_prefix_p): New functions.
776 (amd64_get_insn_details): Adjust to rename. Also skip VEX2 and
777 VEX3 prefixes.
778 (fixup_riprel): Set VEX3.!B.
779
780 2017-12-03 Simon Marchi <simon.marchi@ericsson.com>
781
782 * target.h (mem_region_vector): Remove.
783 (struct target_ops) <to_memory_map>: Change return type to
784 std::vector<mem_region>.
785 * target-debug.h (target_debug_print_mem_region_vector): Rename
786 to ...
787 (target_debug_print_std_vector_mem_region): ... this.
788 * target-delegates.c: Re-generate.
789
790 2017-12-03 Pedro Alves <palves@redhat.com>
791
792 * make-target-delegates (munge_type): Also munge '<', '>', and
793 ':'. Avoid double underscores in identifiers, and trailing
794 underscores.
795 * target-debug.h
796 (target_debug_print_VEC_static_tracepoint_marker_p__p): Rename to
797 ...
798 (target_debug_print_VEC_static_tracepoint_marker_p_p): ... this.
799 * target-delegates.c: Regenerate.
800
801 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
802
803 * common/poison.h (XDELETE): Fix typo.
804
805 2017-12-01 Andrew Cagney <cagney@redhat.com>
806 Joel Brobecker <brobecker@adacore.com>
807 Sergio Durigan Junior <sergiodj@redhat.com>
808
809 * NEWS (Changes since GDB 8.0: Mention new '--readnever'
810 feature.
811 * coffread.c (coff_symfile_read): Do not map over sections with
812 'coff_locate_sections' if readnever is on.
813 * dwarf2read.c (dwarf2_has_info): Return 0 if
814 readnever is on.
815 * elfread.c (elf_symfile_read): Do not map over sections with
816 'elf_locate_sections' if readnever is on.
817 * main.c (validate_readnow_readnever): New function.
818 (captured_main_1): Add support for --readnever.
819 (print_gdb_help): Document --readnever.
820 * objfile-flags.h (enum objfile_flag) <OBJF_READNEVER>: New
821 flag.
822 * symfile.c (readnever_symbol_files): New global.
823 (symbol_file_add_with_addrs): Set 'OBJF_READNEVER' when
824 'READNEVER_SYMBOL_FILES' is set.
825 (validate_readnow_readnever): New function.
826 (symbol_file_command): Handle '-readnever' option.
827 Call 'validate_readnow_readnever'.
828 (add_symbol_file_command): Handle '-readnever' option.
829 Call 'validate_readnow_readnever'.
830 (_initialize_symfile): Document new '-readnever' option for
831 both 'symbol-file' and 'add-symbol-file' commands.
832 * top.h (readnever_symbol_files): New extern global.
833 * xcoffread.c (xcoff_initial_scan): Do not read debug
834 information if readnever is on.
835
836 2017-12-01 Sergio Durigan Junior <sergiodj@redhat.com>
837
838 * symfile.c (symbol_file_command): Call
839 'symbol_file_add_main_1' only after processing all command
840 line options.
841 (add_symbol_file_command): Modify logic to make arguments
842 position-independent.
843
844 2017-12-01 Joel Brobecker <brobecker@adacore.com>
845
846 * ada-lang.c (symbol_list_obstack): Delete.
847 (resolve_subexp): Make sure "candidates" gets xfree'ed.
848 (ada_lookup_symbol_list_worker): Remove the limitation that
849 the result is only good until the next call, now making it
850 the responsibility of the caller to free the result when no
851 longer needed. Adjust the function's intro comment accordingly.
852 (ada_lookup_symbol_list): Adjust the function's intro comment.
853 (ada_iterate_over_symbols): Make sure "results" gets xfree'ed.
854 (ada_lookup_encoded_symbol, get_var_value): Likewise.
855 (_initialize_ada_language): Remove symbol_list_obstack
856 initialization.
857 * ada-exp.y (block_lookup): Make sure "syms" gets xfree'ed.
858 (write_var_or_type, write_name_assoc): Likewise.
859
860 2017-12-01 Tom Tromey <tom@tromey.com>
861
862 * Makefile.in (all_deps_files): New variable.
863 Include .Po files using all_deps_files.
864
865 2017-12-01 Joel Brobecker <brobecker@adacore.com>
866
867 * MAINTAINERS: Update list of maintainers, moving those who
868 stepped down or became inactive to the "Past Maintainers"
869 section.
870
871 2017-11-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
872
873 * configure.ac Don't check for sys/fault.h, sys/syscall.h,
874 sys/proc.h.
875 (NEW_PROC_API): Remove.
876 (prsysent_t, pr_sigset_t, pr_sigaction64_t, pr_siginfo64_t):
877 Likewise.
878 * common/common.m4 (GDB_AC_COMMON): Don't check for sys/syscall.h.
879 * configure: Regenerate.
880 * config.in: Regenerate.
881 * gdbserver/configure: Regenerate.
882 * gdbserver/config.in: Regenerate.
883
884 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Remove
885 NEW_PROC_API test.
886 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Likewise.
887
888 * linux-btrace.c: Remove HAVE_SYS_SYSCALL_H test.
889
890 * proc-api.c: Remove !NEW_PROC_API support.
891 Remove HAVE_SYS_PROC_H and HAVE_SYS_USER_H tests.
892 Remove tests for macros always defined on Solaris.
893 * proc-events.c: Remove !NEW_PROC_API support.
894 Remove Remove HAVE_SYS_SYSCALL_H, HAVE_SYS_PROC_H and
895 HAVE_SYS_USER_H tests.
896 (init_syscall_table): Remove non-Solaris syscalls.
897 Remove tests for syscalls present on all Solaris versions.
898 Add missing Solaris 10+ syscalls.
899 (signal_table): Remove non-Solaris signals.
900 Remove tests for signals present on all Solaris versions.
901 (fault_table): Remove non-Solaris faults.
902 Remove tests for faults present on all Solaris versions.
903 * proc-flags.c: Remove !NEW_PROC_API support.
904 (pr_flag_table): Remove non-Solaris and pre-Solaris 7 comments.
905 Remove non-Solaris flags.
906 * proc-why.c: Remove !NEW_PROC_API support.
907 (pr_why_table): Remove meaningless comments.
908 Remove tests for reasons present on all Solaris versions.
909 Remove OSF/1 cases.
910 (proc_prettyfprint_why): Likewise.
911
912 * procfs.c: Remove !NEW_PROC_API and DYNAMIC_SYSCALLS support.
913 Remove HAVE_SYS_FAULT_H and HAVE_SYS_SYSCALL_H tests.
914 Remove WA_READ test, IRIX watchpoint support.
915 (gdb_sigset_t, gdb_sigaction_t, gdb_siginfo_t): Replace by base
916 types. Change users.
917 (gdb_praddset, gdb_prdelset, gdb_premptysysset, gdb_praddsysset)
918 (gdb_prdelset, gdb_pr_issyssetmember): Replace by base macros.
919 Change callers.
920 Remove CTL_PROC_NAME_FMT tests.
921 (gdb_prstatus_t, gdb_lwpstatus_t): Replace by base types. Change
922 users.
923 (sysset_t_size): Remove. Use sizeof (sysset_t) in callers.
924 Remove PROCFS_DONT_PIOCSSIG_CURSIG support.
925 (proc_modify_flag): Replace GDBRESET by PCUNSET.
926 Remove PR_ASYNC, PR_KLC tests.
927 (proc_unset_inherit_on_fork): Remove PR_ASYNC test.
928 (proc_parent_pid): Remove PCWATCH etc. tests.
929 (proc_set_watchpoint): Remove !PCWATCH && !PIOCSWATCH support.
930 Remove PCAGENT test.
931 (proc_get_nthreads) [PIOCNTHR && PIOCTLIST]: Remove.
932 Remove SYS_lwpcreate || SYS_lwp_create test.
933 (proc_get_current_thread): Likewise.
934 [PIOCNTHR && PIOCTLIST]: Remove.
935 [PIOCLSTATUS]: Remove.
936 (procfs_debug_inferior): Remove non-Solaris cases, conditionals.
937 [PRFS_STOPEXEC]: Remove.
938 (syscall_is_lwp_exit): Remove non-Solaris cases, conditionals.
939 (syscall_is_exit): Likewise.
940 (syscall_is_exec): Likewise.
941 (syscall_is_lwp_create): Likewise.
942 Remove SYS_syssgi support.
943 (procfs_wait): Remove PR_ASYNC, !PIOCSSPCACT tests.
944 [SYS_syssgi]: Remove.
945 Remove non-Solaris cases, conditionals.
946 (unconditionally_kill_inferior) [PROCFS_NEED_PIOCSSIG_FOR_KILL]:
947 Remove.
948 (procfs_init_inferior) [SYS_syssgi]: Remove.
949 (procfs_set_exec_trap) [PRFS_STOPEXEC]: Remove.
950 (procfs_inferior_created) [SYS_syssgi]: Remove.
951 (procfs_set_watchpoint): Remove !AIX5 test.
952 (procfs_stopped_by_watchpoint): Remove FLTWATCH test, FLTKWATCH
953 case.
954 (mappingflags) [MA_PHYS]: Remove.
955 (info_mappings_callback): Remove PCAGENT test.
956 Remove PIOCOPENLWP || PCAGENT test.
957
958 2017-11-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
959
960 * sol-thread.c (info_solthreads): Constify args.
961 Cast args to void *.
962
963 2017-11-29 John Baldwin <jhb@FreeBSD.org>
964
965 * target-float.c [HAVE_LIBMPFR]: Define MPFR_USE_INTMAX_T.
966
967 2017-11-29 Joel Brobecker <brobecker@adacore.com>
968
969 * ada-lang.c (to_fixed_range_type): Make sure that the size
970 of the range type being returned is the same as the size
971 of the range type being fixed.
972
973 2017-11-29 Pedro Alves <palves@redhat.com>
974
975 PR c++/19436
976 * NEWS: Mention setting breakpoints on functions with C++ ABI
977 tags.
978 * completer.h (completion_match_for_lcd) <match,
979 mark_ignored_range>: New methods.
980 <finish>: Consider ignored ranges.
981 <clear>: Clear ignored ranges.
982 <m_ignored_ranges, m_finished_storage>: New fields.
983 * cp-support.c (cp_search_name_hash): Ignore ABI tags.
984 (cp_symbol_name_matches_1, cp_fq_symbol_name_matches): Pass the
985 completion_match_for_lcd pointer to strncmp_iw_with_mode.
986 (test_cp_symbol_name_cmp): Add [abi:...] tags unit tests.
987 * language.c (default_symbol_name_matcher): Pass the
988 completion_match_for_lcd pointer to strncmp_iw_with_mode.
989 * linespec.c (linespec_lexer_lex_string): Don't tokenize ABI tags.
990 * utils.c (skip_abi_tag): New function.
991 (strncmp_iw_with_mode): Add completion_match_for_lcd parameter.
992 Handle ABI tags.
993 * utils.h (strncmp_iw_with_mode): Add completion_match_for_lcd
994 parameter.
995
996 2017-11-29 Pedro Alves <palves@redhat.com>
997
998 PR c++/19436
999 * NEWS: Mention setting breakpoints on functions with C++ ABI
1000 tags.
1001 * completer.h (completion_match_for_lcd) <match,
1002 mark_ignored_range>: New methods.
1003 <finish>: Consider ignored ranges.
1004 <clear>: Clear ignored ranges.
1005 <m_ignored_ranges, m_finished_storage>: New fields.
1006 * cp-support.c (cp_search_name_hash): Ignore ABI tags.
1007 (cp_symbol_name_matches_1, cp_fq_symbol_name_matches): Pass the
1008 completion_match_for_lcd pointer to strncmp_iw_with_mode.
1009 (test_cp_symbol_name_cmp): Add [abi:...] tags unit tests.
1010 * language.c (default_symbol_name_matcher): Pass the
1011 completion_match_for_lcd pointer to strncmp_iw_with_mode.
1012 * linespec.c (linespec_lexer_lex_string): Don't tokenize ABI tags.
1013 * utils.c (skip_abi_tag): New function.
1014 (strncmp_iw_with_mode): Add completion_match_for_lcd parameter.
1015 Handle ABI tags.
1016 * utils.h (strncmp_iw_with_mode): Add completion_match_for_lcd
1017 parameter.
1018
1019 2017-11-29 Pedro Alves <palves@redhat.com>
1020
1021 * NEWS: Mention that breakpoints on C++ functions are now set on
1022 on all namespaces/classes by default, and mention "break
1023 -qualified".
1024 * ax-gdb.c (agent_command_1): Adjust to pass a
1025 symbol_name_match_type to new_linespec_location.
1026 * breakpoint.c (parse_breakpoint_sals): Adjust to
1027 get_linespec_location's return type change.
1028 (strace_marker_create_sals_from_location): Adjust to pass a
1029 symbol_name_match_type to new_linespec_location.
1030 (strace_marker_decode_location): Adjust to get_linespec_location's
1031 return type change.
1032 (strace_command): Adjust to pass a symbol_name_match_type to
1033 new_linespec_location.
1034 (LOCATION_HELP_STRING): Add paragraph about wildmatching, and
1035 mention "-qualified".
1036 * c-lang.c (cplus_language_defn): Install cp_search_name_hash.
1037 * completer.c (explicit_location_match_type::MATCH_QUALIFIED): New
1038 enumerator.
1039 (complete_address_and_linespec_locations): New parameter
1040 'match_type'. Pass it down.
1041 (explicit_options): Add "-qualified".
1042 (collect_explicit_location_matches): Pass the requested match type
1043 to the linespec completers. Handle MATCH_QUALIFIED.
1044 (location_completer): Handle "-qualified" combined with linespecs.
1045 * cp-support.c (cp_search_name_hash): New.
1046 (cp_symbol_name_matches_1): Implement wild matching for C++.
1047 (cp_fq_symbol_name_matches): Reimplement.
1048 (cp_get_symbol_name_matcher): Return different matchers depending
1049 on the lookup name's match type.
1050 (selftests::test_cp_symbol_name_matches): Add wild matching tests.
1051 * cp-support.h (cp_search_name_hash): New declaration.
1052 * dwarf2read.c
1053 (selftests::dw2_expand_symtabs_matching::test_symbols): Add
1054 symbols.
1055 (test_dw2_expand_symtabs_matching_symbol): Add wild matching
1056 tests.
1057 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Adjust to
1058 pass a symbol_name_match_type to new_linespec_location.
1059 * linespec.c (linespec_parse_basic): Lookup function symbols using
1060 the parser's symbol name match type.
1061 (convert_explicit_location_to_linespec): New
1062 symbol_name_match_type parameter. Pass it down to
1063 find_linespec_symbols.
1064 (convert_explicit_location_to_sals): Pass the location's name
1065 match type to convert_explicit_location_to_linespec.
1066 (parse_linespec): New match_type parameter. Save it in the
1067 parser.
1068 (linespec_parser_new): Default to symbol_name_match_type::WILD.
1069 (linespec_complete_function): New symbol_name_match_type
1070 parameter. Use it.
1071 (complete_linespec_component): Pass down the parser's recorded
1072 name match type.
1073 (linespec_complete_label): New symbol_name_match_type parameter.
1074 Use it.
1075 (linespec_complete): New symbol_name_match_type parameter. Save
1076 it in the parser and pass it down. Adjust to
1077 get_linespec_location's prototype change.
1078 (find_function_symbols, find_linespec_symbols): New
1079 symbol_name_match_type parameter. Pass it down instead of
1080 assuming symbol_name_match_type::WILD.
1081 * linespec.h (linespec_complete, linespec_complete_function)
1082 (linespec_complete_label): New symbol_name_match_type parameter.
1083 * location.c (event_location::linespec_location): Now a struct
1084 linespec_location.
1085 (EL_LINESPEC): Adjust.
1086 (initialize_explicit_location): Default to
1087 symbol_name_match_type::WILD.
1088 (new_linespec_location): New symbol_name_match_type parameter.
1089 Record it in the location.
1090 (get_linespec_location): Now returns a struct linespec_location.
1091 (new_explicit_location): Also copy func_name_match_type.
1092 (explicit_to_string_internal)
1093 (string_to_explicit_location): Handle "-qualified".
1094 (copy_event_location): Adjust to LINESPEC_LOCATION type change.
1095 Copy symbol_name_match_type fields.
1096 (event_location_deleter::operator()): Adjust to LINESPEC_LOCATION
1097 type change.
1098 (event_location_to_string): Adjust to LINESPEC_LOCATION type
1099 change. Handle "-qualfied".
1100 (string_to_explicit_location): Handle "-qualified".
1101 (string_to_event_location_basic): New symbol_name_match_type
1102 parameter. Pass it down.
1103 (string_to_event_location): Handle "-qualified".
1104 * location.h (struct linespec_location): New.
1105 (explicit_location::func_name_match_type): New field.
1106 (new_linespec_location): Now returns a const linespec_location *.
1107 (string_to_event_location_basic): New symbol_name_match_type
1108 parameter.
1109 (explicit_completion_info::saw_explicit_location_option): New
1110 field.
1111 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Adjust to pass a
1112 symbol_name_match_type to new_linespec_location.
1113 * python/py-breakpoint.c (bppy_init): Likewise.
1114 * python/python.c (gdbpy_decode_line): Likewise.
1115
1116 2017-11-29 Pedro Alves <palves@redhat.com>
1117
1118 * ada-lang.c (ada_lookup_name_info::matches): Change type of
1119 parameter from completion_match to completion_match_result.
1120 Adjust.
1121 (do_wild_match, do_full_match, ada_symbol_name_matches): Likewise.
1122 * completer.c (completion_tracker::maybe_add_completion): Add
1123 match_for_lcd parameter and use it.
1124 (completion_tracker::add_completion): Likewise.
1125 * completer.h (class completion_match_for_lcd): New class.
1126 (completion_match_result::match_for_lcd): New field.
1127 (completion_match_result::set_match): New method.
1128 (completion_tracker): Add comments.
1129 (completion_tracker::add_completion): Add match_for_lcd parameter.
1130 (completion_tracker::reset_completion_match_result): Reset
1131 match_for_lcd too.
1132 (completion_tracker::maybe_add_completion): Add match_for_lcd
1133 parameter.
1134 (completion_tracker::m_lowest_common_denominator_unique): Extend
1135 comments.
1136 * cp-support.c (cp_symbol_name_matches_1)
1137 (cp_fq_symbol_name_matches): Change type of parameter from
1138 completion_match to completion_match_result. Adjust.
1139 * language.c (default_symbol_name_matcher): Change type of
1140 parameter from completion_match to completion_match_result.
1141 Adjust.
1142 * language.h (completion_match_for_lcd): Forward declare.
1143 (default_symbol_name_matcher): Change type of parameter from
1144 completion_match to completion_match_result.
1145 * symtab.c (compare_symbol_name): Adjust.
1146 (completion_list_add_name): Pass the match_for_lcd to the tracker.
1147 * symtab.h (ada_lookup_name_info::matches): Change type of
1148 parameter from completion_match to completion_match_result.
1149 (symbol_name_matcher_ftype): Likewise, and update comments.
1150
1151 2017-11-29 Pedro Alves <palves@redhat.com>
1152
1153 * linespec.c (minsym_found, add_minsym): Use msymbol_is_function.
1154 * minsyms.c (msymbol_is_text): Delete.
1155 (msymbol_is_function): New function.
1156 * minsyms.h (msymbol_is_text): Delete.
1157 (msymbol_is_function): New declaration.
1158 * symtab.c (find_function_alias_target): Use msymbol_is_function.
1159
1160 2017-11-29 Tom Tromey <tom@tromey.com>
1161
1162 * Makefile.in (distclean): Handle the case where rmdir fails.
1163
1164 2017-11-29 Tom Tromey <tom@tromey.com>
1165
1166 * symfile.c (_initialize_symfile): Update usage text for
1167 add-symbol-file, symbol-file, load.
1168
1169 2017-11-29 Tom Tromey <tom@tromey.com>
1170
1171 * symfile.c (add_symbol_file_command): Error if some arguments to
1172 -s are missing. Change unrecognized-argument error message.
1173 (_initialize_symfile): Fix usage text for add-symbol-file.
1174
1175 2017-11-27 Tom Tromey <tom@tromey.com>
1176
1177 * Makefile.in (REMOTE_OBS): Remove.
1178 (SFILES): Remove remote sources.
1179 (COMMON_SFILES): Add remote sources.
1180 (ALLDEPFILES): Remove dcache.c.
1181
1182 2017-11-27 Tom Tromey <tom@tromey.com>
1183
1184 * Makefile.in (SUBDIR_TARGET_SRCS, SUBDIR_TARGET_OBS): New
1185 variables.
1186 (SFILES): Use SUBDIR_TARGET_SRCS.
1187 (COMMON_OBS): Use SUBDIR_TARGET_OBS. Remove waitstatus.o.
1188 (CONFIG_SRC_SUBDIR): Add target.
1189 (%.o): Remove target rule.
1190
1191 2017-11-27 Tom Tromey <tom@tromey.com>
1192
1193 * Makefile.in (COMMON_OBS): Remove filename-seen-cache.o,
1194 registry.o, thread-fsm.o, debug.o.
1195 (COMMON_SFILES): Add filename-seen-cache.c, registry.c,
1196 thread-fsm.c, debug.c.
1197
1198 2017-11-27 Tom Tromey <tom@tromey.com>
1199
1200 * Makefile.in (COMMON_SFILES): New.
1201 (SFILES): Move some entries to COMMON_SFILES.
1202 (COMMON_OBS): Use COMMON_SFILES.
1203
1204 2017-11-27 Tom Tromey <tom@tromey.com>
1205
1206 * Makefile.in (YYFILES): Update comment.
1207 (YYOBJ): Redefine.
1208
1209 2017-11-27 Tom Tromey <tom@tromey.com>
1210
1211 * Makefile.in (SUBDIR_PYTHON_OBS): Redefine.
1212 (CONFIG_SRC_SUBDIR): Add python.
1213 (%.o): Remove python rule.
1214 (python/%.o): New rule.
1215 * configure: Rebuild.
1216 * configure.ac (CONFIG_OBS): Refer to python/python.o
1217
1218 2017-11-27 Tom Tromey <tom@tromey.com>
1219
1220 * configure: Rebuild.
1221 * configure.ac (CONFIG_OBS): Refer to guile/guile.o.
1222 * Makefile.in (SUBDIR_GUILE_OBS): Redefine.
1223 (CONFIG_SRC_SUBDIR): Add guile.
1224 (%.o): Remove guile rule.
1225
1226 2017-11-27 Tom Tromey <tom@tromey.com>
1227
1228 * Makefile.in (SUBDIR_UNITTESTS_OBS): Redefine.
1229 (%.o): Remove unittests rule.
1230 (CONFIG_SRC_SUBDIR): Add unittests.
1231
1232 2017-11-27 Tom Tromey <tom@tromey.com>
1233
1234 * Makefile.in (SUBDIR_TUI_OBS): Redefine.
1235 (CONFIG_SRC_SUBDIR): Add tui.
1236 (%.o): Remove tui rule.
1237
1238 2017-11-27 Tom Tromey <tom@tromey.com>
1239
1240 * Makefile.in (SUBDIR_GCC_COMPILE_OBS): Redefine.
1241 (%.o): Remove compile rule.
1242 (CONFIG_SRC_SUBDIR): Add compile.
1243
1244 2017-11-27 Tom Tromey <tom@tromey.com>
1245
1246 * Makefile.in (SUBDIR_MI_OBS): Redefine.
1247 (%.o): Remove mi rule.
1248 (CONFIG_SRC_SUBDIR): Add mi.
1249 (COMMON_OBS): Use mi/mi-common.o
1250
1251 2017-11-27 Tom Tromey <tom@tromey.com>
1252
1253 * Makefile.in (SUBDIR_CLI_OBS): Redefine.
1254 (%.o): Remove cli rule.
1255 (CONFIG_SRC_SUBDIR): Add cli.
1256
1257 2017-11-27 Tom Tromey <tom@tromey.com>
1258
1259 * configure.ac (CONFIG_SRC_SUBDIR): Don't subst.
1260 * configure: Rebuild.
1261 * Makefile.in (CONFIG_SRC_SUBDIR): Redefine.
1262 (CONFIG_DEP_SUBDIR): New variable.
1263 (%.o): Add order-only dependency.
1264 ($(CONFIG_DEP_SUBDIR)): New target.
1265
1266 2017-11-26 Dominik Czarnota <dominik.b.czarnota@gmail.com>
1267
1268 PR gdb/21945
1269 * findcmd.c (_initialize_mem_search): Update find command help
1270 text.
1271
1272 2017-11-26 Simon Marchi <simon.marchi@polymtl.ca>
1273
1274 * python/python.c (do_start_initialization): Change progname
1275 type to gdb::unique_xmalloc_ptr. Release the pointer when using
1276 Python 2.
1277
1278 2017-11-26 Tom Tromey <tom@tromey.com>
1279
1280 * common/format.h: Add include guards.
1281
1282 2017-11-26 Tom Tromey <tom@tromey.com>
1283
1284 * nat/linux-personality.h (class
1285 maybe_disable_address_space_randomization): New class.
1286 (maybe_disable_address_space_randomization): Don't declare
1287 function.
1288 * nat/linux-personality.c (restore_personality)
1289 (make_disable_asr_cleanup): Remove.
1290 (maybe_disable_address_space_randomization): Now a constructor.
1291 (~maybe_disable_address_space_randomization): New destructor.
1292 * linux-nat.c (linux_nat_create_inferior): Update.
1293
1294 2017-11-26 Tom Tromey <tom@tromey.com>
1295
1296 * gcore.c (write_gcore_file_1): Use gdb::unique_xmalloc_ptr.
1297
1298 2017-11-26 Ulrich Weigand <uweigand@de.ibm.com>
1299
1300 * spu-tdep.c (spu_software_single_step): Access SPU_LSLR_REGNUM as
1301 "cooked" register. Access only first four bytes of branch target
1302 registers.
1303
1304 2017-11-25 Sergio Durigan Junior <sergiodj@redhat.com>
1305
1306 PR gdb/22491
1307 * stap-probe.c (relocate_address): New function.
1308 (stap_probe::get_relocated_address): Use 'relocate_address'.
1309 (stap_probe::set_semaphore): Use 'relocate_address' and pass
1310 'm_sem_addr'.
1311 (stap_probe::clear_semaphore): Likewise.
1312
1313 2017-11-25 Pedro Alves <palves@redhat.com>
1314
1315 * dictionary.c: Include "safe-ctype.h".
1316 * minsyms.c: Include "safe-ctype.h".
1317 * minsyms.c (SYMBOL_HASH_NEXT): Use TOLOWER instead of tolower.
1318
1319 2017-11-25 Pedro Alves <palves@redhat.com>
1320
1321 * completer.c (complete_line_internal_1): Skip spaces until the
1322 start of the command.
1323
1324 2017-11-24 Pedro Alves <palves@redhat.com>
1325
1326 * cp-support.c (cp_symbol_name_matches_1): New, factored out from
1327 cp_fq_symbol_name_matches. Pass language_cplus to
1328 strncmp_with_mode.
1329 (cp_fq_symbol_name_matches): Call cp_symbol_name_matches_1.
1330 (selftests::test_cp_symbol_name_cmp): New.
1331 (_initialize_cp_support): Register "cp_symbol_name_matches"
1332 selftests.
1333 * language.c (default_symbol_name_matcher): Pass language_minimal
1334 to strncmp_iw_with_mode.
1335 * utils.c: Include "cp-support.h" and <algorithm>.
1336 (valid_identifier_name_char, cp_skip_operator_token, skip_ws)
1337 (cp_is_operator): New functions.
1338 (strncmp_iw_with_mode): Use them. Add language parameter. Don't
1339 skip whitespace in the symbol name when the lookup name doesn't
1340 have spaces, and vice versa.
1341 (strncmp_iw, strcmp_iw): Pass language to strncmp_iw_with_mode.
1342 * utils.h (strncmp_iw_with_mode): Add language parameter.
1343
1344 2017-11-24 Joel Brobecker <brobecker@adacore.com>
1345
1346 * ada-lang.c (ada_exception_message_1, ada_exception_message):
1347 New functions.
1348 (print_it_exception): If available, display the exception
1349 message as well.
1350 * NEWS: Document new feature.
1351
1352 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
1353
1354 * configure.nat <spu-linux>: Add fork-inferior.o to NATDEPFILES.
1355
1356 2017-11-24 Philipp Rudo <prudo@linux.vnet.ibm.com>
1357
1358 * dtrace-probe.c (dtrace_probe::build_arg_exprs)
1359 (dtrace_probe::is_enabled, dtrace_probe::enable)
1360 (dtrace_probe::disable): Remove keyword 'struct' at for-range
1361 variable
1362 * probe.c (gen_ui_out_table_header_info)
1363 (print_ui_out_not_applicables): Remove keyword 'struct' at
1364 for-range variable
1365
1366 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1367
1368 * configure.tgt: Add arch/aarch64.o
1369
1370 2017-11-24 Simon Marchi <simon.marchi@polymtl.ca>
1371
1372 * common/common-utils.h: Include poison.h.
1373 (xfree): Remove declaration, add definition with static_assert.
1374 * common/common-utils.c (xfree): Remove.
1375 * common/poison.h (IsMallocatable): Define.
1376 (IsFreeable): Define.
1377 (free): Delete for non-freeable types.
1378 (xnew): New.
1379 (XNEW): Undef and redefine.
1380 (xcnew): New.
1381 (XCNEW): Undef and redefine.
1382 (xdelete): New.
1383 (XDELETE): Undef and redefine.
1384 (xnewvec): New.
1385 (XNEWVEC): Undef and redefine.
1386 (xcnewvec): New.
1387 (XCNEWVEC): Undef and redefine.
1388 (xresizevec): New.
1389 (XRESIZEVEC): Undef and redefine.
1390 (xdeletevec): New.
1391 (XDELETEVEC): Undef and redefine.
1392 (xnewvar): New.
1393 (XNEWVAR): Undef and redefine.
1394 (xcnewvar): New.
1395 (XCNEWVAR): Undef and redefine.
1396 (xresizevar): New.
1397 (XRESIZEVAR): Undef and redefine.
1398
1399 2017-11-24 Simon Marchi <simon.marchi@polymtl.ca>
1400
1401 * gdbthread.h (private_thread_info): Define structure type, add
1402 virtual pure destructor.
1403 (thread_info) <priv>: Change type to unique_ptr.
1404 <private_dtor>: Remove.
1405 * thread.c (add_thread_with_info): Adjust to use of unique_ptr.
1406 (private_thread_info::~private_thread_info): Provide default
1407 implementation.
1408 (thread_info::~thread_info): Don't call private_dtor nor
1409 manually free priv.
1410 * aix-thread.c (private_thread_info): Rename to ...
1411 (aix_thread_info): ... this.
1412 (get_aix_thread_info): New.
1413 (sync_threadlists): Adjust.
1414 (iter_tid): Adjust.
1415 (aix_thread_resume): Adjust.
1416 (aix_thread_fetch_registers): Adjust.
1417 (aix_thread_store_registers): Adjust.
1418 (aix_thread_extra_thread_info): Adjust.
1419 * darwin-nat.h (private_thread_info): Rename to ...
1420 (darwin_thread_info): ... this.
1421 (get_darwin_thread_info): New.
1422 * darwin-nat.c (darwin_init_thread_list): Adjust.
1423 (darwin_check_new_threads): Adjust.
1424 (thread_info_from_private_thread_info): Adjust.
1425 * linux-thread-db.c (private_thread_info): Rename to ...
1426 (thread_db_thread_info): ... this, initialize fields.
1427 (get_thread_db_thread_info): New.
1428 <dying>: Change type to bool.
1429 (update_thread_state): Adjust to type rename.
1430 (record_thread): Adjust to type rename an use of unique_ptr.
1431 (thread_db_pid_to_str): Likewise.
1432 (thread_db_extra_thread_info): Likewise.
1433 (thread_db_thread_handle_to_thread_info): Likewise.
1434 (thread_db_get_thread_local_address): Likewise.
1435 * nto-tdep.h (private_thread_info): Rename to ...
1436 (nto_thread_info): ... this, initialize fields.
1437 (get_nto_thread_info): New.
1438 <name>: Change type to std::string.
1439 * nto-tdep.c (nto_extra_thread_info): Adjust to type rename and
1440 use of unique_ptr.
1441 * nto-procfs.c (update_thread_private_data_name): Adjust to
1442 std::string change, allocate nto_private_thread_info with new.
1443 (update_thread_private_data): Adjust to unique_ptr.
1444 * remote.c (private_thread_info): Rename to ...
1445 (remote_thread_info): ... this, initialize data members with
1446 default values.
1447 <extra, name>: Change type to std::string.
1448 <thread_handle>: Change type to non-pointer.
1449 (free_private_thread_info): Remove.
1450 (get_private_info_thread): Rename to...
1451 (get_remote_thread_info): ... this, change return type, adjust to
1452 use of unique_ptr, use remote_thread_info constructor.
1453 (remote_add_thread): Adjust.
1454 (get_private_info_ptid): Rename to...
1455 (get_remote_thread_info): ...this, change return type.
1456 (remote_thread_name): Use get_remote_thread_info, adjust to
1457 change to std::string.
1458 (struct thread_item) <~thread_item>: Remove.
1459 <thread_handle>: Make non pointer.
1460 (start_thread): Adjust to thread_item::thread_handle type
1461 change.
1462 (remote_update_thread_list): Adjust to type name change, move
1463 strings from temporary to long-lived object instead of
1464 duplicating.
1465 (remote_threads_extra_info): Use get_remote_thread_info.
1466 (process_initial_stop_replies): Likewise.
1467 (resume_clear_thread_private_info): Likewise.
1468 (remote_resume): Adjust to type name change.
1469 (remote_commit_resume): Use get_remote_thread_info.
1470 (process_stop_reply): Adjust to type name change.
1471 (remote_stopped_by_sw_breakpoint): Use get_remote_thread_info.
1472 (remote_stopped_by_hw_breakpoint): Likewise.
1473 (remote_stopped_by_watchpoint): Likewise.
1474 (remote_stopped_data_address): Likewise.
1475 (remote_core_of_thread): Likewise.
1476 (remote_thread_handle_to_thread_info): Use
1477 get_private_info_thread, adjust to thread_handle field type
1478 change.
1479
1480 2017-11-24 Simon Marchi <simon.marchi@polymtl.ca>
1481
1482 * remote.c (struct thread_item): Add constructor, disable copy
1483 construction and copy assignment, define default move
1484 construction and move assignment.
1485 <extra, name>: Change type to std::string.
1486 <core>: Initialize.
1487 <thread_handle>: Make non-pointer.
1488 (thread_item_t): Remove typedef.
1489 (DEF_VEC_O(thread_item_t)): Remove.
1490 (threads_listing_context) <contains_thread>: New method.
1491 <remove_thread>: New method.
1492 <items>: Change type to std::vector.
1493 (clear_threads_listing_context): Remove.
1494 (threads_listing_context_remove): Remove.
1495 (remote_newthread_step): Use thread_item constructor, adjust to
1496 change to std::vector.
1497 (start_thread): Use thread_item constructor, adjust to change to
1498 std::vector.
1499 (end_thread): Adjust to change to std::vector and std::string.
1500 (remote_get_threads_with_qthreadinfo): Use thread_item
1501 constructor, adjust to std::vector.
1502 (remote_update_thread_list): Adjust to change to std::vector and
1503 std::string, use threads_listing_context methods.
1504 (remove_child_of_pending_fork): Adjust.
1505 (remove_new_fork_children): Adjust.
1506 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add rsp-low-selftests.c.
1507 (SUBDIR_UNITTESTS_OBS): Add rsp-low-selftests.o.
1508 * unittests/rsp-low-selftests.c: New file.
1509 * common/rsp-low.h: Include common/byte-vector.h.
1510 (hex2bin): New overload.
1511 * common/rsp-low.c (hex2bin): New overload.
1512
1513 2017-11-24 Simon Marchi <simon.marchi@ericsson.com>
1514
1515 * inferior.h (private_inferior): Define structure type, add
1516 virtual pure destructor.
1517 (inferior) <priv>: Change type to unique_ptr.
1518 * inferior.c (private_inferior::~private_inferior): Provide
1519 default implementation.
1520 (inferior::~inferior): Don't free priv field.
1521 (exit_inferior_1): Likewise.
1522 * darwin-nat.h (struct darwin_exception_info): Initialize fields.
1523 (darwin_exception_info): Remove typedef.
1524 (DEF_VEC_O (darwin_thread_t)); Remove.
1525 (private_inferior): Rename to ...
1526 (darwin_private_inferior): ... this, extend private_inferior.
1527 (get_darwin_inferior): New.
1528 <threads>: Change type to std::vector of darwin_thread_t pointers.
1529 * darwin-nat.c (darwin_check_new_threads): Adjust.
1530 (find_inferior_task_it): Adjust.
1531 (darwin_find_thread); Adjust.
1532 (darwin_suspend_inferior): Adjust.
1533 (darwin_resume_inferior): Adjust.
1534 (darwin_find_new_inferior): Adjust.
1535 (darwin_decode_notify_message): Adjust.
1536 (darwin_send_reply): Adjust.
1537 (darwin_resume_inferior_threads): Adjust.
1538 (darwin_suspend_inferior_threads): Adjust.
1539 (darwin_decode_message): Adjust.
1540 (darwin_wait): Adjust.
1541 (darwin_interrupt): Adjust.
1542 (darwin_deallocate_threads): Adjust.
1543 (darwin_mourn_inferior): Adjust, don't free private data.
1544 (darwin_reply_to_all_pending_messages): Adjust.
1545 (darwin_stop_inferior): Adjust.
1546 (darwin_setup_exceptions): Adjust.
1547 (darwin_kill_inferior): Adjust.
1548 (darwin_setup_request_notification): Adjust.
1549 (darwin_attach_pid): Adjust.
1550 (darwin_init_thread_list): Adjust.
1551 (darwin_setup_fake_stop_event): Adjust.
1552 (darwin_attach): Adjust.
1553 (darwin_detach): Adjust.
1554 (darwin_xfer_partial): Adjust.
1555 (set_enable_mach_exceptions): Adjust.
1556 (darwin_pid_to_exec_file): Adjust.
1557 (darwin_get_ada_task_ptid): Adjust.
1558 * darwin-nat-info.c (get_task_from_args): Adjust.
1559 (info_mach_ports_command): Adjust.
1560 (info_mach_region_command): Adjust.
1561 (info_mach_exceptions_command): Adjust.
1562 * remote.c (private_inferior): Rename to ...
1563 (remote_private_inferior): ... this, initialize fields.
1564 (get_remote_inferior); New.
1565 (remote_commit_resume): Use get_remote_inferior.
1566 (check_pending_event_prevents_wildcard_vcont_callback): Likewise.
1567
1568 2017-11-24 Pedro Alves <palves@redhat.com>
1569
1570 * NEWS: Mention linespecs and explicit locations, and completion
1571 improvements.
1572
1573 2017-11-24 Yao Qi <yao.qi@linaro.org>
1574
1575 * regcache.c (regcache::dump): Remove footnote_register_size.
1576
1577 2017-11-24 Yao Qi <yao.qi@linaro.org>
1578
1579 * regcache.c (cooked_read_test): Add more test for readonly
1580 regcache.
1581
1582 2017-11-24 Yao Qi <yao.qi@linaro.org>
1583
1584 * gdbarch-selftests.c (test_target_has_registers): Move it to
1585 target.c.
1586 (test_target_has_stack): Likewise.
1587 (test_target_has_memory): Likewise.
1588 (test_target_prepare_to_store): Likewise.
1589 (test_target_store_registers): Likewise.
1590 (test_target_ops): Likewise.
1591 * regcache.c: Include selftest-arch.h and gdbthread.h.
1592 (target_ops_no_register): New class.
1593 (test_target_fetch_registers): New.
1594 (test_target_store_registers): New.
1595 (test_target_xfer_partial): New.
1596 (readwrite_regcache): New.
1597 (cooked_read_test): New.
1598 (_initialize_regcache): Register the test.
1599 * target.c: (test_target_has_registers): Moved from
1600 gdbarch-selftests.c.
1601 (test_target_has_stack): Likewise.
1602 (test_target_has_memory): Likewise.
1603 (test_target_prepare_to_store): Likewise.
1604 (test_target_store_registers): Likewise.
1605 * target.h (test_target_ops): New class.
1606
1607 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1608
1609 * aarch64-tdep.c (_initialize_aarch64_tdep): Add target desc
1610 selftest.
1611
1612 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1613
1614 * aarch64-tdep.c (_initialize_aarch64_tdep): Remove init.
1615 * arch/aarch64.c (aarch64_create_target_description): Create
1616 new target description.
1617 * features/Makefile: Add new files.
1618 * features/aarch64.c: Remove file.
1619 * features/aarch64-core.c: New autogenerated file.
1620 * features/aarch64-fpu.c: New autogenerated file.
1621 * target-descriptions.c (maint_print_c_tdesc_cmd): Check for aarch64.
1622
1623 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1624
1625 * Makefile.in: Add new files.
1626 * aarch64-linux-nat.c (aarch64_linux_read_description): Call
1627 aarch64_read_description.
1628 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
1629 Call aarch64_read_description.
1630 * aarch64-tdep.c (aarch64_read_description): New function.
1631 (aarch64_gdbarch_init): Call aarch64_read_description.
1632 * aarch64-tdep.h (aarch64_read_description): New function.
1633 * arch/aarch64.c: New file.
1634 * configure.tgt: Add new files.
1635
1636 2017-11-24 Yao Qi <yao.qi@linaro.org>
1637
1638 * mi/mi-main.c (register_changed_p): Update.
1639 * value.c (value_contents_bits_eq): Change return type.
1640 (value_contents_eq): Likewise.
1641 * value.h: Update comments.
1642
1643 2017-11-24 Yao Qi <yao.qi@linaro.org>
1644
1645 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Remove
1646 local 'changed'. Remove error.
1647 (register_changed_p): Change return type to bool.
1648
1649 2017-11-24 Yao Qi <yao.qi@linaro.org>
1650
1651 * arch/tic6x.c: New file.
1652 * arch/tic6x.h: New file.
1653 * features/Makefile (FEATURE_XMLFILES): Add tic6x-c6xp.xml,
1654 tic6x-core.xml and tic6x-gp.xml.
1655 * features/tic6x-c6xp.c: Generated.
1656 * features/tic6x-core.c: Generated.
1657 * features/tic6x-gp.c: Generated.
1658 * target-descriptions.c (maint_print_c_tdesc_cmd): Match
1659 "tic6x-".
1660
1661 2017-11-23 Simon Marchi <simon.marchi@ericsson.com>
1662
1663 * mi/mi-main.c (list_available_thread_groups): Change map value
1664 type to std::vector.
1665
1666 2017-11-23 Simon Marchi <simon.marchi@ericsson.com>
1667
1668 * osdata.c (osdata_end_column, get_osdata): Remove std::move.
1669
1670 2017-11-23 Simon Marchi <simon.marchi@ericsson.com>
1671
1672 * varobj.c (struct varobj_dynamic) <children_requested_>: Rename
1673 back to...
1674 <children_requested>: ... this.
1675 (varobj_get_num_children, varobj_update): Adjust.
1676
1677 2017-11-23 Simon Marchi <simon.marchi@ericsson.com>
1678
1679 * ada-varobj.c (ada_value_is_changeable_p): Change int to bool where applicable.
1680 (ada_value_has_mutated): Likewise.
1681 * c-varobj.c (varobj_is_anonymous_child): Likewise.
1682 (c_is_path_expr_parent): Likewise.
1683 * mi/mi-cmd-var.c (varobj_update_one): Likewise.
1684 (mi_cmd_var_set_frozen): Likewise.
1685 (mi_cmd_var_update_iter): Likewise.
1686 (mi_cmd_var_update): Likewise.
1687 * varobj.c (pretty_printing): Likewise.
1688 (varobj_enable_pretty_printing): Likewise.
1689 (struct varobj_root) <floating, is_valid>: Likewise.
1690 (struct varobj_dynamic) <children_requested>: Likewise.
1691 (delete_variable): Likewise.
1692 (delete_variable_1): Likewise.
1693 (install_variable): Likewise.
1694 (update_type_if_necessary): Likewise.
1695 (install_new_value): Likewise.
1696 (value_of_root): Likewise.
1697 (is_root_p): Likewise.
1698 (varobj_create): Likewise.
1699 (varobj_delete): Likewise.
1700 (varobj_has_more): Likewise.
1701 (varobj_set_frozen): Likewise.
1702 (varobj_get_frozen): Likewise.
1703 (install_dynamic_child): Likewise.
1704 (dynamic_varobj_has_child_method): Likewise.
1705 (update_dynamic_varobj_children): Likewise.
1706 (varobj_get_num_children): Likewise.
1707 (varobj_list_children): Likewise.
1708 (is_path_expr_parent): Likewise.
1709 (varobj_default_is_path_expr_parent): Likewise.
1710 (varobj_is_dynamic_p): Likewise.
1711 (varobj_set_value): Likewise.
1712 (varobj_value_has_mutated): Likewise.
1713 (varobj_update): Likewise.
1714 (check_scope): Likewise.
1715 (value_of_root_1): Likewise.
1716 (varobj_value_get_print_value): Likewise.
1717 (varobj_editable_p): Likewise.
1718 (varobj_value_is_changeable_p): Likewise.
1719 (varobj_floating_p): Likewise.
1720 (varobj_default_value_is_changeable_p): Likewise.
1721 (varobj_invalidate_iter): Likewise.
1722 * varobj.h (struct varobj_update_result) <type_changed,
1723 children_changed, changed, value_installed>: Likewise.
1724 (struct varobj) <updated, frozen, not_fetched>: Likewise.
1725 (struct lang_varobj_ops) <value_is_changeable_p,
1726 value_has_mutated, is_path_expr_parent>: Likewise.
1727 (varobj_delete): Likewise.
1728 (varobj_set_frozen): Likewise.
1729 (varobj_get_frozen): Likewise.
1730 (varobj_set_value): Likewise.
1731 (varobj_update): Likewise.
1732 (varobj_editable_p): Likewise.
1733 (varobj_floating_p): Likewise.
1734 (varobj_has_more): Likewise.
1735 (varobj_is_dynamic_p): Likewise.
1736 (varobj_default_value_is_changeable_p): Likewise.
1737 (varobj_value_is_changeable_p): Likewise.
1738 (varobj_is_anonymous_child): Likewise.
1739 (varobj_default_is_path_expr_parent): Likewise.
1740
1741 2017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
1742
1743 * dtrace-probe.c (struct probe_ops dtrace_probe_ops): Delete.
1744 (struct dtrace_probe_arg) <dtrace_probe_arg>: New constructor.
1745 <type_str>: Convert to 'std::string'.
1746 <expr>: Convert to 'expression_up'.
1747 (dtrace_probe_arg_s): Delete type and VEC.
1748 (dtrace_probe_enabler_s): Likewise.
1749 (struct dtrace_probe): Replace by...
1750 (class dtrace_static_probe_ops): ...this and...
1751 (class dtrace_probe): ...this.
1752 (dtrace_probe_is_linespec): Rename to...
1753 (dtrace_static_probe_ops::is_linespec): ...this. Adjust code
1754 to reflect change.
1755 (dtrace_process_dof_probe): Use 'std::vector' instead of VEC.
1756 Adjust code. Create new instance of 'dtrace_probe'.
1757 (dtrace_build_arg_exprs): Rename to...
1758 (dtrace_probe::build_arg_exprs): ...this. Adjust code to
1759 reflect change.
1760 (dtrace_get_probes): Rename to...
1761 (dtrace_static_probe_ops::get_probes): ...this. Adjust code
1762 to reflect change.
1763 (dtrace_get_arg): Rename to...
1764 (dtrace_probe::get_arg_by_number): ...this. Adjust code to
1765 reflect change.
1766 (dtrace_probe_is_enabled): Rename to...
1767 (dtrace_probe::is_enabled): ...this. Adjust code to reflect
1768 change.
1769 (dtrace_get_probe_address): Rename to...
1770 (dtrace_probe::get_relocated_address): ...this. Adjust code
1771 to reflect change.
1772 (dtrace_get_probe_argument_count): Rename to...
1773 (dtrace_probe::get_argument_count): ...this. Adjust code to
1774 reflect change.
1775 (dtrace_can_evaluate_probe_arguments): Rename to...
1776 (dtrace_probe::can_evaluate_arguments): ...this. Adjust code
1777 to reflect change.
1778 (dtrace_evaluate_probe_argument): Rename to...
1779 (dtrace_probe::evaluate_argument): ...this. Adjust code to
1780 reflect change.
1781 (dtrace_compile_to_ax): Rename to...
1782 (dtrace_probe::compile_to_ax): ...this. Adjust code to
1783 reflect change.
1784 (dtrace_probe_destroy): Delete.
1785 (dtrace_type_name): Rename to...
1786 (dtrace_static_probe_ops::type_name): ...this. Adjust code to
1787 reflect change.
1788 (dtrace_probe::get_static_ops): New method.
1789 (dtrace_gen_info_probes_table_header): Rename to...
1790 (dtrace_static_probe_ops::gen_info_probes_table_header):
1791 ...this. Adjust code to reflect change.
1792 (dtrace_gen_info_probes_table_values): Rename to...
1793 (dtrace_probe::gen_info_probes_table_values): ...this. Adjust
1794 code to reflect change.
1795 (dtrace_enable_probe): Rename to...
1796 (dtrace_probe::enable_probe): ...this. Adjust code to reflect
1797 change.
1798 (dtrace_disable_probe): Rename to...
1799 (dtrace_probe::disable_probe): ...this. Adjust code to reflect
1800 change.
1801 (struct probe_ops dtrace_probe_ops): Delete.
1802 (info_probes_dtrace_command): Call 'info_probes_for_spops'
1803 instead of 'info_probes_for_ops'.
1804 (_initialize_dtrace_probe): Use 'all_static_probe_ops' instead
1805 of 'all_probe_ops'.
1806
1807 2017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
1808 Simon Marchi <simark@simark.ca>
1809
1810 * stap-probe.c (struct probe_ops stap_probe_ops): Delete
1811 variable.
1812 (struct stap_probe_arg) <stap_probe_arg>: New constructor.
1813 <aexpr>: Change type to 'expression_up'.
1814 (stap_probe_arg_s): Delete type and VEC.
1815 (struct stap_probe): Delete. Replace by...
1816 (class stap_static_probe_ops): ...this and...
1817 (class stap_probe): ...this. Rename variables to add 'm_'
1818 prefix. Do not use 'union' for arguments anymore.
1819 (stap_get_expected_argument_type): Receive probe name instead
1820 of 'struct stap_probe'. Adjust code.
1821 (stap_parse_probe_arguments): Rename to...
1822 (stap_probe::parse_arguments): ...this. Adjust code to
1823 reflect change.
1824 (stap_get_probe_address): Rename to...
1825 (stap_probe::get_relocated_address): ...this. Adjust code
1826 to reflect change.
1827 (stap_get_probe_argument_count): Rename to...
1828 (stap_probe::get_argument_count): ...this. Adjust code
1829 to reflect change.
1830 (stap_get_arg): Rename to...
1831 (stap_probe::get_arg_by_number'): ...this. Adjust code to
1832 reflect change.
1833 (can_evaluate_probe_arguments): Rename to...
1834 (stap_probe::can_evaluate_arguments): ...this. Adjust code
1835 to reflect change.
1836 (stap_evaluate_probe_argument): Rename to...
1837 (stap_probe::evaluate_argument): ...this. Adjust code
1838 to reflect change.
1839 (stap_compile_to_ax): Rename to...
1840 (stap_probe::compile_to_ax): ...this. Adjust code to
1841 reflect change.
1842 (stap_probe_destroy): Delete.
1843 (stap_modify_semaphore): Adjust comment.
1844 (stap_set_semaphore): Rename to...
1845 (stap_probe::set_semaphore): ...this. Adjust code to reflect
1846 change.
1847 (stap_clear_semaphore): Rename to...
1848 (stap_probe::clear_semaphore): ...this. Adjust code to
1849 reflect change.
1850 (stap_probe::get_static_ops): New method.
1851 (handle_stap_probe): Adjust code to create instance of
1852 'stap_probe'.
1853 (stap_get_probes): Rename to...
1854 (stap_static_probe_ops::get_probes): ...this. Adjust code to
1855 reflect change.
1856 (stap_probe_is_linespec): Rename to...
1857 (stap_static_probe_ops::is_linespec): ...this. Adjust code to
1858 reflect change.
1859 (stap_type_name): Rename to...
1860 (stap_static_probe_ops::type_name): ...this. Adjust code to
1861 reflect change.
1862 (stap_gen_info_probes_table_header): Rename to...
1863 (stap_static_probe_ops::gen_info_probes_table_header):
1864 ...this. Adjust code to reflect change.
1865 (stap_gen_info_probes_table_values): Rename to...
1866 (stap_probe::gen_info_probes_table_values): ...this. Adjust
1867 code to reflect change.
1868 (struct probe_ops stap_probe_ops): Delete.
1869 (info_probes_stap_command): Use 'info_probes_for_spops'
1870 instead of 'info_probes_for_ops'.
1871 (_initialize_stap_probe): Use 'all_static_probe_ops' instead
1872 of 'all_probe_ops'.
1873
1874 2017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
1875
1876 * break-catch-throw.c (fetch_probe_arguments): Use
1877 'probe.prob' instead of 'probe.probe'.
1878 * breakpoint.c (create_longjmp_master_breakpoint): Call
1879 'can_evaluate_arguments' and 'get_relocated_address' methods
1880 from probe.
1881 (create_exception_master_breakpoint): Likewise.
1882 (add_location_to_breakpoint): Use 'sal->prob' instead of
1883 'sal->probe'.
1884 (bkpt_probe_insert_location): Call 'set_semaphore' method from
1885 probe.
1886 (bkpt_probe_remove_location): Likewise, for 'clear_semaphore'.
1887 * elfread.c (elf_get_probes): Use 'static_probe_ops' instead
1888 of 'probe_ops'.
1889 (probe_key_free): Call 'delete' on probe.
1890 (check_exception_resume): Use 'probe.prob' instead of
1891 'probe.probe'.
1892 * location.c (string_to_event_location_basic): Call
1893 'probe_linespec_to_static_ops'.
1894 * probe.c (class any_static_probe_ops): New class.
1895 (any_static_probe_ops any_static_probe_ops): New variable.
1896 (parse_probes_in_pspace): Receive 'static_probe_ops' as
1897 argument. Adjust code to reflect change.
1898 (parse_probes): Use 'static_probe_ops' instead of
1899 'probe_ops'. Adjust code to reflect change.
1900 (find_probes_in_objfile): Call methods to get name and
1901 provider from probe.
1902 (find_probe_by_pc): Use 'result.prob' instead of
1903 'result.probe'. Call 'get_relocated_address' method from
1904 probe.
1905 (collect_probes): Adjust comment and argument list to receive
1906 'static_probe_ops' instead of 'probe_ops'. Adjust code to
1907 reflect change. Call necessary methods from probe.
1908 (compare_probes): Call methods to get name and provider from
1909 probes.
1910 (gen_ui_out_table_header_info): Receive 'static_probe_ops'
1911 instead of 'probe_ops'. Use 'std::vector' instead of VEC,
1912 adjust code accordingly.
1913 (print_ui_out_not_applicables): Likewise.
1914 (info_probes_for_ops): Rename to...
1915 (info_probes_for_spops): ...this. Receive 'static_probe_ops'
1916 as argument instead of 'probe_ops'. Adjust code. Call
1917 necessary methods from probe.
1918 (info_probes_command): Use 'info_probes_for_spops'.
1919 (enable_probes_command): Pass correct argument to
1920 'collect_probes'. Call methods from probe.
1921 (disable_probes_command): Likewise.
1922 (get_probe_address): Move to 'any_static_probe_ops::get_address'.
1923 (get_probe_argument_count): Move to
1924 'any_static_probe_ops::get_argument_count'.
1925 (can_evaluate_probe_arguments): Move to
1926 'any_static_probe_ops::can_evaluate_arguments'.
1927 (evaluate_probe_argument): Move to
1928 'any_static_probe_ops::evaluate_argument'.
1929 (probe_safe_evaluate_at_pc): Use 'probe.prob' instead of
1930 'probe.probe'.
1931 (probe_linespec_to_ops): Rename to...
1932 (probe_linespec_to_static_ops): ...this. Adjust code.
1933 (probe_any_is_linespec): Rename to...
1934 (any_static_probe_ops::is_linespec): ...this.
1935 (probe_any_get_probes): Rename to...
1936 (any_static_probe_ops::get_probes): ...this.
1937 (any_static_probe_ops::type_name): New method.
1938 (any_static_probe_ops::gen_info_probes_table_header): New
1939 method.
1940 (compute_probe_arg): Use 'pc_probe.prob' instead of
1941 'pc_probe.probe'. Call methods from probe.
1942 (compile_probe_arg): Likewise.
1943 (std::vector<const probe_ops *> all_probe_ops): Delete.
1944 (std::vector<const static_probe_ops *> all_static_probe_ops):
1945 New variable.
1946 (_initialize_probe): Use 'all_static_probe_ops' instead of
1947 'all_probe_ops'.
1948 * probe.h (struct info_probe_column) <field_name>: Delete
1949 extraneous newline
1950 (info_probe_column_s): Delete type and VEC.
1951 (struct probe_ops): Delete. Replace with...
1952 (class static_probe_ops): ...this and...
1953 (clas probe): ...this.
1954 (struct bound_probe) <bound_probe>: Delete extraneous
1955 newline. Adjust constructor to receive 'probe' instead of
1956 'struct probe'.
1957 <probe>: Rename to...
1958 <prob>: ...this. Delete extraneous newline.
1959 <objfile>: Delete extraneous newline.
1960 (register_probe_ops): Delete unused prototype.
1961 (info_probes_for_ops): Rename to...
1962 (info_probes_for_spops): ...this. Adjust comment.
1963 (get_probe_address): Move to 'probe::get_address'.
1964 (get_probe_argument_count): Move to
1965 'probe::get_argument_count'.
1966 (can_evaluate_probe_arguments): Move to
1967 'probe::can_evaluate_arguments'.
1968 (evaluate_probe_argument): Move to 'probe::evaluate_argument'.
1969 * solib-svr4.c (struct svr4_info): Adjust comment.
1970 (struct probe_and_action) <probe>: Rename to...
1971 <prob>: ...this.
1972 (register_solib_event_probe): Receive 'probe' instead of
1973 'struct probe' as argument. Use 'prob' instead of 'probe'
1974 when applicable.
1975 (solib_event_probe_action): Call 'get_argument_count' method
1976 from probe. Adjust comment.
1977 (svr4_handle_solib_event): Adjust comment. Call
1978 'evaluate_argument' method from probe.
1979 (svr4_create_probe_breakpoints): Call 'get_relocated_address'
1980 from probe.
1981 (svr4_create_solib_event_breakpoints): Use 'probe' instead of
1982 'struct probe'. Call 'can_evaluate_arguments' from probe.
1983 * symfile.h: Forward declare 'class probe' instead of 'struct
1984 probe'.
1985 * symtab.h: Likewise.
1986 (struct symtab_and_line) <probe>: Rename to...
1987 <prob>: ...this.
1988 * tracepoint.c (start_tracing): Use 'prob' when applicable.
1989 Call probe methods.
1990 (stop_tracing): Likewise.
1991
1992 2017-11-22 Joel Brobecker <brobecker@adacore.com>
1993
1994 * ravenscar-thread.c (ravenscar_inferior_created): Remove
1995 trailing newline at end of string in call to warning.
1996
1997 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1998
1999 * osdata.h: Include vector isntead of vec.h.
2000 (osdata_column_s): Remove typedef.
2001 (struct osdata_column): Add constructor.
2002 <name, value>: Change type to std::string.
2003 (DEF_VEC_O (osdata_column_s)): Remove.
2004 (osdata_item_s): Remove typedef.
2005 (struct osdata_item) <columns>: Change type to std::vector.
2006 (DEF_VEC_O (osdata_item_s)): Remove.
2007 (struct osdata): Add constructor.
2008 <type>: Change type to std::string.
2009 <items>: Change type to std::vector.
2010 (osdata_p): Remove typedef.
2011 (DEF_VEC_P (osdata_p)): Remove.
2012 (osdata_parse): Return a unique_ptr.
2013 (osdata_free): Remove.
2014 (make_cleanup_osdata_free): Remove.
2015 (get_osdata): Return a unique_ptr.
2016 (get_osdata_column): Return pointer to std::string, take a
2017 reference to osdata_item as parameter.
2018 * osdata.c (struct osdata_parsing_data) <osdata>: Change type to
2019 unique_ptr.
2020 <property_name>: Change type to std::string.
2021 (osdata_start_osdata): Allocate osdata with new and adjust.
2022 (osdata_start_item): Adjust.
2023 (osdata_start_column): Adjust.
2024 (osdata_end_column): Adjust.
2025 (clear_parsing_data): Remove.
2026 (osdata_parse): Return a unique_ptr and adjust, remove cleanup.
2027 (osdata_item_clear): Remove.
2028 (get_osdata): return a unique_ptr and adjust.
2029 (get_osdata_column): Return a pointer to std::string and adjust.
2030 (info_osdata): Adjust.
2031 * mi/mi-main.c: Include <map>.
2032 (free_vector_of_osdata_items): Remove.
2033 (list_available_thread_groups): Adjust, use std::map instead of
2034 splay tree.
2035
2036 2017-11-22 Simon Marchi <simon.marchi@ericsson.com>
2037
2038 * stack.c (iterate_over_block_locals): Add LOC_OPTIMIZED_OUT
2039 case in switch.
2040
2041 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2042
2043 * varobj.h (DEF_VEC_P (varobj_p)): Remove.
2044
2045 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2046
2047 * varobj.h (struct varobj_update_result): Add constructor, add
2048 move constructor, disable copy and assign, initialize fields.
2049 <newobj>: Change type to std::vector.
2050 (varobj_update): Return std::vector.
2051 * varobj.c (install_dynamic_child): Change VEC parameters to
2052 std::vector and adjust.
2053 (update_dynamic_varobj_children): Likewise.
2054 (varobj_update): Return std::vector and adjust.
2055 * mi/mi-cmd-var.c (varobj_update_one): Adjust to vector changes.
2056
2057 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2058
2059 * varobj.h (struct varobj) <parent>: Remove const.
2060 <children>: Change type to std::vector.
2061 (varobj_list_children): Return std::vector const reference.
2062 (varobj_restrict_range): Change parameter type to std::vector
2063 const reference.
2064 * varobj.c (varobj_has_more): Adjust.
2065 (varobj_restrict_range): Change parameter type to std::vector
2066 const reference and adjust.
2067 (install_dynamic_child): Adjust.
2068 (update_dynamic_varobj_children): Adjust.
2069 (varobj_list_children): Return std::vector const reference and
2070 adjust.
2071 (varobj_add_child): Adjust.
2072 (update_type_if_necessary): Adjust.
2073 (varobj_update): Adjust.
2074 (delete_variable_1): Adjust.
2075 * ada-varobj.c (ada_value_has_mutated): Adjust.
2076 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Adjust.
2077
2078 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2079
2080 * varobj.h (struct varobj): Add constructor and destructor,
2081 initialize fields.
2082 * varobj.c (struct varobj_root): Initialize fields.
2083 (struct varobj_dynamic): Initialize fields.
2084 (varobj_create): Use unique_ptr instead of cleanup. Create
2085 varobj with new instead of new_root_variable.
2086 (delete_variable_1): Free variable with delete instead of
2087 free_variable.
2088 (create_child_with_value): Create variable with new instead of
2089 new_variable.
2090 (varobj::varobj): New.
2091 (varobj::~varobj): New (body mostly coming from free_variable).
2092 (new_variable): Remove.
2093 (free_variable): Remove.
2094 (do_free_variable_cleanup): Remove.
2095 (make_cleanup_free_variable): Remove.
2096
2097 2017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
2098
2099 * core-regset.c: Remove file.
2100 * Makefile.in (ALLDEPFILES): Remove core-regset.c.
2101
2102 2017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
2103
2104 * NEWS: Document use of GNU MPFR.
2105 * README: Likewise.
2106
2107 * Makefile.in (LIBMPFR): Add define.
2108 (CLIBS): Add $(LIBMPFR).
2109 * configure.ac: Add --with-mpfr configure option.
2110 * configure: Regenerate.
2111 * config.in: Regenerate.
2112
2113 * target-float.c [HAVE_LIBMPFR]: Include <mpfr.h>.
2114 (class mpfr_float_ops): New type.
2115 (mpfr_float_ops::from_target): Two new overloaded functions.
2116 (mpfr_float_ops::to_target): Likewise.
2117 (mpfr_float_ops::to_string): New function.
2118 (mpfr_float_ops::from_string): Likewise.
2119 (mpfr_float_ops::to_longest): Likewise.
2120 (mpfr_float_ops::from_longest): Likewise.
2121 (mpfr_float_ops::from_ulongest): Likewise.
2122 (mpfr_float_ops::to_host_double): Likewise.
2123 (mpfr_float_ops::from_host_double): Likewise.
2124 (mpfr_float_ops::convert): Likewise.
2125 (mpfr_float_ops::binop): Likewise.
2126 (mpfr_float_ops::compare): Likewise.
2127 (get_target_float_ops): Use mpfr_float_ops if available.
2128
2129 2017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
2130
2131 * target-float.c: Do not include <math.h>.
2132 Include <cmath> and <limits>.
2133 (DOUBLEST): Do not define.
2134 (class target_float_ops): New type.
2135 (class host_float_ops): New templated type.
2136 (class decimal_float_ops): New type.
2137
2138 (floatformat_to_doublest): Rename to ...
2139 (host_float_ops<T>::from_target): ... this. Use template type T
2140 instead of DOUBLEST. Use C++ math routines. Update recursive calls.
2141 (host_float_ops<T>::from_target): New overload using a type argument.
2142 (floatformat_from_doublest): Rename to ...
2143 (host_float_ops<T>::to_target): ... this. Use template type T
2144 instead of DOUBLEST. Use C++ math routines. Update recursive calls.
2145 (host_float_ops<T>::to_target): New overload using a type argument.
2146 (floatformat_printf_format): New function.
2147 (struct printf_length_modifier): New templated type.
2148 (floatformat_to_string): Rename to ...
2149 (host_float_ops<T>::to_string): ... this. Use type instead of
2150 floatformat argument. Use floatformat_printf_format and
2151 printf_length_modifier. Remove special handling of invalid numbers,
2152 infinities and NaN (moved to target_float_to_string).
2153 (struct scanf_length_modifier): New templated type.
2154 (floatformat_from_string): Rename to ...
2155 (host_float_ops<T>::from_string): ... this. Use type instead of
2156 floatformat argument. Use scanf_length_modifier.
2157 (floatformat_to_longest): Rename to ...
2158 (host_float_ops<T>::to_longest): ... this. Use type instead of
2159 floatformat argument. Handle out-of-range values deterministically.
2160 (floatformat_from_longest): Rename to ...
2161 (host_float_ops<T>::from_longest): ... this. Use type instead of
2162 floatformat argument.
2163 (floatformat_from_ulongest): Rename to ...
2164 (host_float_ops<T>::from_ulongest): ... this. Use type instead of
2165 floatformat argument.
2166 (floatformat_to_host_double): Rename to ...
2167 (host_float_ops<T>::to_host_double): ... this. Use type instead of
2168 floatformat argument.
2169 (floatformat_from_host_double): Rename to ...
2170 (host_float_ops<T>::from_host_double): ... this. Use type instead of
2171 floatformat argument.
2172 (floatformat_convert): Rename to ...
2173 (host_float_ops<T>::convert): ... this. Use type instead of
2174 floatformat arguments. Remove handling of no-op conversions.
2175 (floatformat_binop): Rename to ...
2176 (host_float_ops<T>::binop): ... this. Use type instead of
2177 floatformat arguments.
2178 (floatformat_compare): Rename to ...
2179 (host_float_ops<T>::compare): ... this. Use type instead of
2180 floatformat arguments.
2181
2182 (match_endianness): Use type instead of length/byte_order arguments.
2183 (set_decnumber_context): Likewise.
2184 (decimal_from_number): Likewise. Update calls.
2185 (decimal_to_number): Likewise.
2186 (decimal_is_zero): Likewise. Update calls. Move to earlier in file.
2187 (decimal_float_ops::to_host_double): New dummy function.
2188 (decimal_float_ops::from_host_double): Likewise.
2189 (decimal_to_string): Rename to ...
2190 (decimal_float_ops::to_string): ... this. Use type instead of
2191 length/byte_order arguments. Update calls.
2192 (decimal_from_string): Rename to ...
2193 (decimal_float_ops::from_string): ... this. Use type instead of
2194 length/byte_order arguments. Update calls.
2195 (decimal_from_longest): Rename to ...
2196 (decimal_float_ops::from_longest): ... this. Use type instead of
2197 length/byte_order arguments. Update calls.
2198 (decimal_from_ulongest): Rename to ...
2199 (decimal_float_ops::from_ulongest): ... this. Use type instead of
2200 length/byte_order arguments. Update calls.
2201 (decimal_to_longest): Rename to ...
2202 (decimal_float_ops::to_longest): ... this. Use type instead of
2203 length/byte_order arguments. Update calls.
2204 (decimal_binop): Rename to ...
2205 (decimal_float_ops::binop): ... this. Use type instead of
2206 length/byte_order arguments. Update calls.
2207 (decimal_compare): Rename to ...
2208 (decimal_float_ops::compare): ... this. Use type instead of
2209 length/byte_order arguments. Update calls.
2210 (decimal_convert): Rename to ...
2211 (decimal_float_ops::convert): ... this. Use type instead of
2212 length/byte_order arguments. Update calls.
2213
2214 (target_float_same_category_p): New function.
2215 (target_float_same_format_p): Likewise.
2216 (target_float_format_length): Likewise.
2217 (enum target_float_ops_kind): New type.
2218 (get_target_float_ops_kind): New function.
2219 (get_target_float_ops): Three new overloaded functions.
2220
2221 (target_float_is_zero): Update call.
2222 (target_float_to_string): Add special handling of invalid numbers,
2223 infinities and NaN (moved from floatformat_to_string). Use
2224 target_float_ops callback.
2225 (target_float_from_string): Use target_float_ops callback.
2226 (target_float_to_longest): Likewise.
2227 (target_float_from_longest): Likewise.
2228 (target_float_from_ulongest): Likewise.
2229 (target_float_to_host_double): Likewise.
2230 (target_float_from_host_double): Likewise.
2231 (target_float_convert): Add special case for no-op conversions.
2232 Use target_float_ops callback.
2233 (target_float_binop): Use target_float_ops callback.
2234 (target_float_compare): Likewise.
2235
2236 2017-11-22 Yao Qi <yao.qi@linaro.org>
2237
2238 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use strcpy.
2239
2240 2017-11-22 Yao Qi <yao.qi@linaro.org>
2241
2242 * cli/cli-decode.c (help_list): Use memcpy instead of strncpy.
2243 * cp-namespace.c (cp_lookup_transparent_type_loop): Likewise.
2244
2245 2017-11-21 Jerome Guitton <guitton@adacore.com>
2246
2247 * ravenscar-thread.c (ravenscar_wait): Update inferior ptid
2248 with event ptid from the lower layer before doing the
2249 ravenscar-specific update.
2250
2251 2017-11-21 Joel Brobecker <brobecker@adacore.com>
2252
2253 * ravenscar-thread.c (is_ravenscar_task): Also verify that
2254 the ptid's TID is nonzero.
2255
2256 2017-11-21 Joel Brobecker <brobecker@adacore.com>
2257
2258 * ada-lang.h (ada_get_tcb_types_info): Add declaration.
2259 * ada-tasks.c (ada_get_tcb_types_info): Renames get_tcb_types_info.
2260 Make non-static. Change return type to char *. Adjust code
2261 accordingly. Rewrite the function's documentation.
2262 (read_atcb): Adjust call to get_tcb_types_info accordingly.
2263 * ravenscar-thread.c (ravenscar_inferior_created): Check that
2264 we have enough debugging information in the runtime to support
2265 Ada task debugging before we enable the ravenscar-thread layer.
2266
2267 2017-11-21 Joel Brobecker <brobecker@adacore.com>
2268
2269 * ada-lang.h (ada_get_task_info_from_ptid): Add declaration.
2270 * ada-tasks.c (ada_get_task_info_from_ptid): New function.
2271 * ravenscar-thread.c: Add into comment.
2272 (base_magic_null_ptid): Delete.
2273 (base_ptid): Change documentation.
2274 (ravenscar_active_task): Renames ravenscar_running_thread.
2275 All callers updated throughout.
2276 (is_ravenscar_task, ravenscar_get_thread_base_cpu): New function.
2277 (ravenscar_task_is_currently_active): Likewise.
2278 (get_base_thread_from_ravenscar_task): Ditto.
2279 (ravenscar_update_inferior_ptid): Adjust to handle multiple CPUs.
2280 (ravenscar_runtime_initialized): Likewise.
2281 (get_running_thread_id): Add new parameter "cpu". Adjust
2282 implementation to handle this new parameter.
2283 (ravenscar_fetch_registers): Small adjustment to use
2284 is_ravenscar_task and ravenscar_task_is_currently_active in
2285 order to decide whether to use the target beneath or this
2286 module's arch_ops.
2287 (ravenscar_store_registers, ravenscar_prepare_to_store): Likewise.
2288 (ravenscar_stopped_by_sw_breakpoint): Use
2289 get_base_thread_from_ravenscar_task to get the underlying
2290 thread, rather than using base_ptid.
2291 (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
2292 (ravenscar_stopped_data_address, ravenscar_core_of_thread):
2293 Likewise.
2294 (ravenscar_inferior_created): Do not set base_magic_null_ptid.
2295
2296 2017-11-21 Joel Brobecker <brobecker@adacore.com>
2297
2298 * ada-lang.h (struct ada_task_info) <base_cpu>: New field.
2299 * ada-lang.c (struct atcb_fieldno) <base_cpu>: New field.
2300 (get_tcb_types_info): Set fieldnos.base_cpu.
2301 (read_atcb): Set task_info->base_cpu.
2302 (info_task): Print "Base CPU" info if set by runtime.
2303
2304 2017-11-21 Joel Brobecker <brobecker@adacore.com>
2305
2306 * ravenscar-thread.c (ravenscar_stopped_by_sw_breakpoint)
2307 (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
2308 (ravenscar_stopped_data_address, ravenscar_core_of_thread):
2309 New functions.
2310 (init_ravenscar_thread_ops): Set the to_stopped_by_sw_breakpoint,
2311 to_stopped_by_hw_breakpoint, to_stopped_by_watchpoint,
2312 to_stopped_data_address and to_core_of_thread fields of
2313 ravenscar_ops.
2314
2315 2017-11-21 Ulrich Weigand <uweigand@de.ibm.com>
2316
2317 * ppc-tdep.h (enum powerpc_long_double_abi): New data type.
2318 (struct gdbarch_tdep): New member long_double_abi.
2319 * rs6000-tdep.c (rs6000_gdbarch_init): Initialize long_double_abi
2320 member of tdep struct based on Tag_GNU_Power_ABI_FP attribute.
2321 * ppc-linux-tdep.c (ppc_linux_init_abi): Install long double data
2322 format depending on long_double_abi tdep member.
2323 (ppc_floatformat_for_type): Handle __ibm128 type.
2324
2325 2017-11-20 Simon Marchi <simon.marchi@polymtl.ca>
2326
2327 * darwin-nat.c (set_enable_mach_exceptions): Constify parameter.
2328
2329 2017-11-21 Pedro Alves <palves@redhat.com>
2330
2331 * dwarf2read.c (mapped_index::find_name_components_bounds)
2332 <completion mode, upper bound>: Use std::lower_bound instead of
2333 std::upper_bound.
2334 (test_mapped_index_find_name_component_bounds): Remove incorrect
2335 "t1_fund" from expected symbols.
2336
2337 2017-11-21 Pedro Alves <palves@redhat.com>
2338
2339 * dwarf2read.c (mapped_index::name_components_casing): New field.
2340 (mapped_index) <build_name_components,
2341 find_name_components_bounds): Declare new methods.
2342 (mapped_index::find_name_components_bounds)
2343 (mapped_index::build_name_components): New methods, factored out
2344 from dw2_expand_symtabs_matching_symbol.
2345 (check_find_bounds_finds)
2346 (test_mapped_index_find_name_component_bounds): New.
2347 (run_test): Rename to ...
2348 (test_dw2_expand_symtabs_matching_symbol): ... this.
2349 (run_test): Reimplement.
2350
2351 2017-11-21 Pedro Alves <palves@redhat.com>
2352
2353 * cp-name-parser.y (cp_ident_is_alpha, cp_ident_is_alnum): New.
2354 (symbol_end): Use cp_ident_is_alnum.
2355 (yylex): Use cp_ident_is_alpha and cp_ident_is_alnum.
2356 * dwarf2read.c (make_sort_after_prefix_name): New function.
2357 (dw2_expand_symtabs_matching_symbol): Use it.
2358 (test_symbols): Add more symbols.
2359 (run_test): Add tests.
2360
2361 2017-11-17 Tom Tromey <tom@tromey.com>
2362
2363 * symtab.h (enum symbol_subclass_kind): New.
2364 (struct symbol) <is_cplus_template_function, is_rust_vtable>:
2365 Remove.
2366 <subclass>: New member.
2367 (SYMBOL_IS_CPLUS_TEMPLATE_FUNCTION): Update.
2368 * rust-lang.c (rust_get_trait_object_pointer): Update.
2369 * dwarf2read.c (read_func_scope): Update.
2370 (read_variable): Update.
2371
2372 2017-11-17 Tom Tromey <tom@tromey.com>
2373
2374 * dwarf2read.c (read_func_scope): Update.
2375 * symtab.h (struct template_symbol): Derive from symbol.
2376 <base>: Remove.
2377
2378 2017-11-17 Tom Tromey <tom@tromey.com>
2379
2380 * symtab.h (struct symbol) <is_rust_vtable>: New member.
2381 (struct rust_vtable_symbol): New.
2382 (find_symbol_at_address): Declare.
2383 * symtab.c (find_symbol_at_address): New function.
2384 * symfile.h (struct quick_symbol_functions)
2385 <find_compunit_symtab_by_address>: New member.
2386 * symfile-debug.c (debug_qf_find_compunit_symtab_by_address): New
2387 function.
2388 (debug_sym_quick_functions): Link to
2389 debug_qf_find_compunit_symtab_by_address.
2390 * rust-lang.c (rust_get_trait_object_pointer): New function.
2391 (rust_evaluate_subexp) <case UNOP_IND>: New case. Call
2392 rust_get_trait_object_pointer.
2393 * psymtab.c (psym_relocate): Clear psymbol_map.
2394 (psym_fill_psymbol_map, psym_find_compunit_symtab_by_address): New
2395 functions.
2396 (psym_functions): Link to psym_find_compunit_symtab_by_address.
2397 * objfiles.h (struct objfile) <psymbol_map>: New member.
2398 * dwarf2read.c (dwarf2_gdb_index_functions): Update.
2399 (process_die) <DW_TAG_variable>: New case. Call read_variable.
2400 (rust_containing_type, read_variable): New functions.
2401
2402 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2403
2404 * common/gdb_vecs.h (DEF_VEC_I (int)): Remove.
2405
2406 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2407
2408 * common/filestuff.c: Include <algorithm>.
2409 (open_fds): Change type to std::vector<int>.
2410 (do_mark_open_fd): Adjust.
2411 (unmark_fd_no_cloexec): Adjust.
2412 (do_close): Adjust.
2413
2414 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2415
2416 * breakpoint.c (output_thread_groups): Take an std::vector.
2417 (print_one_breakpoint_location): Adjust.
2418
2419 2017-11-17 Joel Brobecker <brobecker@adacore.com>
2420
2421 * ada-lang.c (resolve_subexp): Add handling of OP_VAR_MSYM_VALUE.
2422 (ada_evaluate_subexp_for_cast): New function.
2423 (ada_evaluate_subexp) <UNOP_CAST>: Replace code by call to
2424 ada_evaluate_subexp_for_cast.
2425 (ada_evaluate_subexp) <nosideret>: Replace code by call to
2426 eval_skip_value.
2427 * eval.c (evaluate_var_value): Make non-static.
2428 (evaluate_var_msym_value, eval_skip_value): Likewise.
2429 * value.h (evaluate_var_value, evaluate_var_msym_value)
2430 (eval_skip_value): Declare.
2431
2432 2017-11-16 Joel Brobecker <brobecker@adacore.com>
2433
2434 * ada-lang.c (ada_value_cast): Remove parameter "noside".
2435 Update all callers.
2436
2437 2017-11-16 Pedro Alves <palves@redhat.com>
2438
2439 * python/py-unwind.c (pyuw_sniffer): Translate
2440 PyExc_KeyboardInterrupt to a GDB Quit exception.
2441
2442 2017-11-16 Pedro Alves <palves@redhat.com>
2443
2444 * infrun.c (resume_cleanups): Delete.
2445 (resume): No longer install a resume_cleanups cleanup nor call
2446 QUIT.
2447 (proceed): Pass the terminal to the inferior.
2448 (keep_going_pass_signal): No longer install a resume_cleanups
2449 cleanup.
2450
2451 2017-11-16 Pedro Alves <palves@redhat.com>
2452
2453 * inf-loop.c (inferior_event_handler): Don't swallow the exception
2454 if the prompt is blocked.
2455
2456 2017-11-16 Pedro Alves <palves@redhat.com>
2457
2458 * breakpoint.c (insert_bp_location): Replace bp_err and
2459 bp_err_message locals by a gdb_exception local.
2460
2461 2017-11-16 Pedro Alves <palves@redhat.com>
2462
2463 * inflow.c (scoped_ignore_sigttou): New class.
2464 (child_terminal_ours_1, new_tty): Use it.
2465
2466 2017-11-16 Ulrich Weigand <uweigand@de.ibm.com>
2467
2468 * target-float.c (decimal_from_number): Add byte_order argument and
2469 call match_endianness. Error if unknown floating-point type.
2470 (decimal_to_number): Add byte_order argument and call match_endianness.
2471 (decimal_from_longest): Update call. Do not call match_endianness.
2472 (decimal_from_ulongest): Likewise.
2473 (decimal_binop): Likewise.
2474 (decimal_is_zero): Likewise.
2475 (decimal_compare): Likewise.
2476 (decimal_convert): Likewise.
2477
2478 2017-11-16 Phil Muldoon <pmuldoon@redhat.com>
2479
2480 * python/python.c (gdbpy_rbreak): New function.
2481 * NEWS: Document Python rbreak feature.
2482
2483 2017-11-16 Yao Qi <yao.qi@linaro.org>
2484
2485 * features/tic6x-c62x.xml: Remove.
2486 * features/tic6x-c64x.xml: Remove.
2487 * features/tic6x-c64xp.xml: Remove.
2488
2489 2017-11-15 John Baldwin <jhb@FreeBSD.org>
2490
2491 * symtab.h: Include <array>.
2492
2493 2017-11-15 John Baldwin <jhb@FreeBSD.org>
2494
2495 * bsd-kvm.c (bsd_kvm_cmd): Constify 'arg'.
2496 (bsd_kvm_proc_cmd): Likewise.
2497
2498 2017-11-15 Simon Marchi <simon.marchi@ericsson.com>
2499
2500 * tui/tui-win.c (window_name_completer): Replace VEC with
2501 std::vector.
2502
2503 2017-11-15 Andrew Cagney <cagney@gnu.org>
2504
2505 * MAINTAINERS: Remove no-longer applicable entries.
2506
2507 2017-11-15 Andrew Cagney <cagney@gnu.org>
2508
2509 * MAINTAINERS: Move self to Past Maintainers.
2510
2511 2017-11-15 Yao Qi <yao.qi@linaro.org>
2512
2513 * features/Makefile (XMLTOC): Remove nios2-linux.xml.
2514 * features/nios2-linux.c: Remove.
2515 * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Don't call
2516 initialize_tdesc_nios2_linux.
2517
2518 2017-11-15 Yao Qi <yao.qi@linaro.org>
2519
2520 * m68hc11-tdep.c (M68HC11_NUM_REGS): Change it to
2521 M68HC11_LAST_HARD_REG + 1.
2522
2523 2017-11-14 Paul Carroll <pcarroll@codesourcery.com>
2524
2525 PR gdb/22388
2526 * remote.c (remote_write_bytes_aux, remote_read_bytes_1,
2527 remote_read_bytes, remote_write_qxfer, remote_xfer_partial):
2528 Return TARGET_XFER_EOF if size of returned data is 0.
2529
2530 2017-11-14 Simon Marchi <simon.marchi@ericsson.com>
2531
2532 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2533 memory-map-selftests.c.
2534 (SUBDIR_UNITTESTS_OBS): Add memory-map-selftests.o.
2535 * memory-map.c (memory_map_start_memory): Fix computation of hi
2536 address.
2537 * unittests/memory-map-selftests.c: New file.
2538
2539 2017-11-09 Joel Brobecker <brobecker@adacore.com>
2540
2541 * ada-lang.c: Fix some typos in the general command documenting
2542 how Ada expressions are being evaluated and how their result
2543 is printed.
2544
2545 2017-11-09 Tom Tromey <tom@tromey.com>
2546
2547 * psymtab.c (psymbol_hash): Do not hash string contents.
2548 (psymbol_compare): Add comment.
2549
2550 2017-11-09 Tom Tromey <tom@tromey.com>
2551
2552 * dictionary.c (dict_hash): Move "TKB" check into the "switch".
2553
2554 2017-11-08 Joel Brobecker <brobecker@adacore.com>
2555
2556 * ada-exp.y (write_var_from_sym): Remove parameter
2557 "orig_left_context". Update all callers.
2558
2559 2017-11-08 Simon Marchi <simon.marchi@ericsson.com>
2560
2561 * tracepoint.h (class collection_list) <stringify>: Return
2562 std::vector<std::string>.
2563 (encode_actions_rsp): Change parameters to
2564 std::vector<std::string> *.
2565 * tracepoint.c (collection_list::stringify): Return
2566 std::vector<std::string> and adjust accordingly.
2567 (encode_actions_rsp): Changee parameters to
2568 std::vector<std::string> and adjust accordingly.
2569 * remote.c (free_actions_list),
2570 free_actions_list_cleanup_wrapper): Remove.
2571 (remote_download_tracepoint): Adjust to std::vector.
2572
2573 2017-11-08 Tom Tromey <tom@tromey.com>
2574
2575 * dwarf2read.c (symbolp): Remove typedef.
2576 (read_func_scope): Use std::vector.
2577 (process_structure_scope): Use std::vector.
2578
2579 2017-11-08 Pedro Alves <palves@redhat.com>
2580
2581 * ada-lang.c (ada_make_symbol_completion_list): Use
2582 completion_skip_symbol.
2583 * symtab.c (symbol_is_function_or_method(minimal_symbol*)): New.
2584 (symbol_is_function_or_method(symbol*)): New.
2585 (add_symtab_completions): Add complete_symbol_mode parameter. Use
2586 completion_skip_symbol.
2587 (default_collect_symbol_completion_matches_break_on): Use
2588 completion_skip_symbol. Pass down mode.
2589 (collect_file_symbol_completion_matches): Pass down mode.
2590 * symtab.h (symbol_is_function_or_method): New declarations.
2591 (completion_skip_symbol): New template function.
2592
2593 2017-11-08 Pedro Alves <palves@redhat.com>
2594
2595 * linespec.c (iterate_over_all_matching_symtabs): Add
2596 search_domain parameter. Pass it down to expand_symtabs_matching.
2597 (decode_objc): Request FUNCTIONS_DOMAIN symbols only.
2598 (lookup_prefix_sym): Adjust by passing ALL_DOMAIN as
2599 search_domain.
2600 (add_all_symbol_names_from_pspace): Add search_domain parameter.
2601 Pass it down.
2602 (find_method, find_function_symbols): Request FUNCTIONS_DOMAIN
2603 symbols.
2604 (add_matching_symbols_to_info): Add search_domain parameter. Pass
2605 it down.
2606
2607 2017-11-08 Pedro Alves <palves@redhat.com>
2608
2609 * ada-lang.c (ada_make_symbol_completion_list): Remove text and
2610 text_len locals and don't pass them down.
2611 * symtab.c (completion_list_add_name): Remove
2612 sym_text/sym_text_len parameters and adjust.
2613 (completion_list_add_symbol, completion_list_add_msymbol)
2614 (completion_list_objc_symbol, completion_list_add_fields)
2615 (add_symtab_completions): Likewise.
2616 (default_collect_symbol_completion_matches_break_on)
2617 (collect_file_symbol_completion_matches): Remove sym_text_len
2618 local and don't pass it down.
2619 * symtab.h (completion_list_add_name): Remove
2620 sym_text/sym_text_len parameters.
2621
2622 2017-11-08 Pedro Alves <palves@redhat.com>
2623
2624 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2625 unittests/lookup_name_info-selftests.c.
2626 (SUBDIR_UNITTESTS_OBS): Add lookup_name_info-selftests.o.
2627 * cp-support.c: Include "selftest.h".
2628 (cp_remove_params_1): Rename from cp_remove_params. Add
2629 'require_param' parameter, and handle it.
2630 (cp_remove_params): Reimplement.
2631 (cp_remove_params_if_any): New.
2632 (selftests::quote): New.
2633 (selftests::check_remove_params): New.
2634 (selftests::test_cp_remove_params): New.
2635 (_initialize_cp_support): Install
2636 selftests::test_cp_remove_params.
2637 * cp-support.h (cp_remove_params_if_any): Declare.
2638 * dwarf2read.c :Include "selftest.h".
2639 (dw2_expand_symtabs_matching_symbol): Use
2640 lookup_name_info::make_ignore_params.
2641 (selftests::dw2_expand_symtabs_matching::mock_mapped_index)
2642 (selftests::dw2_expand_symtabs_matching::string_or_null)
2643 (selftests::dw2_expand_symtabs_matching::check_match)
2644 (selftests::dw2_expand_symtabs_matching::test_symbols)
2645 (selftests::dw2_expand_symtabs_matching::run_test): New.
2646 (_initialize_dwarf2_read): Register
2647 selftests::dw2_expand_symtabs_matching::run_test.
2648 * psymtab.c (psym_expand_symtabs_matching): Use
2649 lookup_name_info::make_ignore_params.
2650 * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info):
2651 If the lookup name wants to ignore parameters, strip them.
2652 (compare_symbol_name): Remove sym_text/sym_text_len parameters and
2653 code handling '('.
2654 (completion_list_add_name): Don't pass down sym_text/sym_text_len.
2655 (default_collect_symbol_completion_matches_break_on): Don't try to
2656 strip parameters.
2657 * symtab.h (lookup_name_info::lookup_name_info): Add
2658 'ignore_parameters' parameter.
2659 (lookup_name_info::ignore_parameters)
2660 (lookup_name_info::make_ignore_params): New methods.
2661 (lookup_name_info::m_ignore_parameters): New field.
2662 * unittests/lookup_name_info-selftests.c: New file.
2663
2664 2017-11-08 Pedro Alves <palves@redhat.com>
2665
2666 * dwarf2read.c (dw2_expand_marked_cus)
2667 (dw2_expand_symtabs_matching_symbol): Remove forward declarations.
2668 (dw2_expand_symtabs_matching): Move further below.
2669 (dw2_expand_marked_cus): Reindent.
2670
2671 2017-11-08 Pedro Alves <palves@redhat.com>
2672
2673 * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
2674 (struct name_component): New.
2675 (mapped_index::name_components): New field.
2676 (mapped_index::symbol_name_at): New method.
2677 (dwarf2_read_index): Call mapped_index ctor.
2678 (dw2_map_matching_symbols): Add comment about name_components
2679 table.
2680 (dw2_expand_symtabs_matching): Factor part to...
2681 (dw2_expand_symtabs_matching_symbol): ... this new function.
2682 Build name components table, and lookup symbols in it before
2683 calling the name matcher.
2684 (dw2_expand_marked_cus): New, factored out from
2685 dw2_expand_symtabs_matching.
2686 (dwarf2_per_objfile_free): Call the mapped_index's dtor.
2687
2688 2017-11-08 Pedro Alves <palves@redhat.com>
2689
2690 * ada-lang.c (ada_encode): Rename to ..
2691 (ada_encode_1): ... this. Add throw_errors parameter and handle
2692 it.
2693 (ada_encode): Reimplement.
2694 (match_name): Delete, folded into full_name.
2695 (resolve_subexp): No longer pass the encoded name to
2696 ada_lookup_symbol_list.
2697 (should_use_wild_match): Delete.
2698 (name_match_type_from_name): New.
2699 (ada_lookup_simple_minsym): Use lookup_name_info and the
2700 language's symbol_name_matcher_ftype.
2701 (add_symbols_from_enclosing_procs, ada_add_local_symbols)
2702 (ada_add_block_renamings): Adjust to use lookup_name_info.
2703 (ada_lookup_name): New.
2704 (add_nonlocal_symbols, ada_add_all_symbols)
2705 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
2706 (ada_iterate_over_symbols): Adjust to use lookup_name_info.
2707 (ada_name_for_lookup): Delete.
2708 (ada_lookup_encoded_symbol): Construct a verbatim name.
2709 (wild_match): Reverse sense of return type. Use bool.
2710 (full_match): Reverse sense of return type. Inline bits of old
2711 match_name here.
2712 (ada_add_block_symbols): Adjust to use lookup_name_info.
2713 (symbol_completion_match): Delete, folded into...
2714 (ada_lookup_name_info::matches): ... .this new method.
2715 (symbol_completion_add): Delete.
2716 (ada_collect_symbol_completion_matches): Add name_match_type
2717 parameter. Adjust to use lookup_name_info and
2718 completion_list_add_name.
2719 (get_var_value, ada_add_global_exceptions): Adjust to use
2720 lookup_name_info.
2721 (ada_get_symbol_name_cmp): Delete.
2722 (do_wild_match, do_full_match): New functions.
2723 (ada_lookup_name_info::ada_lookup_name_info): New method.
2724 (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
2725 functions.
2726 (ada_language_defn): Install ada_get_symbol_name_matcher.
2727 * ada-lex.l (processId): If name starts with '<', copy it
2728 verbatim.
2729 * block.c (block_iter_match_step, block_iter_match_first)
2730 (block_iter_match_next, block_lookup_symbol)
2731 (block_lookup_symbol_primary, block_find_symbol): Adjust to use
2732 lookup_name_info.
2733 * block.h (block_iter_match_first, block_iter_match_next)
2734 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
2735 * c-lang.c (c_language_defn, cplus_language_defn)
2736 (asm_language_defn, minimal_language_defn): Adjust comments to
2737 refer to la_get_symbol_name_matcher.
2738 * completer.c (complete_files_symbols)
2739 (collect_explicit_location_matches, symbol_completer): Pass a
2740 symbol_name_match_type down.
2741 * completer.h (class completion_match, completion_match_result):
2742 New classes.
2743 (completion_tracker::reset_completion_match_result): New method.
2744 (completion_tracker::m_completion_match_result): New field.
2745 * cp-support.c (make_symbol_overload_list_block): Adjust to use
2746 lookup_name_info.
2747 (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
2748 functions.
2749 * cp-support.h (cp_get_symbol_name_matcher): New declaration.
2750 * d-lang.c: Adjust comments to refer to
2751 la_get_symbol_name_matcher.
2752 * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
2753 Adjust to use lookup_name_info.
2754 (dict_iter_match_first, dict_iter_match_next)
2755 (iter_match_first_hashed, iter_match_next_hashed)
2756 (iter_match_first_linear, iter_match_next_linear): Adjust to work
2757 with a lookup_name_info.
2758 * dictionary.h (dict_iter_match_first, dict_iter_match_next):
2759 Likewise.
2760 * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
2761 (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
2762 (gdb_index_symbol_name_matcher): New class.
2763 (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
2764 gdb_index_symbol_name_matcher. Accept a NULL symbol_matcher.
2765 * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
2766 with a symbol_name_match_type.
2767 (f_language_defn): Adjust comments to refer to
2768 la_get_symbol_name_matcher.
2769 * go-lang.c (go_language_defn): Adjust comments to refer to
2770 la_get_symbol_name_matcher.
2771 * language.c (default_symbol_name_matcher)
2772 (language_get_symbol_name_matcher): New functions.
2773 (unknown_language_defn, auto_language_defn): Adjust comments to
2774 refer to la_get_symbol_name_matcher.
2775 * language.h (symbol_name_cmp_ftype): Delete.
2776 (language_defn) <la_collect_symbol_completion_matches>: Add match
2777 type parameter.
2778 <la_get_symbol_name_cmp>: Delete field.
2779 <la_get_symbol_name_matcher>: New field.
2780 <la_iterate_over_symbols>: Adjust to use lookup_name_info.
2781 (default_symbol_name_matcher, language_get_symbol_name_matcher):
2782 Declare.
2783 * linespec.c (iterate_over_all_matching_symtabs)
2784 (iterate_over_file_blocks): Adjust to use lookup_name_info.
2785 (find_methods): Add language parameter, and use lookup_name_info
2786 and the language's symbol_name_matcher_ftype.
2787 (linespec_complete_function): Adjust.
2788 (lookup_prefix_sym): Use lookup_name_info.
2789 (add_all_symbol_names_from_pspace): Adjust.
2790 (find_superclass_methods): Add language parameter and pass it
2791 down.
2792 (find_method): Pass symbol language down.
2793 (find_linespec_symbols): Don't demangle or Ada encode here.
2794 (search_minsyms_for_name): Add lookup_name_info parameter.
2795 (add_matching_symbols_to_info): Add name_match_type parameter.
2796 Use lookup_name_info.
2797 * m2-lang.c (m2_language_defn): Adjust comments to refer to
2798 la_get_symbol_name_matcher.
2799 * minsyms.c: Include <algorithm>.
2800 (add_minsym_to_demangled_hash_table): Remove table parameter and
2801 add objfile parameter. Use search_name_hash, and add language to
2802 demangled languages vector.
2803 (struct found_minimal_symbols): New struct.
2804 (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
2805 New functions.
2806 (lookup_minimal_symbol): Adjust to use them. Don't canonicalize
2807 input names here. Use lookup_name_info instead. Lookup up
2808 demangled names once for each language in the demangled names
2809 vector.
2810 (iterate_over_minimal_symbols): Use lookup_name_info. Lookup up
2811 demangled names once for each language in the demangled names
2812 vector.
2813 (build_minimal_symbol_hash_tables): Adjust.
2814 * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
2815 lookup_name_info.
2816 * objc-lang.c (objc_language_defn): Adjust comment to refer to
2817 la_get_symbol_name_matcher.
2818 * objfiles.h: Include <vector>.
2819 (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
2820 * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
2821 la_get_symbol_name_matcher.
2822 * p-lang.c (pascal_language_defn): Adjust comment to refer to
2823 la_get_symbol_name_matcher.
2824 * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
2825 (match_partial_symbol): Use symbol_name_match_type,
2826 lookup_name_info and psymbol_name_matches.
2827 (lookup_partial_symbol): Use lookup_name_info.
2828 (map_block): Use symbol_name_match_type and lookup_name_info.
2829 (psym_map_matching_symbols): Use symbol_name_match_type.
2830 (psymbol_name_matches): New.
2831 (recursively_search_psymtabs): Use lookup_name_info and
2832 psymbol_name_matches. Rename 'kind' parameter to 'domain'.
2833 (psym_expand_symtabs_matching): Use lookup_name_info. Rename
2834 'kind' parameter to 'domain'.
2835 * rust-lang.c (rust_language_defn): Adjust comment to refer to
2836 la_get_symbol_name_matcher.
2837 * symfile-debug.c (debug_qf_map_matching_symbols)
2838 (debug_qf_map_matching_symbols): Use symbol_name_match_type.
2839 (debug_qf_expand_symtabs_matching): Use lookup_name_info.
2840 * symfile.c (expand_symtabs_matching): Use lookup_name_info.
2841 * symfile.h (quick_symbol_functions) <map_matching_symbols>:
2842 Adjust to use symbol_name_match_type.
2843 <expand_symtabs_matching>: Adjust to use lookup_name_info.
2844 (expand_symtabs_matching): Adjust to use lookup_name_info.
2845 * symmisc.c (maintenance_expand_symtabs): Use
2846 lookup_name_info::match_any ().
2847 * symtab.c (symbol_matches_search_name): New.
2848 (eq_symbol_entry): Adjust to use lookup_name_info and the
2849 language's matcher.
2850 (demangle_for_lookup_info::demangle_for_lookup_info): New.
2851 (lookup_name_info::match_any): New.
2852 (iterate_over_symbols, search_symbols): Use lookup_name_info.
2853 (compare_symbol_name): Add language, lookup_name_info and
2854 completion_match_result parameters, and use them.
2855 (completion_list_add_name): Make extern. Add language and
2856 lookup_name_info parameters. Use them.
2857 (completion_list_add_symbol, completion_list_add_msymbol)
2858 (completion_list_objc_symbol): Add lookup_name_info parameters and
2859 adjust. Pass down language.
2860 (completion_list_add_fields): Add lookup_name_info parameters and
2861 adjust. Pass down language.
2862 (add_symtab_completions): Add lookup_name_info parameters and
2863 adjust.
2864 (default_collect_symbol_completion_matches_break_on): Add
2865 name_match_type parameter, and use it. Use lookup_name_info.
2866 (default_collect_symbol_completion_matches)
2867 (collect_symbol_completion_matches): Add name_match_type
2868 parameter, and pass it down.
2869 (collect_symbol_completion_matches_type): Adjust.
2870 (collect_file_symbol_completion_matches): Add name_match_type
2871 parameter, and use lookup_name_info.
2872 * symtab.h: Include <string> and "common/gdb_optional.h".
2873 (enum class symbol_name_match_type): New.
2874 (class ada_lookup_name_info): New.
2875 (struct demangle_for_lookup_info): New.
2876 (class lookup_name_info): New.
2877 (symbol_name_matcher_ftype): New.
2878 (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
2879 (symbol_matches_search_name): Declare.
2880 (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
2881 (default_collect_symbol_completion_matches)
2882 (collect_symbol_completion_matches)
2883 (collect_file_symbol_completion_matches): Add name_match_type
2884 parameter.
2885 (iterate_over_symbols): Use lookup_name_info.
2886 (completion_list_add_name): Declare.
2887 * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
2888 (strncmp_iw_with_mode): Now extern.
2889 * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
2890 (strncmp_iw_with_mode): Declare.
2891
2892 2017-11-08 Keith Seitz <keiths@redhat.com>
2893 Pedro Alves <palves@redhat.com>
2894
2895 * ada-lang.c (ada_language_defn): Install
2896 default_search_name_hash.
2897 * buildsym.c (struct buildsym_compunit): <language>: New field.
2898 (finish_block_internal): Pass language when creating dictionaries.
2899 (start_buildsym_compunit, start_symtab): New language parameters.
2900 Use them.
2901 (restart_symtab): Pass down compilation unit's language.
2902 * buildsym.h (enum language): Forward declare.
2903 (start_symtab): New 'language' parameter.
2904 * c-lang.c (c_language_defn, cplus_language_defn)
2905 (asm_language_defn, minimal_language_defn): Install
2906 default_search_name_hash.
2907 * coffread.c (coff_start_symtab): Adjust.
2908 * d-lang.c (d_language_defn): Install default_search_name_hash.
2909 * dbxread.c (struct symloc): Add 'pst_language' field.
2910 (PST_LANGUAGE): Define.
2911 (start_psymtab, read_ofile_symtab): Use it.
2912 (process_one_symbol): New 'language' parameter. Pass it down.
2913 * dictionary.c (struct dictionary) <language>: New field.
2914 (DICT_LANGUAGE): Define.
2915 (dict_create_hashed, dict_create_hashed_expandable)
2916 (dict_create_linear, dict_create_linear_expandable): New parameter
2917 'language'. Set the dictionary's language.
2918 (iter_match_first_hashed): Adjust to rename.
2919 (insert_symbol_hashed): Assert we don't see mismatching
2920 languages. Adjust to rename.
2921 (dict_hash): Rename to ...
2922 (default_search_name_hash): ... this and make extern.
2923 * dictionary.h (struct language_defn): Forward declare.
2924 (dict_create_hashed): New parameter 'language'.
2925 * dwarf2read.c (dwarf2_start_symtab): Pass down language.
2926 * f-lang.c (f_language_defn): Install default_search_name_hash.
2927 * go-lang.c (go_language_defn): Install default_search_name_hash.
2928 * jit.c (finalize_symtab): Pass compunit's language to dictionary
2929 creation.
2930 * language.c (unknown_language_defn, auto_language_defn):
2931 * language.h (language_defn::la_search_name_hash): New field.
2932 (default_search_name_hash): Declare.
2933 * m2-lang.c (m2_language_defn): Install default_search_name_hash.
2934 * mdebugread.c (new_block): New parameter 'language'.
2935 * mdebugread.c (parse_symbol): Pass symbol language to block
2936 allocation.
2937 (psymtab_to_symtab_1): Pass down language.
2938 (new_symtab): Pass compunit's language to block allocation.
2939 * objc-lang.c (objc_language_defn): Install
2940 default_search_name_hash.
2941 * opencl-lang.c (opencl_language_defn):
2942 * p-lang.c (pascal_language_defn): Install
2943 default_search_name_hash.
2944 * rust-lang.c (rust_language_defn): Install
2945 default_search_name_hash.
2946 * stabsread.h (enum language): Forward declare.
2947 (process_one_symbol): Add 'language' parameter.
2948 * symtab.c (search_name_hash): New function.
2949 * symtab.h (search_name_hash): Declare.
2950 * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
2951
2952 2017-11-08 Pedro Alves <palves@redhat.com>
2953
2954 * cp-name-parser.y (main): Don't initialize extra_chars.
2955
2956 2017-11-07 Tom Tromey <tom@tromey.com>
2957
2958 * event-top.h (command_handler): Constify.
2959 * record-full.c (cmd_record_full_start): Update.
2960 * thread.c (thread_apply_all_command): Update.
2961 * printcmd.c (eval_command): Update.
2962 * mi/mi-main.c (mi_execute_cli_command): Update.
2963 (mi_execute_async_cli_command): Update.
2964 * tui/tui-stack.c (tui_update_command): Update.
2965 * cli/cli-interp.c (safe_execute_command): Constify.
2966 * record.c (record_start): Update.
2967 (record_start, record_stop, cmd_record_start): Update.
2968 * record-btrace.c (cmd_record_btrace_bts_start): Update.
2969 (cmd_record_btrace_pt_start): Update.
2970 (cmd_record_btrace_start): Update.
2971 (cmd_record_btrace_start): Update.
2972 * reverse.c (exec_reverse_once): Update.
2973 * python/python.c (execute_gdb_command): Don't copy the command.
2974 * event-top.c (command_line_handler): Update.
2975 (command_handler): Constify.
2976 * defs.h (deprecated_call_command_hook): Constify.
2977 * cli/cli-script.h (execute_user_command): Constify.
2978 * cli/cli-script.c (execute_user_command): Constify.
2979 (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
2980 (enum command_control_type): Update.
2981 * main.c (catch_command_errors): Remove non-const overload.
2982 (catch_command_errors_ftype): Remove.
2983 * python/py-cmd.c (cmdpy_function): Constify.
2984 * guile/scm-cmd.c (cmdscm_function): Constify.
2985 * cli/cli-dump.c (call_dump_func): Constify.
2986 * cli/cli-decode.c (do_const_cfunc): Constify.
2987 (do_sfunc): Constify.
2988 (cmd_func): Constify.
2989 * gdbcmd.h (execute_command, execute_command_to_string): Constify.
2990 * top.h (execute_command): Constify.
2991 * top.c (execute_command): Constify.
2992 (execute_command_to_string): Constify.
2993 (deprecated_call_command_hook): Constify.
2994 * command.h (cmd_func): Constify.
2995 * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
2996
2997 2017-11-07 Tom Tromey <tom@tromey.com>
2998
2999 * ada-lang.c (catch_ada_exception_command): Constify.
3000 (catch_assert_command): Constify.
3001 * break-catch-throw.c (catch_catch_command, catch_throw_command)
3002 (catch_rethrow_command): Constify.
3003 (catch_exception_command_1): Constify.
3004 * breakpoint.h (add_catch_command): Constify.
3005 * break-catch-syscall.c (catch_syscall_command_1): Constify.
3006 (catch_syscall_split_args): Constify.
3007 * break-catch-sig.c (catch_signal_command): Constify.
3008 (catch_signal_split_args): Constify.
3009 * cli/cli-decode.h (struct cmd_list_element) <function>: Use
3010 cmd_const_sfunc_ftype.
3011 * cli/cli-decode.c (add_setshow_cmd_full): Constify.
3012 (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
3013 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
3014 (add_setshow_string_cmd, struct cmd_list_element)
3015 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
3016 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
3017 (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
3018 Constify.
3019 (set_cmd_sfunc): Constify.
3020 (empty_sfunc): Constify.
3021 * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
3022 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
3023 (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
3024 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
3025 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
3026 (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
3027 Constify.
3028 (set_cmd_sfunc): Constify.
3029 (cmd_sfunc_ftype): Remove.
3030 * compile/compile.c (set_compile_args): Constify.
3031 * infrun.c (set_disable_randomization): Constify.
3032 * infcmd.c (set_args_command, set_cwd_command): Constify.
3033 * breakpoint.c (set_condition_evaluation_mode): Constify.
3034 (add_catch_command): Constify.
3035 (catch_fork_command_1, catch_exec_command_1)
3036 (catch_load_command_1, catch_unload_command_1): Constify.
3037 (catch_load_or_unload): Constify.
3038 * guile/scm-param.c (pascm_set_func): Constify.
3039 (add_setshow_generic): Constify.
3040 * python/py-param.c (get_set_value): Constify.
3041 * top.h (set_verbose): Constify.
3042 * tui/tui-win.c (tui_set_var_cmd): Constify.
3043 * mi/mi-main.c (set_mi_async_command): Constify.
3044 * cli/cli-logging.c (set_logging_overwrite)
3045 (set_logging_redirect): Constify.
3046 * value.c (set_max_value_size): Constify.
3047 * valprint.c (set_input_radix, set_output_radix): Constify.
3048 * utils.c (set_width_command, set_height_command): Constify.
3049 * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
3050 * tracepoint.c (set_disconnected_tracing)
3051 (set_circular_trace_buffer, set_trace_buffer_size)
3052 (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
3053 * top.c (set_history_size_command, set_verbose, set_editing)
3054 (set_gdb_datadir, set_history_filename): Constify.
3055 * target.c (set_targetdebug, maint_set_target_async_command)
3056 (maint_set_target_non_stop_command, set_target_permissions)
3057 (set_write_memory_permission): Constify.
3058 (open_target): Constify.
3059 * target-descriptions.c (set_tdesc_filename_cmd): Constify.
3060 * target-dcache.c (set_stack_cache, set_code_cache): Constify.
3061 * symtab.c (set_symbol_cache_size_handler): Constify.
3062 * symfile.c (set_ext_lang_command): Constify.
3063 * symfile-debug.c (set_debug_symfile): Constify.
3064 * source.c (set_directories_command): Constify.
3065 * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
3066 * serial.c (set_parity): Constify.
3067 * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
3068 * remote.c (set_remote_exec_file, set_remotebreak)
3069 (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
3070 * record.c (set_record_insn_history_size)
3071 (set_record_call_history_size): Constify.
3072 * record-full.c (set_record_full_insn_max_num): Constify.
3073 * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
3074 * osabi.c (set_osabi): Constify.
3075 * mips-tdep.c (set_mips64_transfers_32bit_regs)
3076 (reinit_frame_cache_sfunc, mips_abi_update): Constify.
3077 * maint.c (maintenance_set_profile_cmd): Constify.
3078 * linux-thread-db.c (set_libthread_db_search_path): Constify.
3079 * language.c (set_language_command, set_range_command)
3080 (set_case_command): Constify.
3081 * infrun.c (set_non_stop, set_observer_mode)
3082 (set_stop_on_solib_events, set_schedlock_func)
3083 (set_exec_direction_func): Constify.
3084 * infcmd.c (set_inferior_tty_command): Constify.
3085 * disasm.c (set_disassembler_options_sfunc): Constify.
3086 * demangle.c (set_demangling_command): Constify.
3087 * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
3088 * cris-tdep.c (set_cris_version, set_cris_mode)
3089 (set_cris_dwarf2_cfi): Constify.
3090 * corefile.c (set_gnutarget_command): Constify.
3091 * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
3092 (set_target_wide_charset_sfunc): Constify.
3093 * breakpoint.c (update_dprintf_commands): Constify.
3094 * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
3095 * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
3096 (set_disassembly_style_sfunc): Constify.
3097 * arch-utils.c (set_endian, set_architecture): Constify.
3098 * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
3099 * agent.c (set_can_use_agent): Constify.
3100
3101 2017-11-07 Tom Tromey <tom@tromey.com>
3102
3103 * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
3104 (go32_pde, go32_pte, go32_pte_for_address): Constify.
3105 * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
3106 (set_thread_default_pause_cmd, set_thread_default_run_cmd)
3107 (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
3108 (parse_int_arg, show_thread_default_detach_sc_cmd)
3109 (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
3110 (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
3111 (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
3112 (show_task_pause_cmd, set_task_detach_sc_cmd)
3113 (show_task_detach_sc_cmd, set_task_exc_port_cmd)
3114 (set_noninvasive_cmd, set_thread_pause_cmd)
3115 (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
3116 (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
3117 (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
3118 * windows-nat.c (display_selectors): Constify.
3119 * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
3120 non-const "cfunc".
3121 * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
3122 (cmd_cfunc_eq): Likewise.
3123 (struct cmd_list_element): Likewise.
3124 (do_cfunc): Remove.
3125 (cli_user_command_p): Update.
3126 * command.h (add_cmd): Remove non-const overload.
3127 (cmd_cfunc_ftype): Remove typedef.
3128 (cmd_cfunc_eq): Remove non-const overload.
3129 * value.c (show_values): Constify.
3130 * thread.c (thread_apply_all_command): Constify.
3131 * symfile.c (load_command): Constify.
3132 * source.c (directory_command): Constify.
3133 * maint.c (maintenance_internal_error)
3134 (maintenance_demangler_warning, maintenance_space_display)
3135 (maintenance_print_architecture, maintenance_translate_address)
3136 (maintenance_info_selftests, maintenance_internal_warning):
3137 Constify.
3138 * breakpoint.c (disable_trace_command, enable_trace_command):
3139 Constify.
3140 * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
3141 Constify.
3142 (add_auto_load_safe_path): Constify.
3143 * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
3144 * top.h (show_commands): Constify.
3145 * linux-thread-db.c (info_auto_load_libthread_db): Constify.
3146 * sparc64-tdep.c (adi_examine_command): Constify.
3147 (adi_assign_command): Constify.
3148
3149 2017-11-07 Tom Tromey <tom@tromey.com>
3150
3151 * frame.h (info_locals_command, info_args_command): Constify.
3152 * auto-load.h (auto_load_info_scripts): Constify.
3153 * inferior.h (registers_info): Constify.
3154 * copying.c: Rebuild.
3155 * copying.awk: Constify generated commands.
3156 * auto-load.c (auto_load_info_scripts)
3157 (info_auto_load_gdb_scripts): Constify.
3158 * cli/cli-decode.c (struct cmd_list_element): Take a
3159 cmd_const_cfunc_ftype.
3160 * command.h (add_info): Take a cmd_const_cfunc_ftype.
3161 * tui/tui-win.c (tui_all_windows_info): Constify.
3162 * python/py-auto-load.c (info_auto_load_python_scripts):
3163 Constify.
3164 * cli/cli-cmds.c (show_command): Remove non-const overload.
3165 * tracepoint.c (info_tvariables_command, info_scope_command):
3166 Constify.
3167 (info_static_tracepoint_markers_command): Constify.
3168 * thread.c (info_threads_command): Constify.
3169 (print_thread_info_1): Constify.
3170 * target.c (info_target_command): Constify.
3171 * symtab.c (info_sources_command, info_functions_command)
3172 (info_types_command): Constify.
3173 (info_variables_command): Remove non-const overload.
3174 * symfile.c (info_ext_lang_command): Constify.
3175 * stack.c (info_frame_command, info_locals_command)
3176 (info_args_command): Constify.
3177 (backtrace_command): Remove non-const overload.
3178 * source.c (info_source_command, info_line_command): Constify.
3179 * solib.c (info_sharedlibrary_command): Constify.
3180 * skip.c (info_skip_command): Constify.
3181 * ser-go32.c (info_serial_command): Constify.
3182 * reverse.c (info_bookmarks_command): Constify.
3183 * printcmd.c (info_symbol_command, info_address_command)
3184 (info_display_command): Constify.
3185 * osdata.c (info_osdata_command): Constify.
3186 * objc-lang.c (info_selectors_command, info_classes_command):
3187 Constify.
3188 * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
3189 * memattr.c (info_mem_command): Constify.
3190 * macrocmd.c (info_macro_command, info_macros_command): Constify.
3191 * linux-fork.c (info_checkpoints_command): Constify.
3192 * infrun.c (info_signals_command): Constify.
3193 * inflow.c (info_terminal_command): Constify.
3194 * inferior.c (info_inferiors_command): Constify.
3195 (print_inferior): Constify.
3196 * infcmd.c (info_program_command, info_all_registers_command)
3197 (info_registers_command, info_vector_command)
3198 (info_float_command): Constify.
3199 (registers_info): Constify.
3200 * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
3201 (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
3202 Constify.
3203 * f-valprint.c (info_common_command): Constify.
3204 * dcache.c (info_dcache_command): Constify.
3205 (dcache_info_1): Constify.
3206 * darwin-nat-info.c (info_mach_tasks_command)
3207 (info_mach_task_command, info_mach_ports_command)
3208 (info_mach_port_command, info_mach_threads_command)
3209 (info_mach_thread_command, info_mach_regions_command)
3210 (info_mach_regions_recurse_command, info_mach_region_command)
3211 (info_mach_exceptions_command): Constify.
3212 (get_task_from_args): Constify.
3213 * cp-support.c (info_vtbl_command): Constify.
3214 * breakpoint.c (info_watchpoints_command)
3215 (info_tracepoints_command): Constify.
3216 (info_breakpoints_command): Remove non-const overload.
3217 * avr-tdep.c (avr_io_reg_read_command): Constify.
3218 * auxv.c (info_auxv_command): Constify.
3219 * ada-tasks.c (info_tasks_command): Constify.
3220 (info_task): Constify.
3221 * ada-lang.c (info_exceptions_command): Constify.
3222
3223 2017-11-07 Tom Tromey <tom@tromey.com>
3224
3225 * solib.h (no_shared_libraries): Constify.
3226 * frame.h (return_command): Constify.
3227 * cli/cli-cmds.h (quit_command): Constify.
3228 * top.h (quit_command, execute_command): Constify.
3229 * target.h (flash_erase_command): Constify.
3230 * inferior.h (set_inferior_args, attach_command): Constify.
3231 * tracepoint.h (start_tracing, stop_tracing): Constify.
3232 * breakpoint.h (break_command, tbreak_command)
3233 (hbreak_command_wrapper, thbreak_command_wrapper)
3234 (rbreak_command_wrapper, watch_command_wrapper)
3235 (awatch_command_wrapper, rwatch_command_wrapper)
3236 (get_tracepoint_by_number): Constify.
3237 * symtab.c (info_variables_command, rbreak_command)
3238 (symtab_symbol_info): Constify.
3239 (info_variables_command): Add non-const overload.
3240 * top.c (dont_repeat_command): Constify.
3241 * breakpoint.c (ignore_command, commands_command)
3242 (condition_command, tbreak_command, hbreak_command)
3243 (thbreak_command, clear_command, break_command)
3244 (info_breakpoints_command, watch_command, rwatch_command)
3245 (awatch_command, trace_command, ftrace_command, strace_command)
3246 (trace_pass_command, break_range_command, dprintf_command)
3247 (agent_printf_command, get_tracepoint_by_number)
3248 (watch_maybe_just_location, trace_pass_command): Constify.
3249 (info_breakpoints_command): Add non-const overload.
3250 * tracefile.c (tsave_command): Constify.
3251 * infcmd.c (attach_command, disconnect_command, signal_command)
3252 (queue_signal_command, stepi_command, nexti_command)
3253 (finish_command, next_command, step_command, until_command)
3254 (advance_command, jump_command, continue_command, run_command)
3255 (start_command, starti_command, interrupt_command)
3256 (run_command_1, set_inferior_args, step_1): Constify.
3257 * inferior.c (add_inferior_command, remove_inferior_command)
3258 (clone_inferior_command): Constify.
3259 * linux-fork.c (checkpoint_command, restart_command): Constify.
3260 * windows-nat.c (signal_event_command): Constify.
3261 * guile/guile.c (guile_repl_command, guile_command): Constify.
3262 * printcmd.c (x_command, display_command, printf_command)
3263 (output_command, set_command, call_command, print_command)
3264 (eval_command): Constify.
3265 (non_const_set_command): Remove.
3266 (_initialize_printcmd): Update.
3267 * source.c (forward_search_command, reverse_search_command):
3268 Constify.
3269 * jit.c (jit_reader_load_command, jit_reader_unload_command):
3270 Constify.
3271 * infrun.c (handle_command): Constify.
3272 * memattr.c (mem_command): Constify.
3273 * stack.c (return_command, up_command, up_silently_command)
3274 (down_command, down_silently_command, frame_command)
3275 (backtrace_command, func_command, backtrace_command_1): Constify.
3276 (backtrace_command): Add non-const overload.
3277 * remote-sim.c (simulator_command): Constify.
3278 * exec.c (set_section_command): Constify.
3279 * tracepoint.c (tdump_command, trace_variable_command)
3280 (tstatus_command, tstop_command, tstart_command)
3281 (end_actions_pseudocommand, while_stepping_pseudocommand)
3282 (collect_pseudocommand, teval_pseudocommand, actions_command)
3283 (start_tracing, stop_tracing): Constify.
3284 * value.c (init_if_undefined_command): Constify.
3285 * tui/tui-stack.c (tui_update_command): Constify.
3286 * tui/tui-win.c (tui_refresh_all_command)
3287 (tui_set_tab_width_command, tui_set_win_height_command)
3288 (tui_set_focus_command, tui_scroll_forward_command)
3289 (tui_scroll_backward_command, tui_scroll_left_command)
3290 (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
3291 (tui_set_win_height): Constify.
3292 * tui/tui-layout.c (tui_layout_command): Constify.
3293 * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
3294 (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
3295 (proc_untrace_sysexit_cmd): Constify.
3296 * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
3297 (threadset_test_cmd, threadlist_update_test_cmd)
3298 (threadalive_test): Constify.
3299 * objc-lang.c (print_object_command): Constify.
3300 * command.h (add_com): Constify.
3301 * cli/cli-dump.c (restore_command): Constify.
3302 * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
3303 (help_command, complete_command, shell_command, edit_command)
3304 (list_command, disassemble_command, make_command)
3305 (apropos_command, alias_command): Constify.
3306 * cli/cli-script.c (document_command, define_command)
3307 (while_command, if_command, validate_comname): Constify.
3308 * cli/cli-decode.c (struct cmd_list_element): Change type of
3309 "fun".
3310 * target.c (do_monitor_command, flash_erase_command): Constify.
3311 * regcache.c (reg_flush_command): Constify.
3312 * reverse.c (reverse_step, reverse_next, reverse_stepi)
3313 (reverse_nexti, reverse_continue, reverse_finish)
3314 (save_bookmark_command, goto_bookmark_command)
3315 (exec_reverse_once): Constify.
3316 * python/python.c (python_interactive_command, python_command):
3317 Constify.
3318 * typeprint.c (ptype_command, whatis_command, whatis_exp):
3319 Constify.
3320 * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
3321 * gcore.c (gcore_command): Constify.
3322
3323 2017-11-07 Tom Tromey <tom@tromey.com>
3324
3325 * printcmd.c (x_command): Call set_repeat_arguments.
3326 * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
3327 * top.c (repeat_arguments): New global.
3328 (set_repeat_arguments): New function.
3329 (execute_command): Handle repeat_arguments.
3330 (show_commands): Calls set_repeat_arguments.
3331 * command.h (set_repeat_arguments): Declare.
3332
3333 2017-11-07 Tom Tromey <tom@tromey.com>
3334
3335 * stack.c (backtrace_command): Use std::string.
3336 (backtrace_command_1): Make "count_exp" const.
3337
3338 2017-11-07 Tom Tromey <tom@tromey.com>
3339
3340 * source.c (directory_switch, mod_path, add_path): Constify.
3341 * defs.h (add_path, mod_path, directory_switch): Constify.
3342 * mi/mi-cmd-env.c (env_mod_path): Constify.
3343
3344 2017-11-07 Tom Tromey <tom@tromey.com>
3345
3346 * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
3347 (run_command_1, continue_command, step_1, jump_command)
3348 (signal_command, until_command, advance_command, finish_command)
3349 (attach_command): Update.
3350
3351 2017-11-07 Tom Tromey <tom@tromey.com>
3352
3353 * command.h (set_cmd_cfunc): Don't declare.
3354 * cli/cli-decode.c (set_cmd_cfunc): Now static.
3355
3356 2017-11-07 Tom Tromey <tom@tromey.com>
3357
3358 * stack.c (select_frame_command): Constify.
3359 * cli/cli-decode.c (add_com_suppress_notification): Constify.
3360 * command.h (add_com_suppress_notification): Constify.
3361
3362 2017-11-07 Tom Tromey <tom@tromey.com>
3363
3364 * breakpoint.c (stop_command): Constify.
3365 * cli/cli-decode.c (struct cmd_list_element): Constify.
3366 * command.h (add_abbrev_prefix_cmd): Constify.
3367
3368 2017-11-07 Pedro Alves <palves@redhat.com>
3369
3370 * breakpoint.c (extract_bp_kind): New enum.
3371 (extract_bp_num, extract_bp_or_bp_range): New functions, partially
3372 factored out from ...
3373 (extract_bp_number_and_location): ... here.
3374 * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
3375
3376 2017-11-07 Pedro Alves <palves@redhat.com>
3377
3378 * breakpoint.c (extract_bp_number_and_location): Change return
3379 type to void. Throw error instead of warning.
3380 (enable_disable_command): Adjust.
3381
3382 2017-11-07 Xavier Roirand <roirand@adacore.com>
3383 Pedro Alves <palves@redhat.com>
3384
3385 * breakpoint.c (map_breakpoint_number_range): New, factored out
3386 from ...
3387 (map_breakpoint_numbers): ... here.
3388 (find_location_by_number): Change parameters from string to
3389 breakpoint number and location.
3390 (extract_bp_number_and_location): New function.
3391 (enable_disable_bp_num_loc)
3392 (enable_disable_breakpoint_location_range)
3393 (enable_disable_command): New functions, factored out ...
3394 (enable_command, disable_command): ... these functions, and
3395 adjusted to support ranges.
3396 * NEWS: Document enable/disable breakpoint location range feature.
3397
3398 2017-11-06 Luis Machado <luis.machado@linaro.org>
3399
3400 * MAINTAINERS (Write After Approval): Update my e-mail address.
3401
3402 2017-11-06 Pedro Alves <palves@redhat.com>
3403
3404 * gnu-nat.c (gnu_terminal_init): Delete.
3405 (gnu_target): Don't install gnu_terminal_init.
3406 * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
3407 (child_terminal_init): ... this function.
3408
3409 2017-11-06 Pedro Alves <palves@redhat.com>
3410
3411 * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
3412 sgtty.h.
3413 * config.in, configure: Regenerate.
3414
3415 2017-11-06 Pedro Alves <palves@redhat.com>
3416
3417 * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
3418 (async_init_signals): Adjust.
3419 (handle_stop_sig): Rename to ...
3420 (handle_sigtstp): ... this.
3421 (async_stop_sig): Rename to ...
3422 (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
3423 SIGTSTP path.
3424 * event-top.h: Move signal.h include to the top. Check SIGTSTP
3425 instead of STOP_SIGNAL thoughout.
3426 (handle_stop_sig): Rename to ...
3427 (handle_sigtstp): ... this.
3428 * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
3429
3430 2017-11-06 Pedro Alves <palves@redhat.com>
3431
3432 * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
3433 longer set flags twice in row.
3434
3435 2017-11-06 Pedro Alves <palves@redhat.com>
3436
3437 * Makefile.in (SER_HARDWIRE): Update comment.
3438 (HFILES_NO_SRCDIR): Remove gdb_termios.h.
3439 * common/gdb_termios.h: Delete file.
3440 * common/job-control.c: Include termios.h and unistd.h instead of
3441 gdb_termios.h.
3442 (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
3443 check.
3444 (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
3445 Remove sgtty code.
3446 * configure.ac: No longer check for termio.h and sgtty.h.
3447 * configure: Regenerate.
3448 * inflow.c: Include termios.h instead of gdb_termios.h. Replace
3449 PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
3450 Replace PROCESS_GROUP_TYPE references with pid_t references
3451 throughout.
3452 (gdb_getpgrp): Delete.
3453 (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
3454 (child_terminal_inferior): Remove comment. Remove sgtty code.
3455 (child_terminal_ours_1): Use tcgetpgrp directly instead of
3456 gdb_getpgrp. Use serial_set_tty_state instead aof
3457 serial_noflush_set_tty_state. Remove sgtty code.
3458 * inflow.h: Include unistd.h instead of gdb_termios.h. Replace
3459 PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
3460 (inferior_process_group): Now returns pid_t.
3461 * ser-base.c (ser_base_noflush_set_tty_state): Delete.
3462 * ser-base.h (ser_base_noflush_set_tty_state): Delete.
3463 * ser-event.c (serial_event_ops): Update.
3464 * ser-go32.c (dos_noflush_set_tty_state): Delete.
3465 (dos_ops): Update.
3466 * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
3467 * ser-pipe.c (pipe_ops): Update.
3468 * ser-tcp.c (tcp_ops): Update.
3469 * ser-unix.c: Include termios.h instead of gdb_termios.h. Remove
3470 HAVE_TERMIOS checks.
3471 [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
3472 [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
3473 (get_tty_state, set_tty_state): Drop termio and sgtty code, and
3474 assume termios.
3475 (hardwire_noflush_set_tty_state): Delete.
3476 (hardwire_print_tty_state, hardwire_drain_output)
3477 (hardwire_flush_output, hardwire_flush_input)
3478 (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
3479 (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
3480 code, and assume termios.
3481 (hardwire_ops): Update.
3482 (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
3483 * serial.c (serial_noflush_set_tty_state): Delete.
3484 * serial.h (serial_noflush_set_tty_state): Delete.
3485 (serial_ops::noflush_set_tty_state): Delete.
3486
3487 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3488
3489 * Makefile.in (SFILES): Remove doublest.c and dfp.c.
3490 (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
3491 (COMMON_OBS): Remove doublest.o and dfp.o.
3492 Do not build target-float.c (instead of doublest.c)
3493 with -Wformat-nonliteral.
3494
3495 * doublest.c: Remove file.
3496 * doublest.h: Remove file.
3497 * dfp.c: Remove file.
3498 * dfp.h: Remove file.
3499
3500 * target-float.c: Do not include "doublest.h" and "dfp.h".
3501 (DOUBLEST): Move here from doublest.h.
3502 (enum float_kind): Likewise.
3503 (FLOATFORMAT_CHAR_BIT): Likewise.
3504 (FLOATFORMAT_LARGEST_BYTES): Likewise.
3505 (floatformat_totalsize_bytes): Move here from doublest.c. Make static.
3506 (floatformat_precision): Likewise.
3507 (floatformat_normalize_byteorder, get_field, put_field): Likewise.
3508 (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
3509 Likewise.
3510 (host_float_format, host_double_format, host_long_double_format):
3511 Likewise.
3512 (floatformat_to_string, floatformat_from_string): Likewise.
3513 (floatformat_to_doublest): Likewise. Also, inline the original
3514 convert_floatformat_to_doublest.
3515 (floatformat_from_doublest): Likewise. Also, inline the original
3516 convert_floatformat_from_doublest.
3517
3518 Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
3519 (MAX_DECIMAL_STRING): Move here from dfp.c.
3520 (match_endianness): Likewise.
3521 (set_decnumber_context, decimal_check_errors): Likewise.
3522 (decimal_from_number, decimal_to_number): Likewise.
3523 (decimal_to_string, decimal_from_string): Likewise. Make static.
3524 (decimal_from_longest, decimal_from_ulongest): Likewise.
3525 (decimal_to_longest): Likewise.
3526 (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
3527 (decimal_convert): Likewise.
3528
3529 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3530
3531 * doublest.c: Do not include "gdbtypes.h".
3532 (extract_typed_floating): Remove.
3533 (store_typed_floating): Remove.
3534 (convert_typed_floating): Remove.
3535 * doublest.h (struct type): Remove.
3536 (DOUBLEST_PRINT_FORMAT): Remove.
3537 (DOUBLEST_SCAN_FORMAT): Remove.
3538 (extract_typed_floating): Remove.
3539 (store_typed_floating): Remove.
3540 (convert_typed_floating): Remove.
3541
3542 * dfp.c (decimal_from_doublest): Remove.
3543 (decimal_to_doublest): Remove.
3544 * dfp.h: Do not include "doublest.h".
3545 (decimal_from_doublest): Remove.
3546 (decimal_to_doublest): Remove.
3547
3548 * value.c: Do not include "doublest.h" and "dfp.h".
3549 (value_as_double): Remove.
3550 (unpack_double): Remove.
3551 (value_from_double): Remove.
3552 (value_from_decfloat): Remove.
3553 * value.h: Do not include "doublest.h".
3554 (value_as_double): Remove.
3555 (unpack_double): Remove.
3556 (value_from_double): Remove.
3557 (value_from_decfloat): Remove.
3558
3559 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3560
3561 * i386-tdep.c: Include "target-float.h". Do not include "doublest.h".
3562 (i386_extract_return_value): Use target_float_convert.
3563 (i386_store_return_value): Likewise.
3564 * i387-tdep.c (i387_register_to_value): Use target_float_convert.
3565 (i387_value_to_register): Likewise.
3566 * ia64-tdep.c: Include "target-float.h". Do not include "doublest.h".
3567 (ia64_register_to_value): Use target_float_convert.
3568 (ia64_value_to_register): Likewise.
3569 (ia64_extract_return_value): Likewise.
3570 (ia64_store_return_value): Likewise.
3571 (ia64_push_dummy_call): Likewise.
3572 * m68k-tdep.c: Include "target-float.h".
3573 (m68k_register_to_value): Use target_float_convert.
3574 (m68k_value_to_register): Likewise.
3575 (m68k_svr4_extract_return_value): Likewise.
3576 (m68k_svr4_store_return_value): Likewise.
3577 * ppc-sysv-tdep.c: Include "target-float.h".
3578 (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
3579 (do_ppc_sysv_return_value): Likewise.
3580 (ppc64_sysv_abi_push_freg): Likewise.
3581 (ppc64_sysv_abi_return_value_base): Likewise.
3582 * rs6000-aix-tdep.c: Include "target-float.h".
3583 (rs6000_push_dummy_call): Use target_float_convert.
3584 (rs6000_return_value): Likewise.
3585 * rs6000-lynx178-tdep.c: Include "target-float.h".
3586 (rs6000_lynx178_push_dummy_call): Use target_float_convert.
3587 (rs6000_lynx178_return_value): Likewise.
3588 * rs6000-tdep.c: Include "target-float.h". Do not include "doublest.h".
3589 (rs6000_register_to_value): Use target_float_convert.
3590 (rs6000_value_to_register): Likewise.
3591 * arm-tdep.c: Include "target-float.h". Do not include "doublest.h".
3592 (arm_extract_return_value): Use target_float_convert.
3593 (arm_store_return_value): Likewise.
3594 * sh-tdep.c: Include "target-float.h". Do not include "doublest.h".
3595 (sh_register_convert_to_virtual): Use target_float_convert.
3596 (sh_register_convert_to_raw): Likewise.
3597 * sh64-tdep.c: Include "target-float.h".
3598 (sh64_extract_return_value): Use target_float_convert.
3599 (sh64_register_convert_to_virtual): Likewise.
3600 (sh64_register_convert_to_raw): Likewise. Fix argument types.
3601
3602 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3603
3604 * target-float.c (floatformat_to_host_double): New function.
3605 (floatformat_from_host_double): Likewise.
3606 (target_float_to_host_double): Likewise.
3607 (target_float_from_host_double): Likewise.
3608 * target-float.h (target_float_to_host_double): Add prototype.
3609 (target_float_from_host_double): Likewise.
3610
3611 * guile/scm-value.c: Include "target-float.h".
3612 (gdbscm_value_to_real): Use target_float_to_host_double.
3613 Handle integer source values via value_as_long.
3614 * guile/scm-math.c: Include "target-float.h". Do not include
3615 "doublest.h", "dfp.h", and "expression.h".
3616 (vlscm_convert_typed_number): Use target_float_from_host_double.
3617 (vlscm_convert_number): Likewise.
3618
3619 * python/py-value.c (valpy_float): Use target_float_to_host_double.
3620 (convert_value_from_python): Use target_float_from_host_double.
3621
3622 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3623
3624 * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
3625 (cast_from_fixed): Likewise.
3626 (ada_scaling_type): New function.
3627 (ada_delta): Return value instead of DOUBLEST. Perform target
3628 arithmetic instead of host arithmetic.
3629 (scaling_factor): Rename to ...
3630 (ada_scaling_factor) ... this. Make non-static. Return value instead
3631 of DOUBLEST. Perform target arithmetic instead of host arithmetic.
3632 (ada_fixed_to_float): Remove.
3633 (ada_float_to_fixed): Remove.
3634 * ada-lang.h (ada_fixed_to_float): Remove.
3635 (ada_float_to_fixed): Remove.
3636 (ada_delta): Return value instead of DOUBLEST.
3637 (ada_scaling_factor): Add prototype.
3638
3639 * ada-typeprint.c: Include "target-float.h".
3640 (print_fixed_point_type): Perform target arithmetic instead of
3641 host arithmetic.
3642 * ada-valprint.c: Include "target-float.h".
3643 (ada_val_print_num): Perform target arithmetic instead of
3644 host arithmetic for fixed-point types.
3645
3646 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3647
3648 * target-float.c: Include <math.h>.
3649 (floatformat_binop): New function.
3650 (floatformat_compare): Likewise.
3651 (target_float_binop): Likewise.
3652 (target_float_compare): Likewise.
3653 * target-float.h: Include "expression.h".
3654 (target_float_binop): Add prototype.
3655 (target_float_compare): Likewise.
3656
3657 * valarith.c: Do not include "doublest.h" and "dfp.h".
3658 Include "common/byte-vector.h".
3659 (value_args_as_decimal): Remove, replace by ...
3660 (value_args_as_target_float): ... this function. Handle both
3661 binary and decimal target floating-point formats.
3662 (scalar_binop): Handle both binary and decimal FP using
3663 value_args_as_target_float and target_float_binop.
3664 (value_equal): Handle both binary and decimal FP using
3665 value_args_as_target_float and target_float_compare.
3666 (value_less): Likewise.
3667 (value_pos): Handle all scalar types as simple copy.
3668 (value_neg): Handle all scalar types via BINOP_SUB from 0.
3669 * dfp.c (decimal_binop): Throw error instead of internal_error
3670 when called with an unsupported operation code.
3671
3672 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3673
3674 * target-float.c (target_float_to_string): New function.
3675 (target_float_from_string): New function.
3676 * target-float.h (target_float_to_string): Add prototype.
3677 (target_float_from_string): Add prototype.
3678
3679 * valprint.c: Include "target-float.h". Do not include
3680 "doublest.h" and "dfp.h".
3681 (print_floating): Use target_float_to_string.
3682 * printcmd.c: Include "target-float.h". Do not include "dfp.h".
3683 (printf_floating): Use target_float_to_string.
3684 * i387-tdep.c: Include "target-float.h". Do not include "doublest.h".
3685 (print_i387_value): Use target_float_to_string.
3686 * mips-tdep.c: Include "target-float.h".
3687 (mips_print_fp_register): Use target_float_to_string.
3688 * sh64-tdep.c: Include "target-float.h".
3689 (sh64_do_fp_register): Use target_float_to_string.
3690
3691 * parse.c: Include "target-float.h". Do not include
3692 "doublest.h" and "dfp.h".
3693 (parse_float): Use target_float_from_string.
3694 * stabsread.c: Include "target-float.h". Do not include "doublest.h".
3695 (define_symbol): Use target_float_from_string.
3696 * gdbarch-selftests.c: Include "target-float.h".
3697 (register_to_value_test): Use target_float_from_string.
3698
3699 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3700
3701 * Makefile.c (SFILES): Add target-float.c.
3702 (HFILES_NO_SRCDIR): Add target-float.h.
3703 (COMMON_OBS): Add target-float.o.
3704 * target-float.h: New file.
3705 * target-float.c: New file.
3706
3707 * doublest.c (floatformat_classify): Fix detection of float_zero.
3708
3709 * gdbtypes.c (is_floating_type): New function.
3710 * gdbtypes.h (is_floating_type): Add prototype.
3711
3712 * value.c: Do not include "floatformat.h".
3713 (unpack_double): Use target_float_is_valid.
3714 (is_floating_value): New function.
3715 * value.h (is_floating_value): Add prototype-
3716
3717 * valarith.c: Include "target-float.h".
3718 (value_logical_not): Use target_float_is_zero.
3719
3720 * python/py-value.c: Include "target-float.h".
3721 (valpy_nonzero): Use target_float_is_zero.
3722
3723 2017-11-04 Tom Tromey <tom@tromey.com>
3724
3725 * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
3726
3727 2017-11-04 Tom Tromey <tom@tromey.com>
3728
3729 * breakpoint.c (set_momentary_breakpoint): Return
3730 breakpoint_up.
3731 (until_break_command): Update.
3732 (new_until_break_fsm): Change argument types to
3733 breakpoint_up.
3734 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
3735 (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
3736 Remove.
3737 * infcmd.c (finish_forward): Update.
3738 * breakpoint.h (set_momentary_breakpoint)
3739 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
3740 (make_cleanup_delete_breakpoint): Remove.
3741 (struct breakpoint_deleter): New.
3742 (breakpoint_up): New typedef.
3743 * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
3744 (insert_exception_resume_breakpoint): Update.
3745 (insert_exception_resume_from_probe): Update.
3746 (insert_longjmp_resume_breakpoint): Update.
3747 * arm-linux-tdep.c (arm_linux_copy_svc): Update.
3748 * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
3749 * infcall.c (call_function_by_hand_dummy): Update
3750
3751 2017-11-04 Tom Tromey <tom@tromey.com>
3752
3753 * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
3754
3755 2017-11-04 Tom Tromey <tom@tromey.com>
3756
3757 * linux-tdep.c (linux_core_info_proc_mappings): Use
3758 gdb::def_vector.
3759 (linux_get_siginfo_data): Return gdb::byte_vector. Remove
3760 "size" argument.
3761 (linux_corefile_thread): Update.
3762 (linux_make_corefile_notes): Remove unused variable.
3763
3764 2017-11-04 Tom Tromey <tom@tromey.com>
3765
3766 * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
3767 gdb::byte_vector.
3768
3769 2017-11-04 Tom Tromey <tom@tromey.com>
3770
3771 * objfiles.c (do_free_objfile_cleanup): Remove.
3772 * compile/compile-object-load.c (compile_object_load): Update.
3773 * objfiles.h (make_cleanup_free_objfile): Remove.
3774
3775 2017-11-04 Tom Tromey <tom@tromey.com>
3776
3777 * sparc64-tdep.c (do_examine): Use gdb::def_vector.
3778 (adi_read_versions): Change "tags" to "gdb_byte *".
3779 (adi_print_versions): Likewise.
3780
3781 2017-11-04 Tom Tromey <tom@tromey.com>
3782
3783 * breakpoint.c
3784 (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
3785 from start_rbreak_breakpoints.
3786 (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
3787 * breakpoint.h (class scoped_rbreak_breakpoints): New.
3788 (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
3789 * symtab.c (do_end_rbreak_breakpoints): Remove.
3790 (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
3791
3792 2017-11-04 Tom Tromey <tom@tromey.com>
3793
3794 * cp-namespace.c (reset_directive_searched): Remove.
3795 (cp_lookup_symbol_via_imports): Use scoped_restore.
3796 * cp-support.c (reset_directive_searched): Remove.
3797 (make_symbol_overload_list_using): Use scoped_restore.
3798 * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
3799 (reset_directive_searched): Remove.
3800
3801 2017-11-04 Tom Tromey <tom@tromey.com>
3802
3803 * symfile.c (find_separate_debug_file_by_debuglink): Use
3804 unique_xmalloc_ptr.
3805
3806 2017-11-04 Tom Tromey <tom@tromey.com>
3807
3808 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
3809 type of "info".
3810 (compute_stack_depth): Likewise.
3811 (do_compile_dwarf_expr_to_c): Use std::vector.
3812
3813 2017-11-04 Tom Tromey <tom@tromey.com>
3814
3815 * compile/compile-object-load.c (link_callbacks_einfo): Use
3816 std::string.
3817
3818 2017-11-04 Tom Tromey <tom@tromey.com>
3819
3820 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
3821 Use scoped_free_pendings.
3822 * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
3823 scoped_free_pendings.
3824 * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
3825 (xcoff_initial_scan): Likewise.
3826 * buildsym.c (reset_symtab_globals): Update comment.
3827 (scoped_free_pendings): Rename from really_free_pendings.
3828 (prepare_for_building): Update comment.
3829 (buildsym_init): Likewise.
3830 * buildsym.h (class scoped_free_pendings): New class.
3831 (really_free_pendings): Don't declare.
3832
3833 2017-11-03 Ulrich Weigand <uweigand@de.ibm.com>
3834
3835 * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
3836 output when converting a zero value to a special byteorder format.
3837
3838 2017-11-02 Yao Qi <yao.qi@linaro.org>
3839
3840 * frame.c (do_frame_register_read): Remove aspace.
3841 * jit.c (jit_frame_sniffer): Likwise.
3842 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
3843 * regcache.c (regcache::regcache): Pass nullptr.
3844 (regcache_print): Caller updated.
3845 * regcache.h (regcache::regcache): Remove one constructor
3846 parameter aspace.
3847
3848 2017-11-02 Yao Qi <yao.qi@linaro.org>
3849
3850 * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
3851
3852 2017-11-02 Yao Qi <yao.qi@linaro.org>
3853
3854 * breakpoint.c (insert_single_step_breakpoints): Update.
3855 * frame.c (struct frame_info) <aspace>: Add const.
3856 (frame_save_as_regcache): Add const.
3857 (get_frame_address_space): Return const address_space *.
3858 * frame.h (get_frame_address_space): Update declaration.
3859 * infrun.c (struct step_over_info) <aspace>: Add const.
3860 (set_step_over_info): Make aspace const.
3861 (displaced_step_prepare_throw): Change variable const.
3862 (resume): Likewise.
3863 (proceed): Likewise.
3864 (adjust_pc_after_break): Likewise.
3865 (save_waitstatus): Likewise.
3866 (handle_signal_stop): Likewise.
3867 (keep_going_pass_signal): Likewise.
3868 * jit.c (jit_frame_sniffer): Add const.
3869 * mips-tdep.c (mips_single_step_through_delay): Likewise.
3870 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
3871 * record-full.c (record_full_wait_1): Likewise.
3872 * regcache.c (regcache::regcache): Change parameter to const.
3873 * regcache.h (regcache::regcache): Likewise.
3874 (regcache::aspace): Return const address_space *.
3875 (regcache) <m_aspace>: Add const.
3876
3877 2017-11-02 Yao Qi <yao.qi@linaro.org>
3878
3879 * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
3880 * frame.c (create_sentinel_frame): Likewise.
3881 * infrun.c (displaced_step_prepare_throw): Likewise.
3882 (resume): Likewise.
3883 (thread_still_needs_step_over_bp): Likewise.
3884 (proceed): Likewise.
3885 (do_target_wait): Likewise.
3886 (adjust_pc_after_break): Likewise.
3887 (handle_syscall_event): Likewise.
3888 (save_waitstatus): Likewise.
3889 (handle_inferior_event_1): Likewise.
3890 (handle_signal_stop): Likewise.
3891 (keep_going_pass_signal): Likewise.
3892 * linux-nat.c (status_callback): Likewise.
3893 (save_stop_reason): Likewise.
3894 (resume_stopped_resumed_lwps): Likewise.
3895 * record-full.c (record_full_exec_insn): Likewise.
3896 (record_full_wait_1): Likewise.
3897 * regcache.c (get_regcache_aspace): Remove.
3898 * regcache.h (get_regcache_aspace): Remove.
3899
3900 2017-11-02 Yao Qi <yao.qi@linaro.org>
3901
3902 * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
3903 (init_regcache_descr): Use gdbarch_num_regs.
3904 (regcache::regcache): Likewise.
3905 (regcache::get_register_status): Likewise.
3906 (regcache::assert_raw_regnum): Likewise.
3907 (regcache::cooked_read): Likewise.
3908 (regcache::cooked_read_value): Likewise.
3909 (regcache::cooked_write): Likewise.
3910 (regcache::dump): Likewise.
3911 (regcache::num_raw_registers): New method.
3912 * regcache.h (class regcache) <num_raw_registers>: New.
3913
3914 2017-11-02 Yao Qi <yao.qi@linaro.org>
3915
3916 * regcache.c (regcache::assert_regnum): New method.
3917 (regcache::invalidate): Call assert_regnum.
3918 (regcache::raw_update): Likewise.
3919 (regcache::raw_write): Likewise.
3920 (regcache::raw_read_part): Likewise.
3921 (regcache::raw_write_part): Likewise.
3922 (regcache::raw_supply): Likewise.
3923 (regcache::raw_supply_integer): Likewise.
3924 (regcache::raw_supply_zeroed): Likewise.
3925 (regcache::raw_collect): Likewise.
3926 (regcache::raw_collect_integer): Likewise.
3927 * regcache.h (regcache::assert_regnum): Declare.
3928
3929 2017-11-02 Yao Qi <yao.qi@linaro.org>
3930
3931 * regcache.c (regcache::dump): Remove code.
3932
3933 2017-11-02 Yao Qi <yao.qi@linaro.org>
3934
3935 * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
3936 Remove.
3937 <sizeof_cooked_register_status>: Remove.
3938 (init_regcache_descr): Update.
3939 (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
3940 (regcache::save): Likewise.
3941 (regcache::dump): Likewise.
3942
3943 2017-11-01 James Bowman <james.bowman@ftdichip.com>
3944
3945 * ft32-tdep.c (ft32_fetch_instruction): New function.
3946 (ft32_analyze_prologue): Use ft32_fetch_instruction().
3947
3948 2017-10-31 Simon Marchi <simon.marchi@polymtl.ca>
3949
3950 * cli/cli-script.c (execute_control_command): Rename to ...
3951 (execute_control_command_1): ... this.
3952 (execute_control_command): New function.
3953
3954 2017-10-31 Simon Marchi <simon.marchi@ericsson.com>
3955
3956 * tracepoint.c (tfind_command): Remove const_cast.
3957
3958 2017-10-30 Mike Gulick <mgulick@mathworks.com>
3959
3960 * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
3961
3962 2017-10-30 Simon Marchi <simon.marchi@ericsson.com>
3963
3964 * common/common-utils.h (in_inclusive_range): New function.
3965 * arm-tdep.c (arm_record_extension_space): Use
3966 in_inclusive_range.
3967 (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
3968 * cris-tdep.c (cris_spec_reg_applicable): Use
3969 in_inclusive_range.
3970
3971 2017-10-30 Pedro Alves <palves@redhat.com>
3972 Simon Marchi <simon.marchi@ericsson.com>
3973
3974 * remote.c (remote_set_syscall_catchpoint): Build a std::string
3975 instead of a gdb::unique_xmalloc_ptr, using string_appendf.
3976
3977 2017-10-30 Pedro Alves <palves@redhat.com>
3978
3979 * common/common-utils.c (string_appendf, string_vappendf): New
3980 functions.
3981 * common/common-utils.h (string_appendf, string_vappendf): New
3982 declarations.
3983 * unittests/common-utils-selftests.c (string_appendf_func)
3984 (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
3985 (string_vappendf_tests): New functions.
3986 (_initialize_common_utils_selftests): Register "string_appendf" and
3987 "string_vappendf tests".
3988
3989 2017-10-30 Pedro Alves <palves@redhat.com>
3990
3991 * unittests/common-utils-selftests.c (format_func): New typedef.
3992 (string_printf_tests, string_vprintf_tests): Tests factored out
3993 and merged to ...
3994 (test_format_func): ... this new function.
3995 (string_printf_tests, string_vprintf_tests): Reimplement on top of
3996 test_format_func.
3997
3998 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
3999
4000 * darwin-nat.c: Remove include of gdb.h.
4001
4002 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
4003
4004 * xtensa-xtregs.c: Fix formatting issues.
4005
4006 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
4007
4008 * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
4009
4010 2017-10-28 Maksim Dzabraev <dzabraew@gmail.com>
4011
4012 PR python/21213
4013 * python/py-infthread.c (thpy_get_inferior): Increment reference
4014 of inferior before returning it.
4015
4016 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
4017
4018 * unittests/common-utils-selftests.c (format): Add
4019 ATTRIBUTE_PRINTF.
4020
4021 2017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
4022
4023 * xml-syscall.c (struct syscall_desc): Add constructor.
4024 <name>: Change type to std::string.
4025 (syscall_desc_up): New typedef.
4026 (syscall_desc_p): Remove typeder.
4027 (DEF_VEC_P(syscall_desc_p)): Remove.
4028 (struct syscall_group_desc): Add constructor.
4029 <name>: Change type to std::string.
4030 <syscalls>: Change type to std::vector.
4031 (syscall_group_desc_up): New typedef.
4032 (syscall_group_desc_p): Remove typedef.
4033 (DEF_VEC_P(syscall_group_desc_p)): Remove.
4034 (struct syscalls_info) <syscalls>: Change type to std::vector of
4035 unique_ptr.
4036 <groups>: Likewise.
4037 <my_gdb_datadir>: Change type to std::string.
4038 (syscalls_info_up): New typedef.
4039 (allocate_syscalls_info): Remove.
4040 (syscalls_info_free_syscalls_desc): Remove.
4041 (syscalls_info_free_syscall_group_desc): Remove.
4042 (free_syscalls_info): Remove.
4043 (make_cleanup_free_syscalls_info): Remove.
4044 (syscall_group_create_syscall_group_desc): Adjust.
4045 (syscall_group_add_syscall): Adjust.
4046 (syscall_create_syscall_desc): Adjust.
4047 (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
4048 (init_syscalls_info): Adjust.
4049 (syscall_group_get_group_by_name): Adjust.
4050 (xml_get_syscall_number): Adjust.
4051 (xml_get_syscall_name): Adjust.
4052 (xml_list_of_syscalls): Adjust.
4053 (xml_list_syscalls_by_group): Adjust.
4054 (xml_list_of_groups): Adjust.
4055
4056 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
4057
4058 * probe.h: Don't include gdb_vecs.h.
4059 (DEF_VEC_P (probe_p)): Remove.
4060 (find_probes_in_objfile): Return an std::vector.
4061 * probe.c (find_probes_in_objfile): Likewise.
4062 * breakpoint.c (breakpoint_objfile_data)
4063 <longjmp_probes>: Change type to std::vector.
4064 <exception_probes>: Likewise.
4065 (free_breakpoint_probes): Don't manually free vectors.
4066 (create_longjmp_master_breakpoint): Adjust.
4067 (create_exception_master_breakpoint): Adjust.
4068 * solib-svr4.c (svr4_create_probe_breakpoints): Change
4069 parameter type, adjust.
4070 (svr4_create_solib_event_breakpoints): Adjust.
4071
4072 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
4073
4074 * breakpoint.c (breakpoint_objfile_data): Initialize fields.
4075 (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
4076 with new.
4077 (free_breakpoint_probes): Rename to ...
4078 (free_breakpoint_objfile_data): ... this, and call delete on
4079 bp_objfile_data..
4080
4081 2017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
4082
4083 * auto-load.c: Don't include gdb_vecs.h, include algorithm.
4084 (loaded_script_ptr): Remove typedef.
4085 (DEF_VEC_P (loaded_script_ptr)): Remove.
4086 (struct collect_matching_scripts_data): Add constructor.
4087 <scripts_p>: Change type to (pointer to) std::vector.
4088 (collect_matching_scripts_data): Adjust.
4089 (sort_scripts_by_name): Make suitable for std::sort.
4090 (print_scripts): Don't sort vector, adjust to std::vector.
4091 (auto_load_info_scripts): Sort vectors, adjust to std::vector.
4092
4093 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
4094
4095 * symfile.c (filename_language): Make struct, not typedef. Add
4096 constructor.
4097 <ext>: Change type to std::string.
4098 (DEF_VEC_O (filename_language)): Remove.
4099 (filename_language_table): Change type to std::vector.
4100 (add_filename_language): Adjust.
4101 (set_ext_lang_command): Adjust.
4102 (info_ext_lang_command): Adjust.
4103 (deduce_language_from_filename): Adjust.
4104 (class scoped_restore_filename_language_table): Remove.
4105 (test_filename_language): Use scoped_restore.
4106 (test_set_ext_lang_command): Use scoped_restore, adjust to
4107 std::vector change.
4108
4109 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
4110
4111 * symfile.c: Include selftest.h.
4112 (class scoped_restore_filename_language_table): New.
4113 (test_filename_language): New test.
4114 (test_set_ext_lang_command): New test.
4115 (_initialize_symfile): Register tests.
4116
4117 2017-10-27 Keith Seitz <keiths@redhat.com>
4118
4119 * breakpoint.c (print_breakpoint_location): Use the symbol saved
4120 in the bp_location, falling back to find_pc_sect_function when
4121 needed.
4122 (add_location_to_breakpoint): Save sal->symbol.
4123 * breakpoint.h (struct bp_location) <symbol>: New field.
4124 * symtab.c (find_function_start_sal): Save the symbol into the SaL.
4125 * symtab.h (struct symtab_and_line) <symbol>: New field.
4126
4127 2017-10-26 Patrick Frants <osscontribute@gmail.com>
4128
4129 PR gdb/13669
4130 * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
4131 to rewind obstack.
4132
4133 2017-10-26 Pedro Alves <palves@redhat.com>
4134
4135 * remote.c (remote_async_terminal_ours_p): Delete.
4136 (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
4137 Remove references to 'remote_async_terminal_ours_p'.
4138
4139 2017-10-26 Yao Qi <yao.qi@linaro.org>
4140
4141 * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
4142
4143 2017-10-26 Yao Qi <yao.qi@linaro.org>
4144
4145 * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
4146 aspace const.
4147 * break-catch-syscall.c (breakpoint_hit_catch_syscall):
4148 Likewise.
4149 * breakpoint.c (bpstat_check_location): Remove cast.
4150 (breakpoint_hit_catch_fork): Make aspce const.
4151 (breakpoint_hit_catch_solib): Likewise.
4152 (breakpoint_hit_catch_exec): Likewise.
4153 (breakpoint_hit_ranged_breakpoint): Likewise.
4154 (breakpoint_hit_watchpoint): Likewise.
4155 (base_breakpoint_breakpoint_hit): Likewise.
4156 (bkpt_breakpoint_hit): Likewise.
4157 (dprintf_breakpoint_hit): Likewise.
4158 (tracepoint_breakpoint_hit): Likewise.
4159 * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
4160
4161 2017-10-26 Yao Qi <yao.qi@linaro.org>
4162
4163 * breakpoint.c (breakpoint_location_address_match): Change
4164 "struct address_space *" to "const address_space".
4165 (breakpoint_location_address_range_overlap): Likewise.
4166 (breakpoint_here_p): Likewise.
4167 (breakpoint_in_range_p): Likewise.
4168 (moribund_breakpoint_here_p): Likewise.
4169 (bp_location_inserted_here_p): Likewise.
4170 (software_breakpoint_inserted_here_p): Likewise.
4171 (hardware_breakpoint_inserted_here_p): Likewise.
4172 (hardware_watchpoint_inserted_in_range): Likewise.
4173 (bpstat_check_location): Likewise.
4174 (bpstat_stop_status): Likewise.
4175 (breakpoint_address_match): Likewise.
4176 (breakpoint_address_match_range): Likewise.
4177 (breakpoint_location_address_match): Likewise.
4178 (breakpoint_location_address_range_overlap): Likewise.
4179 (insert_single_step_breakpoint): Likewise.
4180 (breakpoint_has_location_inserted_here): Likewise.
4181 (single_step_breakpoint_inserted_here_p): Likewise.
4182 (pc_at_non_inline_function): Likewise.
4183 * breakpoint.h (bpstat_stop_status): Update declaration.
4184 (breakpoint_here_p): Likewise.
4185 (breakpoint_in_range_p): Likewise.
4186 (moribund_breakpoint_here_p): Likewise.
4187 (breakpoint_inserted_here_p): Likewise.
4188 (software_breakpoint_inserted_here_p): Likewise.
4189 (hardware_breakpoint_inserted_here_p): Likewise.
4190 (breakpoint_has_location_inserted_here): Likewise.
4191 (single_step_breakpoint_inserted_here_p): Likewise.
4192 (hardware_watchpoint_inserted_in_range): Likewise.
4193 (breakpoint_address_match): Likewise.
4194 (insert_single_step_breakpoint): Likewise.
4195 (pc_at_non_inline_function): Likewise.
4196 * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
4197 * record.c (record_check_stopped_by_breakpoint): Likewise.
4198 * record.h (record_check_stopped_by_breakpoint): Likewise.
4199 * thread.c (thread_has_single_step_breakpoint_here): Likewise.
4200
4201 2017-10-25 Yao Qi <yao.qi@linaro.org>
4202
4203 * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
4204 regcache->arch () instead get_regcache_arch.
4205 * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
4206 Likewise.
4207 (aarch64_fbsd_store_inferior_registers): Likewise.
4208 * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
4209 (store_gregs_to_thread): Likewise.
4210 (fetch_fpregs_from_thread): Likewise.
4211 (store_fpregs_to_thread): Likewise.
4212 * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
4213 (aarch64_store_return_value): Likewise.
4214 (aarch64_software_single_step): Likewise.
4215 * aix-thread.c (aix_thread_wait): Likewise.
4216 (supply_reg32): Likewise.
4217 (supply_sprs64): Likewise.
4218 (supply_sprs32): Likewise.
4219 (fill_gprs64): Likewise.
4220 (fill_gprs32): Likewise.
4221 (fill_sprs64): Likewise.
4222 (fill_sprs32): Likewise.
4223 (store_regs_user_thread): Likewise.
4224 (store_regs_kernel_thread): Likewise.
4225 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
4226 (alphabsd_store_inferior_registers): Likewise.
4227 * alpha-tdep.c (alpha_extract_return_value): Likewise.
4228 (alpha_store_return_value): Likewise.
4229 (alpha_deal_with_atomic_sequence): Likewise.
4230 (alpha_next_pc): Likewise.
4231 (alpha_software_single_step): Likewise.
4232 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
4233 (amd64bsd_store_inferior_registers): Likewise.
4234 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
4235 Likewise.
4236 (amd64_linux_store_inferior_registers): Likewise.
4237 * amd64-nat.c (amd64_supply_native_gregset): Likewise.
4238 (amd64_collect_native_gregset): Likewise.
4239 * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
4240 (amd64obsd_collect_uthread): Likewise.
4241 * amd64-tdep.c (amd64_supply_fpregset): Likewise.
4242 (amd64_collect_fpregset): Likewise.
4243 (amd64_supply_fxsave): Likewise.
4244 (amd64_supply_xsave): Likewise.
4245 (amd64_collect_fxsave): Likewise.
4246 (amd64_collect_xsave): Likewise.
4247 * arc-tdep.c (arc_write_pc): Likewise.
4248 * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
4249 * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
4250 (arm_fbsd_store_inferior_registers): Likewise.
4251 * arm-linux-nat.c (fetch_vfp_regs): Likewise.
4252 (store_vfp_regs): Likewise.
4253 (arm_linux_fetch_inferior_registers): Likewise.
4254 (arm_linux_store_inferior_registers): Likewise.
4255 * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
4256 (arm_linux_sigreturn_next_pc): Likewise.
4257 (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
4258 * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
4259 (fetch_register): Likewise.
4260 (store_register): Likewise.
4261 * arm-tdep.c (arm_is_thumb): Likewise.
4262 (displaced_in_arm_mode): Likewise.
4263 (bx_write_pc): Likewise.
4264 (arm_get_next_pcs_addr_bits_remove): Likewise.
4265 (arm_software_single_step): Likewise.
4266 (arm_extract_return_value): Likewise.
4267 (arm_store_return_value): Likewise.
4268 (arm_write_pc): Likewise.
4269 * bfin-tdep.c (bfin_extract_return_value): Likewise.
4270 * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
4271 (bsd_uthread_store_registers): Likewise.
4272 * core-regset.c (fetch_core_registers): Likewise.
4273 * corelow.c (get_core_registers): Likewise.
4274 * cris-tdep.c (cris_store_return_value): Likewise.
4275 (cris_extract_return_value): Likewise.
4276 (find_step_target): Likewise.
4277 (find_step_target): Likewise.
4278 (cris_software_single_step): Likewise.
4279 * ctf.c (ctf_fetch_registers): Likewise.
4280 * darwin-nat.c (cancel_breakpoint): Likewise.
4281 * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
4282 * frv-tdep.c (frv_extract_return_value): Likewise.
4283 * ft32-tdep.c (ft32_store_return_value): Likewise.
4284 (ft32_extract_return_value): Likewise.
4285 * go32-nat.c (fetch_register): Likewise.
4286 (go32_fetch_registers): Likewise.
4287 (go32_store_registers): Likewise.
4288 (store_register): Likewise.
4289 * h8300-tdep.c (h8300_extract_return_value): Likewise.
4290 (h8300_store_return_value): Likewise.
4291 * hppa-linux-nat.c (fetch_register): Likewise.
4292 (store_register): Likewise.
4293 (hppa_linux_fetch_inferior_registers): Likewise.
4294 (hppa_linux_store_inferior_registers): Likewise.
4295 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
4296 (i386_darwin_store_inferior_registers): Likewise.
4297 * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
4298 (gnu_store_registers): Likewise.
4299 * i386-linux-nat.c (fetch_register): Likewise.
4300 (store_register): Likewise.
4301 (supply_gregset): Likewise.
4302 (fill_gregset): Likewise.
4303 (i386_linux_fetch_inferior_registers): Likewise.
4304 (i386_linux_store_inferior_registers): Likewise.
4305 (i386_linux_resume): Likewise.
4306 * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
4307 Likewise.
4308 * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
4309 * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
4310 * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
4311 (i386obsd_collect_uthread): Likewise.
4312 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
4313 (i386_supply_gregset): Likewise.
4314 (i386_collect_gregset): Likewise.
4315 (i386_supply_fpregset): Likewise.
4316 (i386_collect_fpregset): Likewise.
4317 (i386_mpx_bd_base): Likewise.
4318 * i386-v4-nat.c (supply_fpregset): Likewise.
4319 (fill_fpregset): Likewise.
4320 * i387-tdep.c (i387_supply_fsave): Likewise.
4321 (i387_collect_fsave): Likewise.
4322 (i387_supply_fxsave): Likewise.
4323 (i387_collect_fxsave): Likewise.
4324 (i387_supply_xsave): Likewise.
4325 (i387_collect_xsave): Likewise.
4326 * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
4327 (ia64_linux_store_registers): Likewise.
4328 * ia64-tdep.c (ia64_access_rse_reg): Likewise.
4329 (ia64_extract_return_value): Likewise.
4330 (ia64_store_return_value): Likewise.
4331 (find_func_descr): Likewise.
4332 * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
4333 * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
4334 (inf_ptrace_store_registers): Likewise.
4335 * infrun.c (use_displaced_stepping): Likewise.
4336 (displaced_step_prepare_throw): Likewise.
4337 (resume): Likewise.
4338 (proceed): Likewise.
4339 (do_target_wait): Likewise.
4340 (adjust_pc_after_break): Likewise.
4341 (handle_inferior_event_1): Likewise.
4342 (handle_signal_stop): Likewise.
4343 (save_infcall_suspend_state): Likewise.
4344 (restore_infcall_suspend_state): Likewise.
4345 * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
4346 * jit.c (jit_frame_prev_register): Likewise.
4347 * linux-nat.c (save_stop_reason): Likewise.
4348 (linux_nat_wait_1): Likewise.
4349 (resume_stopped_resumed_lwps): Likewise.
4350 * linux-record.c (record_linux_sockaddr): Likewise.
4351 (record_linux_msghdr): Likewise.
4352 (record_linux_system_call): Likewise.
4353 * linux-tdep.c (linux_collect_thread_registers): Likewise.
4354 * lm32-tdep.c (lm32_extract_return_value): Likewise.
4355 (lm32_store_return_value): Likewise.
4356 * m32c-tdep.c (m32c_read_flg): Likewise.
4357 (m32c_pseudo_register_read): Likewise.
4358 (m32c_pseudo_register_write): Likewise.
4359 * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
4360 (m32r_linux_collect_gregset): Likewise.
4361 * m32r-tdep.c (m32r_store_return_value): Likewise.
4362 (m32r_extract_return_value): Likewise.
4363 * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
4364 (m68kbsd_collect_fpregset): Likewise.
4365 * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
4366 * m68k-linux-nat.c (fetch_register): Likewise.
4367 (old_fetch_inferior_registers): Likewise.
4368 (old_store_inferior_registers): Likewise.
4369 (store_regs): Likewise.
4370 * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
4371 (m68k_svr4_store_return_value): Likewise.
4372 * m88k-tdep.c (m88k_store_arguments): Likewise.
4373 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
4374 (mi_cmd_data_write_register_values): Likewise.
4375 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
4376 (mips_fbsd_store_inferior_registers): Likewise.
4377 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
4378 (mips_fbsd_supply_gregs): Likewise.
4379 (mips_fbsd_collect_fpregs): Likewise.
4380 (mips_fbsd_collect_gregs): Likewise.
4381 (mips_fbsd_supply_fpregset): Likewise.
4382 (mips_fbsd_collect_fpregset): Likewise.
4383 (mips_fbsd_supply_gregset): Likewise.
4384 (mips_fbsd_collect_gregset): Likewise.
4385 * mips-linux-nat.c (supply_gregset): Likewise.
4386 (fill_gregset): Likewise.
4387 (supply_fpregset): Likewise.
4388 (fill_fpregset): Likewise.
4389 * mips-linux-tdep.c (mips_supply_gregset): Likewise.
4390 (mips_fill_gregset): Likewise.
4391 (mips_supply_fpregset): Likewise.
4392 (mips_fill_fpregset): Likewise.
4393 (mips64_supply_gregset): Likewise.
4394 (micromips_linux_sigframe_validate): Likewise.
4395 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
4396 (mipsnbsd_fetch_inferior_registers): Likewise.
4397 (mipsnbsd_store_inferior_registers): Likewise.
4398 * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
4399 (mipsnbsd_supply_gregset): Likewise.
4400 (mipsnbsd_iterate_over_regset_sections): Likewise.
4401 (mipsnbsd_supply_reg): Likewise.
4402 (mipsnbsd_supply_fpreg): Likewise.
4403 * mips-tdep.c (mips_in_frame_stub): Likewise.
4404 (mips_dummy_id): Likewise.
4405 (is_octeon_bbit_op): Likewise.
4406 (micromips_bc1_pc): Likewise.
4407 (extended_mips16_next_pc): Likewise.
4408 (mips16_next_pc): Likewise.
4409 (deal_with_atomic_sequence): Likewise.
4410 * moxie-tdep.c (moxie_process_readu): Likewise.
4411 * nios2-tdep.c (nios2_get_next_pc): Likewise.
4412 * nto-procfs.c (procfs_store_registers): Likewise.
4413 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
4414 (ppcfbsd_store_inferior_registers): Likewise.
4415 * ppc-linux-nat.c (fetch_vsx_register): Likewise.
4416 (fetch_altivec_register): Likewise.
4417 (get_spe_registers): Likewise.
4418 (fetch_spe_register): Likewise.
4419 (fetch_altivec_registers): Likewise.
4420 (fetch_all_gp_regs): Likewise.
4421 (fetch_all_fp_regs): Likewise.
4422 (store_vsx_register): Likewise.
4423 (store_altivec_register): Likewise.
4424 (set_spe_registers): Likewise.
4425 (store_spe_register): Likewise.
4426 (store_altivec_registers): Likewise.
4427 (store_all_gp_regs): Likewise.
4428 (store_all_fp_regs): Likewise.
4429 * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
4430 (ppc_linux_collect_gregset): Likewise.
4431 (ppc_canonicalize_syscall): Likewise.
4432 (ppc_linux_record_signal): Likewise.
4433 (ppu2spu_prev_register): Likewise.
4434 * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
4435 * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
4436 (ppcobsd_store_registers): Likewise.
4437 * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
4438 Likewise.
4439 (ppc_ravenscar_generic_store_registers): Likewise.
4440 * procfs.c (procfs_fetch_registers): Likewise.
4441 (procfs_store_registers): Likewise.
4442 * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
4443 (ravenscar_store_registers): Likewise.
4444 (ravenscar_prepare_to_store): Likewise.
4445 * record-btrace.c (record_btrace_fetch_registers): Likewise.
4446 * record-full.c (record_full_wait_1): Likewise.
4447 (record_full_registers_change): Likewise.
4448 (record_full_store_registers): Likewise.
4449 (record_full_core_fetch_registers): Likewise.
4450 (record_full_save): Likewise.
4451 (record_full_goto_insn): Likewise.
4452 * regcache.c (regcache_register_size): Likewise.
4453 (get_regcache_arch): Remove.
4454 (regcache_read_pc): Likewise.
4455 * regcache.h (get_regcache_arch): Remove.
4456 * remote-sim.c (gdbsim_fetch_register): Likewise.
4457 (gdbsim_store_register): Likewise.
4458 * remote.c (fetch_register_using_p): Likewise.
4459 (send_g_packet): Likewise.
4460 (remote_prepare_to_store): Likewise.
4461 (store_registers_using_G): Likewise.
4462 * reverse.c (save_bookmark_command): Likewise.
4463 (goto_bookmark_command): Likewise.
4464 * rs6000-aix-tdep.c (branch_dest): Likewise.
4465 * rs6000-nat.c (rs6000_ptrace64): Likewise.
4466 (fetch_register): Likewise.
4467 * rs6000-tdep.c (ppc_supply_reg): Likewise.
4468 (ppc_collect_reg): Likewise.
4469 (ppc_collect_gregset): Likewise.
4470 (ppc_collect_fpregset): Likewise.
4471 (ppc_collect_vsxregset): Likewise.
4472 (ppc_collect_vrregset): Likewise.
4473 (ppc_displaced_step_hw_singlestep): Likewise.
4474 (rs6000_pseudo_register_read): Likewise.
4475 (rs6000_pseudo_register_write): Likewise.
4476 * s390-linux-nat.c (supply_gregset): Likewise.
4477 (fill_gregset): Likewise.
4478 (s390_linux_fetch_inferior_registers): Likewise.
4479 * s390-linux-tdep.c (s390_write_pc): Likewise.
4480 (s390_software_single_step): Likewise.
4481 (s390_all_but_pc_registers_record): Likewise.
4482 (s390_linux_syscall_record): Likewise.
4483 * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
4484 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
4485 (shnbsd_store_inferior_registers): Likewise.
4486 * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
4487 (sh_extract_return_value_fpu): Likewise.
4488 (sh_store_return_value_nofpu): Likewise.
4489 (sh_corefile_supply_regset): Likewise.
4490 (sh_corefile_collect_regset): Likewise.
4491 * sh64-tdep.c (sh64_extract_return_value): Likewise.
4492 (sh64_store_return_value): Likewise.
4493 * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
4494 * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
4495 (sparc_store_inferior_registers): Likewise.
4496 * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
4497 (sparc_ravenscar_prepare_to_store): Likewise.
4498 * sparc-tdep.c (sparc32_store_arguments): Likewise.
4499 (sparc_analyze_control_transfer): Likewise.
4500 (sparc_step_trap): Likewise.
4501 (sparc_software_single_step): Likewise.
4502 (sparc32_gdbarch_init): Likewise.
4503 (sparc_supply_rwindow): Likewise.
4504 (sparc_collect_rwindow): Likewise.
4505 * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
4506 * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
4507 (sparc64nbsd_collect_gregset): Likewise.
4508 (sparc64nbsd_supply_fpregset): Likewise.
4509 (sparc64nbsd_collect_fpregset): Likewise.
4510 * sparc64-tdep.c (sparc64_store_arguments): Likewise.
4511 (sparc64_supply_gregset): Likewise.
4512 (sparc64_collect_gregset): Likewise.
4513 (sparc64_supply_fpregset): Likewise.
4514 (sparc64_collect_fpregset): Likewise.
4515 * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
4516 * spu-tdep.c (spu_unwind_sp): Likewise.
4517 (spu2ppu_prev_register): Likewise.
4518 (spu_memory_remove_breakpoint): Likewise.
4519 * stack.c (return_command): Likewise.
4520 * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
4521 * tracefile-tfile.c (tfile_fetch_registers): Likewise.
4522 * tracefile.c (trace_save_ctf): Likewise.
4523 * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
4524 (do_windows_store_inferior_registers): Likewise.
4525 (windows_resume): Likewise.
4526 * xtensa-linux-nat.c (fill_gregset): Likewise.
4527 (supply_gregset_reg): Likewise.
4528 * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
4529 (xtensa_register_read_masked): Likewise.
4530 (xtensa_supply_gregset): Likewise.
4531 (xtensa_extract_return_value): Likewise.
4532 (xtensa_store_return_value): Likewise.
4533
4534 2017-10-25 Ulrich Weigand <uweigand@de.ibm.com>
4535
4536 * doublest.c (floatformat_from_string): New function.
4537 * doublest.h (floatformat_from_string): Add prototype.
4538
4539 * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
4540 (OP_FLOAT): ... this.
4541 * expression.h: Do not include "doublest.h".
4542 (union exp_element): Replace doubleconst and decfloatconst by
4543 new element floatconst.
4544 * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
4545 (ada_evaluate_subexp): Likewise.
4546 * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
4547 OP_DOUBLE and OP_DECFLOAT.
4548 * expprint.c (print_subexp_standard): Likewise.
4549 (dump_subexp_body_standard): Likewise.
4550 * breakpoint.c (watchpoint_exp_is_const): Likewise.
4551
4552 * parse.c: Include "dfp.h".
4553 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
4554 (write_exp_elt_floatcst): New function.
4555 (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
4556 and OP_DECFLOAT.
4557 (operator_check_standard): Likewise.
4558 (parse_float): Do not accept suffix. Take type as input. Return bool.
4559 Return target format buffer instead of host DOUBLEST.
4560 Use floatformat_from_string and decimal_from_string to parse
4561 either binary or decimal floating-point types.
4562 (parse_c_float): Remove.
4563 * parser-defs.h: Do not include "doublest.h".
4564 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
4565 (write_exp_elt_floatcst): Add prototype.
4566 (parse_float): Update prototype.
4567 (parse_c_float): Remove.
4568
4569 * c-exp.y: Do not include "dfp.h".
4570 (typed_val_float): Use byte buffer instead of DOUBLEST.
4571 (typed_val_decfloat): Remove.
4572 (DECFLOAT): Remove.
4573 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4574 (parse_number): Update to new parse_float interface.
4575 Parse suffixes and determine type before calling parse_float.
4576 Handle decimal and binary FP types the same way.
4577
4578 * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
4579 (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
4580 (parse_number): Update to new parse_float interface.
4581 Parse suffixes and determine type before calling parse_float.
4582
4583 * f-exp.y: Replace dval by typed_val_float.
4584 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4585 (parse_number): Use parse_float instead of atof.
4586
4587 * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
4588 (parse_go_float): Remove.
4589 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4590 (parse_number): Call parse_float instead of parse_go_float.
4591 Parse suffixes and determine type before calling parse_float.
4592
4593 * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
4594 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4595 (parse_number): Update to new parse_float interface.
4596 Parse suffixes and determine type before calling parse_float.
4597
4598 * m2-exp.y: Replace dval by byte buffer val.
4599 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4600 (parse_number): Call parse_float instead of atof.
4601
4602 * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
4603 (lex_number): Call parse_float instead of strtod.
4604 (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
4605 (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
4606 Use write_exp_elt_floatcst.
4607 (unit_testing): Remove static variable.
4608 (rust_type): Do not check unit_testing.
4609 (rust_lex_tests): Do not set uint_testing. Set up dummy rust_parser.
4610
4611 * ada-exp.y (type_float, type_double): Remove.
4612 (typed_val_float): Use byte buffer instead of DOUBLEST.
4613 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4614 * ada-lex.l (processReal): Use parse_float instead of sscanf.
4615
4616 2017-10-25 Alan Hayward <alan.hayward@arm.com>
4617
4618 * aarch64-tdep.h (enum aarch64_regnum): Remove.
4619 * arch/aarch64.h: New file.
4620
4621 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
4622
4623 * dfp.h (decimal_from_string): Use const reference for argument.
4624 * dfp.c (decimal_from_string): Likewise.
4625
4626 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
4627
4628 * i387-tdep.c (print_i387_value): Use floatformat_to_string.
4629 * sh64-tdep.c (sh64_do_fp_register): Likewise.
4630 * mips-tdep.c (mips_print_fp_register): Likewise.
4631
4632 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
4633
4634 * common/format.h (enum argclass): Replace decfloat_arg by
4635 dec32float_arg, dec64float_arg, and dec128float_arg.
4636 * common/format.c (parse_format_string): Update to return
4637 new decimal float argument classes.
4638
4639 * printcmd.c (printf_decfloat): Rename to ...
4640 (printf_floating): ... this. Add argclass argument, and use it
4641 instead of parsing the format string again. Add support for
4642 binary floating-point values, using floatformat_to_string.
4643 Convert value to the target format if it doesn't already match.
4644 (ui_printf): Call printf_floating instead of printf_decfloat,
4645 also for double_arg / long_double_arg. Pass argclass.
4646
4647 * dfp.c (decimal_to_string): Add format string argument.
4648 * dfp.h (decimal_to_string): Likewise.
4649
4650 * doublest.c (floatformat_to_string): Add format string argument.
4651 * doublest.h (floatformat_to_string): Likewise.
4652
4653 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
4654
4655 * doublest.c (floatformat_precision): New routine.
4656 (floatformat_to_string): Likewise.
4657 * doublest.c (floatformat_to_string): Add prototype.
4658
4659 * printcmd.c (print_scalar_formatted): Only call print_floating
4660 on floating-point types.
4661 * valprint.c: Do not include "floatformat.h".
4662 (generic_val_print_decfloat): Remove.
4663 (generic_val_print): Call generic_val_print_float for both
4664 TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
4665 (print_floating): Use floatformat_to_string. Handle decimal float.
4666 (print_decimal_floating): Remove, merge into floatformat_to_string.
4667 * value.h (print_decimal_floating): Remove.
4668
4669 * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
4670
4671 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
4672
4673 * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
4674
4675 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
4676
4677 * memattr.h: Don't include vec.h.
4678 (struct mem_attrib): Initialize fields.
4679 <unknown>: New static method.
4680 (struct mem_region): Add constructors, operator<, initialize
4681 fields.
4682 * memattr.c: Include algorithm.
4683 (default_mem_attrib, unknown_mem_attrib): Remove.
4684 (user_mem_region_list): New global.
4685 (target_mem_region_list, mem_region_list): Change type to
4686 std::vector<mem_region>.
4687 (mem_use_target): Now a function.
4688 (target_mem_regions_valid): Change type to bool.
4689 (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
4690 (require_user_regions): Adjust.
4691 (require_target_regions): Adjust.
4692 (create_mem_region): Adjust.
4693 (lookup_mem_region): Adjust.
4694 (invalidate_target_mem_regions): Adjust.
4695 (mem_clear): Rename to...
4696 (user_mem_clear): ... this, and adjust.
4697 (mem_command): Adjust.
4698 (info_mem_command): Adjust.
4699 (mem_enable, enable_mem_command, mem_disable,
4700 disable_mem_command): Adjust.
4701 (mem_delete): Adjust.
4702 (delete_mem_command): Adjust.
4703 * memory-map.h (parse_memory_map): Return an std::vector.
4704 * memory-map.c (parse_memory_map): Likewise.
4705 (struct memory_map_parsing_data): Add constructor.
4706 <memory_map>: Point to std::vector.
4707 (memory_map_start_memory): Adjust.
4708 (memory_map_end_memory): Adjust.
4709 (memory_map_end_property): Adjust.
4710 (clear_result): Remove.
4711 * remote.c (remote_memory_map): Return an std::vector.
4712 * target-debug.h (target_debug_print_VEC_mem_region_s__p):
4713 Remove.
4714 (target_debug_print_mem_region_vector): New.
4715 * target-delegates.c: Regenerate.
4716 * target.h (mem_region_vector): New typedef.
4717 (to_memory_map): Return mem_region_vector.
4718 (target_memory_map): Return an std::vector.
4719 * target.c (target_memory_map): Return an std::vector.
4720 (flash_erase_command): Adjust.
4721
4722 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
4723
4724 * memory-map.c (struct memory_map_parsing_data) <property_name>:
4725 Change type to std::string.
4726 (memory_map_start_property): Adjust.
4727 (memory_map_end_property): Adjust.
4728
4729 2017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
4730
4731 * infrun.h: Include common/byte-vector.h.
4732 (struct displaced_step_closure): New struct.
4733 (struct buf_displaced_step_closure): New struct.
4734 * infrun.c (displaced_step_closure::~displaced_step_closure):
4735 Provide default implementation.
4736 (displaced_step_clear): Deallocate step closure with delete.
4737 * aarch64-tdep.c (displaced_step_closure): Rename to ...
4738 (aarch64_displaced_step_closure): ... this, extend
4739 displaced_step_closure.
4740 (aarch64_displaced_step_data) <dsc>: Change type to
4741 aarch64_displaced_step_closure.
4742 (aarch64_displaced_step_copy_insn): Adjust to type change, use
4743 unique_ptr.
4744 (aarch64_displaced_step_fixup): Add cast for displaced step
4745 closure.
4746 * amd64-tdep.c (displaced_step_closure): Rename to ...
4747 (amd64_displaced_step_closure): ... this, extend
4748 displaced_step_closure.
4749 <insn_buf>: Change type to std::vector<gdb_byte>.
4750 <max_len>: Remove.
4751 (fixup_riprel): Change type of DSC parameter, adjust to type
4752 change of insn_buf.
4753 (fixup_displaced_copy): Change type of DSC parameter.
4754 (amd64_displaced_step_copy_insn): Instantiate
4755 amd64_displaced_step_closure.
4756 (amd64_displaced_step_fixup): Add cast for closure type, adjust
4757 to type change of insn_buf.
4758 * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
4759 parameter DSC.
4760 (arm_linux_copy_svc): Likewise.
4761 (cleanup_kernel_helper_return): Likewise.
4762 (arm_catch_kernel_helper_return): Likewise.
4763 (arm_linux_displaced_step_copy_insn): Instantiate
4764 arm_displaced_step_closure.
4765 * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
4766 (displaced_read_reg): Change type of parameter DSC.
4767 (branch_write_pc): Likewise.
4768 (load_write_pc): Likewise.
4769 (alu_write_pc): Likewise.
4770 (displaced_write_reg): Likewise.
4771 (arm_copy_unmodified): Likewise.
4772 (thumb_copy_unmodified_32bit): Likewise.
4773 (thumb_copy_unmodified_16bit): Likewise.
4774 (cleanup_preload): Likewise.
4775 (install_preload): Likewise.
4776 (arm_copy_preload): Likewise.
4777 (thumb2_copy_preload): Likewise.
4778 (install_preload_reg): Likewise.
4779 (arm_copy_preload_reg): Likewise.
4780 (cleanup_copro_load_store): Likewise.
4781 (install_copro_load_store): Likewise.
4782 (arm_copy_copro_load_store) Likewise.
4783 (thumb2_copy_copro_load_store): Likewise.
4784 (cleanup_branch): Likewise.
4785 (install_b_bl_blx): Likewise.
4786 (arm_copy_b_bl_blx): Likewise.
4787 (thumb2_copy_b_bl_blx): Likewise.
4788 (thumb_copy_b): Likewise.
4789 (install_bx_blx_reg): Likewise.
4790 (arm_copy_bx_blx_reg): Likewise.
4791 (thumb_copy_bx_blx_reg): Likewise.
4792 (cleanup_alu_imm): Likewise.
4793 (arm_copy_alu_imm): Likewise.
4794 (thumb2_copy_alu_imm): Likewise.
4795 (cleanup_alu_reg): Likewise.
4796 (install_alu_reg): Likewise.
4797 (arm_copy_alu_reg): Likewise.
4798 (thumb_copy_alu_reg): Likewise.
4799 (cleanup_alu_shifted_reg): Likewise.
4800 (install_alu_shifted_reg): Likewise.
4801 (arm_copy_alu_shifted_reg): Likewise.
4802 (cleanup_load): Likewise.
4803 (cleanup_store): Likewise.
4804 (arm_copy_extra_ld_st): Likewise.
4805 (install_load_store): Likewise.
4806 (thumb2_copy_load_literal): Likewise.
4807 (thumb2_copy_load_reg_imm): Likewise.
4808 (arm_copy_ldr_str_ldrb_strb): Likewise.
4809 (cleanup_block_load_all): Likewise.
4810 (cleanup_block_store_pc): Likewise.
4811 (cleanup_block_load_pc): Likewise.
4812 (arm_copy_block_xfer): Likewise.
4813 (thumb2_copy_block_xfer): Likewise.
4814 (cleanup_svc): Likewise.
4815 (install_svc): Likewise.
4816 (arm_copy_svc): Likewise.
4817 (thumb_copy_svc): Likewise.
4818 (arm_copy_undef): Likewise.
4819 (thumb_32bit_copy_undef): Likewise.
4820 (arm_copy_unpred): Likewise.
4821 (arm_decode_misc_memhint_neon): Likewise.
4822 (arm_decode_unconditional): Likewise.
4823 (arm_decode_miscellaneous): Likewise.
4824 (arm_decode_dp_misc): Likewise.
4825 (arm_decode_ld_st_word_ubyte): Likewise.
4826 (arm_decode_media): Likewise.
4827 (arm_decode_b_bl_ldmstm): Likewise.
4828 (arm_decode_ext_reg_ld_st): Likewise.
4829 (thumb2_decode_dp_shift_reg): Likewise.
4830 (thumb2_decode_ext_reg_ld_st): Likewise.
4831 (arm_decode_svc_copro): Likewise.
4832 (thumb2_decode_svc_copro): Likewise.
4833 (install_pc_relative): Likewise.
4834 (thumb_copy_pc_relative_16bit): Likewise.
4835 (thumb_decode_pc_relative_16bit): Likewise.
4836 (thumb_copy_pc_relative_32bit): Likewise.
4837 (thumb_copy_16bit_ldr_literal): Likewise.
4838 (thumb_copy_cbnz_cbz): Likewise.
4839 (thumb2_copy_table_branch): Likewise.
4840 (cleanup_pop_pc_16bit_all): Likewise.
4841 (thumb_copy_pop_pc_16bit): Likewise.
4842 (thumb_process_displaced_16bit_insn): Likewise.
4843 (decode_thumb_32bit_ld_mem_hints): Likewise.
4844 (thumb_process_displaced_32bit_insn): Likewise.
4845 (thumb_process_displaced_insn): Likewise.
4846 (arm_process_displaced_insn): Likewise.
4847 (arm_displaced_init_closure): Likewise.
4848 (arm_displaced_step_fixup): Add cast for closure.
4849 * arm-tdep.h: Include infrun.h.
4850 (displaced_step_closure): Rename to ...
4851 (arm_displaced_step_closure): ... this, extend
4852 displaced_step_closure.
4853 <u::svc::copy_svc_os>: Change type of parameter DSC.
4854 <cleanup>: Likewise.
4855 (arm_process_displaced_insn): Likewise.
4856 (arm_displaced_init_closure): Likewise.
4857 (displaced_read_reg): Likewise.
4858 (displaced_write_reg): Likewise.
4859 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
4860 Adjust.
4861 * i386-tdep.h: Include infrun.h.
4862 (i386_displaced_step_closure): New typedef.
4863 * i386-tdep.c (i386_displaced_step_copy_insn): Use
4864 i386_displaced_step_closure.
4865 (i386_displaced_step_fixup): Adjust.
4866 * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
4867 (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
4868 and unique_ptr.
4869 (ppc_displaced_step_fixup): Adjust.
4870 * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
4871 (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
4872 and unique_ptr.
4873 (s390_displaced_step_fixup): Adjust.
4874
4875 2017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
4876
4877 * interps.h (interp_resume, interp_suspend, interp_set_temp):
4878 Remove declarations.
4879
4880 2017-10-20 Tom Tromey <tom@tromey.com>
4881
4882 * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
4883 std::vector.
4884 (gdb_bfd_record_inclusion): Update.
4885 (bfdp): Remove typedef.
4886
4887 2017-10-20 Tom Tromey <tom@tromey.com>
4888
4889 * gdb_bfd.c (gdb_bfd_ref): Use new.
4890 (struct gdb_bfd_data): Add constructor, destructor, and member
4891 initializers.
4892 (gdb_bfd_unref): Use delete.
4893
4894 2017-10-20 Tom Tromey <tom@tromey.com>
4895
4896 * exec.c (exec_file_attach): Use new_bfd_ref.
4897 * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
4898 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
4899 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
4900 new_bfd_ref.
4901 * gdb_bfd.h (new_bfd_ref): New function.
4902
4903 2017-10-20 Pedro Alves <palves@redhat.com>
4904
4905 * main.c (captured_command_loop): Add attribute noinline.
4906
4907 2017-10-19 Simon Marchi <simon.marchi@ericsson.com>
4908
4909 * interps.c (struct interp_factory): Add constructor.
4910 (interp_factory_p): Remove typedef.
4911 (DEF_VEC_P(interp_factory_p)): Remove.
4912 (interpreter_factories): Change type to std::vector.
4913 (interp_factory_register): Adjust.
4914 (interp_lookup): Adjust.
4915 (interpreter_completer): Adjust.
4916
4917 2017-10-19 Tom Tromey <tom@tromey.com>
4918
4919 * break-catch-syscall.c (catch_syscall_completer): Use
4920 std::string, gdb::unique_xmalloc_ptr.
4921
4922 2017-10-19 Tom Tromey <tom@tromey.com>
4923
4924 * infcall.c (call_function_by_hand_dummy): Use std::string.
4925
4926 2017-10-19 Tom Tromey <tom@tromey.com>
4927
4928 * mi/mi-main.c (mi_cmd_execute): Update.
4929 * top.h (prepare_execute_command): Return scoped_value_mark.
4930 * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
4931 Add move constructor.
4932 * top.c (prepare_execute_command): Return scoped_value_mark.
4933 (execute_command): Update.
4934
4935 2017-10-19 Pedro Alves <palves@redhat.com>
4936
4937 * xml-support.c (xml_fetch_content_from_file): Check fread's
4938 return.
4939
4940 2017-10-19 Pedro Alves <palves@redhat.com>
4941
4942 * ser-base.c (ser_base_read_error_fd): Delete the file handler if
4943 async.
4944 (handle_error_fd): New function.
4945 (ser_base_async): Add/delete an event loop file handler for
4946 error_fd.
4947
4948 2017-10-19 Pedro Alves <palves@redhat.com>
4949
4950 * xml-support.c (xml_fetch_content_from_file): Don't read in
4951 chunks. Instead use fseek to determine the file's size, and read
4952 it in one go.
4953
4954 2017-11-18 Keith Seitz <keiths@redhat.com>
4955
4956 * c-exp.y (oper): Canonicalize conversion operators of user-defined
4957 types.
4958 Add whitespace to front of type name.
4959
4960 2017-10-18 Keith Seitz <keiths@redhat.com>
4961
4962 * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
4963 DW_AT_accessibility.
4964
4965 2017-10-18 Yao Qi <yao.qi@linaro.org>
4966
4967 * features/tic6x-c62x-linux.c: Remove.
4968
4969 2017-10-17 Tom Tromey <tom@tromey.com>
4970
4971 * disasm.c (do_mixed_source_and_assembly_deprecated): Use
4972 gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
4973 (do_mixed_source_and_assembly): Likewise.
4974
4975 2017-10-17 Tom Tromey <tom@tromey.com>
4976
4977 * regcache.c (regcache::xfer_part): Remove assertion.
4978
4979 2017-10-17 Pedro Alves <palves@redhat.com>
4980
4981 * xml-support.c (xml_fetch_content_from_file): Call
4982 unique_ptr::release() instead unique_ptr::get() when passing
4983 through xrealloc.
4984
4985 2017-10-17 Yao Qi <yao.qi@linaro.org>
4986
4987 * regcache.c (regcache::xfer_part): Remove parameters read and
4988 write, add parameter is_raw. All callers are updated.
4989
4990 2017-10-16 Keith Seitz <keiths@redhat.com>
4991
4992 * c-typeprint.c (enum access_specifier): Moved here from
4993 c_type_print_base.
4994 (output_access_specifier): New function.
4995 (c_type_print_base): Consider typedefs when assessing
4996 whether access labels are needed.
4997 Use output_access_specifier as needed.
4998 Output access specifier for typedefs, if needed.
4999 * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
5000 * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
5001 fields.
5002 (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
5003 accessor macros.
5004
5005 2017-10-16 Tom Tromey <tom@tromey.com>
5006
5007 * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
5008 (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
5009 * target.c (target_fileio_read_stralloc): Update.
5010 * sparc64-tdep.c (adi_is_addr_mapped): Update.
5011 * target.h (target_fileio_read_stralloc): Return
5012 unique_xmalloc_ptr.
5013
5014 2017-10-16 Tom Tromey <tom@tromey.com>
5015
5016 * xml-syscall.c (xml_init_syscalls_info): Update.
5017 * xml-support.c (xinclude_start_include): Update.
5018 (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
5019 * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
5020 (xml_fetch_content_from_file): Likewise.
5021 * osdata.c (get_osdata): Update.
5022 * target.h (target_read_stralloc, target_get_osdata): Return
5023 unique_xmalloc_ptr.
5024 * solib-aix.c (solib_aix_get_library_list): Update.
5025 * solib-target.c (solib_target_current_sos): Update.
5026 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
5027 * xml-tdesc.c (fetch_available_features_from_target): Update.
5028 (target_fetch_description_xml): Update.
5029 (file_read_description_xml): Update.
5030 * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
5031 (remote_traceframe_info, btrace_read_config, remote_read_btrace)
5032 (remote_pid_to_exec_file): Update.
5033 * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
5034 (target_get_osdata): Likewise.
5035
5036 2017-10-16 Tom Tromey <tom@tromey.com>
5037
5038 * remote.c (remote_register_number_and_offset): Use std::vector.
5039 (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
5040 (putpkt_binary): Use gdb::def_vector.
5041 (compare_sections_command): Use gdb::byte_vector.
5042
5043 2017-10-16 Tom Tromey <tom@tromey.com>
5044
5045 * ppc-linux-nat.c (hwdebug_insert_point): Use
5046 gdb::unique_xmalloc_ptr, XDUP.
5047
5048 2017-10-16 Tom Tromey <tom@tromey.com>
5049
5050 * probe.c (parse_probes): Use std::string.
5051 (info_probes_for_ops, enable_probes_command)
5052 (disable_probes_command): Remove cleanups.
5053
5054 2017-10-16 Tom Tromey <tom@tromey.com>
5055
5056 * buildsym.c (block_compar): Remove.
5057 (end_symtab_get_static_block): Use std::vector.
5058
5059 2017-10-16 Simon Marchi <simon.marchi@ericsson.com>
5060
5061 * memrange.h (struct mem_range): Define operator< and operator==.
5062 (mem_range_s): Remove.
5063 (DEF_VEC_O (mem_range_s)): Remove.
5064 (normalize_mem_ranges): Change parameter type to std::vector.
5065 * memrange.c (compare_mem_ranges): Remove.
5066 (normalize_mem_ranges): Change parameter type to std::vector,
5067 adjust to vector change.
5068 * exec.c (section_table_available_memory): Return vector, remove
5069 parameter.
5070 (section_table_read_available_memory): Adjust to std::vector
5071 change.
5072 * remote.c (remote_read_bytes): Adjust to std::vector
5073 change.
5074 * tracepoint.h (traceframe_available_memory): Change parameter
5075 type to std::vector.
5076 * tracepoint.c (traceframe_available_memory): Change parameter
5077 type to std::vector, adjust.
5078 * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
5079 std::vector change.
5080 * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5081 unittests/memrange-selftests.c.
5082 (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
5083 * gdb/unittests/memrange-selftests.c: New file.
5084
5085 2017-10-16 Pedro Alves <palves@redhat.com>
5086
5087 * elfread.c (probe_key_free): Rename range-for variable.
5088 * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
5089 (find_probe_by_pc, collect_probes): Rename range-for variable.
5090
5091 2017-10-16 Yao Qi <yao.qi@linaro.org>
5092
5093 * features/Makefile (XMLTOC): Remove tic6x-*.xml.
5094 * features/tic6x-c62x.c: Remove.
5095 * features/tic6x-c64x-linux.c: Remove.
5096 * features/tic6x-c64x.c: Remove.
5097 * features/tic6x-c64xp-linux.c: Remove.
5098 * features/tic6x-c64xp.c: Remove.
5099 * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
5100 initialize_tdesc_tic6x_*_linux functions.
5101 * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
5102 initialize_tdesc_tic6x_* functions.
5103
5104 2017-10-16 Yao Qi <yao.qi@linaro.org>
5105
5106 * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
5107 tic6x-c62x.
5108 * regformats/tic6x-c62x.dat: Remove.
5109 * regformats/tic6x-c64x.dat: Remove.
5110 * regformats/tic6x-c64xp.dat: Remove.
5111
5112 2017-10-15 Simon Marchi <simon.marchi@ericsson.com>
5113
5114 * tracepoint.c (parse_traceframe_info): Return a unique_ptr
5115 (the !HAVE_LIBEXPAT version).
5116
5117 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
5118
5119 * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
5120 const.
5121
5122 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
5123
5124 * target.h: Include tracepoint.h.
5125 (enum trace_find_type): Move to tracepoint.h.
5126 (struct target_ops) <to_traceframe_info>: Return a unique ptr.
5127 * tracepoint.h: Don't include target.h
5128 (enum trace_find_type): Move from target.h.
5129 (parse_traceframe_info): Return a unique ptr.
5130 * tracepoint.c (current_traceframe_info): Change type to unique
5131 ptr.
5132 (free_traceframe_info): Remove.
5133 (clear_traceframe_info): Don't manually free
5134 current_traceframe_info.
5135 (free_result): Remove.
5136 (parse_traceframe_info): Return a unique ptr.
5137 (get_traceframe_info): Adjust to unique ptr.
5138 * ctf.c (ctf_traceframe_info): Return a unique ptr.
5139 * remote.c (remote_traceframe_info): Return a unique ptr.
5140 * tracefile-tfile.c (tfile_traceframe_info): Return a unique
5141 ptr.
5142 * target-debug.h (target_debug_print_traceframe_info_up): New
5143 macro.
5144 * target-delegates.c: Regenerate.
5145
5146 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
5147
5148 * memrange.h (struct mem_range): Add constructors.
5149 * tracepoint.h (struct traceframe_info) <memory>: Change type to
5150 std::vector<mem_range>.
5151 * tracepoint.c (free_traceframe_info): Don't manually free
5152 vector.
5153 (traceframe_info_start_memory): Adjust to vector change.
5154 (traceframe_available_memory): Likewise.
5155 * tracefile-tfile.c (build_traceframe_info): Likewise.
5156 * ctf.c (ctf_traceframe_info): Likewise.
5157
5158 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
5159
5160 * tracepoint.h (struct traceframe_info) <tvars>: Change type to
5161 std::vector<int>.
5162 * tracepoint.c (free_traceframe_info): Deallocate with delete.
5163 (traceframe_info_start_tvar): Adjust to vector change.
5164 (parse_traceframe_info): Allocate with new.
5165 * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
5166 vector change.
5167 * tracefile-tfile.c (build_traceframe_info): Adjust to vector
5168 change.
5169 tfile_traceframe_info): Allocate with new.
5170 * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
5171 change.
5172
5173 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
5174
5175 * tracepoint.c (traceframe_info): Rename to...
5176 (current_traceframe_info): ...this.
5177 (clear_traceframe_info): Adjust.
5178 (get_traceframe_info): Adjust.
5179
5180 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
5181
5182 * nat/linux-osdata.c: Include algorithm.
5183 (compare_processes): Remove.
5184 (struct pid_pgid_entry): New struct.
5185 (linux_xfer_osdata_processgroups): Use std::vector instead of
5186 XNEWVEC.
5187
5188 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
5189
5190 * objfiles.h: Don't include symfile.h.
5191 (struct partial_symbol): Remove forward-declaration.
5192 (struct objfile) <global_psymbols, static_psymbols>: Change type
5193 to std::vector<partial_symbol *>.
5194 * objfiles.c (objfile::objfile): Don't memset those fields.
5195 (objfile::~objfile): Don't free those fields.
5196 * psympriv.h (struct psymbol_allocation_list): Remove
5197 forward-declaration.
5198 (add_psymbol_to_list): Change psymbol_allocation_list parameter
5199 to std::vector.
5200 (start_psymtab_common): Change parameters to std::vector.
5201 * psymtab.c: Include algorithm.
5202 (require_partial_symbols): Call shrink_to_fit.
5203 (find_pc_sect_psymbol): Adjust to vector change.
5204 (match_partial_symbol): Likewise.
5205 (lookup_partial_symbol): Likewise.
5206 (psym_relocate): Likewise.
5207 (dump_psymtab): Likewise.
5208 (recursively_search_psymtabs): Likewise.
5209 (compare_psymbols): Remove.
5210 (sort_pst_symbols): Adjust to vector change.
5211 (start_psymtab_common): Likewise.
5212 (end_psymtab_common): Likewise.
5213 (psymbol_bcache_full): De-constify return value.
5214 (add_psymbol_to_bcache): Likewise.
5215 (extend_psymbol_list): Remove.
5216 (append_psymbol_to_list): Adjust to vector change.
5217 (add_psymbol_to_list): Likewise.
5218 (init_psymbol_list): Likewise.
5219 (maintenance_info_psymtabs): Likewise.
5220 (maintenance_check_psymtabs): Likewise.
5221 * symfile.h (struct psymbol_allocation_list): Remove.
5222 * symfile.c (reread_symbols): Adjust to vector change.
5223 * dbxread.c (start_psymtab): Change type of parameters.
5224 (dbx_symfile_read): Adjust to vector change.
5225 (read_dbx_symtab): Likewise.
5226 (start_psymtab): Change type of parameters.
5227 * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
5228 (create_partial_symtab): Likewise.
5229 (add_partial_symbol): Likewise.
5230 (write_one_signatured_type): Likewise.
5231 (recursively_write_psymbols): Likewise.
5232 * mdebugread.c (parse_partial_symbols): Likewise.
5233 * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
5234 (scan_xcoff_symtab): Adjust to vector change.
5235 (xcoff_initial_scan): Likewise.
5236
5237 2017-10-13 Simon Marchi <simon.marchi@ericsson.com>
5238
5239 * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
5240
5241 2017-10-13 Yao Qi <yao.qi@linaro.org>
5242
5243 * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
5244 Remove s390x-*-expedite, add s390x-expedite.
5245
5246 2017-10-13 Yao Qi <yao.qi@linaro.org>
5247
5248 * features/s390-gs-linux64.c: Regenerated.
5249 * features/s390x-gs-linux64.c: Regenerated.
5250
5251 2017-10-13 Tom Tromey <tom@tromey.com>
5252
5253 * compile/compile-object-run.c (do_module_cleanup): Use delete.
5254 * solib.c (update_solib_list, reload_shared_libraries_1): Use
5255 delete.
5256 * symfile.c (symbol_file_add_with_addrs): Use new.
5257 (symbol_file_add_separate): Update comment.
5258 (syms_from_objfile_1, remove_symbol_file_command): Use delete.
5259 * jit.c (jit_object_close_impl): Use new.
5260 (jit_unregister_code): Use delete.
5261 * objfiles.c (objfile::objfile): Rename from allocate_objfile.
5262 (~objfile): Rename from free_objfile.
5263 (free_objfile_separate_debug, do_free_objfile_cleanup)
5264 (free_all_objfiles, objfile_purge_solibs): Use delete.
5265 * objfiles.h (struct objfile): Add constructor and destructor.
5266 Use DISABLE_COPY_AND_ASSIGN. Add initializers to data members.
5267 (allocate_objfile, free_objfile): Don't declare.
5268 (struct objstats): Add initializers.
5269
5270 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
5271
5272 * arch-utils.h (simple_displaced_step_copy_insn): Remove.
5273 * arch-utils.c (simple_displaced_step_copy_insn): Remove.
5274 * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
5275 * gdbarch.h: Regenerate.
5276 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
5277 Adjust comment.
5278 * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
5279 (i386_displaced_step_fixup): Adjust comment.
5280 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
5281
5282 2017-10-12 Tom Tromey <tom@tromey.com>
5283
5284 * prologue-value.h (pv_area::store_would_trash): Return bool.
5285 (pv_area::find_reg): Likewise.
5286 * prologue-value.c (pv_area::store_would_trash): Return bool.
5287 (pv_area::find_reg): Likewise.
5288
5289 2017-10-12 Tom Tromey <tom@tromey.com>
5290
5291 * s390-linux-tdep.c (s390_store, s390_load)
5292 (s390_check_for_saved, s390_analyze_prologue): Update.
5293 * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
5294 * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
5295 * prologue-value.h (class pv_area): Move from prologue-value.c.
5296 Change names of members. Add constructor, destructor, member
5297 functions.
5298 (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
5299 (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
5300 (pv_area_fetch, pv_area_scan): Don't declare.
5301 * prologue-value.c (struct pv_area::area_entry): Now member of
5302 pv_area.
5303 (struct pv_area): Move to prologue-value.h.
5304 (pv_area::pv_area): Rename from make_pv_area.
5305 (pv_area::~pv_area): Rename from free_pv_area.
5306 (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
5307 (clear_entries, find_entry, overlaps, store_would_trash, store)
5308 (fetch, find_reg, scan): Now member of pv_area.
5309 Remove "area" argument. Update.
5310 * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
5311 Update.
5312 * mn10300-tdep.c (push_reg, check_for_saved)
5313 (mn10300_analyze_prologue): Update.
5314 * mep-tdep.c (is_arg_spill, check_for_saved)
5315 (mep_analyze_prologue): Update.
5316 * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
5317 (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
5318 (m32c_is_struct_return, m32c_analyze_prologue): Update.
5319 * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
5320 Update.
5321 * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
5322 * aarch64-tdep.c (aarch64_analyze_prologue): Update.
5323
5324 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
5325
5326 * linux-nat.h (linux_nat_set_delete_thread): New declaration.
5327 * linux-nat.c (linux_nat_delete_thread): New variable.
5328 (lwp_free): Invoke linux_nat_delete_thread if set.
5329 (linux_nat_set_delete_thread): New function.
5330 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
5331 thread delete callback.
5332 * arm-linux-nat.c (arm_linux_delete_thread): New function.
5333 (_initialize_arm_linux_nat): Assign thread delete callback.
5334 * s390-linux-nat.c (s390_delete_thread): New function.
5335 (_initialize_s390_nat): Assign thread delete callback.
5336 * x86-linux-nat.c (x86_linux_add_target): Likewise.
5337 * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
5338 function.
5339 * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
5340 declaration.
5341 * nat/x86-linux.c (x86_linux_delete_thread): New function.
5342 * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
5343
5344 2017-10-09 Tom Tromey <tom@tromey.com>
5345
5346 * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
5347 std::string.
5348 * tui/tui-layout.c (enum tui_status): Use std::string.
5349
5350 2017-10-11 Tom Tromey <tom@tromey.com>
5351
5352 * gdbthread.h (thread_command): Constify.
5353 * inferior.h (detach_command): Constify.
5354 * top.h (set_history, show_history): Constify.
5355 * arm-tdep.c (set_arm_command, show_arm_command): Constify.
5356 * serial.c (serial_set_cmd, serial_show_cmd): Constify.
5357 * bsd-kvm.c (bsd_kvm_cmd): Constify.
5358 * printcmd.c (set_command): Constify.
5359 (non_const_set_command): New function.
5360 * dcache.c (set_dcache_command, show_dcache_command): Constify.
5361 * breakpoint.c (enable_command, disable_command, delete_command)
5362 (catch_command, tcatch_command, set_breakpoint_cmd)
5363 (show_breakpoint_cmd): Constify.
5364 * macrocmd.c (macro_command): Constify.
5365 * infcmd.c (unset_command, kill_command, detach_command)
5366 (info_proc_cmd): Constify.
5367 * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
5368 * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
5369 (info_auto_load_cmd): Constify.
5370 * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
5371 (unset_tdesc_cmd): Constify.
5372 * ada-lang.c (set_ada_command, show_ada_command)
5373 (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
5374 * guile/guile.c (set_guile_command, show_guile_command)
5375 (info_guile_command): Constify.
5376 * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
5377 Constify.
5378 * skip.c (skip_command): Constify.
5379 * compile/compile.c (_initialize_compile): Constify.
5380 * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
5381 * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
5382 (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
5383 (maint_btrace_pt_show_cmd): Constify.
5384 * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
5385 Constify.
5386 * python/python.c (user_show_python, user_set_python): Constify.
5387 * mips-tdep.c (set_mips_command, show_mips_command)
5388 (set_mipsfpu_command): Constify.
5389 * record-btrace.c (cmd_record_btrace_start)
5390 (cmd_set_record_btrace, cmd_show_record_btrace)
5391 (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
5392 (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
5393 * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
5394 Constify.
5395 * symfile.c (overlay_command): Constify.
5396 * spu-tdep.c (set_spu_command, show_spu_command): Constify.
5397 * cli/cli-logging.c (set_logging_command, show_logging_command):
5398 Constify.
5399 * cli/cli-dump.c (dump_command, append_command)
5400 (srec_dump_command, ihex_dump_command, verilog_dump_command)
5401 (tekhex_dump_command, binary_dump_command)
5402 (binary_append_command): Constify.
5403 * cli/cli-decode.c (struct cmd_list_element): Change type of
5404 "fun".
5405 * cli/cli-cmds.c (info_command, show_command, set_debug)
5406 (show_debug): Constify.
5407 (show_command): Add non-const overload.
5408 * top.c (set_history, show_history): Constify.
5409 * sh-tdep.c (set_sh_command, show_sh_command): Constify.
5410 * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
5411 * target.c (target_command): Constify.
5412 * sparc64-tdep.c (info_adi_command): Constify.
5413 * record-full.c (cmd_record_full_start): Constify.
5414 (set_record_full_command): Constify. Fix typo.
5415 (show_record_full_command): Constify.
5416 * thread.c (thread_command, thread_apply_command): Constify.
5417 * memattr.c (dummy_cmd): Constify.
5418 * value.c (function_command): Constify.
5419 * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
5420 * probe.c (info_probes_command): Constify.
5421 * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
5422 * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
5423 (show_thread_cmd, set_thread_default_cmd)
5424 (show_thread_default_cmd): Constify.
5425 (check_empty): Constify.
5426 * tracepoint.c (tfind_command): Constify.
5427 * cp-support.c (maint_cplus_command): Constify.
5428 * windows-tdep.c (info_w32_command): Constify.
5429 * record.c (cmd_record_start, set_record_command)
5430 (show_record_command, info_record_command, cmd_record_goto):
5431 Constify.
5432 * ravenscar-thread.c (set_ravenscar_command)
5433 (show_ravenscar_command): Constify.
5434 * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
5435 Constify.
5436 (add_internal_problem_command): Remove casts.
5437 * arc-tdep.c (maintenance_print_arc_command): Constify.
5438 * valprint.c (set_print, show_print, set_print_raw)
5439 (show_print_raw): Constify.
5440 * maint.c (maintenance_command, maintenance_info_command)
5441 (maintenance_print_command, maintenance_set_cmd)
5442 (maintenance_show_cmd, set_per_command_cmd)
5443 (show_per_command_cmd, maintenance_check_command): Constify.
5444 * language.c (set_check, show_check): Constify.
5445 * typeprint.c (show_print_type, set_print_type): Constify.
5446 * go32-nat.c (go32_info_dos_command): Constify.
5447
5448 2017-10-11 Tom Tromey <tom@tromey.com>
5449
5450 * breakpoint.c (prepare_re_set_context): Remove.
5451 (breakpoint_re_set_one): Update. Don't use cleanups.
5452 (breakpoint_re_set): Use scoped_restore, std::string, and
5453 scoped_restore_current_language.
5454
5455 2017-10-11 Tom Tromey <tom@tromey.com>
5456
5457 * breakpoint.c (commands_command_1): Use std::string.
5458 (cleanup_executing_breakpoints): Remove.
5459 (bpstat_do_actions_1): Use scoped_restore.
5460 (bpstat_check_watchpoint): Use std::string.
5461 (decode_static_tracepoint_spec): Likewise.
5462 (break_range_command): Likewise.
5463 (watch_command_1): Likewise.
5464 (compare_breakpoints): Change argument types.
5465 (clear_command): Use std::vector.
5466 (cleanup_executing_breakpoints): Remove.
5467 (update_global_location_list): Use unique_xmalloc_ptr.
5468 (strace_command): Remove unused declaration.
5469
5470 2017-10-11 John Baldwin <jhb@FreeBSD.org>
5471
5472 * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
5473 * NEWS: Mention new FreeBSD/arm native configuration.
5474 * configure.host: Add arm*-*-freebsd*.
5475 * configure.nat: Likewise.
5476 * arm-fbsd-nat.c: New file.
5477
5478 2017-10-11 John Baldwin <jhb@FreeBSD.org>
5479
5480 * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
5481 (ALLDEPFILES): Add arm-fbsd-tdep.c.
5482 * NEWS: Mention new FreeBSD/arm target.
5483 * configure.tgt: Add arm*-*-freebsd*.
5484 * arm-fbsd-tdep.c: New file.
5485 * arm-fbsd-tdep.h: New file.
5486
5487 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
5488
5489 * linux-tdep.c (linux_make_corefile_notes): Remove call to
5490 `gdbarch_elfcore_write_linux_prpsinfo'.
5491 * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
5492 method.
5493 (elf_internal_linux_prpsinfo): Remove declaration.
5494 * gdbarch.h: Regenerate.
5495 * gdbarch.c: Regenerate.
5496
5497 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
5498
5499 * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
5500 `set_gdbarch_elfcore_write_linux_prpsinfo'.
5501
5502 2017-10-11 Pedro Alves <palves@redhat.com>
5503
5504 * breakpoint.c (reattach_breakpoints): Delete.
5505 * breakpoint.h (reattach_breakpoints): Delete.
5506
5507 2017-10-11 Simon Marchi <simon.marchi@ericsson.com>
5508
5509 * symfile.c (registered_sym_fns): Make struct, not typedef.
5510 (DEF_VEC_O (registered_sym_fns)): Remove.
5511 (symtab_fns): Change type to std::vector.
5512 (add_symtab_fns): Adjust.
5513 (find_sym_fns): Adjust.
5514
5515 2017-10-11 Anton Kolesov <Anton.Kolesov@synopsys.com>
5516
5517 * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
5518 * arc-tdep.h (arc_arch_is_em): New function.
5519 (arc_arch_is_hs): Likewise.
5520
5521 2017-10-11 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
5522
5523 * macrotab.h (macro_lookup_inclusion): Remove unnecessary
5524 parentheses in the declaration.
5525 (macro_lookup_inclusion): Likewise.
5526 (macro_lookup_definition): Likewise.
5527 * p-lang.h (pascal_builtin_types): Likewise.
5528 * tui/tui-data.c (tui_win_list): Likewise.
5529 * tui/tui-data.h (tui_win_list): Likewise.
5530 * utils.h (make_cleanup_free_section_addr_info): Likewise.
5531
5532 2017-10-11 Mark Rages <markrages@gmail.com>
5533
5534 * target-memory.c (block_boundaries): Fix for block address not
5535 aligned on block size.
5536
5537 2017-10-10 Pedro Alves <palves@redhat.com>
5538 Tom Tromey <tom@tromey.com>
5539
5540 * breakpoint.c (struct captured_breakpoint_query_args)
5541 (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
5542 (print_breakpoint): New.
5543 * breakpoint.h (print_breakpoint): Declare.
5544 * common/common-exceptions.h (enum return_reason): Remove
5545 references to catch_exceptions.
5546 * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
5547 Delete.
5548 * exceptions.h (catch_exceptions_ftype, catch_exceptions)
5549 (catch_exception_ftype, catch_exceptions_with_msg): Delete.
5550 * gdb.h: Delete.
5551 * gdbthread.h (thread_select): Declare.
5552 * mi/mi-cmd-break.c: Don't include gdb.h.
5553 (breakpoint_notify): Use print_breakpoint.
5554 * mi/mi-cmd-catch.c: Don't include gdb.h.
5555 * mi/mi-interp.c: Don't include gdb.h.
5556 (mi_print_breakpoint_for_event): New.
5557 (mi_breakpoint_created, mi_breakpoint_modified): Use
5558 mi_print_breakpoint_for_event.
5559 * mi/mi-main.c: Don't include gdb.h.
5560 (mi_cmd_thread_select): Parse the global thread ID here. Use
5561 thread_select instead of gdb_thread_select.
5562 (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
5563 of using gdb_list_thread_ids.
5564 * remote-fileio.c (do_remote_fileio_request): Change type. Reply
5565 FILEIO_ENOSYS here.
5566 (remote_fileio_request): Use TRY/CATCH instead of
5567 catch_exceptions.
5568 * symfile-mem.c (struct symbol_file_add_from_memory_args)
5569 (symbol_file_add_from_memory_wrapper): Delete.
5570 (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
5571 * thread.c: Don't include gdb.h.
5572 (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
5573 (thread_alive): Use thread_select.
5574 (do_captured_thread_select): Delete, parts salvaged as ...
5575 (thread_select): ... this new function.
5576 (gdb_thread_select): Delete.
5577
5578 2017-10-10 Pedro Alves <palves@redhat.com>
5579 Tom Tromey <tom@tromey.com>
5580
5581 * breakpoint.c (breakpoint_cond_eval): Change return type to bool
5582 and reverse logic.
5583 (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
5584 No longer macros. Instead ...
5585 (enum wp_check_result): They're now values of this new
5586 enumeration.
5587 (watchpoint_check): Change return type to wp_check_result and
5588 parameter type to bpstat.
5589 (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
5590 (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
5591 catch_errors. Reverse logic of watchpoint_check call.
5592 (breakpoint_re_set_one): Now returns void and takes a breakpoint
5593 pointer as parameter.
5594 (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
5595 * common/common-exceptions.c (throw_exception_sjlj): Update
5596 comments to avoid mentioning catch_errors.
5597 * exceptions.c (catch_errors): Delete.
5598 * exceptions.h: Update comments to avoid mentioning catch_errors.
5599 (catch_errors_ftype, catch_errors): Delete.
5600 * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
5601 (hook_stop_stub): Delete.
5602 (restore_selected_frame): Change return type to void, and
5603 parameter type to const frame_id &.
5604 (restore_infcall_control_state): Use TRY/CATCH instead of
5605 catch_errors.
5606 * main.c (captured_command_loop): Return void and remove
5607 parameter. Remove references to catch_errors.
5608 (captured_main): Use TRY/CATCH instead of catch_errors.
5609 * objc-lang.c (objc_submethod_helper_data)
5610 (find_objc_msgcall_submethod_helper): Delete.
5611 (find_objc_msgcall_submethod): Use TRY/CATCH instead of
5612 catch_errors.
5613 * record-full.c (record_full_message): Return void.
5614 (record_full_message_args, record_full_message_wrapper): Delete.
5615 (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
5616 instead of catch_errors.
5617 * solib-aix.c (solib_aix_open_symbol_file_object): Change
5618 parameter type to int.
5619 * solib-darwin.c (open_symbol_file_object): Ditto.
5620 * solib-dsbt.c (open_symbol_file_object): Ditto.
5621 * solib-frv.c (open_symbol_file_object): Ditto.
5622 * solib-svr4.c (open_symbol_file_object): Ditto.
5623 * solib-target.c (solib_target_open_symbol_file_object): Ditto.
5624 * solib.c (update_solib_list): Use TRY/CATCH instead of
5625 catch_errors.
5626 * solist.h (struct target_so_ops) <open_symbol_file_object>:
5627 Change type.
5628 * symmisc.c (struct print_symbol_args): Remove.
5629 (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
5630 (print_symbol): Change type.
5631 * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
5632 and remove parameters.
5633 (catch_errors): New.
5634 (get_windows_debug_event): Adjust.
5635
5636 2017-10-09 Tom Tromey <tom@tromey.com>
5637
5638 * mi/mi-main.c (free_splay_tree): Remove.
5639 (list_available_thread_groups): Use splay_tree_up.
5640 * common/gdb_splay_tree.h: New file.
5641
5642 2017-10-09 Tom Tromey <tom@tromey.com>
5643
5644 * mi/mi-main.c (do_nothing): Remove.
5645 (list_available_thread_groups): Update.
5646
5647 2017-10-09 Pedro Alves <palves@redhat.com>
5648
5649 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
5650 reading registers when switching context.
5651
5652 2017-10-09 John Baldwin <jhb@FreeBSD.org>
5653
5654 * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
5655 (fbsd_convert_siginfo): Likewise.
5656 * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
5657
5658 2017-10-09 Simon Marchi <simon.marchi@polymtl.ca>
5659
5660 * configure.ac (try_guile_versions): Remove guile-2.2.
5661 * configure: Regenerate.
5662
5663 2017-10-09 Tom Tromey <tom@tromey.com>
5664
5665 * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
5666 (COMPILE.pre): Use $(CXX).
5667
5668 2017-10-09 Pedro Alves <palves@redhat.com>
5669
5670 * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
5671 Use bool.
5672 (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
5673 * cp-support.h (cp_remove_params): Now returns a
5674 gdb::unique_xmalloc_ptr.
5675 * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
5676 Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
5677 * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
5678 returning a gdb::unique_xmalloc_ptr.
5679 (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
5680 * stack.c (find_frame_funname): Adjust to cp_remove_params
5681 returning a gdb::unique_xmalloc_ptr.
5682
5683 2017-10-08 Tom Tromey <tom@tromey.com>
5684
5685 * dwarf2read.c (dwarf2_get_dwz_file): Use
5686 gdb::unique_xmalloc_ptr.
5687 (find_slot_in_mapped_hash): Likewise.
5688 (dwarf2_physname): Likewise.
5689 (create_dwo_unit_in_dwp_v1): Use std::string.
5690 (create_dwo_unit_in_dwp_v2): Likewise.
5691 (lookup_dwo_cutu): Likewise.
5692 (inherit_abstract_dies): Use std::vector.
5693 (read_array_type): Likewise.
5694 (dwarf_decode_macros): Remove unused declaration.
5695 (unsigned_int_compar): Remove.
5696 (dwarf2_build_psymtabs_hard): Use scoped_restore.
5697 (psymtabs_addrmap_cleanup): Remove.
5698
5699 2017-10-08 Tom Tromey <tom@tromey.com>
5700
5701 * frame-unwind.c (frame_unwind_try_unwinder): Update.
5702 * frame.h (frame_cleanup_after_sniffer): Declare.
5703 (frame_prepare_for_sniffer): Return void.
5704 * frame.c (frame_cleanup_after_sniffer): No longer static. Change
5705 type of argument.
5706 (frame_prepare_for_sniffer): Return void.
5707
5708 2017-10-08 Tom Tromey <tom@tromey.com>
5709
5710 * utils.h (make_cleanup_value_free): Remove.
5711 * utils.c (do_value_free, struct cleanup): Remove.
5712 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
5713 Use gdb_value_up.
5714 * value.h (struct value_deleter): New.
5715 (gdb_value_up): New typedef.
5716
5717 2017-10-08 Tom Tromey <tom@tromey.com>
5718
5719 * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
5720 (make_cleanup_free_search_symbols): Remove.
5721 (search_symbols): Return std::vector.
5722 (symbol_search::compare_search_syms): Now member of
5723 symbol_search. Change arguments.
5724 (sort_search_symbols_remove_dups): Change arguments. Rewrite.
5725 (symtab_symbol_info, rbreak_command): Update.
5726 * symtab.h (struct symbol_search) <next>: Remove.
5727 Add constructors.
5728 (symbol_search::operator<): New function.
5729 (symbol_search::operator==): New function.
5730 (search_symbols): Remove std::vector.
5731 (free_search_symbols, make_cleanup_free_search_symbols): Remove.
5732 (symbol_search::compare_search_syms): Declare.
5733
5734 2017-10-06 Yao Qi <yao.qi@linaro.org>
5735
5736 * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
5737 arch/aarch64-insn.o.
5738 Remove one rule.
5739 * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
5740
5741 2017-10-06 Yao Qi <yao.qi@linaro.org>
5742
5743 * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
5744 and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
5745 arch/arm-linux.o respectively.
5746 * configure.tgt: Likewise.
5747
5748 2017-10-06 Yao Qi <yao.qi@linaro.org>
5749
5750 * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
5751 * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
5752
5753 2017-10-06 Pedro Alves <palves@redhat.com>
5754
5755 * windows-nat.c: Include <algorithm>.
5756
5757 2017-10-06 Yao Qi <yao.qi@linaro.org>
5758
5759 * configure.tgt (i386_tobjs): New variable.
5760 (amd64_tobjs): New variable.
5761 Set $cpu_obs and $os_obs.
5762
5763 2017-10-06 Yao Qi <yao.qi@linaro.org>
5764
5765 * Makefile.in (CONFIG_SRC_SUBDIR): New.
5766 (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
5767 (clean): Remove object files and dependency files.
5768 (distclean): Remove the directory.
5769 * configure.ac: Invoke AC_CONFIG_COMMANDS.
5770 * configure: Re-generated.
5771 * configure.tgt: Replace amd64.o with arch/amd64.o.
5772
5773 2017-10-05 Jose E. Marchesi <jose.marchesi@oracle.com>
5774
5775 PR build/22188
5776 * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
5777 and SETEND.
5778
5779 2017-10-05 Pedro Alves <palves@redhat.com>
5780
5781 * linux-nat.c (linux_child_follow_fork): When following the parent
5782 and detaching the child, consult the parent thread's architecture
5783 instead of the child's.
5784
5785 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
5786
5787 * ax.h: Do not include "doublest.h".
5788 (union agent_val): Remove.
5789
5790 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
5791
5792 * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
5793 (decimal_to_string): Return std::string object.
5794 (decimal_from_string): Accept std::string object. Return bool.
5795 (decimal_from_integral, decimal_from_doublest): Remove.
5796 (decimal_from_longest): Add prototype.
5797 (decimal_from_ulongest): Likewise.
5798 (decimal_to_longest): Likewise.
5799 (decimal_from_doublest): Likewise.
5800 * dfp.c: Do not include "gdbtypes.h" or "value.h".
5801 (MAX_DECIMAL_STRING): Move here.
5802 (decimal_to_string): Return std::string object.
5803 (decimal_from_string): Accept std::string object. Return bool.
5804 (decimal_from_integral): Remove, replace by ...
5805 (decimal_from_longest, decimal_from_ulongest): ... these new functions.
5806 (decimal_to_longest): New function.
5807 (decimal_from_floating): Remove, replace by ...
5808 (decimal_from_doublest): ... this new function.
5809 (decimal_to_doublest): Update to new decimal_to_string interface.
5810
5811 * value.c (unpack_long): Use decimal_to_longest.
5812 * valops.c (value_cast): Use decimal_from_doublest instead of
5813 decimal_from_floating. Use decimal_from_[u]longest isntead of
5814 decimal_from_integral.
5815 * valarith.c (value_args_as_decimal): Likewise.
5816 * valprint.c (print_decimal_floating): Update to new
5817 decimal_to_string interface.
5818 * printcmd.c (printf_decfloat): Likewise.
5819 * c-exp.y (parse_number): Update to new decimal_from_string interface.
5820
5821 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
5822
5823 * doublest.h: Do not include "floatformat.h". Remove stale comments.
5824 * gdbtypes.c: Include "floatformat.h".
5825 * value.c: Likewise.
5826 * m68k-tdep.c: Likewise.
5827
5828 * findvar.c: Do not include "floatformat.h".
5829 * amd64-darwin-tdep.c: Likewise.
5830 * arm-linux-tdep.c: Likewise.
5831 * i386-darwin-tdep.c: Likewise.
5832 * i387-tdep.c: Likewise.
5833 * m68k-linux-tdep.c: Likewise.
5834 * mep-tdep.c: Likewise.
5835 * mips-tdep.c: Likewise.
5836 * nios2-tdep.c: Likewise.
5837 * s390-linux-tdep.c: Likewise.
5838 * sparc-obsd-tdep.c: Likewise.
5839 * sparc-tdep.c: Likewise.
5840 * sparc64-tdep.c: Likewise.
5841 * spu-tdep.c: Likewise.
5842 * tic6x-tdep.c: Likewise.
5843 * tilegx-tdep.c: Likewise.
5844 * vax-tdep.c: Likewise.
5845 * xstormy16-tdep.c: Likewise.
5846 * xtensa-tdep.c: Likewise.
5847
5848 * top.c: Do not include "doublest.h".
5849 * aarch64-tdep.c: Likewise.
5850 * alpha-tdep.c: Likewise.
5851 * arm-linux-tdep.c: Likewise.
5852 * m68k-linux-tdep.c: Likewise.
5853 * tilegx-tdep.c: Likewise.
5854 * xstormy16-tdep.c: Likewise.
5855
5856 2017-10-05 John Baldwin <jhb@FreeBSD.org>
5857
5858 * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
5859 (mipsn32_fbsd_sigframe): Define.
5860 (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
5861 for FreeBSD/mipsn32.
5862
5863 2017-10-05 John Baldwin <jhb@FreeBSD.org>
5864
5865 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
5866 AT_HWCAP.
5867
5868 2017-10-05 Tristan Gingold <tgingold@free.fr>
5869
5870 * MAINTAINERS (Misc): Update my email address.
5871
5872 2017-10-04 Pedro Alves <palves@redhat.com>
5873
5874 * remote.c (get_remote_arch_state): New 'gdbarch' parameter. Use
5875 it instead of target_gdbarch.
5876 (get_remote_state, get_remote_packet_size): Adjust
5877 get_remote_arch_state calls, passing down target_gdbarch
5878 explicitly.
5879 (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
5880 'gdbarch' and use it instead of target_gdbarch.
5881 (get_memory_packet_size): Adjust get_remote_arch_state calls,
5882 passing down target_gdbarch explicitly.
5883 (struct stop_reply) <arch>: New field.
5884 (remote_parse_stop_reply): Use the stopped thread's architecture,
5885 not the current inferior's. Save the architecture in the
5886 stop_reply.
5887 (process_stop_reply): Use the stop reply's architecture.
5888 (process_g_packet, remote_fetch_registers)
5889 (remote_prepare_to_store, store_registers_using_G)
5890 (remote_store_registers): Adjust get_remote_arch_state calls,
5891 using the regcache's architecture.
5892 (remote_get_trace_status): Adjust get_remote_arch_state calls,
5893 passing down target_gdbarch explicitly.
5894 * spu-multiarch.c (spu_thread_architecture): Defer to the target
5895 beneath instead of calling target_gdbarch.
5896 * target.c (default_thread_architecture): Use the specified
5897 inferior's architecture, instead of the current inferior's
5898 architecture (via target_gdbarch).
5899
5900 2017-10-04 Pedro Alves <palves@redhat.com>
5901
5902 * regcache.c (get_thread_arch_regcache): Remove null_ptid special
5903 case.
5904 (regcache_print): Handle !target_has_registers here instead.
5905
5906 2017-10-04 Pedro Alves <palves@redhat.com>
5907
5908 * frame.c (create_test_frame): Delete.
5909 * frame.h (create_test_frame): Delete.
5910 * gdbarch-selftests.c: Include gdbthread.h and target.h.
5911 (class regcache_test): Delete.
5912 (test_target_has_registers, test_target_has_stack)
5913 (test_target_has_memory, test_target_prepare_to_store)
5914 (test_target_store_registers): New functions.
5915 (test_target_ops): New class.
5916 (register_to_value_test): Error out if there's already a
5917 process_stratum (or higher) target pushed. Create a fuller mock
5918 environment, with mock target_ops, inferior, address space, thread
5919 and inferior_ptid.
5920 * progspace.c (struct address_space): Move to ...
5921 * progspace.h (struct address_space): ... here.
5922 * regcache.h (regcache::~regcache, regcache::raw_write)
5923 [GDB_SELF_TEST]: No longer virtual.
5924
5925 2017-10-04 Simon Marchi <simon.marchi@ericsson.com>
5926
5927 * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
5928
5929 2017-10-04 Pedro Alves <palves@redhat.com>
5930
5931 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
5932 out of 'between TRY and CATCH'.
5933
5934 2017-10-04 Pedro Alves <palves@redhat.com>
5935
5936 * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
5937 * common/common-exceptions.h (TRY): Open an outermost scope.
5938 Expand intro comment.
5939 (CATCH): Reindent.
5940 (END_CATCH): Close the outermost scope.
5941 * completer.c (complete_line_internal): Add missing END_CATCH.
5942
5943 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
5944
5945 * NEWS (Changes since GDB 8.0): Add entry about new
5946 'set-cwd-on-gdbserver' feature.
5947 (New remote packets): Add entry for QSetWorkingDir.
5948 * common/common-inferior.h (set_inferior_cwd): New prototype.
5949 * infcmd.c (set_inferior_cwd): Remove "static".
5950 (show_cwd_command): Expand text to include remote debugging.
5951 * remote.c: Add PACKET_QSetWorkingDir.
5952 (remote_protocol_features) <QSetWorkingDir>: New entry for
5953 PACKET_QSetWorkingDir.
5954 (extended_remote_set_inferior_cwd): New function.
5955 (extended_remote_create_inferior): Call
5956 "extended_remote_set_inferior_cwd".
5957 (_initialize_remote): Call "add_packet_config_cmd" for
5958 QSetWorkingDir.
5959
5960 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
5961
5962 * NEWS (New commands): Mention "set/show cwd".
5963 * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
5964 "cd" command's help text.
5965 * common/common-inferior.h (get_inferior_cwd): New prototype.
5966 * infcmd.c (inferior_cwd_scratch): New global variable.
5967 (set_inferior_cwd): New function.
5968 (get_inferior_cwd): Likewise.
5969 (set_cwd_command): Likewise.
5970 (show_cwd_command): Likewise.
5971 (_initialize_infcmd): Add "set/show cwd" commands.
5972 * inferior.h (class inferior) <cwd>: New field.
5973 * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
5974 (fork_inferior): Change inferior's cwd before its execution.
5975 * windows-nat.c (windows_create_inferior): Pass inferior's cwd
5976 to CreateProcess.
5977
5978 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
5979
5980 * Makefile.in (SFILES): Add gdb_tilde_expand.c.
5981 (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
5982 (COMMON_OBS): Add gdb_tilde_expand.o.
5983 * common/gdb_tilde_expand.c: New file.
5984 * common/gdb_tilde_expand.h: Likewise.
5985
5986 2017-10-03 Maciej W. Rozycki <macro@imgtec.com>
5987
5988 * gdbarch.sh (objfile): Remove duplicate declaration.
5989 * gdbarch.h: Regenerate.
5990
5991 2017-10-03 Tom Tromey <tom@tromey.com>
5992
5993 * utils.c (internal_vproblem): Use string_vprintf.
5994
5995 2017-10-03 Tom Tromey <tom@tromey.com>
5996
5997 * printcmd.c (info_symbol_command): Use std::string.
5998
5999 2017-10-03 Tom Tromey <tom@tromey.com>
6000
6001 * top.c (gdb_safe_append_history): Use std::string.
6002
6003 2017-10-03 Tom Tromey <tom@tromey.com>
6004
6005 * event-top.c (stdin_event_handler): Update.
6006 * main.c (captured_main_1): Update.
6007 * top.h (make_delete_ui_cleanup): Remove.
6008 (struct ui): Add constructor and destructor.
6009 (new_ui, delete_ui): Remove.
6010 * top.c (make_delete_ui_cleanup): Remove.
6011 (new_ui_command): Use std::unique_ptr.
6012 (delete_ui_cleanup): Remove.
6013 (ui::ui): Rename from new_ui. Update.
6014 (free_ui): Remove.
6015 (ui::~ui): Rename from delete_ui. Update.
6016
6017 2017-10-03 Tom Tromey <tom@tromey.com>
6018
6019 * symfile.c (load_progress): Use gdb::byte_vector.
6020
6021 2017-10-03 Tom Tromey <tom@tromey.com>
6022
6023 * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
6024 declaration.
6025 * printcmd.c (x_command): Remove unused declaration.
6026 * symfile.c (symbol_file_command): Remove unused declaration.
6027
6028 2017-10-03 Tom Tromey <tom@tromey.com>
6029
6030 * utils.c (internal_vproblem): Use std::string.
6031 (defaulted_query): Likewise.
6032
6033 2017-10-03 Tom Tromey <tom@tromey.com>
6034
6035 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
6036 * top.c (execute_command_to_string): Update.
6037 * utils.c (make_cleanup_restore_page_info): Remove.
6038 (do_restore_page_info_cleanup): Remove.
6039 (set_batch_flag_and_restore_page_info):
6040 New.
6041 (make_cleanup_restore_page_info): Remove.
6042 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
6043 (~set_batch_flag_and_restore_page_info): New
6044 (make_cleanup_restore_uinteger): Remove.
6045 (make_cleanup_restore_integer): Remove.
6046 (struct restore_integer_closure): Remove.
6047 (restore_integer): Remove.
6048 * utils.h (struct set_batch_flag_and_restore_page_info): New
6049 class.
6050 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
6051 (make_cleanup_restore_page_info): Remove.
6052 (make_cleanup_restore_uinteger) Remove.
6053 (make_cleanup_restore_integer) Remove.
6054
6055 2017-10-03 Tom Tromey <tom@tromey.com>
6056
6057 * record-full.h (record_full_gdb_operation_disable_set): Return
6058 scoped_restore_tmpl<int>.
6059 * infrun.c (adjust_pc_after_break): Update.
6060 (handle_signal_stop): Update.
6061 * record-full.c (record_full_gdb_operation_disable_set): Return
6062 scoped_restore_tmpl<int>.
6063 (record_full_wait_1, record_full_insert_breakpoint)
6064 (record_full_remove_breakpoint, record_full_save)
6065 (record_full_goto_insn): Update.
6066
6067 2017-10-02 Tom Tromey <tom@tromey.com>
6068
6069 PR rust/22236:
6070 * rust-lang.c (rust_val_print_str): New function.
6071 (val_print_struct): Call it.
6072 (rust_subscript): Preserve name of slice type.
6073
6074 2017-10-02 Tom Tromey <tom@tromey.com>
6075
6076 * rust-lang.c (rust_subscript): Handle slices in
6077 EVAL_AVOID_SIDE_EFFECTS case.
6078
6079 2017-10-02 Tom Tromey <tom@tromey.com>
6080
6081 * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
6082
6083 2017-10-02 Tom Tromey <tom@tromey.com>
6084
6085 * rust-lang.h (rust_slice_type): Add "extern".
6086
6087 2017-10-02 Tom Tromey <tom@tromey.com>
6088 Pedro Alves <palves@redhat.com>
6089
6090 * ada-lang.h (ada_exc_info::operator<): Make const.
6091 (ada_exc_info::operator==): Make const.
6092 * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
6093 Make const.
6094
6095 2017-09-29 Tom Tromey <tom@tromey.com>
6096
6097 * target.c (read_whatever_is_readable): Change type of "result".
6098 Update.
6099 (free_memory_read_result_vector): Remove.
6100 (read_memory_robust): Change return type. Update.
6101 * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update. Use
6102 bin2hex, std::string.
6103 * target.h (memory_read_result_s): Remove typedef.
6104 (free_memory_read_result_vector): Remove.
6105 (read_memory_robust): Return std::vector.
6106
6107 2017-09-29 Tom Tromey <tom@tromey.com>
6108
6109 * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
6110
6111 2017-09-29 Tom Tromey <tom@tromey.com>
6112
6113 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
6114 * ada-lang.h (struct ada_exc_info): Remove typedef. Declare
6115 operator< and operator==.
6116 (ada_exceptions_list): Return a std::vector.
6117 * ada-lang.c (ada_exc_info::operator<): Rename from
6118 compare_ada_exception_info.
6119 (ada_exc_info::operator==): New.
6120 (sort_remove_dups_ada_exceptions_list): Change type of
6121 "exceptions".
6122 (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
6123 (ada_add_global_exceptions): Likewise.
6124 (ada_exceptions_list_1): Return a std::vector.
6125 (ada_exceptions_list): Likewise.
6126
6127 2017-09-29 Tom Tromey <tom@tromey.com>
6128
6129 * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
6130 'std::set *'.
6131 (print_one_inferior): Update.
6132 (free_vector_of_ints): Remove.
6133 (list_available_thread_groups): Change "ids" to std::set.
6134 (mi_cmd_list_thread_groups): Update.
6135 (struct collect_cores_data) <core>: Now a std::set.
6136 (collect_cores): Update.
6137 (unique): Remove.
6138 (print_one_inferior): Update.
6139
6140 2017-09-29 Tom Tromey <tom@tromey.com>
6141
6142 * mi/mi-main.c (mi_execute_cli_command): Use std::string.
6143 (mi_execute_async_cli_command): Likewise.
6144 (mi_cmd_trace_frame_collected): Use field_fmt.
6145
6146 2017-09-29 Tom Tromey <tom@tromey.com>
6147
6148 * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
6149 gdb::byte_vector.
6150
6151 2017-09-29 Tom Tromey <tom@tromey.com>
6152
6153 * mi/mi-parse.c (mi_parse): Remove unused declaration.
6154
6155 2017-09-29 Tom Tromey <tom@tromey.com>
6156
6157 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
6158
6159 2017-09-29 Tom Tromey <tom@tromey.com>
6160
6161 * varobj.h (varobj_gen_name): Return std::string.
6162 * varobj.c (varobj_gen_name): Return std::string.
6163 * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
6164 (mi_cmd_var_delete): Don't copy "name".
6165
6166 2017-09-29 Tom Tromey <tom@tromey.com>
6167
6168 * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
6169 (mi_cmd_break_insert_1): Update.
6170
6171 2017-09-29 Tom Tromey <tom@tromey.com>
6172
6173 * target.h (make_scoped_defer_target_commit_resume): Update.
6174 * target.c (make_scoped_defer_target_commit_resume): Rename from
6175 make_cleanup_defer_target_commit_resume. Return a
6176 scoped_restore.
6177 * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
6178
6179 2017-09-29 Tom Tromey <tom@tromey.com>
6180
6181 * main.c (captured_main_1): Remove unused declaration.
6182 * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
6183
6184 2017-09-29 Tom Tromey <tom@tromey.com>
6185
6186 * symtab.c (search_symbols): Remove unused outer cleanup.
6187 (make_source_files_completion_list): Remove unused declaration.
6188
6189 2017-09-29 Tom Tromey <tom@tromey.com>
6190
6191 * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
6192
6193 2017-09-29 Tom Tromey <tom@tromey.com>
6194
6195 * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
6196 gdb::byte_vector.
6197
6198 2017-09-29 Tom Tromey <tom@tromey.com>
6199
6200 * complaints.c (vcomplaint): Use std::string.
6201
6202 2017-09-29 Tom Tromey <tom@tromey.com>
6203
6204 * tracepoint.c (trace_variable_command): Use std::string.
6205 (encode_actions_1): Remove unused declarations.
6206 (create_tsv_from_upload): Use std::string.
6207
6208 2017-09-29 Tom Tromey <tom@tromey.com>
6209
6210 * cp-support.c (gdb_demangle): Use std::string.
6211
6212 2017-09-29 Tom Tromey <tom@tromey.com>
6213
6214 * stack.c (parse_frame_specification): Use std::string
6215 (info_frame_command): Use gdb::unique_xmalloc_ptr.
6216
6217 2017-09-29 Tom Tromey <tom@tromey.com>
6218
6219 * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
6220
6221 2017-09-29 Tom Tromey <tom@tromey.com>
6222
6223 * utils.c (vfprintf_maybe_filtered): Use std::string.
6224 (vfprintf_unfiltered): Likewise.
6225
6226 2017-09-29 Tom Tromey <tom@tromey.com>
6227
6228 * event-top.c (top_level_prompt): Return std::string.
6229 (display_gdb_prompt): Update.
6230
6231 2017-09-29 Tom Tromey <tom@tromey.com>
6232
6233 * unittests/common-utils-selftests.c (format): New function.
6234 (string_vprintf_tests): New function.
6235 (_initialize_common_utils_selftests): Register new tests.
6236 * common/common-utils.c (string_vprintf): New function.
6237 * common/common-utils.h (string_vprintf): Declare.
6238
6239 2017-09-29 Pedro Alves <palves@redhat.com>
6240
6241 * common/rsp-low.c (unpack_varlen_hex): Constify.
6242 * common/rsp-low.h (unpack_varlen_hex): Constify.
6243 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
6244 Constify.
6245 * remote.c (remote_set_permissions, read_ptid)
6246 (remote_current_thread, remote_get_threads_with_qthreadinfo)
6247 (remote_static_tracepoint_marker_at)
6248 (remote_static_tracepoint_markers_by_strid)
6249 (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
6250 * tracepoint.c (parse_trace_status, parse_tracepoint_status)
6251 (parse_tracepoint_definition, parse_tsv_definition)
6252 (parse_static_tracepoint_marker_definition): Constify.
6253 * tracepoint.h (parse_static_tracepoint_marker_definition)
6254 (parse_trace_status, parse_tracepoint_status)
6255 (parse_tracepoint_definition, parse_tsv_definition): Constify.
6256
6257 2017-09-29 Pedro Alves <palves@redhat.com>
6258
6259 * remote.c (target_buf, target_buf_size): Delete.
6260 (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
6261 Use the connection's packet buffer instead.
6262 All callers adjusted.
6263 (_initialize_remote): Remove references to target_buf and
6264 target_buf_size.
6265
6266 2017-09-28 Pedro Alves <palves@redhat.com>
6267
6268 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6269 unittests/common-utils-selftests.c.
6270 (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
6271 (COMMON_OBS): Remove utils-selftests.o.
6272 * utils-selftests.c: Move to ...
6273 * unittests/common-utils-selftests.c: ... here and rename self
6274 test to "string_printf".
6275
6276 2017-09-28 Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
6277
6278 * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
6279 having NULL cus or tus.
6280
6281 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
6282
6283 * arm-tdep.c: (convert_from_extended): Remove.
6284 (convert_to_extended): Likewise.
6285 (arm_extract_return_value): Use convert_typed_floating.
6286 (arm_store_return_value): Likewise.
6287
6288 * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
6289 * sh-tdep.c: Do not include "floatformat.h".
6290 (sh_littlebyte_bigword_type): New function.
6291 (sh_register_convert_to_virtual): Use convert_typed_floating.
6292 (sh_register_convert_to_raw): Likewise.
6293 * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
6294 (sh64_littlebyte_bigword_type): New function.
6295 (sh64_extract_return_value): Use convert_typed_floating.
6296 (sh64_register_convert_to_virtual): Likewise.
6297 (sh64_register_convert_to_raw): Likewise.
6298
6299 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
6300
6301 * doublest.h (floatformat_from_type): Move to gdbtypes.h.
6302 * doublest.c (floatformat_from_type): Move to gdbtypes.c.
6303
6304 * gdbtypes.h (union type_specific): Make field floatformat hold
6305 just a single struct floatformat, not an array.
6306 (floatformat_from_type): Move here.
6307 * gdbtypes.c (floatformat_from_type): Move here. Update to
6308 changed TYPE_FLOATFORMAT definition.
6309 (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
6310 (recursive_dump_type): Likewise.
6311 (init_float_type): Install correct floatformat for byte order.
6312 (arch_float_type): Likewise.
6313
6314 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
6315
6316 * gdbtypes.c (init_type): Change incoming argument from
6317 length-in-bytes to length-in-bits. Assert length is a
6318 multiple of TARGET_CHAR_BITS.
6319 (arch_type, arch_flags_type): Likewise.
6320 (init_integer_type): Update call to init_type.
6321 (init_character_type): Likewise.
6322 (init_boolean_type): Likewise.
6323 (init_float_type): Likewise.
6324 (init_decfloat_type): Likewise.
6325 (init_complex_type): Likewise.
6326 (init_pointer_type): Likewise.
6327 (objfile_type): Likewise.
6328 (arch_integer_type): Update call to arch_type.
6329 (arch_character_type): Likewise.
6330 (arch_boolean_type): Likewise.
6331 (arch_float_type): Likewise.
6332 (arch_decfloat_type): Likewise.
6333 (arch_complex_type): Likewise.
6334 (arch_pointer_type): Likewise.
6335 (gdbtypes_post_init): Likewise.
6336
6337 * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
6338 (read_base_type): Likewise.
6339 * mdebugread.c (basic_type): Likewise.
6340 * stabsread.c (dbx_init_float_type): Likewise.
6341 (rs6000_builtin_type): Likewise.
6342 (read_range_type): Likewise. Also, fix call to init_integer_type
6343 with erroneous length argument.
6344
6345 * ada-lang.c (ada_language_arch_info): Update call to arch_type.
6346 * d-lang.c (build_d_types): Likewise.
6347 * f-lang.c (build_fortran_types): Likewise.
6348 * go-lang.c (build_go_types): Likewise.
6349 * opencl-lang.c (build_opencl_types): Likewise.
6350 * jit.c (finalize_symtab): Likewise.
6351 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
6352 (build_std_type_info_type): Likewise.
6353 * target-descriptions.c (tdesc_gdb_type): Likewise. Also,
6354 update call to arch_flags_type.
6355
6356 * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
6357 arch_type.
6358 * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
6359 * windows-tdep.c (windows_get_tlb_type): Likewise.
6360
6361 * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
6362 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
6363 * m32c-tdep.c (make_types): Likewise.
6364 * rl78-tdep.c (rl78_gdbarch_init): Likewise.
6365 (rl78_psw_type): Update call to arch_flags_type.
6366 * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
6367 * rx-tdep.c (rx_psw_type): Likewise.
6368 (rx_fpsw_type): Likewise.
6369 * sparc-tdep.c (sparc_psr_type): Likewise.
6370 (sparc_fsr_type): Likewise.
6371 * sparc64-tdep.c (sparc64_pstate_type): Likewise.
6372 (sparc64_ccr_type): Likewise.
6373 (sparc64_fsr_type): Likewise.
6374 (sparc64_fprs_type): Likewise.
6375
6376 2017-09-27 Tom Tromey <tom@tromey.com>
6377
6378 * findcmd.c (find_command): Constify.
6379
6380 2017-09-27 Tom Tromey <tom@tromey.com>
6381
6382 * ada-tasks.c (task_command_1, task_command): Constify.
6383
6384 2017-09-27 Tom Tromey <tom@tromey.com>
6385
6386 * symtab.c (maintenance_print_symbol_cache)
6387 (maintenance_flush_symbol_cache)
6388 (maintenance_print_symbol_cache_statistics): Constify.
6389
6390 2017-09-27 Tom Tromey <tom@tromey.com>
6391
6392 * inferior.c (detach_inferior_command, kill_inferior_command)
6393 (inferior_command): Constify.
6394
6395 2017-09-27 Tom Tromey <tom@tromey.com>
6396
6397 * regcache.c (regcache_print, maintenance_print_registers)
6398 (maintenance_print_raw_registers)
6399 (maintenance_print_cooked_registers)
6400 (maintenance_print_register_groups)
6401 (maintenance_print_remote_registers): Constify.
6402
6403 2017-09-27 Tom Tromey <tom@tromey.com>
6404
6405 * printcmd.c (map_display_numbers, undisplay_command)
6406 (enable_disable_display_command, enable_display_command)
6407 (disable_display_command): Constify.
6408
6409 2017-09-27 Tom Tromey <tom@tromey.com>
6410
6411 * breakpoint.h (delete_command): Don't declare.
6412 * breakpoint.c (delete_command, enable_once_command)
6413 (enable_count_command, enable_delete_command, breakpoint_1)
6414 (maintenance_info_breakpoints, stopin_command, stopat_command)
6415 (delete_command, delete_trace_command, save_breakpoints)
6416 (save_breakpoints_command, save_tracepoints_command): Constify.
6417
6418 2017-09-27 Tom Tromey <tom@tromey.com>
6419
6420 * macrocmd.c (macro_expand_command, macro_expand_once_command)
6421 (skip_ws, extract_identifier, macro_define_command)
6422 (macro_undef_command, macro_list_command): Constify.
6423
6424 2017-09-27 Tom Tromey <tom@tromey.com>
6425
6426 * infcmd.c (environment_info, set_environment_command)
6427 (unset_environment_command, path_info, info_proc_cmd_1)
6428 (info_proc_cmd_mappings, info_proc_cmd_stat)
6429 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
6430 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
6431
6432 2017-09-27 Tom Tromey <tom@tromey.com>
6433
6434 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
6435 Constify.
6436
6437 2017-09-27 Tom Tromey <tom@tromey.com>
6438
6439 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
6440
6441 2017-09-27 Tom Tromey <tom@tromey.com>
6442
6443 * demangle.c (demangle_command): Constify.
6444
6445 2017-09-27 Tom Tromey <tom@tromey.com>
6446
6447 * progspace.c (maintenance_info_program_spaces_command):
6448 Constify.
6449
6450 2017-09-27 Tom Tromey <tom@tromey.com>
6451
6452 * compile/compile.c (check_raw_argument, compile_file_command)
6453 (compile_code_command, compile_print_command): Constify.
6454
6455 2017-09-27 Tom Tromey <tom@tromey.com>
6456
6457 * reggroups.c (maintenance_print_reggroups): Constify.
6458
6459 2017-09-27 Tom Tromey <tom@tromey.com>
6460
6461 * dwarf2read.c (save_gdb_index_command): Constify.
6462
6463 2017-09-27 Tom Tromey <tom@tromey.com>
6464
6465 * stap-probe.c (info_probes_stap_command): Constify.
6466
6467 2017-09-27 Tom Tromey <tom@tromey.com>
6468
6469 * fork-child.c (unset_exec_wrapper_command): Constify.
6470
6471 2017-09-27 Tom Tromey <tom@tromey.com>
6472
6473 * btrace.c (get_uint, get_context_size, no_chunk)
6474 (maint_btrace_packet_history_cmd)
6475 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
6476 (maint_info_btrace_cmd): Constify.
6477
6478 2017-09-27 Tom Tromey <tom@tromey.com>
6479
6480 * reverse.c (delete_bookmark_command): Constify.
6481
6482 2017-09-27 Tom Tromey <tom@tromey.com>
6483
6484 * remote.c (set_memory_packet_size)
6485 (set_memory_write_packet_size, show_memory_write_packet_size)
6486 (set_memory_read_packet_size, show_memory_read_packet_size)
6487 (compare_sections_command, packet_command, remote_put_command)
6488 (remote_get_command, remote_delete_command): Constify.
6489
6490 2017-09-27 Tom Tromey <tom@tromey.com>
6491
6492 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
6493 (set_mipsfpu_double_command, set_mipsfpu_none_command)
6494 (set_mipsfpu_auto_command): Constify.
6495
6496 2017-09-27 Tom Tromey <tom@tromey.com>
6497
6498 * cli/cli-cmds.h (cd_command): Constify.
6499 * cli/cli-cmds.c (cd_command): Constify.
6500
6501 2017-09-27 Tom Tromey <tom@tromey.com>
6502
6503 * thread.c (thread_name_command, thread_find_command): Constify.
6504
6505 2017-09-27 Tom Tromey <tom@tromey.com>
6506
6507 * probe.c (enable_probes_command, disable_probes_command):
6508 Constify.
6509
6510 2017-09-27 Tom Tromey <tom@tromey.com>
6511
6512 * symfile.c (symbol_file_command): Constify.
6513 * gdbcore.h (deprecated_file_changed_hook): Constify.
6514 * exec.c (deprecated_file_changed_hook, exec_file_command)
6515 (file_command): Constify.
6516 * defs.h (symbol_file_command): Constify.
6517
6518 2017-09-27 Tom Tromey <tom@tromey.com>
6519
6520 * remote-fileio.c (set_system_call_allowed)
6521 (show_system_call_allowed): Constify.
6522
6523 2017-09-27 Tom Tromey <tom@tromey.com>
6524
6525 * tracepoint.c (delete_trace_variable_command)
6526 (tfind_end_command, tfind_start_command, tfind_pc_command)
6527 (tfind_tracepoint_command, tfind_line_command)
6528 (tfind_range_command, tfind_outside_command): Constify.
6529
6530 2017-09-27 Tom Tromey <tom@tromey.com>
6531
6532 * ax-gdb.c (maint_agent_printf_command, agent_command)
6533 (agent_eval_command): Constify.
6534
6535 2017-09-27 Tom Tromey <tom@tromey.com>
6536
6537 * tracepoint.c (info_scope_command): Constify.
6538 * python/python.c (gdbpy_decode_line): Constify.
6539 * python/py-breakpoint.c (bppy_init): Constify.
6540 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
6541 * location.h: (new_linespec_location)
6542 (string_to_event_location_basic, string_to_event_location):
6543 Constify.
6544 * location.c (new_linespec_location)
6545 (string_to_event_location_basic, string_to_event_location):
6546 Constify.
6547 * linespec.h (decode_line_with_current_source)
6548 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
6549 * linespec.c (linespec_lex_to_end)
6550 (decode_line_with_current_source)
6551 (decode_line_with_last_displayed): Constify.
6552 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
6553 Constify.
6554 * cli/cli-cmds.c (edit_command, list_command): Constify.
6555 * breakpoint.h (until_break_command, watch_command_wrapper)
6556 (awatch_command_wrapper, rwatch_command_wrapper)
6557 (init_ada_exception_breakpoint): Constify.
6558 * breakpoint.c (break_command_1, dprintf_command)
6559 (break_range_command, watch_command_wrapper)
6560 (rwatch_command_wrapper, awatch_command_wrapper)
6561 (until_break_command, init_ada_exception_breakpoint)
6562 (strace_marker_create_sals_from_location, trace_command)
6563 (ftrace_command, strace_command, struct tracepoint): Constify.
6564 * ax-gdb.c (agent_command_1): Constify.
6565 * ada-lang.c (ada_exception_sal): Constify.
6566
6567 2017-09-27 Tom Tromey <tom@tromey.com>
6568
6569 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
6570 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
6571 (get_context_size, no_chunk, get_insn_history_modifiers)
6572 (cmd_record_insn_history, get_call_history_modifiers)
6573 (cmd_record_call_history): Constify.
6574
6575 2017-09-27 Tom Tromey <tom@tromey.com>
6576
6577 * source.c (show_substitute_path_command)
6578 (unset_substitute_path_command, set_substitute_path_command):
6579 Constify.
6580
6581 2017-09-27 Tom Tromey <tom@tromey.com>
6582
6583 * typeprint.c (maintenance_print_type): Constify.
6584 * maint.c (maintenance_dump_me, maintenance_demangle)
6585 (maintenance_time_display, maintenance_info_sections)
6586 (maintenance_print_statistics, maintenance_deprecate)
6587 (maintenance_undeprecate): Constify.
6588 (maintenance_do_deprecate): Constify. Use std::string.
6589 (maintenance_selftest): Constify.
6590 * gdbtypes.h (maintenance_print_type): Constify.
6591
6592 2017-09-27 Tom Tromey <tom@tromey.com>
6593
6594 * hppa-tdep.c (unwind_command): Constify.
6595
6596 2017-09-27 Tom Tromey <tom@tromey.com>
6597
6598 * target-descriptions.c (unset_tdesc_filename_cmd)
6599 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
6600 Constify.
6601
6602 2017-09-27 Tom Tromey <tom@tromey.com>
6603
6604 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
6605
6606 2017-09-27 Tom Tromey <tom@tromey.com>
6607
6608 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
6609
6610 2017-09-27 Tom Tromey <tom@tromey.com>
6611
6612 * tui/tui-regs.c (tui_reg_command): Constify.
6613
6614 2017-09-27 Tom Tromey <tom@tromey.com>
6615
6616 * skip.c (skip_file_command, skip_function_command)
6617 (skip_enable_command, skip_disable_command, skip_delete_command):
6618 Constify.
6619
6620 2017-09-27 Tom Tromey <tom@tromey.com>
6621
6622 * record-btrace.c (cmd_record_btrace_bts_start)
6623 (cmd_record_btrace_pt_start): Constify.
6624
6625 2017-09-27 Tom Tromey <tom@tromey.com>
6626
6627 * symmisc.c (maintenance_print_symbols)
6628 (maintenance_print_msymbols, maintenance_print_objfiles)
6629 (maintenance_info_symtabs, maintenance_check_symtabs)
6630 (maintenance_expand_symtabs, maintenance_info_line_tables):
6631 Constify.
6632
6633 2017-09-27 Tom Tromey <tom@tromey.com>
6634
6635 * top.c (new_ui_command): Constify.
6636
6637 2017-09-27 Tom Tromey <tom@tromey.com>
6638
6639 * symfile.c (add_symbol_file_command)
6640 (remove_symbol_file_command, list_overlays_command)
6641 (map_overlay_command, unmap_overlay_command)
6642 (overlay_auto_command, overlay_manual_command)
6643 (overlay_off_command, overlay_load_command): Constify.
6644
6645 2017-09-27 Tom Tromey <tom@tromey.com>
6646
6647 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
6648 (info_spu_mailbox_command, info_spu_dma_command)
6649 (info_spu_proxydma_command): Constify.
6650
6651 2017-09-27 Tom Tromey <tom@tromey.com>
6652
6653 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
6654
6655 2017-09-27 Tom Tromey <tom@tromey.com>
6656
6657 * cli/cli-script.c (user_defined_command): Constify.
6658
6659 2017-09-27 Tom Tromey <tom@tromey.com>
6660
6661 * cli/cli-dump.c (dump_memory_command, dump_value_command)
6662 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
6663 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
6664 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
6665 (dump_binary_value, append_binary_memory, append_binary_value):
6666 Constify.
6667 (struct dump_context) <func>: Constify.
6668 (add_dump_command): Update.
6669
6670 2017-09-27 Tom Tromey <tom@tromey.com>
6671
6672 * cli/cli-cmds.c (show_version, show_configuration)
6673 (source_command, show_user): Constify.
6674
6675 2017-09-27 Tom Tromey <tom@tromey.com>
6676
6677 * target.c (maintenance_print_target_stack): Constify.
6678
6679 2017-09-27 Tom Tromey <tom@tromey.com>
6680
6681 * interps.c (interpreter_exec_cmd): Constify.
6682
6683 2017-09-27 Tom Tromey <tom@tromey.com>
6684
6685 * record-full.c (cmd_record_full_restore): Constify.
6686
6687 2017-09-27 Tom Tromey <tom@tromey.com>
6688
6689 * memattr.c (enable_mem_command, disable_mem_command)
6690 (delete_mem_command): Constify.
6691
6692 2017-09-27 Tom Tromey <tom@tromey.com>
6693
6694 * value.c (show_convenience): Constify.
6695
6696 2017-09-27 Tom Tromey <tom@tromey.com>
6697
6698 * gdbcore.h (core_file_command): Update.
6699 * corefile.c (core_file_command): Constify.
6700
6701 2017-09-27 Tom Tromey <tom@tromey.com>
6702
6703 * user-regs.c (maintenance_print_user_registers): Constify.
6704
6705 2017-09-27 Tom Tromey <tom@tromey.com>
6706
6707 * cp-namespace.c (maintenance_cplus_namespace): Constify.
6708
6709 2017-09-27 Tom Tromey <tom@tromey.com>
6710
6711 * cp-support.c (first_component_command): Constify.
6712
6713 2017-09-27 Tom Tromey <tom@tromey.com>
6714
6715 * psymtab.c (maintenance_print_psymbols)
6716 (maintenance_info_psymtabs, maintenance_check_psymtabs):
6717 Constify.
6718
6719 2017-09-27 Tom Tromey <tom@tromey.com>
6720
6721 * windows-tdep.c (display_tib): Constify.
6722
6723 2017-09-27 Tom Tromey <tom@tromey.com>
6724
6725 * linux-fork.c (delete_checkpoint_command)
6726 (detach_checkpoint_command): Constify.
6727
6728 2017-09-27 Tom Tromey <tom@tromey.com>
6729
6730 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
6731
6732 2017-09-27 Tom Tromey <tom@tromey.com>
6733
6734 * arc-tdep.c (dump_arc_instruction_command): Constify.
6735
6736 2017-09-27 Tom Tromey <tom@tromey.com>
6737
6738 * valprint.c (set_radix, show_radix): Constify.
6739
6740 2017-09-27 Tom Tromey <tom@tromey.com>
6741
6742 * dtrace-probe.c (info_probes_dtrace_command): Constify.
6743
6744 2017-09-27 Tom Tromey <tom@tromey.com>
6745
6746 * command.h (not_just_help_class_command): Update.
6747 * cli/cli-decode.h (not_just_help_class_command): Update.
6748 * cli/cli-decode.c (not_just_help_class_command): Constify.
6749
6750 2017-09-27 Tom Tromey <tom@tromey.com>
6751
6752 * gdb_bfd.c (maintenance_info_bfds): Constify.
6753
6754 2017-09-27 Tom Tromey <tom@tromey.com>
6755
6756 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
6757 overloads.
6758 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
6759 (do_const_cfunc): New function.
6760 (cmd_cfunc_eq): New overload.
6761 (cli_user_command_p): Check do_const_cfunc.
6762 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
6763 const_cfunc.
6764 * command.h (add_cmd): Add const overload and no-function
6765 overload.
6766 (set_cmd_cfunc): Add const overload.
6767 (cmd_const_cfunc_ftype): Declare.
6768 (cmd_cfunc_eq): Add const overload.
6769 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
6770 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
6771 overload.
6772
6773 2017-09-27 Tom Tromey <tom@tromey.com>
6774
6775 * macroexp.c (get_next_token_for_substitution): New function.
6776 (substitute_args): Call it. Check for __VA_OPT__.
6777
6778 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
6779 Pedro Alves <palves@redhat.com>
6780
6781 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
6782 producer_is_icc_lt_14.
6783 (producer_is_icc_lt_14): New function.
6784 (check_producer): Add code for checking version of ICC.
6785 (producer_is_icc): Move to producer.c.
6786 (read_structure_type): Restrict ICC workaround to ICC<14.
6787 * producer.c: Include selftest.h.
6788 (producer_is_icc, producer_parsing_tests, _initialize_producer):
6789 New functions.
6790 * producer.h (producer_is_icc): New declaration.
6791
6792 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
6793
6794 * Makefile.in (SFILES): Add producer.c.
6795 (COMMON_OBS): Add producer.o
6796 * amd64-tdep.c (producer.h): Add new include.
6797 * dwarf2read.c (producer.h): Add new include.
6798 * producer.c: New file.
6799 * producer.h: New file.
6800 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
6801 producer.c.
6802 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
6803 producer.h.
6804
6805 2017-09-26 Matthias Klose <doko@ubuntu.com>
6806
6807 * configure.ac: Search ncursesw before ncurses.
6808 Check ncursesw/ncurses.h before ncurses/ncurses.h.
6809 * gdb_curses.h: Include <ncursesw/ncurses.h>
6810 * config.in, configure: Regenerate.
6811
6812 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6813
6814 PR gdb/22185
6815 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
6816 obsolete.
6817 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
6818 Remove i386sol2 support.
6819 * configure.nat <i386sol2>: Remove.
6820 <sol2-64>: Fold into ...
6821 <sol2>: ... this.
6822 Move common settings to default section.
6823 Add sol-thread.o.
6824 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
6825 x86_64-*-solaris2.1[0-9]*>: Rename to ...
6826 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
6827 <i[34567]86-*-solaris*>: Remove.
6828 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
6829
6830 * configure.ac: Remove wctype in libw check.
6831 (_MSE_INT_H): Don't define on Solaris 7-9.
6832 <solaris*>: Remove libthread_db.so.1 check.
6833 * configure: Regenerate.
6834 * config.in: Regenerate.
6835
6836 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
6837 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
6838 (gdb_ps_size_t): Remove.
6839 Use base types in users.
6840 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
6841
6842 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
6843
6844 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6845
6846 PR build/22206
6847 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
6848 (adi_is_addr_mapped): Likewise.
6849 (PSR_ICC): Don't redefine.
6850 (PSR_IMPL): Likewise.
6851
6852 2017-09-25 Tom Tromey <tom@tromey.com>
6853
6854 * regcache.c (regcache::dump): Use string_printf.
6855
6856 2017-09-25 Tom Tromey <tom@tromey.com>
6857
6858 * regcache.c (class regcache_invalidator): New.
6859 (struct register_to_invalidate): Remove.
6860 (make_cleanup_regcache_invalidate): Remove.
6861 (regcache::raw_write): Use regcache_invalidator.
6862
6863 2017-09-25 Tom Tromey <tom@tromey.com>
6864
6865 * spu-tdep.c (spu2ppu_sniffer): Update.
6866 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
6867 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
6868 Remove.
6869 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
6870 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
6871 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
6872 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
6873 (frame_pop): Update.
6874
6875 2017-09-25 Tom Tromey <tom@tromey.com>
6876
6877 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
6878 * regcache.h (regcache_xfree): Don't declare.
6879 * regcache.c (regcache_xfree): Remove.
6880 (do_regcache_xfree): Use delete.
6881 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
6882 * linux-fork.c (free_fork): Use delete.
6883 (fork_save_infrun_state): Likewise.
6884 * jit.c (jit_dealloc_cache): Use delete.
6885 * infrun.c (discard_infcall_suspend_state): Use delete.
6886
6887 2017-09-25 Tom Tromey <tom@tromey.com>
6888
6889 * regcache.h (regcache_xmalloc): Don't declare.
6890 (regcache_raw_set_cached_value): Update comment.
6891 * regcache.c (regcache_xmalloc): Remove.
6892 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
6893 * jit.c (jit_frame_sniffer): Use new.
6894 * frame.c (frame_save_as_regcache): Use new.
6895
6896 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
6897
6898 * NEWS: Advertise support for guarded-storage registers on IBM z.
6899
6900 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
6901
6902 * s390-linux-nat.c (have_regset_gs): New static variable.
6903 (s390_linux_fetch_inferior_registers): Handle guarded-storage
6904 control block and guarded-storage broadcast control regsets.
6905 (s390_read_description): Detect whether the target has
6906 guarded-storage support, return appropriate tdesc.
6907 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
6908 (features/s390x-gs-linux64.c): Likewise.
6909 (struct gdbarch_tdep) <have_gs>: New field.
6910 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
6911 (s390_gsbc_regset): New variables.
6912 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
6913 and s390_gsbc_regset, if applicable.
6914 (s390_core_read_description): Check whether core file was from a
6915 target with guarded-storage support; include appropriate regsets.
6916 (s390_gdbarch_init): Add registers for guarded-storage support.
6917 (_initialize_s390_tdep): Initialize new target descriptions that
6918 include registers for guarded-storage support.
6919 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
6920 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
6921 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
6922 (S390_NUM_REGS): Adjust macro definition.
6923 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
6924 (tdesc_s390x_gs_linux64): New declarations.
6925
6926 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
6927
6928 * features/s390-gs-linux64.xml: New file.
6929 * features/s390-gs.xml: New file.
6930 * features/s390-gsbc.xml: New file.
6931 * features/s390x-gs-linux64.xml: New file.
6932 * features/Makefile (WHICH): Add s390-gs-linux64 and
6933 s390x-gs-linux64.
6934 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
6935 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
6936 * features/s390-gs-linux64.c: New generated file.
6937 * features/s390x-gs-linux64.c: New file.
6938 * regformats/s390-gs-linux64.dat: New file.
6939 * regformats/s390x-gs-linux64.dat: New file.
6940
6941 2017-09-23 Tom Tromey <tom@tromey.com>
6942
6943 * defs.h (make_cleanup_override_quit_handler): Don't declare.
6944
6945 2017-09-22 Tom Tromey <tom@tromey.com>
6946
6947 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
6948 type to scoped_restore_tmpl.
6949 <scoped_input_handler>: Initialize m_quit_handler directly.
6950
6951 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
6952
6953 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
6954 (cd_command): Likewise. Free "current_directory" before
6955 assigning to it.
6956 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
6957 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
6958 * top.c (gdb_dirbuf): Remove global declaration.
6959 * top.h (gdb_dirbuf): Likewise.
6960
6961 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
6962
6963 * gnulib/aclocal.m4: Regenerate.
6964 * gnulib/config.in: Regenerate.
6965 * gnulib/configure: Regenerate.
6966 * gnulib/import/Makefile.am: Regenerate.
6967 * gnulib/import/Makefile.in: Regenerate.
6968 * gnulib/import/assure.h: New file.
6969 * gnulib/import/at-func.c: Likewise
6970 * gnulib/import/chdir-long.c: New file.
6971 * gnulib/import/chdir-long.h: New file.
6972 * gnulib/import/cloexec.c: New file.
6973 * gnulib/import/cloexec.h: New file.
6974 * gnulib/import/close.c: New file.
6975 * gnulib/import/closedir.c: New file.
6976 * gnulib/import/dirent-private.h: New file.
6977 * gnulib/import/dup-safer.c: New file.
6978 * gnulib/import/dup.c: New file.
6979 * gnulib/import/dup2.c: New file.
6980 * gnulib/import/error.c: New file.
6981 * gnulib/import/error.h: New file.
6982 * gnulib/import/exitfail.c: New file.
6983 * gnulib/import/exitfail.h: New file.
6984 * gnulib/import/fchdir.c: New file.
6985 * gnulib/import/fcntl.c: New file.
6986 * gnulib/import/fcntl.in.h: New file.
6987 * gnulib/import/fd-hook.c: New file.
6988 * gnulib/import/fd-hook.h: New file.
6989 * gnulib/import/fd-safer.c: New file.
6990 * gnulib/import/fdopendir.c: New file.
6991 * gnulib/import/filename.h: New file.
6992 * gnulib/import/filenamecat-lgpl.c: New file.
6993 * gnulib/import/filenamecat.h: New file.
6994 * gnulib/import/fstat.c: New file.
6995 * gnulib/import/fstatat.c: New file.
6996 * gnulib/import/getcwd-lgpl.c: New file.
6997 * gnulib/import/getcwd.c: New file.
6998 * gnulib/import/getdtablesize.c: New file.
6999 * gnulib/import/getlogin_r.c: New file.
7000 * gnulib/import/getprogname.c: New file.
7001 * gnulib/import/getprogname.h: New file.
7002 * gnulib/import/gettext.h: New file.
7003 * gnulib/import/glob-libc.h: New file.
7004 * gnulib/import/glob.c: New file.
7005 * gnulib/import/glob.in.h: New file.
7006 * gnulib/import/intprops.h: New file.
7007 * gnulib/import/m4/chdir-long.m4: New file.
7008 * gnulib/import/m4/close.m4: New file.
7009 * gnulib/import/m4/closedir.m4: New file.
7010 * gnulib/import/m4/d-ino.m4: New file.
7011 * gnulib/import/m4/d-type.m4: New file.
7012 * gnulib/import/m4/dup.m4: New file.
7013 * gnulib/import/m4/dup2.m4: New file.
7014 * gnulib/import/m4/error.m4: New file.
7015 * gnulib/import/m4/fchdir.m4: New file.
7016 * gnulib/import/m4/fcntl.m4: New file.
7017 * gnulib/import/m4/fcntl_h.m4: New file.
7018 * gnulib/import/m4/fdopendir.m4: New file.
7019 * gnulib/import/m4/filenamecat.m4: New file.
7020 * gnulib/import/m4/fstat.m4: New file.
7021 * gnulib/import/m4/fstatat.m4: New file.
7022 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
7023 * gnulib/import/m4/getcwd-path-max.m4: New file.
7024 * gnulib/import/m4/getcwd.m4: New file.
7025 * gnulib/import/m4/getdtablesize.m4: New file.
7026 * gnulib/import/m4/getlogin_r.m4: New file.
7027 * gnulib/import/m4/getprogname.m4: New file.
7028 * gnulib/import/m4/glob.m4: New file.
7029 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
7030 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
7031 * gnulib/import/m4/mempcpy.m4: New file.
7032 * gnulib/import/m4/memrchr.m4: New file.
7033 * gnulib/import/m4/mode_t.m4: New file.
7034 * gnulib/import/m4/msvc-inval.m4: New file.
7035 * gnulib/import/m4/msvc-nothrow.m4: New file.
7036 * gnulib/import/m4/open.m4: New file.
7037 * gnulib/import/m4/openat.m4: New file.
7038 * gnulib/import/m4/opendir.m4: New file.
7039 * gnulib/import/m4/readdir.m4: New file.
7040 * gnulib/import/m4/realloc.m4: New file.
7041 * gnulib/import/m4/rewinddir.m4: New file.
7042 * gnulib/import/m4/save-cwd.m4: New file.
7043 * gnulib/import/m4/strdup.m4: New file.
7044 * gnulib/import/m4/strerror.m4: New file.
7045 * gnulib/import/m4/unistd-safer.m4: New file.
7046 * gnulib/import/mempcpy.c: New file.
7047 * gnulib/import/memrchr.c: New file.
7048 * gnulib/import/msvc-inval.c: New file.
7049 * gnulib/import/msvc-inval.h: New file.
7050 * gnulib/import/msvc-nothrow.c: New file.
7051 * gnulib/import/msvc-nothrow.h: New file.
7052 * gnulib/import/open.c: New file.
7053 * gnulib/import/openat-die.c: New file.
7054 * gnulib/import/openat-priv.h: New file.
7055 * gnulib/import/openat-proc.c: New file.
7056 * gnulib/import/openat.c: New file.
7057 * gnulib/import/openat.h: New file.
7058 * gnulib/import/opendir.c: New file.
7059 * gnulib/import/pipe-safer.c: New file.
7060 * gnulib/import/readdir.c: New file.
7061 * gnulib/import/realloc.c: New file.
7062 * gnulib/import/rewinddir.c: New file.
7063 * gnulib/import/save-cwd.c: New file.
7064 * gnulib/import/save-cwd.h: New file.
7065 * gnulib/import/strdup.c: New file.
7066 * gnulib/import/strerror-override.c: New file.
7067 * gnulib/import/strerror-override.h: New file.
7068 * gnulib/import/strerror.c: New file.
7069 * gnulib/import/unistd--.h: New file.
7070 * gnulib/import/unistd-safer.h: New file.
7071 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
7072 "getcwd" and "glob".
7073 * ser-tcp.c: Undefine "close" before redefining it.
7074
7075 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
7076
7077 * guile/scm-value.c (gdbscm_value_address): Initialize address,
7078 get rid of res_val.
7079
7080 2017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7081
7082 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
7083 <sol2,sparc>: Likewise.
7084 <sol2-64,i386>: Likewise.
7085
7086 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
7087 -Wdeprecated-declarations on *-*-solaris*.
7088 * configure: Regenerate.
7089
7090 * procfs.c: Include "nat/inferior.h".
7091 (procfs_info_proc): Fix typo.
7092
7093 2017-09-21 Kevin Buettner <kevinb@redhat.com>
7094
7095 * remote.c (vector): Include.
7096 (struct private_thread_info): Add field, thread_handle.
7097 (free_private_thread_info): Deallocate storage associated with
7098 thread handle.
7099 (get_private_info_thread): Initialize `thread_handle' field.
7100 (struct thread_item): Add field, thread_handle.
7101 (clear_threads_listing_context): Deallocate storage associated
7102 with thread handle.
7103 (start_thread): Add support for "handle" attribute.
7104 (thread_attributes): Add "handle".
7105 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
7106 field.
7107 (remote_update_thread_list): Update thread_handle.
7108 (remote_thread_handle_to_thread_info): New function.
7109 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
7110
7111 2017-09-21 Kevin Buettner <kevinb@redhat.com>
7112
7113 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
7114 function.
7115 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
7116 * python/python-internal.h (thread_object_type): Declare.
7117
7118 2017-09-21 Kevin Buettner <kevinb@redhat.com>
7119
7120 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
7121 (target_thread_handle_to_thread_info): Declare.
7122 * target.c (target_thread_handle_to_thread_info): New function.
7123 * target-delegates.c: Regenerate.
7124 * gdbthread.h (find_thread_by_handle): Declare.
7125 * thread.c (find_thread_by_handle): New function.
7126 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
7127 function.
7128 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
7129
7130 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
7131
7132 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
7133
7134 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
7135
7136 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
7137
7138 2017-09-21 Yao Qi <yao.qi@linaro.org>
7139
7140 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
7141 to gdb_target_obs.
7142
7143 2017-09-20 Tom Tromey <tom@tromey.com>
7144
7145 * breakpoint.c (struct counted_command_line): Remove.
7146 (breakpoint_commands): Update.
7147 (alloc_counted_command_line, incref_counted_command_line)
7148 (decref_counted_command_line, do_cleanup_counted_command_line)
7149 (make_cleanup_decref_counted_command_line): Remove.
7150 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
7151 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
7152 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
7153 (save_breakpoints): Update.
7154 * breakpoint.h (counted_command_line): Now a typedef to
7155 shared_ptr.
7156 (struct breakpoint) <commands>: Now a counted_command_line.
7157 (struct bpstats) <command>: Likewise.
7158
7159 2017-09-20 Tom Tromey <tom@tromey.com>
7160
7161 * breakpoint.c (struct commands_info, do_map_commands_command):
7162 Remove.
7163 (commands_command_1): Update.
7164 (iterate_over_related_breakpoints): Take a function_view.
7165 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
7166 (delete_command): Update.
7167 (map_breakpoint_numbers): Take a function_view.
7168 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
7169 (disable_command): Update.
7170 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
7171 (enable_command): Update.
7172 (struct disp_data, do_enable_breakpoint_disp)
7173 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
7174 (do_map_enable_delete_breakpoint): Remove.
7175 (enable_once_command, enable_count_command, enable_delete_command)
7176 (delete_trace_variable_command): Update.
7177
7178 2017-09-20 Tom Tromey <tom@tromey.com>
7179
7180 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
7181 (bpstat_clear): Use delete.
7182 (bpstats): New constructors.
7183 (bpstat_copy, bpstat_stop_status): Use new.
7184 (dprintf_after_condition_true): Update.
7185 * breakpoint.h (bpstats::bpstats): Add constructors.
7186 (bpstats::~bpstats): Add destructor.
7187
7188 2017-09-20 Pedro Alves <palves@redhat.com>
7189
7190 * eval.c (make_params): Delete, refactored as ...
7191 (class fake_method): ... this new type's ctor.
7192 (fake_method::~fake_method): New.
7193 (evaluate_subexp_standard): Use 'fake_method'.
7194
7195 2017-09-20 Tom Tromey <tom@tromey.com>
7196
7197 * windows-nat.c (get_windows_debug_event, windows_wait)
7198 (do_initial_windows_stuff, windows_attach): Update.
7199 * utils.c (vwarning, internal_vproblem): Update.
7200 (ui_unregister_input_event_handler_cleanup)
7201 (prepare_to_handle_input): Remove.
7202 (class scoped_input_handler): New.
7203 (defaulted_query, prompt_for_continue): Update.
7204 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
7205 Update.
7206 * top.c (undo_terminal_modifications_before_exit): Update.
7207 * target/target.h (target_terminal_init, target_terminal_inferior)
7208 (target_terminal_ours): Don't declare.
7209 (class target_terminal): New.
7210 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
7211 (target_terminal_ours_for_output)
7212 (make_cleanup_restore_target_terminal): Don't declare.
7213 (target_terminal_info): Remove.
7214 * target.c (enum terminal_state, terminal_state): Remove.
7215 (target_terminal::terminal_state): Define.
7216 (target_terminal::init): Rename from target_terminal_init.
7217 (target_terminal::inferior): Rename from
7218 target_terminal_inferior.
7219 (target_terminal::ours): Rename from target_terminal_ours.
7220 (target_terminal::ours_for_output): Rename from
7221 target_terminal_ours_for_output.
7222 (target_terminal::info): New method.
7223 (cleanup_restore_target_terminal)
7224 (make_cleanup_restore_target_terminal): Remove.
7225 * solib.c (handle_solib_event): Update.
7226 * remote.c (remote_serial_quit_handler): Update.
7227 (remote_terminal_inferior, remote_wait_as): Update.
7228 * record-full.c (record_full_wait_1): Update.
7229 * nto-procfs.c (procfs_create_inferior): Update.
7230 * nat/fork-inferior.c (startup_inferior): Update.
7231 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
7232 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
7233 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
7234 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
7235 (mi_breakpoint_created, mi_breakpoint_deleted)
7236 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
7237 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
7238 (mi_user_selected_context_changed, report_initial_inferior):
7239 Update.
7240 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
7241 (linux_nat_terminal_inferior): Update.
7242 * infrun.c (follow_fork_inferior)
7243 (handle_vfork_child_exec_or_exit, do_target_resume)
7244 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
7245 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
7246 Update.
7247 * inflow.c (child_terminal_init, info_terminal_command): Update.
7248 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
7249 (attach_command): Update.
7250 * infcall.c (call_thread_fsm_should_stop): Update.
7251 * gnu-nat.c (gnu_attach): Update.
7252 * extension.c (struct active_ext_lang_state)
7253 (restore_active_ext_lang): Update.
7254 * exceptions.c (print_flush): Update.
7255 * event-top.c (async_enable_stdin, default_quit_handler): Update.
7256 (struct quit_handler_cleanup_data, restore_quit_handler)
7257 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
7258 Remove.
7259 * cp-support.c (gdb_demangle): Update.
7260 * breakpoint.c (update_inserted_breakpoint_locations)
7261 (insert_breakpoint_locations, handle_jit_event)
7262 (disable_breakpoints_in_unloaded_shlib): Update.
7263 * annotate.c (annotate_breakpoints_invalid)
7264 (annotate_frames_invalid): Update.
7265
7266 2017-09-20 Tom Tromey <tom@tromey.com>
7267
7268 * main.c (catch_command_errors): Rename from
7269 catch_command_errors_const.
7270 (captured_main_1): Update.
7271
7272 2017-09-20 Pedro Alves <palves@redhat.com>
7273
7274 * cli/cli-cmds.c (list_command): Use print_sal_location.
7275 (print_sal_location): New function.
7276 (ambiguous_line_spec): Use print_sal_location.
7277 * linespec.c (symbol_to_sal): Record the symbol in the sal.
7278 * symtab.c (find_function_start_sal): Likewise.
7279 * symtab.h (symtab_and_line::symbol): New field.
7280
7281 2017-09-20 Pedro Alves <palves@redhat.com>
7282
7283 * linespec.c (minsym_found): Handle non-text minsyms.
7284 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
7285
7286 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7287
7288 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
7289 backslash.
7290
7291 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7292
7293 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
7294 vmovups instead vmovaps.
7295 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
7296
7297 2017-09-19 John Baldwin <jhb@FreeBSD.org>
7298
7299 * NEWS (Changes since GDB 8.0): Add starti.
7300 * infcmd.c (enum run_break): New.
7301 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
7302 case.
7303 (run_command): Use enum run_how.
7304 (start_command): Likewise.
7305 (starti_command): New function.
7306 (RUN_ARGS_HELP): New macro.
7307 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
7308 commands. Add starti command.
7309
7310 2017-09-19 Yao Qi <yao.qi@linaro.org>
7311
7312 * Makefile.in (monitor.o): Remove the rule.
7313
7314 2017-09-19 Yao Qi <yao.qi@linaro.org>
7315
7316 * annotate.h (struct annotate_arg_emitter): Use
7317 DISABLE_COPY_AND_ASSIGN.
7318 * common/refcounted-object.h (refcounted_object): Likewise.
7319 * completer.h (struct completion_result): Likewise.
7320 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
7321 * filename-seen-cache.h (filename_seen_cache): Likewise.
7322 * gdbcore.h (thread_section_name): Likewise.
7323 * gdb_regex.h (compiled_regex): Likewise.
7324 * gdbthread.h (scoped_restore_current_thread): Likewise.
7325 * inferior.h (scoped_restore_current_inferior): Likewise.
7326 * jit.c (jit_reader): Likewise.
7327 * linespec.h (struct linespec_result): Likewise.
7328 * mi/mi-parse.h (struct mi_parse): Likewise.
7329 * nat/fork-inferior.c (execv_argv): Likewise.
7330 * progspace.h (scoped_restore_current_program_space): Likewise.
7331 * python/python-internal.h (class gdbpy_enter): Likewise.
7332 * regcache.h (regcache): Likewise.
7333 * target-descriptions.c (struct tdesc_reg): Likewise.
7334 (struct tdesc_type): Likewise.
7335 (struct tdesc_feature): Likewise.
7336 * ui-out.h (ui_out_emit_type): Likewise.
7337
7338 2017-09-18 Simon Marchi <simon.marchi@ericsson.com>
7339
7340 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
7341 label abort_expression.
7342
7343 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
7344
7345 * common/buffer.c (buffer_xml_printf): Adjust.
7346 * common/xml-utils.c (xml_escape_text): Change return type to
7347 std::string, update code accordingly.
7348 * common/xml-utils.h (xml_escape_text): Change return type to
7349 std::string.
7350 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
7351 * windows-tdep.c (windows_xfer_shared_library): Adjust.
7352 * unittests/xml-utils-selftests.c (test_xml_escape_text):
7353 Adjust.
7354
7355 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
7356
7357 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
7358 (SUBDIR_UNITTESTS_OBS): Add new object file.
7359 * unittests/xml-utils-selftests.c: New file.
7360
7361 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
7362
7363 * common/selftest.h (selftest): New struct/interface.
7364 (register_test): Add name parameter, add new overload.
7365 (run_tests): Add filter parameter.
7366 (for_each_selftest_ftype): New typedef.
7367 (for_each_selftest): New declaration.
7368 * common/selftest.c (tests): Change type to
7369 map<string, unique_ptr<selftest>>.
7370 (simple_selftest): New struct.
7371 (register_test): New function.
7372 (register_test): Add name parameter and use it.
7373 (run_tests): Add filter parameter and use it. Add prints.
7374 Adjust to vector -> map change.
7375 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
7376 registering selftests.
7377 * arm-tdep.c (_initialize_arm_tdep): Likewise.
7378 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
7379 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
7380 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
7381 * findvar.c (_initialize_findvar): Likewise.
7382 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
7383 * maint.c (maintenance_selftest): Update call to run_tests.
7384 (maintenance_info_selftests): New function.
7385 (_initialize_maint_cmds): Register "maintenance info selftests"
7386 command. Update "maintenance selftest" doc.
7387 * regcache.c (_initialize_regcache): Add names when registering
7388 selftests.
7389 * rust-exp.y (_initialize_rust_exp): Likewise.
7390 * selftest-arch.c (gdbarch_selftest): New struct.
7391 (gdbarch_tests): Remove.
7392 (register_test_foreach_arch): Add name parameter. Call
7393 register_test.
7394 (tests_with_arch): Remove, move most content to
7395 gdbarch_selftest::operator().
7396 (_initialize_selftests_foreach_arch): Remove.
7397 * selftest-arch.h (register_test_foreach_arch): Add name
7398 parameter.
7399 (run_tests_with_arch): New declaration.
7400 * utils-selftests.c (_initialize_utils_selftests): Add names
7401 when registering selftests.
7402 * utils.c (_initialize_utils): Likewise.
7403 * unittests/array-view-selftests.c
7404 (_initialize_array_view_selftests): Likewise.
7405 * unittests/environ-selftests.c (_initialize_environ_selftests):
7406 Likewise.
7407 * unittests/function-view-selftests.c
7408 (_initialize_function_view_selftests): Likewise.
7409 * unittests/offset-type-selftests.c
7410 (_initialize_offset_type_selftests): Likewise.
7411 * unittests/optional-selftests.c
7412 (_initialize_optional_selftests): Likewise.
7413 * unittests/scoped_restore-selftests.c
7414 (_initialize_scoped_restore_selftests): Likewise.
7415 * NEWS: Document "maintenance selftest" and "maint info
7416 selftests".
7417
7418 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
7419
7420 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
7421 scoped_restore.
7422
7423 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
7424
7425 * mi/mi-main.c (mi_load_progress): Make uiout variable
7426 a unique_ptr.
7427
7428 2017-09-15 Pedro Alves <palves@redhat.com>
7429
7430 * compile/compile-c-types.c (convert_enum, convert_int)
7431 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
7432
7433 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
7434
7435 * dwarf2read.c (copy_string): Remove.
7436 (parse_macro_definition): Replace copy_string with savestring.
7437
7438 2017-09-15 Yao Qi <yao.qi@linaro.org>
7439
7440 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
7441 gdb_target_obs.
7442 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
7443 Likewise.
7444 (i[34567]86-*-linux*): Likewise.
7445
7446 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
7447
7448 * dwarf2expr.h (dwarf_stack_value): Add constructor.
7449 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
7450 <stack>: Change type to std::vector.
7451 <stack_len, stack_allocated>: Remove.
7452 <grow_stack>: Remove.
7453 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
7454 (dwarf_expr_context::~dwarf_expr_context): Remove.
7455 (dwarf_expr_context::grow_stack): Remove.
7456 (dwarf_expr_context::push): Adjust.
7457 (dwarf_expr_context::pop): Adjust.
7458 (dwarf_expr_context::fetch): Adjust.
7459 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
7460 (dwarf_expr_context::stack_empty_p): Adjust.
7461 (dwarf_expr_context::execute_stack_op): Adjust.
7462
7463 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
7464
7465 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
7466 return type to bool.
7467 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
7468
7469 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
7470
7471 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
7472 Change type to bool.
7473 (dwarf_stack_value) <in_stack_memory>: Likewise.
7474 (dwarf_expr_context) <push_address>: Change parameter type to
7475 bool.
7476 <fetch_in_stack_memory>: Change return type to bool.
7477 <push>: Change parameter type to bool.
7478 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
7479 to bool.
7480 (dwarf_expr_context::push_address): Likewise.
7481 (dwarf_expr_context::fetch_in_stack_memory): Change return type
7482 to bool.
7483 (dwarf_expr_context::execute_stack_op): Adjust.
7484 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
7485
7486 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
7487
7488 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
7489 (struct dwarf_expr_context) <n_pieces>: Remove.
7490 <pieces>: Change type to std::vector.
7491 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
7492 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
7493 pieces.
7494 (dwarf_expr_context::add_piece): Adjust.
7495 * dwarf2loc.c (struct piece_closure): Initialize fields.
7496 <n_pieces>: Remove.
7497 <pieces>: Change type to std::vector.
7498 (allocate_piece_closure): Adjust, change parameter to
7499 std::vector rvalue and std::move it to piece_closure.
7500 (rw_pieced_value): Adjust.
7501 (check_pieced_synthetic_pointer): Adjust.
7502 (indirect_synthetic_pointer): Adjust.
7503 (coerce_pieced_ref): Adjust.
7504 (free_pieced_value_closure): Adjust. Use delete to free
7505 piece_closure.
7506 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
7507 to allocate_piece_closure.
7508 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
7509
7510 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
7511
7512 * probe.h (probe_ops_cp): Remove typedef.
7513 (DEF_VEC_P (probe_ops_cp)): Remove.
7514 (all_probe_ops): Change type to std::vector.
7515 * probe.c (info_probes_for_ops): Adjust to vector change.
7516 (probe_linespec_to_ops): Likewise.
7517 (all_probe_ops): Change type to std::vector.
7518 (_initialize_probe): Adjust to vector change.
7519 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
7520 * elfread.c (elf_get_probes): Likewise.
7521 * stap-probe.c (_initialize_stap_probe): Likewise.
7522
7523 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
7524
7525 * probe.h (struct bound_probe): Define constructors.
7526 * probe.c (bound_probe_s): Remove typedef.
7527 (DEF_VEC_O (bound_probe_s)): Remove VEC.
7528 (collect_probes): Change return type to std::vector, remove
7529 cleanup.
7530 (compare_probes): Return bool, change parameter type. Change
7531 semantic to "less than".
7532 (gen_ui_out_table_header_info): Change parameter to std::vector
7533 and update.
7534 (exists_probe_with_pops): Likewise.
7535 (info_probes_for_ops): Update to std::vector change.
7536 (enable_probes_command): Likewise.
7537 (disable_probes_command): Likewise.
7538
7539 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
7540
7541 * probe.h (struct probe_ops) <get_probes>: Change parameter from
7542 vec to std::vector.
7543 * probe.c (parse_probes_in_pspace): Update.
7544 (find_probes_in_objfile): Update.
7545 (find_probe_by_pc): Update.
7546 (collect_probes): Update.
7547 (probe_any_get_probes): Update.
7548 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
7549 return type to reference to std::vector.
7550 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
7551 std::vector and update.
7552 (dtrace_process_dof): Likewise.
7553 (dtrace_get_probes): Likewise.
7554 * elfread.c (elf_get_probes): Change return type to std::vector,
7555 store an std::vector in bfd_data.
7556 (probe_key_free): Update to std::vector.
7557 * stap-probe.c (handle_stap_probe): Change parameter to
7558 std::vector and update.
7559 (stap_get_probes): Likewise.
7560 * symfile-debug.c (debug_sym_get_probes): Change return type to
7561 std::vector and update.
7562
7563 2017-09-11 Tom Tromey <tom@tromey.com>
7564
7565 * breakpoint.c (program_breakpoint_here_p): Update.
7566 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
7567 from make_show_memory_breakpoints_cleanup. Return a
7568 scoped_restore_tmpl<int>.
7569 (restore_show_memory_breakpoints): Remove.
7570 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
7571 * mem-break.c (memory_validate_breakpoint): Update.
7572 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
7573 (ia64_memory_remove_breakpoint): Update.
7574 (ia64_breakpoint_from_pc): Update.
7575 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
7576 from make_show_memory_breakpoints_cleanup.
7577
7578 2017-09-11 Tom Tromey <tom@tromey.com>
7579
7580 * d-namespace.c (d_lookup_symbol): Use std::string.
7581 (find_symbol_in_baseclass): Likewise.
7582
7583 2017-09-11 Tom Tromey <tom@tromey.com>
7584
7585 * ctf.c (ctf_start): Use std::string.
7586
7587 2017-09-11 Tom Tromey <tom@tromey.com>
7588
7589 * ada-lang.c (is_known_support_routine): Update.
7590 (ada_unhandled_exception_name_addr_from_raise): Update.
7591 * guile/scm-frame.c (gdbscm_frame_name): Update.
7592 * python/py-frame.c (frapy_name): Update.
7593 (frapy_function): Update.
7594 * stack.h (find_frame_funname): Update.
7595 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
7596 (print_frame): Update.
7597
7598 2017-09-11 Tom Tromey <tom@tromey.com>
7599
7600 * findcmd.c (put_bits): Take a gdb::byte_vector.
7601 (parse_find_args): Return gdb::byte_vector. "args" now const.
7602 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
7603 cleanups.
7604 (find_command): Update.
7605
7606 2017-09-11 Tom Tromey <tom@tromey.com>
7607
7608 * cli/cli-script.c (class scoped_restore_hook_in): New.
7609 (clear_hook_in_cleanup): Remove.
7610 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
7611 scoped_restore_hook_in.
7612
7613 2017-09-11 Tom Tromey <tom@tromey.com>
7614
7615 * cli/cli-script.c (restore_interp): Remove.
7616 (read_command_lines): Use scoped_restore_interp.
7617 * interps.c (scoped_restore_interp::set_temp): Rename from
7618 interp_set_temp.
7619 * interps.h (class scoped_restore_interp): New.
7620 (interp_set_temp): Remove.
7621
7622 2017-09-11 Tom Tromey <tom@tromey.com>
7623
7624 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
7625 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
7626 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
7627 scoped_restore.
7628 (mi_cmd_break_insert_1): Update.
7629 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
7630 scoped_restore.
7631
7632 2017-09-11 Tom Tromey <tom@tromey.com>
7633
7634 * demangle.c (demangle_command): Update.
7635 * breakpoint.c (disable_command): Update.
7636 (enable_command): Update.
7637 (find_location_by_number): Make "number" const. Use
7638 get_number_trailer.
7639 * cli/cli-utils.c (extract_arg): Return std::string.
7640 * probe.c (parse_probe_linespec): Update. Change types.
7641 (collect_probes): Take string arguments.
7642 (parse_probe_linespec): Likewise.
7643 (info_probes_for_ops): Update.
7644 (enable_probes_command): Update.
7645 (disable_probes_command): Update.
7646 * break-catch-sig.c (catch_signal_split_args): Update.
7647 * mi/mi-parse.c (mi_parse): Update.
7648
7649 2017-09-11 Tom Tromey <tom@tromey.com>
7650
7651 * language.h (language_enum): Make argument const.
7652 * language.c (language_enum): Make argument const.
7653
7654 2017-09-11 Tom Tromey <tom@tromey.com>
7655
7656 * common/common-utils.h (skip_to_space): Remove macro, redeclare
7657 as function.
7658 (skip_to_space): Rename from skip_to_space_const.
7659 * common/common-utils.c (skip_to_space): New function.
7660 (skip_to_space): Rename from skip_to_space_const.
7661 * cli/cli-utils.h (get_number): Rename from get_number_const.
7662 (extract_arg): Rename from extract_arg_const.
7663 * cli/cli-utils.c (get_number): Rename from get_number_const.
7664 (extract_arg): Rename from extract_arg_const.
7665 (number_or_range_parser::get_number): Use ::get_number.
7666 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
7667 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
7668 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
7669 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
7670 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
7671 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
7672 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
7673 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
7674
7675 2017-09-11 Tom Tromey <tom@tromey.com>
7676
7677 * python/python.c (do_start_initialization): Use
7678 py-event-types.def to initialize types.
7679 Define all object type structures.
7680 * python/python-internal.h: Don't declare event initialization
7681 functions.
7682 * python/py-threadevent.c (thread_event_object_type): Don't
7683 define.
7684 * python/py-stopevent.c (stop_event_object_type): Don't define.
7685 * python/py-signalevent.c (signal_event_object_type): Don't
7686 declare or define.
7687 * python/py-newobjfileevent.c (new_objfile_event_object_type)
7688 (clear_objfiles_event_object_type): Don't declare or define.
7689 * python/py-infevents.c (inferior_call_pre_event_object_type)
7690 (inferior_call_post_event_object_type)
7691 (register_changed_event_object_type)
7692 (memory_changed_event_object_type): Don't declare or define.
7693 * python/py-inferior.c (new_thread_event_object_type)
7694 (new_inferior_event_object_type)
7695 (inferior_deleted_event_object_type): Don't declare or define.
7696 * python/py-exitedevent.c (exited_event_object_type): Don't
7697 declare or define.
7698 * python/py-evts.c (gdbpy_initialize_py_events): Use
7699 py-all-events.def.
7700 * python/py-events.h (thread_event_object_type): Don't declare.
7701 (events_object): Use py-all-events.def.
7702 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
7703 py-event-types.def.
7704 * python/py-event-types.def: New file.
7705 * python/py-continueevent.c (create_continue_event_object): Don't
7706 declare or define.
7707 * python/py-bpevent.c (breakpoint_event_object_type): Don't
7708 declare or define.
7709 * python/py-all-events.def: New file.
7710
7711 2017-09-11 Tom Tromey <tom@tromey.com>
7712
7713 * python/py-threadevent.c (create_thread_event_object): Return
7714 gdbpy_ref.
7715 * python/py-stopevent.h (create_stop_event_object)
7716 (create_breakpoint_event_object, create_signal_event_object):
7717 Update.
7718 * python/py-stopevent.c (create_stop_event_object): Return
7719 gdbpy_ref.
7720 (emit_stop_event): Update.
7721 * python/py-signalevent.c (create_signal_event_object): Return
7722 gdbpy_ref.
7723 * python/py-infevents.c (create_inferior_call_event_object):
7724 Update.
7725 * python/py-event.h (create_event_object)
7726 (create_thread_event_object): Update.
7727 * python/py-event.c (create_event_object): Return gdbpy_ref.
7728 * python/py-continueevent.c: Return gdbpy_ref.
7729 * python/py-bpevent.c (create_breakpoint_event_object): Return
7730 gdbpy_ref.
7731
7732 2017-09-11 Tom Tromey <tom@tromey.com>
7733
7734 PR python/15622:
7735 * NEWS: Add entry.
7736 * python/python.c (do_start_initialization): Initialize new event
7737 types.
7738 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
7739 (gdbpy_initialize_inferior_deleted_event)
7740 (gdbpy_initialize_new_thread_event): Declare.
7741 * python/py-threadevent.c (create_thread_event_object): Add option
7742 "thread" parameter.
7743 * python/py-inferior.c (new_thread_event_object_type)
7744 (new_inferior_event_object_type)
7745 (inferior_deleted_event_object_type): Declare.
7746 (python_new_inferior, python_inferior_deleted): New functions.
7747 (add_thread_object): Emit new_thread event.
7748 (gdbpy_initialize_inferior): Attach new functions to corresponding
7749 observers.
7750 (new_thread, new_inferior, inferior_deleted): Define new event
7751 types.
7752 * python/py-evts.c (gdbpy_initialize_py_events): Add new
7753 registries.
7754 * python/py-events.h (events_object) <new_inferior,
7755 inferior_deleted, new_thread>: New fields.
7756 * python/py-event.h (create_thread_event_breakpoint): Add optional
7757 "thread" parameter.
7758
7759 2017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
7760
7761 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
7762 check current_ui instead.
7763 (internal_vproblem): Likewise.
7764
7765 2017-09-09 Simon Marchi <simon.marchi@ericsson.com>
7766
7767 * thread.c (print_thread_info_1): Remove unnecessary calls to
7768 uiout->is_mi_like_p.
7769
7770 2017-09-09 Tom Tromey <tom@tromey.com>
7771
7772 * namespace.h (add_using_directive): Update.
7773 * namespace.c (add_using_directive): Change type of excludes to
7774 std::vector.
7775 * dwarf2read.c (read_import_statement): Use std::vector.
7776 (read_namespace): Update.
7777 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
7778
7779 2017-09-09 Tom Tromey <tom@tromey.com>
7780
7781 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
7782
7783 2017-09-09 Tom Tromey <tom@tromey.com>
7784
7785 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
7786
7787 2017-09-09 Tom Tromey <tom@tromey.com>
7788
7789 * stack.c (func_command): Use gdb::def_vector.
7790
7791 2017-09-09 Tom Tromey <tom@tromey.com>
7792
7793 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
7794 ui_out_emit_list, ui_out_emit_tuple.
7795 (mi_cmd_var_update): Likewise.
7796
7797 2017-09-09 Tom Tromey <tom@tromey.com>
7798
7799 * mi/mi-interp.c (mi_user_selected_context_changed): Use
7800 ui_out_redirect_pop.
7801 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
7802 ui_out_redirect_pop.
7803 * utils.c (do_ui_out_redirect_pop)
7804 (make_cleanup_ui_out_redirect_pop): Remove.
7805 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
7806 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
7807 * ui-out.h (ui_out_redirect_pop): New class.
7808
7809 2017-09-09 Tom Tromey <tom@tromey.com>
7810
7811 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
7812 (list_available_thread_groups, mi_cmd_list_thread_groups)
7813 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
7814 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
7815 Likewise.
7816
7817 2017-09-09 Tom Tromey <tom@tromey.com>
7818
7819 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
7820 ui_out_emit_tuple.
7821
7822 2017-09-09 Tom Tromey <tom@tromey.com>
7823
7824 * target.c (flash_erase_command): Use ui_out_emit_tuple.
7825 * stack.c (print_frame): Use ui_out_emit_tuple.
7826 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
7827 (info_spu_mailbox_command, info_spu_dma_command)
7828 (info_spu_proxydma_command): Likewise.
7829 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
7830 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
7831 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
7832 ui_out_emit_tuple.
7833 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
7834
7835 2017-09-09 Tom Tromey <tom@tromey.com>
7836
7837 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
7838 (class ui_out_emit_table): Update comment.
7839 * ui-out.c (do_cleanup_table_end)
7840 (make_cleanup_ui_out_table_begin_end): Remove.
7841 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
7842 (info_spu_dma_cmdlist): Likewise.
7843 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
7844 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
7845 ui_out_emit_table.
7846
7847 2017-09-09 Tom Tromey <tom@tromey.com>
7848
7849 * thread.c (print_thread_info_1): Use ui_out_emit_table,
7850 ui_out_emit_list, gdb::optional.
7851
7852 2017-09-09 John Baldwin <jhb@FreeBSD.org>
7853
7854 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
7855 prototype.
7856 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
7857 prototype.
7858 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
7859 prototype.
7860 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
7861 * ada-exp.y: Remove _initialize_ada_exp prototype.
7862 * ada-lang.c: Remove _initialize_ada_language prototype.
7863 * ada-tasks.c: Remove _initialize_tasks prototype.
7864 * addrmap.c: Remove _initialize_addrmap prototype.
7865 * agent.c: Remove _initialize_agent prototype.
7866 * aix-thread.c: Remove _initialize_aix_thread prototype.
7867 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
7868 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
7869 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
7870 prototype.
7871 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
7872 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
7873 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
7874 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
7875 prototype.
7876 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
7877 prototype.
7878 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
7879 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
7880 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
7881 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
7882 prototype.
7883 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
7884 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
7885 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
7886 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
7887 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
7888 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
7889 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
7890 prototype.
7891 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
7892 prototype.
7893 * annotate.c: Remove _initialize_annotate prototype.
7894 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
7895 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
7896 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
7897 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
7898 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
7899 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
7900 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
7901 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
7902 prototype.
7903 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
7904 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
7905 * auto-load.c: Remove _initialize_auto_load prototype.
7906 * auxv.c: Remove _initialize_auxv prototype.
7907 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
7908 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
7909 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
7910 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
7911 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
7912 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
7913 prototype.
7914 * break-catch-throw.c: Remove _initialize_break_catch_throw
7915 prototype.
7916 * breakpoint.c: Remove _initialize_breakpoint prototype.
7917 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
7918 * btrace.c: Remove _initialize_btrace prototype.
7919 * charset.c: Remove _initialize_charset prototype.
7920 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
7921 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
7922 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
7923 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
7924 * cli/cli-script.c: Remove _initialize_cli_script prototype.
7925 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
7926 * coffread.c: Remove _initialize_coffread prototype.
7927 * compile/compile.c: Remove _initialize_compile prototype.
7928 * complaints.c: Remove _initialize_complaints prototype.
7929 * completer.c: Remove _initialize_completer prototype.
7930 * copying.awk: Remove _initialize_copying prototype.
7931 * copying.c: Regenerate.
7932 * core-regset.c: Remove _initialize_core_regset prototype.
7933 * corefile.c: Remove _initialize_core prototype.
7934 * corelow.c: Remove _initialize_corelow prototype.
7935 * cp-abi.c: Remove _initialize_cp_abi prototype.
7936 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
7937 * cp-support.c: Remove _initialize_cp_support prototype.
7938 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
7939 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
7940 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
7941 * ctf.c: Remove _initialize_ctf prototype.
7942 * d-lang.c: Remove _initialize_d_language prototype.
7943 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
7944 prototype.
7945 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
7946 * dbxread.c: Remove _initialize_dbxread prototype.
7947 * dcache.c: Remove _initialize_dcache prototype.
7948 * demangle.c: Remove _initialize_demangler prototype.
7949 * disasm-selftests.c: Remove _initialize_disasm_selftests
7950 prototype.
7951 * disasm.c: Remove _initialize_disasm prototype.
7952 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
7953 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
7954 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
7955 prototype.
7956 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
7957 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
7958 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
7959 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
7960 * elfread.c: Remove _initialize_elfread prototype.
7961 * exec.c: Remove _initialize_exec prototype.
7962 * extension.c: Remove _initialize_extension prototype.
7963 * f-lang.c: Remove _initialize_f_language prototype.
7964 * f-valprint.c: Remove _initialize_f_valprint prototype.
7965 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
7966 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
7967 * filesystem.c: Remove _initialize_filesystem prototype.
7968 * findcmd.c: Remove _initialize_mem_search prototype.
7969 * fork-child.c: Remove _initialize_fork_child prototype.
7970 * frame-base.c: Remove _initialize_frame_base prototype.
7971 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
7972 * frame.c: Remove _initialize_frame prototype.
7973 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
7974 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
7975 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
7976 * gcore.c: Remove _initialize_gcore prototype.
7977 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
7978 * gdbarch.c: Regenerate.
7979 * gdbarch.sh: Remove _initialize_gdbarch prototype.
7980 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
7981 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
7982 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
7983 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
7984 * go-lang.c: Remove _initialize_go_language prototype.
7985 * go32-nat.c: Remove _initialize_go32_nat prototype.
7986 * guile/guile.c: Remove _initialize_guile prototype.
7987 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
7988 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
7989 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
7990 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
7991 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
7992 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
7993 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
7994 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
7995 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
7996 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
7997 prototype.
7998 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
7999 prototype.
8000 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
8001 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
8002 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
8003 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
8004 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
8005 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
8006 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
8007 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
8008 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
8009 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
8010 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
8011 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
8012 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
8013 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
8014 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
8015 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
8016 prototype.
8017 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
8018 prototype.
8019 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
8020 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
8021 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
8022 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
8023 * infcall.c: Remove _initialize_infcall prototype.
8024 * infcmd.c: Remove _initialize_infcmd prototype.
8025 * inferior.c: Remove _initialize_inferiors prototype.
8026 * inflow.c: Remove _initialize_inflow prototype.
8027 * infrun.c: Remove _initialize_infrun prototype.
8028 * interps.c: Remove _initialize_interpreter prototype.
8029 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
8030 * jit.c: Remove _initialize_jit prototype.
8031 * language.c: Remove _initialize_language prototype.
8032 * linux-fork.c: Remove _initialize_linux_fork prototype.
8033 * linux-nat.c: Remove _initialize_linux_nat prototype.
8034 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
8035 * linux-thread-db.c: Remove _initialize_thread_db prototype.
8036 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
8037 * m2-lang.c: Remove _initialize_m2_language prototype.
8038 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
8039 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
8040 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
8041 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
8042 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
8043 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
8044 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
8045 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
8046 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
8047 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
8048 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
8049 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
8050 * machoread.c: Remove _initialize_machoread prototype.
8051 * macrocmd.c: Remove _initialize_macrocmd prototype.
8052 * macroscope.c: Remove _initialize_macroscope prototype.
8053 * maint.c: Remove _initialize_maint_cmds prototype.
8054 * mdebugread.c: Remove _initialize_mdebugread prototype.
8055 * memattr.c: Remove _initialize_mem prototype.
8056 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
8057 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
8058 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
8059 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
8060 * mi/mi-main.c: Remove _initialize_mi_main prototype.
8061 * microblaze-linux-tdep.c: Remove
8062 _initialize_microblaze_linux_tdep prototype.
8063 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
8064 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
8065 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
8066 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
8067 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
8068 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
8069 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
8070 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
8071 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
8072 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
8073 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
8074 prototype.
8075 * mipsread.c: Remove _initialize_mipsread prototype.
8076 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
8077 prototype.
8078 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
8079 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
8080 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
8081 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
8082 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
8083 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
8084 prototype.
8085 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
8086 * nto-procfs.c: Remove _initialize_procfs prototype.
8087 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
8088 * objc-lang.c: Remove _initialize_objc_language prototype.
8089 * objfiles.c: Remove _initialize_objfiles prototype.
8090 * observer.c: Remove observer_test_first_notification_function,
8091 observer_test_second_notification_function,
8092 observer_test_third_notification_function, and
8093 _initialize_observer prototypes.
8094 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
8095 * osabi.c: Remove _initialize_gdb_osabi prototype.
8096 * osdata.c: Remove _initialize_osdata prototype.
8097 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
8098 * parse.c: Remove _initialize_parse prototype.
8099 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
8100 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
8101 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
8102 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
8103 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
8104 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
8105 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
8106 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
8107 * printcmd.c: Remove _initialize_printcmd prototype.
8108 * probe.c: Remove _initialize_probe prototype.
8109 * proc-api.c: Remove _initialize_proc_api prototype.
8110 * proc-events.c: Remove _initialize_proc_events prototype.
8111 * proc-service.c: Remove _initialize_proc_service prototype.
8112 * procfs.c: Remove _initialize_procfs prototype.
8113 * psymtab.c: Remove _initialize_psymtab prototype.
8114 * python/python.c: Remove _initialize_python prototype.
8115 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
8116 * record-btrace.c: Remove _initialize_record_btrace prototype.
8117 * record-full.c: Remove _initialize_record_full prototype.
8118 * record.c: Remove _initialize_record prototype.
8119 * regcache.c: Remove _initialize_regcache prototype.
8120 * reggroups.c: Remove _initialize_reggroup prototype.
8121 * remote-notif.c: Remove _initialize_notif prototype.
8122 * remote-sim.c: Remove _initialize_remote_sim prototype.
8123 * remote.c: Remove _initialize_remote prototype.
8124 * reverse.c: Remove _initialize_reverse prototype.
8125 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
8126 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
8127 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
8128 prototype.
8129 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
8130 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
8131 * rust-exp.y: Remove _initialize_rust_exp prototype.
8132 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
8133 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
8134 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
8135 * score-tdep.c: Remove _initialize_score_tdep prototype.
8136 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
8137 prototype.
8138 * ser-go32.c: Remove _initialize_ser_dos prototype.
8139 * ser-mingw.c: Remove _initialize_ser_windows prototype.
8140 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
8141 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
8142 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
8143 * serial.c: Remove _initialize_serial prototype.
8144 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
8145 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
8146 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
8147 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
8148 * skip.c: Remove _initialize_step_skip prototype.
8149 * sol-thread.c: Remove _initialize_sol_thread prototype.
8150 * solib-aix.c: Remove _initialize_solib_aix prototype.
8151 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
8152 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
8153 * solib-frv.c: Remove _initialize_frv_solib prototype.
8154 * solib-spu.c: Remove _initialize_spu_solib prototype.
8155 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
8156 * solib-target.c: Remove _initialize_solib_target prototype.
8157 * solib.c: Remove _initialize_solib prototype.
8158 * source.c: Remove _initialize_source prototype.
8159 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
8160 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
8161 prototype.
8162 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
8163 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
8164 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
8165 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
8166 prototype.
8167 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
8168 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
8169 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
8170 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
8171 prototype.
8172 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
8173 prototype.
8174 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
8175 prototype.
8176 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
8177 prototype.
8178 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
8179 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
8180 prototype.
8181 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
8182 prototype.
8183 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
8184 prototype.
8185 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
8186 prototype.
8187 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
8188 prototype.
8189 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
8190 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
8191 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
8192 * stabsread.c: Remove _initialize_stabsread prototype.
8193 * stack.c: Remove _initialize_stack prototype.
8194 * stap-probe.c: Remove _initialize_stap_probe prototype.
8195 * std-regs.c: Remove _initialize_frame_reg prototype.
8196 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
8197 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
8198 * symfile.c: Remove _initialize_symfile prototype.
8199 * symmisc.c: Remove _initialize_symmisc prototype.
8200 * symtab.c: Remove _initialize_symtab prototype.
8201 * target-dcache.c: Remove _initialize_target_dcache prototype.
8202 * target-descriptions.c: Remove _initialize_target_descriptions
8203 prototype.
8204 * thread.c: Remove _initialize_thread prototype.
8205 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
8206 prototype.
8207 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
8208 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
8209 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
8210 prototype.
8211 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
8212 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
8213 * tracefile.c: Remove _initialize_tracefile prototype.
8214 * tracepoint.c: Remove _initialize_tracepoint prototype.
8215 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
8216 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
8217 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
8218 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
8219 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
8220 * tui/tui-win.c: Remove _initialize_tui_win prototype.
8221 * tui/tui.c: Remove _initialize_tui prototype.
8222 * typeprint.c: Remove _initialize_typeprint prototype.
8223 * user-regs.c: Remove _initialize_user_regs prototype.
8224 * utils.c: Remove _initialize_utils prototype.
8225 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
8226 * valarith.c: Remove _initialize_valarith prototype.
8227 * valops.c: Remove _initialize_valops prototype.
8228 * valprint.c: Remove _initialize_valprint prototype.
8229 * value.c: Remove _initialize_values prototype.
8230 * varobj.c: Remove _initialize_varobj prototype.
8231 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
8232 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
8233 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
8234 * windows-nat.c: Remove _initialize_windows_nat,
8235 _initialize_check_for_gdb_ini, and _initialize_loadable
8236 prototypes.
8237 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
8238 * xcoffread.c: Remove _initialize_xcoffread prototype.
8239 * xml-support.c: Remove _initialize_xml_support prototype.
8240 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
8241 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
8242 prototype.
8243 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
8244 prototype.
8245 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
8246
8247 2017-09-08 Keith Seitz <keiths@redhat.com>
8248
8249 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
8250 field.
8251
8252 2017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
8253
8254 * f-valprint.c (f_val_print): Remove check for one byte
8255 sized integers. Remove printing of character type.
8256
8257 2017-09-08 Frank Penczek <frank.penczek@intel.com>
8258 Christoph Weinmann <christoph.t.weinmann@intel.com>
8259 Bernhard Heckel <bernhard.heckel@intel.com>
8260
8261 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
8262 to maintain proper indentation when printing pointers/refs.
8263
8264 2017-09-07 Joel Brobecker <brobecker@adacore.com>
8265
8266 GDB 8.0.1 released.
8267
8268 2017-09-07 Joel Brobecker <brobecker@adacore.com>
8269
8270 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
8271
8272 2017-09-05 Tom Tromey <tom@tromey.com>
8273
8274 * parse.c (funcall_chain): Now a std::vector.
8275 (start_arglist, end_arglist): Simplify.
8276 (free_funcalls): Remove.
8277 (parse_exp_in_context_1): Remove cleanup.
8278
8279 2017-09-05 Tom Tromey <tom@tromey.com>
8280
8281 * go-exp.y (go_parse): Don't create a cleanup.
8282
8283 2017-09-05 Tom Tromey <tom@tromey.com>
8284
8285 * d-exp.y (PrimaryExpression): Use std::string.
8286 (d_parse): Don't create a cleanup.
8287
8288 2017-09-05 Tom Tromey <tom@tromey.com>
8289
8290 * utils.c (do_clear_parser_state): Remove.
8291 (make_cleanup_clear_parser_state): Remove.
8292 * p-exp.y (pascal_parse): Use scoped_restore.
8293 * m2-exp.y (m2_parse): Use scoped_restore.
8294 * f-exp.y (f_parse): Use scoped_restore.
8295 * d-exp.y (d_parse): Use scoped_restore.
8296 * c-exp.y (c_parse): Use scoped_restore.
8297 * ada-exp.y (ada_parse): Use scoped_restore.
8298 * utils.h (make_cleanup_clear_parser_state): Remove.
8299
8300 2017-09-06 Keith Seitz <keiths@redhat.com>
8301
8302 * dwarf2read.c (dw2_linkage_name_attr): New function.
8303 (dw2_linkage_name): New function.
8304 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
8305 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
8306 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
8307
8308 2017-09-06 Kamil Rytarowski <n54@gmx.com>
8309
8310 * config/djgpp/djconfig.sh: Correct shell portability issue.
8311
8312 2017-09-06 Kamil Rytarowski <n54@gmx.com>
8313
8314 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
8315
8316 2017-09-06 John Baldwin <jhb@FreeBSD.org>
8317
8318 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
8319 * NEWS: Mention new FreeBSD/mips native configuration.
8320 * configure.host: Add aarch64*-*-freebsd*.
8321 * configure.nat: Likewise.
8322 * aarch64-fbsd-nat.c: New file.
8323
8324 2017-09-06 John Baldwin <jhb@FreeBSD.org>
8325
8326 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
8327 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
8328 * NEWS: Mention new FreeBSD/aarch64 target.
8329 * configure.tgt: Add aarch64*-*-freebsd*.
8330 * aarch64-fbsd-tdep.c: New file.
8331 * aarch64-fbsd-tdep.h: New file.
8332
8333 2017-09-06 Kamil Rytarowski <n54@gmx.com>
8334
8335 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
8336
8337 2017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8338
8339 * parse.c (find_minsym_type_and_address): Don't relocate addresses
8340 of TLS symbols.
8341
8342 2017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
8343
8344 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
8345 call.
8346
8347 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
8348
8349 * infrun.c (follow_exec): Call add_thread after
8350 target_find_description.
8351
8352 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
8353
8354 * infrun.c (handle_inferior_event_1): When exec'ing, read
8355 stop_pc after follow_exec.
8356
8357 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
8358
8359 * remote.c (process_g_packet): Update error message.
8360
8361 2017-09-05 Yao Qi <yao.qi@linaro.org>
8362
8363 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
8364 targets.
8365
8366 2017-09-05 Pedro Alves <palves@redhat.com>
8367
8368 * eval.c (eval_call, evaluate_funcall): New functions, factored
8369 out from ...
8370 (evaluate_subexp_standard): ... this.
8371
8372 2017-09-05 Yao Qi <yao.qi@linaro.org>
8373
8374 * amd64-tdep.c (amd64_target_description): Create target
8375 descriptions.
8376 (_initialize_amd64_tdep): Don't call functions
8377 initialize_tdesc_amd64_*. Add self tests.
8378 * arch/amd64.c (amd64_create_target_description): Add parameter
8379 is_linux. Call set_tdesc_osabi if is_linux is true.
8380 * arch/amd64.h (amd64_create_target_description): Update the
8381 declaration.
8382 * arch/i386.c (i386_create_target_description): Add parameter
8383 is_linux. Call set_tdesc_osabi if is_linux is true.
8384 * arch/i386.h (i386_create_target_description): Update
8385 declaration.
8386 * configure.tgt: Add i386.o to gdb_target_obs.
8387 * features/Makefile (XMLTOC): Remove i386/*.xml.
8388 * features/i386/amd64-avx-avx512.c: Remove.
8389 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
8390 * features/i386/amd64-avx-mpx.c: Remove.
8391 * features/i386/amd64-avx.c: Remove.
8392 * features/i386/amd64-mpx.c: Remove.
8393 * features/i386/amd64.c: Remove.
8394 * features/i386/i386-avx-avx512.c: Remove.
8395 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
8396 * features/i386/i386-avx-mpx.c: Remove.
8397 * features/i386/i386-avx.c: Remove.
8398 * features/i386/i386-mmx.c: Remove.
8399 * features/i386/i386-mpx.c: Remove.
8400 * features/i386/i386.c: Remove.
8401 * i386-tdep.c: Don't include features/i386/i386*.c., include
8402 target-descriptions.h and arch/i386.h.
8403 (i386_target_description): Create target descriptions.
8404 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
8405 functions. Do self tests.
8406
8407 2017-09-05 Yao Qi <yao.qi@linaro.org>
8408
8409 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
8410 * features/i386/amd64-avx-avx512-linux.c: Removed.
8411 * features/i386/amd64-avx-linux.c: Removed.
8412 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
8413 * features/i386/amd64-avx-mpx-linux.c: Removed.
8414 * features/i386/amd64-linux.c: Removed.
8415 * features/i386/amd64-mpx-linux.c: Removed.
8416 * features/i386/x32-avx-avx512-linux.c: Removed.
8417 * features/i386/x32-avx-linux.c: Removed.
8418 * features/i386/x32-linux.c: Removed.
8419
8420 2017-09-05 Yao Qi <yao.qi@linaro.org>
8421
8422 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
8423 features/i386/*.c.
8424 (amd64_linux_read_description): Call
8425 amd64_create_target_description.
8426 * arch/amd64.c: New file.
8427 * arch/amd64.h: New file.
8428 * configure.tgt (x86_64-*-linux*): Append amd64.o.
8429 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
8430
8431 2017-09-05 Yao Qi <yao.qi@linaro.org>
8432
8433 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
8434 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
8435 (amd64_linux_read_description): Create target descriptions.
8436 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
8437 functions. Add unit tests.
8438 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
8439 x32-core.xml.
8440 * features/i386/64bit-avx.c: Generated.
8441 * features/i386/64bit-avx512.c: Generated.
8442 * features/i386/64bit-core.c: Generated.
8443 * features/i386/64bit-linux.c: Generated.
8444 * features/i386/64bit-mpx.c: Generated.
8445 * features/i386/64bit-pkeys.c: Generated.
8446 * features/i386/64bit-segments.c: Generated.
8447 * features/i386/64bit-sse.c: Generated.
8448 * features/i386/x32-core.c: Generated.
8449 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
8450 c files for amd64-linux and x32-linux.
8451
8452 2017-09-05 Yao Qi <yao.qi@linaro.org>
8453
8454 * amd64-linux-tdep.c (amd64_linux_read_description): New
8455 function.
8456 (amd64_linux_core_read_description): Call
8457 amd64_linux_read_description.
8458 (amd64_linux_init_abi): Likewise.
8459 (amd64_x32_linux_init_abi): Likewise.
8460 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
8461 * x86-linux-nat.c (x86_linux_read_description): Call
8462 amd64_linux_read_description.
8463
8464 2017-09-05 Yao Qi <yao.qi@linaro.org>
8465
8466 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
8467 comments.
8468
8469 2017-09-05 Yao Qi <yao.qi@linaro.org>
8470
8471 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
8472 * features/i386/i386-avx-avx512-linux.c: Remove.
8473 * features/i386/i386-avx-linux.c: Remove.
8474 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
8475 * features/i386/i386-avx-mpx-linux.c: Remove.
8476 * features/i386/i386-linux.c: Remove.
8477 * features/i386/i386-mmx-linux.c: Remove.
8478 * features/i386/i386-mpx-linux.c: Remove.
8479
8480 2017-09-05 Yao Qi <yao.qi@linaro.org>
8481
8482 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
8483 (SFILES): Add arch/i386.c.
8484 (HFILES_NO_SRCDIR): Add arch/i386.h.
8485 * arch/i386.c: New file.
8486 * arch/i386.h: New file.
8487 * arch/tdesc.h (allocate_target_description): Declare.
8488 (set_tdesc_architecture): Declare.
8489 (set_tdesc_osabi): Declare.
8490 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
8491 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
8492 include arch/i386.h.
8493 (i386_linux_read_description): Remove code and call
8494 i386_create_target_description.
8495 (set_tdesc_architecture): New function.
8496 (set_tdesc_osabi): New function.
8497 * target-descriptions.h (allocate_target_description): Remove.
8498
8499 2017-09-05 Yao Qi <yao.qi@linaro.org>
8500
8501 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
8502 * target-descriptions.c (tdesc_create_feature): Likewise, and
8503 adjust code.
8504 * features/i386/32bit-avx.c: Re-generated.
8505 * features/i386/32bit-avx512.c: Re-generated.
8506 * features/i386/32bit-core.c: Re-generated.
8507 * features/i386/32bit-linux.c: Re-generated.
8508 * features/i386/32bit-mpx.c: Re-generated.
8509 * features/i386/32bit-pkeys.c: Re-generated.
8510 * features/i386/32bit-sse.c: Re-generated.
8511
8512 2017-09-05 Yao Qi <yao.qi@linaro.org>
8513
8514 * regformats/regdef.h (struct reg): Override operator == and !=.
8515
8516 2017-09-05 Yao Qi <yao.qi@linaro.org>
8517
8518 * arch/tdesc.h: New file.
8519 * regformats/regdat.sh: Generate code using tdesc_create_reg.
8520 * target-descriptions.c: Update comments.
8521 * target-descriptions.h: Include "arch/tdesc.h". Remove the
8522 declarations.
8523 * features/i386/32bit-avx.c: Re-generated.
8524 * features/i386/32bit-avx512.c: Re-generated.
8525 * features/i386/32bit-core.c: Re-generated.
8526 * features/i386/32bit-linux.c: Re-generated.
8527 * features/i386/32bit-mpx.c: Re-generated.
8528 * features/i386/32bit-pkeys.c: Re-generated.
8529 * features/i386/32bit-sse.c: Re-generated.
8530
8531 2017-09-05 Yao Qi <yao.qi@linaro.org>
8532
8533 * regformats/regdat.sh: Update generated code.
8534
8535 2017-09-05 Yao Qi <yao.qi@linaro.org>
8536
8537 * regformats/regdat.sh: Adjust code order.
8538
8539 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
8540
8541 * expprint.c (dump_subexp_body_standard): Use constant format
8542 string in fprintf_filtered call.
8543
8544 2017-09-04 John Baldwin <jhb@FreeBSD.org>
8545
8546 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
8547 NetBSD/i386.
8548 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
8549
8550 2017-09-04 John Baldwin <jhb@FreeBSD.org>
8551
8552 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
8553
8554 2017-09-04 John Baldwin <jhb@FreeBSD.org>
8555
8556 * bsd-kvm.o: Define _KMEMUSER.
8557 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
8558 * configure: Regenerate.
8559
8560 2017-09-04 John Baldwin <jhb@FreeBSD.org>
8561
8562 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
8563 * i386-fbsd-nat.c: Likewise.
8564
8565 2017-09-04 John Baldwin <jhb@FreeBSD.org>
8566
8567 * unittests/array-view-selftests.c: Add include of <array>.
8568
8569 2017-09-04 John Baldwin <jhb@FreeBSD.org>
8570
8571 * spu-tdep.c (flush_ea_cache): Add missing argument to
8572 call_function_by_hand.
8573
8574 2017-09-04 Pedro Alves <palves@redhat.com>
8575
8576 * NEWS (Safer support for debugging with no debug info): New.
8577
8578 2017-09-04 Pedro Alves <palves@redhat.com>
8579
8580 * c-exp.y (function_method, function_method_void): Add current
8581 instance flags to TYPE_INSTANCE.
8582 * dwarf2read.c (check_modifier): New.
8583 (compute_delayed_physnames): Assert that only C++ adds delayed
8584 physnames. Mark fn_fields as const/volatile depending on
8585 physname.
8586 * eval.c (make_params): New type_instance_flags parameter. Use
8587 it as the new type's instance flags.
8588 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
8589 flags element and pass it to make_params.
8590 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
8591 instance flags element.
8592 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
8593 * gdbtypes.h: Include "enum-flags.h".
8594 (type_instance_flags): New enum-flags type.
8595 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
8596 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
8597 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
8598 (follow_type_instance_flags): New function.
8599 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
8600 * parser-defs.h (follow_type_instance_flags): Declare.
8601 * valops.c (value_struct_elt_for_reference): const/volatile must
8602 match too.
8603
8604 2017-09-04 Pedro Alves <palves@redhat.com>
8605
8606 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
8607 function/method scopes; lookup the nested name as a function local
8608 static variable.
8609
8610 2017-09-04 Pedro Alves <palves@redhat.com>
8611
8612 (%type <voidval>): Add function_method.
8613 * c-exp.y (exp): New production for calls with no arguments.
8614 (function_method, function_method_void_or_typelist): New
8615 productions.
8616 (exp): New production for "method()::static_var".
8617 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
8618 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
8619 Handle OP_FUNC_STATIC_VAR.
8620 * parse.c (operator_length_standard):
8621 Handle OP_FUNC_STATIC_VAR.
8622
8623 2017-09-04 Pedro Alves <palves@redhat.com>
8624
8625 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
8626 handling.
8627 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
8628 Ditto.
8629 * parse.c (operator_length_standard, operator_check_standard):
8630 Ditto.
8631 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
8632
8633 2017-09-04 Pedro Alves <palves@redhat.com>
8634
8635 * ax-gdb.c: Include "typeprint.h".
8636 (gen_expr_for_cast): New function.
8637 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
8638 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
8639 type is unknown.
8640 * dwarf2read.c (new_symbol_full): Fallback to int instead of
8641 nodebug_data_symbol.
8642 * eval.c: Include "typeprint.h".
8643 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
8644 Error out if symbol has unknown type.
8645 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
8646 evaluate_subexp_for_cast.
8647 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
8648 OP_VAR_MSYM_VALUE.
8649 (evaluate_subexp_for_cast): New function.
8650 * gdbtypes.c (init_nodebug_var_type): New function.
8651 (objfile_type): Use it to initialize types of variables with no
8652 debug info.
8653 * typeprint.c (error_unknown_type): New.
8654 * typeprint.h (error_unknown_type): New declaration.
8655 * compile/compile-c-types.c (convert_type_basic): Handle
8656 TYPE_CODE_ERROR; warn and fallback to int for variables with
8657 unknown type.
8658
8659 2017-09-04 Pedro Alves <palves@redhat.com>
8660
8661 * eval.c (evaluate_var_value): New function, factored out from ...
8662 (evaluate_subexp_standard): ... here.
8663
8664 2017-09-04 Pedro Alves <palves@redhat.com>
8665
8666 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
8667 Remove useless assignments to 'op'.
8668
8669 2017-09-04 Pedro Alves <palves@redhat.com>
8670
8671 * eval.c (eval_skip_value): New function.
8672 (evaluate_subexp_standard): Use it.
8673
8674 2017-09-04 Pedro Alves <palves@redhat.com>
8675
8676 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
8677 function name from symbol/minsym and pass it to
8678 error_call_unknown_return_type.
8679
8680 2017-09-04 Pedro Alves <palves@redhat.com>
8681
8682 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
8683 * ax-gdb.c (gen_msym_var_ref): New function.
8684 (gen_expr): Handle OP_VAR_MSYM_VALUE.
8685 * eval.c (evaluate_var_msym_value): New function.
8686 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
8687 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
8688 to call_function_by_hand.
8689 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
8690 Handle OP_VAR_MSYM_VALUE.
8691 (union exp_element) <msymbol>: New field.
8692 * minsyms.h (struct type): Forward declare.
8693 (find_minsym_type_and_address): Declare.
8694 * parse.c (write_exp_elt_msym): New function.
8695 (write_exp_msymbol): Delete, refactored as ...
8696 (find_minsym_type_and_address): ... this new function.
8697 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
8698 (operator_length_standard, operator_check_standard): Handle
8699 OP_VAR_MSYM_VALUE.
8700 * std-operator.def (OP_VAR_MSYM_VALUE): New.
8701
8702 2017-09-04 Pedro Alves <palves@redhat.com>
8703
8704 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
8705 TYPE_GNU_IFUNC specially here. Throw error if return type is
8706 unknown.
8707 * ada-typeprint.c (print_func_type): Handle functions with unknown
8708 return type.
8709 * c-typeprint.c (c_type_print_base): Handle functions and methods
8710 with unknown return type.
8711 * compile/compile-c-symbols.c (convert_symbol_bmsym)
8712 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
8713 * compile/compile-c-types.c: Include "objfiles.h".
8714 (convert_func): For functions with unknown return type, warn and
8715 default to int.
8716 * compile/compile-object-run.c (compile_object_run): Adjust call
8717 to call_function_by_hand_dummy.
8718 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
8719 call_function_by_hand.
8720 * eval.c (evaluate_subexp_standard): Adjust calls to
8721 call_function_by_hand. Handle functions and methods with unknown
8722 return type. Pass expect_type to call_function_by_hand.
8723 * f-typeprint.c (f_type_print_base): Handle functions with unknown
8724 return type.
8725 * gcore.c (call_target_sbrk): Adjust call to
8726 call_function_by_hand.
8727 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
8728 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
8729 an integer address type instead of nodebug.
8730 * guile/scm-value.c (gdbscm_value_call): Adjust call to
8731 call_function_by_hand.
8732 * infcall.c (error_call_unknown_return_type): New function.
8733 (call_function_by_hand): New "default_return_type" parameter.
8734 Pass it down.
8735 (call_function_by_hand_dummy): New "default_return_type"
8736 parameter. Use it instead of defaulting to int. If there's no
8737 default and the return type is unknown, throw an error. If
8738 there's a default return type, and the called function has no
8739 debug info, then assume the function is prototyped.
8740 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
8741 New "default_return_type" parameter.
8742 (error_call_unknown_return_type): New declaration.
8743 * linux-fork.c (call_lseek): Cast return type of lseek.
8744 (inferior_call_waitpid, checkpoint_command): Adjust calls to
8745 call_function_by_hand.
8746 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
8747 calls to call_function_by_hand.
8748 * m2-typeprint.c (m2_procedure): Handle functions with unknown
8749 return type.
8750 * objc-lang.c (lookup_objc_class, lookup_child_selector)
8751 (value_nsstring, print_object_command): Adjust calls to
8752 call_function_by_hand.
8753 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
8754 functions with unknown return type.
8755 (pascal_type_print_func_varspec_suffix): New function.
8756 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
8757 TYPE_CODE_METHOD>: Use it.
8758 * python/py-value.c (valpy_call): Adjust call to
8759 call_function_by_hand.
8760 * rust-lang.c (rust_evaluate_funcall): Adjust call to
8761 call_function_by_hand.
8762 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
8763 call_function_by_hand.
8764 * valops.c (value_allocate_space_in_inferior): Adjust call to
8765 call_function_by_hand.
8766 * typeprint.c (type_print_unknown_return_type): New function.
8767 * typeprint.h (type_print_unknown_return_type): New declaration.
8768
8769 2017-09-04 Pedro Alves <palves@redhat.com>
8770
8771 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
8772 types with more than one parameter as prototyped.
8773
8774 2017-09-04 Pedro Alves <palves@redhat.com>
8775
8776 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
8777 (disassemble_command): Use gdb_disassembly_flags instead of bare
8778 int.
8779 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
8780 (dump_insns, do_mixed_source_and_assembly_deprecated)
8781 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
8782 Use gdb_disassembly_flags instead of bare int.
8783 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
8784 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
8785 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
8786 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
8787 (enum gdb_disassembly_flag): ... values of this new enumeration.
8788 (gdb_disassembly_flags): Define.
8789 (gdb_disassembly)
8790 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
8791 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
8792 gdb_disassembly_flags instead of bare int.
8793 * record-btrace.c (btrace_insn_history)
8794 (record_btrace_insn_history, record_btrace_insn_history_range)
8795 (record_btrace_insn_history_from): Use gdb_disassembly_flags
8796 instead of bare int.
8797 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
8798 Use gdb_disassembly_flags instead of bare int.
8799 * target-debug.h (target_debug_print_gdb_disassembly_flags):
8800 Define.
8801 * target-delegates.c: Regenerate.
8802 * target.c (target_insn_history, target_insn_history_from)
8803 (target_insn_history_range): Use gdb_disassembly_flags instead of
8804 bare int.
8805 * target.h: Include "disasm.h".
8806 (struct target_ops) <to_insn_history, to_insn_history_from,
8807 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
8808 int.
8809 (target_insn_history, target_insn_history_from)
8810 (target_insn_history_range): Use gdb_disassembly_flags instead of
8811 bare int.
8812
8813 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
8814
8815 * cli/cli-script.c (build_command_line): For if/while commands,
8816 check whether args is empty.
8817
8818 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
8819
8820 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
8821 (enum command_control_type): Likewise.
8822 (struct command_line): Likewise.
8823 (free_command_lines): Likewise.
8824 (struct command_lines_deleter): Likewise.
8825 (command_line_up): Likewise.
8826 (read_command_lines): Likewise.
8827 (read_command_lines_1): Likewise.
8828 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
8829 (enum command_control_type): Likewise.
8830 (struct command_line): Likewise.
8831 (free_command_lines): Likewise.
8832 (struct command_lines_deleter): Likewise.
8833 (command_line_up): Likewise.
8834 (read_command_lines): Likewise.
8835 (read_command_lines_1): Likewise.
8836 * breakpoint.h: Include cli/cli-script.h.
8837 * extension-priv.h: Likewise.
8838 * gdbcmd.h: Likewise.
8839
8840 2017-09-04 Pedro Alves <palves@redhat.com>
8841
8842 * ada-lang.c (is_known_support_routine): Move sal declaration to
8843 where it is initialized.
8844 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
8845 (parse_breakpoint_sals, decode_static_tracepoint_spec)
8846 (clear_command, update_static_tracepoint): Remove init_sal
8847 references. Move declarations closer to initializations.
8848 * cli/cli-cmds.c (list_command): Move sal declarations closer to
8849 initializations.
8850 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
8851 references. Move sal declarations closer to initializations.
8852 * frame.c (find_frame_sal): Return a symtab_and_line via function
8853 return instead of output parameter. Remove init_sal references.
8854 * frame.h (find_frame_sal): Return a symtab_and_line via function
8855 return instead of output parameter.
8856 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
8857 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
8858 instead of memset.
8859 (gdbscm_find_pc_line): Remove init_sal reference.
8860 * infcall.c (call_function_by_hand_dummy): Remove init_sal
8861 references. Move declarations closer to initializations.
8862 * infcmd.c (set_step_frame): Update. Move declarations closer to
8863 initializations.
8864 (finish_backward): Remove init_sal references. Move declarations
8865 closer to initializations.
8866 * infrun.c (process_event_stop_test, handle_step_into_function)
8867 (insert_hp_step_resume_breakpoint_at_frame)
8868 (insert_step_resume_breakpoint_at_caller): Likewise.
8869 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
8870 (symbol_to_sal): Likewise.
8871 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
8872 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
8873 to its initialization.
8874 * reverse.c (save_bookmark_command): Use new/delete. Remove
8875 init_sal references. Move declarations closer to initializations.
8876 * source.c (get_current_source_symtab_and_line): Remove brace
8877 initialization.
8878 (set_current_source_symtab_and_line): Now takes the sal by const
8879 reference. Remove brace initialization.
8880 (line_info): Remove init_sal reference.
8881 * source.h (set_current_source_symtab_and_line): Now takes a
8882 symtab_and_line via const reference.
8883 * stack.c (set_current_sal_from_frame): Adjust.
8884 (print_frame_info): Adjust.
8885 (get_last_displayed_sal): Return the sal via function return
8886 instead of via output parameter. Simplify.
8887 (frame_info): Adjust.
8888 * stack.h (get_last_displayed_sal): Return the sal via function
8889 return instead of via output parameter.
8890 * symtab.c (init_sal): Delete.
8891 (find_pc_sect_line): Remove init_sal references. Move
8892 declarations closer to initializations.
8893 (find_function_start_sal): Remove init_sal references. Move
8894 declarations closer to initializations.
8895 * symtab.h (struct symtab_and_line): In-class initialize all
8896 fields.
8897 * tracepoint.c (set_traceframe_context)
8898 (print_one_static_tracepoint_marker): Remove init_sal references.
8899 Move declarations closer to initializations.
8900 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
8901 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
8902 declarations closer to initializations.
8903 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
8904 init_sal references. Adjust.
8905
8906 2017-09-04 Pedro Alves <palves@redhat.com>
8907
8908 * ax-gdb.c (agent_command_1): Use range-for.
8909 * break-catch-throw.c (re_set_exception_catchpoint): Update.
8910 * breakpoint.c: Include "common/array-view.h".
8911 (init_breakpoint_sal, create_breakpoint_sal): Change sals
8912 parameter from struct symtabs_and_lines to
8913 array_view<symtab_and_line>. Adjust. Use range-for. Update.
8914 (breakpoint_sals_to_pc): Change sals parameter from struct
8915 symtabs_and_lines to std::vector reference.
8916 (check_fast_tracepoint_sals): Change sals parameter from struct
8917 symtabs_and_lines to std::array_view. Use range-for.
8918 (decode_static_tracepoint_spec): Return a std::vector instead of
8919 symtabs_and_lines. Update.
8920 (create_breakpoint): Update.
8921 (break_range_command, until_break_command, clear_command): Update.
8922 (base_breakpoint_decode_location, bkpt_decode_location)
8923 (bkpt_probe_create_sals_from_location)
8924 (bkpt_probe_decode_location, tracepoint_decode_location)
8925 (tracepoint_probe_decode_location)
8926 (strace_marker_create_sals_from_location): Return a std::vector
8927 instead of symtabs_and_lines.
8928 (strace_marker_create_breakpoints_sal): Update.
8929 (strace_marker_decode_location): Return a std::vector instead of
8930 symtabs_and_lines. Update.
8931 (update_breakpoint_locations): Change struct symtabs_and_lines
8932 parameters to gdb::array_view. Adjust.
8933 (location_to_sals): Return a std::vector instead of
8934 symtabs_and_lines. Update.
8935 (breakpoint_re_set_default): Use std::vector instead of struct
8936 symtabs_and_lines.
8937 (decode_location_default): Return a std::vector instead of
8938 symtabs_and_lines. Update.
8939 * breakpoint.h: Include "common/array-view.h".
8940 (struct breakpoint_ops) <decode_location>: Now returns a
8941 std::vector instead of returning a symtabs_and_lines via output
8942 parameter.
8943 (update_breakpoint_locations): Change sals parameters to use
8944 gdb::array_view.
8945 * cli/cli-cmds.c (edit_command, list_command): Update to use
8946 std::vector and gdb::array_view.
8947 (ambiguous_line_spec): Adjust to use gdb::array_view and
8948 range-for.
8949 (compare_symtabs): Rename to ...
8950 (cmp_symtabs): ... this. Change parameters to symtab_and_line
8951 const reference and adjust.
8952 (filter_sals): Rewrite using std::vector and standard algorithms.
8953 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
8954 (jump_command): Update to use std::vector.
8955 * linespec.c (struct linespec_state) <canonical_names>: Update
8956 comment.
8957 (add_sal_to_sals_basic): Delete.
8958 (add_sal_to_sals, filter_results, convert_results_to_lsals)
8959 (decode_line_2, create_sals_line_offset)
8960 (convert_address_location_to_sals, convert_linespec_to_sals)
8961 (convert_explicit_location_to_sals, parse_linespec)
8962 (event_location_to_sals, decode_line_full, decode_line_1)
8963 (decode_line_with_current_source)
8964 (decode_line_with_last_displayed, decode_objc)
8965 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
8966 (linespec_result::~linespec_result): Adjust to use std::vector
8967 instead of symtabs_and_lines.
8968 * linespec.h (linespec_sals::sals): Now a std::vector.
8969 (struct linespec_result): Use std::vector, bool, and in-class
8970 initialization.
8971 (decode_line_1, decode_line_with_current_source)
8972 (decode_line_with_last_displayed): Return std::vector.
8973 * macrocmd.c (info_macros_command): Use std::vector.
8974 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
8975 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
8976 std::vector.
8977 * probe.h (parse_probes): Return a std::vector.
8978 * python/python.c (gdbpy_decode_line): Use std::vector and
8979 gdb::array_view.
8980 * source.c (select_source_symtab, line_info): Use std::vector.
8981 * stack.c (func_command): Use std::vector.
8982 * symtab.h (struct symtabs_and_lines): Delete.
8983 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
8984
8985 2017-09-04 Pedro Alves <palves@redhat.com>
8986
8987 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8988 unittests/array-view-selftests.c.
8989 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
8990 * common/array-view.h: New file.
8991 * unittests/array-view-selftests.c: New file.
8992
8993 2017-09-04 Pedro Alves <palves@redhat.com>
8994
8995 * cli/cli-cmds.c (edit_command): Pass message to
8996 ambiguous_line_spec.
8997 (list_command): Pass message to ambiguous_line_spec. Say
8998 "first"/"last" instead of "start" and "end" to be consistent with
8999 the manual.
9000 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
9001 them to print formatted message.
9002
9003 2017-09-04 Pedro Alves <palves@redhat.com>
9004
9005 * btrace.c (ftrace_add_pt): Pass btrace_insn to
9006 ftrace_update_insns by reference instead of pointer.
9007
9008 2017-09-04 Yao Qi <yao.qi@linaro.org>
9009
9010 * i386-go32-tdep.c: Include x86-xstate.h.
9011 (i386_go32_init_abi): Call i386_target_description.
9012 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
9013 if xcr0 is X86_XSTATE_X87_MASK.
9014 * i386-tdep.h (tdesc_i386): Remove the declaration.
9015 (tdesc_i386_mmx): Likewise.
9016
9017 2017-09-04 Yao Qi <yao.qi@linaro.org>
9018
9019 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
9020 X86_XSTATE_SSE_MASK instead of 0.
9021
9022 2017-09-04 Yao Qi <yao.qi@linaro.org>
9023
9024 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
9025 i386_target_description.
9026 * i386-fbsd-nat.c (i386fbsd_read_description): Call
9027 i386_target_description.
9028 * i386-tdep.c (i386_gdbarch_init): Likewise.
9029
9030 2017-09-04 Yao Qi <yao.qi@linaro.org>
9031
9032 * amd64-darwin-tdep.c: Include "x86-xstate.h".
9033 (x86_darwin_init_abi_64): Call amd64_target_description.
9034 * amd64-dicos-tdep.c: Likewise.
9035 * amd64-fbsd-nat.c: Likewise.
9036 * amd64-fbsd-tdep.c: Likewise.
9037 * amd64-nbsd-tdep.c: Likewise.
9038 * amd64-obsd-tdep.c: Likewise.
9039 * amd64-sol2-tdep.c: Likewise.
9040 * amd64-windows-tdep.c: Likewise.
9041 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
9042
9043 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
9044
9045 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
9046 (btrace_function) <insn>: Change type to use std::vector.
9047 * btrace.c (ftrace_debug, ftrace_call_num_insn,
9048 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
9049 ftrace_update_insns, ftrace_compute_global_level_offset,
9050 btrace_stitch_bts, btrace_clear, btrace_insn_get,
9051 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
9052 change to std::vector.
9053 (ftrace_update_insns): Adjust to change to std::vector, change
9054 type of INSN parameter.
9055 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
9056 * record-btrace.c (btrace_call_history_insn_range,
9057 btrace_compute_src_line_range,
9058 record_btrace_frame_prev_register): Adjust to change to
9059 std::vector.
9060 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
9061 to change to std::vector.
9062
9063 2017-09-03 Tom Tromey <tom@tromey.com>
9064
9065 * corefile.c (reopen_exec_file): Use std::string.
9066
9067 2017-09-03 Tom Tromey <tom@tromey.com>
9068
9069 * compile/compile.c (compile_register_name_mangled): Return
9070 std::string.
9071 * compile/compile-loc2c.c (pushf_register_address): Update.
9072 (pushf_register): Update.
9073 * compile/compile-c-types.c (convert_array): Update.
9074 * compile/compile-c-symbols.c (generate_vla_size): Update.
9075 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
9076 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
9077 (convert_one_symbol): Update.
9078 (generate_c_for_for_one_variable): Update.
9079 * compile/compile-c-support.c (c_get_range_decl_name): Return a
9080 std::string.
9081 (generate_register_struct): Update.
9082 * compile/compile-internal.h (c_get_range_decl_name): Return a
9083 std::string.
9084 (compile_register_name_mangled): Return std::string.
9085
9086 2017-09-03 Tom Tromey <tom@tromey.com>
9087
9088 * utils.c (perror_string): Return a std::string.
9089 (throw_perror_with_name, perror_warning_with_name): Update.
9090
9091 2017-09-03 Tom Tromey <tom@tromey.com>
9092
9093 * demangle.c (demangle_command): Use std::string,
9094 unique_xmalloc_ptr.
9095
9096 2017-09-03 Tom Tromey <tom@tromey.com>
9097
9098 * cli/cli-setshow.c (do_set_command): Use std::string.
9099
9100 2017-09-03 Tom Tromey <tom@tromey.com>
9101
9102 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
9103
9104 2017-09-03 Tom Tromey <tom@tromey.com>
9105
9106 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
9107
9108 2017-09-03 Tom Tromey <tom@tromey.com>
9109
9110 * mi/mi-cmd-env.c (env_execute_cli_command): Use
9111 gdb::unique_xmalloc_ptr.
9112
9113 2017-09-03 Tom Tromey <tom@tromey.com>
9114
9115 * thread.c (print_thread_info_1): Use string_printf.
9116 (thread_apply_command, thread_apply_all_command): Use
9117 std::string.
9118
9119 2017-09-03 Tom Tromey <tom@tromey.com>
9120
9121 * valprint.c (val_print_string): Update.
9122 * gdbcore.h (memory_error_message): Return std::string.
9123 * corefile.c (memory_error_message): Return std::string.
9124 (memory_error): Update.
9125 * breakpoint.c (insert_bp_location): Update.
9126
9127 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
9128
9129 * target/waitstatus.h (target_waitstatus_to_string): Change
9130 return type to std::string.
9131 * target/waitstatus.c (target_waitstatus_to_string): Return
9132 std::string.
9133 * target.h (target_waitstatus_to_string): Remove declaration.
9134 * infrun.c (resume, clear_proceed_status_thread,
9135 print_target_wait_results, do_target_wait, save_waitstatus,
9136 stop_all_threads): Adjust.
9137 * record-btrace.c (record_btrace_wait): Adjust.
9138 * target-debug.h
9139 (target_debug_print_struct_target_waitstatus_p): Adjust.
9140
9141 2017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
9142
9143 PR gdb/22046
9144 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
9145 detection.
9146
9147 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
9148
9149 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
9150 for setting/unsetting environment variables on the remote target.
9151 (New remote packets): Add entries for QEnvironmentHexEncoded,
9152 QEnvironmentUnset and QEnvironmentReset.
9153 * common/environ.c (gdb_environ::operator=): Extend method to
9154 handle m_user_set_env_list and m_user_unset_env_list.
9155 (gdb_environ::clear): Likewise.
9156 (match_var_in_string): Change type of first parameter from 'char
9157 *' to 'const char *'.
9158 (gdb_environ::set): Extend method to handle
9159 m_user_set_env_list and m_user_unset_env_list.
9160 (gdb_environ::unset): Likewise.
9161 (gdb_environ::clear_user_set_env): New method.
9162 (gdb_environ::user_set_envp): Likewise.
9163 (gdb_environ::user_unset_envp): Likewise.
9164 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
9165 m_user_unset_env_list on move constructor/assignment.
9166 (unset): Add new default parameter 'update_unset_list = true'.
9167 (clear_user_set_env): New method.
9168 (user_set_envp): Likewise.
9169 (user_unset_envp): Likewise.
9170 (m_user_set_env_list): New std::set.
9171 (m_user_unset_env_list): Likewise.
9172 * common/rsp-low.c (hex2str): New function.
9173 (bin2hex): New overload for bin2hex function.
9174 * common/rsp-low.c (hex2str): New prototype.
9175 (str2hex): New overload prototype.
9176 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
9177 QEnvironmentUnset and QEnvironmentReset.
9178 (remote_protocol_features): Add QEnvironmentHexEncoded,
9179 QEnvironmentUnset and QEnvironmentReset packets.
9180 (send_environment_packet): New function.
9181 (extended_remote_environment_support): Likewise.
9182 (extended_remote_create_inferior): Call
9183 extended_remote_environment_support.
9184 (_initialize_remote): Add QEnvironmentHexEncoded,
9185 QEnvironmentUnset and QEnvironmentReset packet configs.
9186 * unittests/environ-selftests.c (gdb_selftest_env_var):
9187 New variable.
9188 (test_vector_initialization): New function.
9189 (test_init_from_host_environ): Likewise.
9190 (test_reinit_from_host_environ): Likewise.
9191 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
9192 Likewise.
9193 (test_unset_set_empty_vector): Likewise.
9194 (test_vector_clear): Likewise.
9195 (test_std_move): Likewise.
9196 (test_move_constructor):
9197 (test_self_move): Likewise.
9198 (test_set_unset_reset): Likewise.
9199 (run_tests): Rewrite in terms of the functions above.
9200
9201 2017-08-31 Weimin Pan <weimin.pan@oracle.com>
9202
9203 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
9204 (adi_available): Use a temp variable of type CORE_ADDR as argument
9205 3 when calling target_auxv_search.
9206 (adi_normalize_address): Use masks and xor operators to calculate
9207 normalized address.
9208 (adi_read_versions, adi_write_versions, adi_print_versions)
9209 (do_examine, do_assign): Use paddress.
9210
9211 2017-08-29 John Baldwin <jhb@FreeBSD.org>
9212
9213 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
9214 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
9215 out of loop and add supply of FIR.
9216 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
9217 add collect of FIR.
9218
9219 2017-08-28 Simon Marchi <simon.marchi@ericsson.com>
9220
9221 PR gdb/21827
9222 * cli/cli-script.c (define_command): Don't convert command name
9223 to lower case.
9224
9225 2017-08-25 Joel Brobecker <brobecker@adacore.com>
9226
9227 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
9228 Update all callers accordingly. Remove all code blocks handling
9229 the case where DISPP is not NULL.
9230
9231 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9232
9233 PR symtab/22003
9234 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
9235 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
9236 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
9237
9238 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9239
9240 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
9241 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
9242 (read_comp_units_from_section): New parameter abbrev_section, use
9243 read_and_check_comp_unit_head, allocate signatured_type if needed.
9244 (create_all_comp_units): Update read_comp_units_from_section caller.
9245
9246 2017-08-23 Pedro Alves <palves@redhat.com>
9247
9248 PR remote/21852
9249 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
9250 to null_ptid and switch to thread without reading the registers
9251 after adding the inferior.
9252
9253 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
9254
9255 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
9256 compile-gcc.
9257 * compile/compile.c (compile_gcc, show_compile_gcc): New.
9258 (compile_to_object): Implement compile_gcc.
9259 (_initialize_compile): Install "set compile-gcc". Initialize
9260 compile_gcc.
9261
9262 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
9263
9264 * compile/compile.c (compile_to_object): Conditionally call
9265 set_verbose. Conditionally call compile or compile_v0.
9266
9267 2017-08-07 Weimin Pan <weimin.pan@oracle.com>
9268
9269 * sparc64-tdep.h: (adi_normalize_address): New export.
9270 * sparc-nat.h: (open_adi_tag_fd): New export.
9271 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
9272 * sparc64-linux-tdep.c:
9273 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
9274 (sparc64_linux_handle_segmentation_fault): New function.
9275 (sparc64_linux_init_abi): Register
9276 sparc64_linux_handle_segmentation_fault
9277 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
9278 (sparc64_addr_bits_remove): New function.
9279 (sparc64_init_abi): Register sparc64_addr_bits_remove.
9280 (MAX_PROC_NAME_SIZE): New macro.
9281 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
9282 (sparc64adilist): New variable.
9283 (adi_proc_list): New variable.
9284 (find_adi_info): New function.
9285 (add_adi_info): New function.
9286 (get_adi_info_proc): New function.
9287 (get_adi_info): New function.
9288 (info_adi_command): New function.
9289 (read_maps_entry): New function.
9290 (adi_available): New function.
9291 (adi_normalize_address): New function.
9292 (adi_align_address): New function.
9293 (adi_convert_byte_count): New function.
9294 (adi_tag_fd): New function.
9295 (adi_is_addr_mapped): New function.
9296 (adi_read_versions): New function.
9297 (adi_write_versions): New function.
9298 (adi_print_versions): New function.
9299 (do_examine): New function.
9300 (do_assign): New function.
9301 (adi_examine_command): New function.
9302 (adi_assign_command): New function.
9303 (_initialize_sparc64_adi_tdep): New function.
9304
9305 2017-08-22 Simon Marchi <simon.marchi@ericsson.com>
9306
9307 * breakpoint.c (breakpoints_info): Rename to ...
9308 (info_breakpoints_command): ... this.
9309 (watchpoints_info): Rename to ...
9310 (info_watchpoints_command): ... this.
9311 (tracepoints_info): Rename to ...
9312 (info_tracepoints_command): ... this.
9313 (_initialize_breakpoint): Adjust.
9314 * dcache.c (dcache_info): Rename to ...
9315 (info_display_command): ... this.
9316 (_initialize_dcache): Adjust.
9317 * frame.h (args_info): Rename to ...
9318 (info_args_command): ... this.
9319 (locals_info): Rename to ...
9320 (info_locals_command): ... this.
9321 * infcmd.c (nofp_registers_info): Rename to ...
9322 (info_registers_command): ... this.
9323 (float_info): Rename to ...
9324 (info_float_command): ... this.
9325 (program_info): Rename to ...
9326 (info_program_command): ... this.
9327 (all_registers_info): Rename to ...
9328 (info_all_registers_command): ... this.
9329 (vector_info): Rename to ...
9330 (info_vector_command): ... this.
9331 (float_info): Rename to ...
9332 (info_float_command): ... this.
9333 (_initialize_infcmd): Adjust.
9334 * inferior.h (term_info): Rename to ...
9335 (info_terminal_command): ... this.
9336 * inflow.c (term_info): Rename to ...
9337 (info_terminal_command): ... this.
9338 (_initialize_inflow): Adjust.
9339 * infrun.c (signals_info): Rename to ...
9340 (info_signals_command): ... this.
9341 (_initialize_infrun): Adjust.
9342 * objc-lang.c (classes_info): Rename to ...
9343 (info_classes_command): ... this.
9344 (selectors_info): Rename to ...
9345 (info_selectors_command): ... this.
9346 (_initialize_objc_language): Adjust.
9347 * printcmd.c (sym_info): Rename to ...
9348 (info_symbol_command): ... this.
9349 (address_info): Rename to ...
9350 (info_address_command): ... this.
9351 (display_info): Rename to ...
9352 (info_display_command): ... this.
9353 (_initialize_printcmd): Adjust.
9354 * reverse.c (bookmarks_info): Rename to ...
9355 (info_breakpoints_command): ... this.
9356 (_initialize_reverse): Adjust.
9357 * ser-go32.c (dos_info): Rename to ...
9358 (info_serial_command): ... this.
9359 (_initialize_ser_dos): Adjust.
9360 * skip.c (skip_info): Rename to ...
9361 (info_skip_command): ... this.
9362 (_initialize_step_skip): Adjust.
9363 * source.c (line_info): Rename to ...
9364 (info_line_command): ... this.
9365 (source_info): Rename to ...
9366 (info_source_command)
9367 * stack.c (frame_info): Rename to ...
9368 (info_frame_command): ... this.
9369 (locals_info): Rename to ...
9370 (info_locals_command): ... this.
9371 (args_info): Rename to ...
9372 (info_args_command): ... this.
9373 (_initialize_stack): Adjust.
9374 * symtab.c (sources_info): Rename to ...
9375 (info_sources_command): ... this.
9376 (variables_info): Rename to ...
9377 (info_variables_command): ... this.
9378 (functions_info): Rename to ...
9379 (info_functions_command): ... this.
9380 (types_info): Rename to ...
9381 (info_types_command): ... this.
9382 (_initialize_symtab): Adjust.
9383 * target.c (target_info): Rename to ...
9384 (info_target_command): ... this.
9385 (initialize_targets): Adjust.
9386 * tracepoint.c (tvariables_info): Rename to ...
9387 (info_tvariables_command): ... this.
9388 (scope_info): Rename to ...
9389 (info_scope_command): ... this.
9390 (trace_dump_actions): Adjust.
9391 (_initialize_tracepoint): Adjust.
9392
9393 2017-08-22 Tom Tromey <tom@tromey.com>
9394
9395 * breakpoint.h (install_breakpoint): Update.
9396 * breakpoint.c (add_solib_catchpoint): Update.
9397 (install_breakpoint): Change argument to a std::unique_ptr.
9398 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
9399 (create_breakpoint_sal, create_breakpoint): Update.
9400 (watch_command_1, catch_exec_command_1)
9401 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
9402 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
9403 Return the breakpoint.
9404 (set_raw_breakpoint_without_location, set_raw_breakpoint)
9405 (new_single_step_breakpoint): Update.
9406 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
9407 std::unique_ptr.
9408 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
9409 std::unique_ptr.
9410 * break-catch-sig.c (create_signal_catchpoint): Use
9411 std::unique_ptr.
9412 * ada-lang.c (create_ada_exception_catchpoint): Use
9413 std::unique_ptr.
9414
9415 2017-08-22 Tom Tromey <tom@tromey.com>
9416
9417 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
9418
9419 2017-08-22 Tom Tromey <tom@tromey.com>
9420
9421 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
9422 (lookup_partial_symbol): Update.
9423
9424 2017-08-22 Tom Tromey <tom@tromey.com>
9425
9426 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
9427 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
9428 (find_and_open_source, symtab_to_fullname): Update.
9429 * psymtab.c (psymtab_to_fullname): Update.
9430
9431 2017-08-22 Tom Tromey <tom@tromey.com>
9432
9433 * exec.c (exec_file_attach): Update.
9434 * linux-thread-db.c (try_thread_db_load): Update.
9435 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
9436 * utils.c (gdb_realpath): Change return type.
9437 (gdb_realpath_keepfile): Update.
9438 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
9439 (_initialize_utils): Register the new self test.
9440 * source.c (openp): Update.
9441 (find_and_open_source): Update.
9442 * nto-tdep.c (nto_find_and_open_solib): Update.
9443 * main.c (set_gdb_data_directory): Update.
9444 (captured_main_1): Update.
9445 * dwarf2read.c (dwarf2_get_dwz_file): Update
9446 (dw2_map_symbol_filenames): Update.
9447 * auto-load.c (auto_load_safe_path_vec_update): Update.
9448 (filename_is_in_auto_load_safe_path_vec): Change type of
9449 "filename_realp".
9450 (auto_load_objfile_script): Update.
9451 (file_is_auto_load_safe): Update. Use std::string.
9452 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
9453
9454 2017-08-22 Tom Tromey <tom@tromey.com>
9455
9456 * utils.c (gdb_realpath_keepfile): Return a
9457 gdb::unique_xmalloc_ptr.
9458 * exec.c (exec_file_attach): Update.
9459 * utils.h (gdb_realpath_keepfile): Return a
9460 gdb::unique_xmalloc_ptr.
9461
9462 2017-08-22 Tom Tromey <tom@tromey.com>
9463
9464 * compile/compile.c (compile_file_command): Use
9465 gdb::unique_xmalloc_ptr, std::string.
9466 * utils.c (gdb_abspath): Change return type.
9467 * source.c (openp): Update.
9468 * objfiles.c (allocate_objfile): Update.
9469 * main.c (set_gdb_data_directory): Update.
9470 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
9471
9472 2017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
9473
9474 * cli-cmds.c (list_commands): List actual code around more than
9475 one location.
9476
9477 2017-08-21 John Baldwin <jhb@FreeBSD.org>
9478
9479 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
9480
9481 2017-08-21 Pedro Alves <palves@redhat.com>
9482
9483 PR gdb/19487
9484 * c-exp.y (variable production): Handle function aliases.
9485 * minsyms.c (msymbol_is_text): New function.
9486 * minsyms.h (msymbol_is_text): Declare.
9487 * symtab.c (find_function_alias_target): New function.
9488 * symtab.h (find_function_alias_target): Declare.
9489
9490 2017-08-21 Pedro Alves <palves@redhat.com>
9491
9492 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
9493 typedefs.
9494 * typeprint.c (whatis_exp): If handling "whatis", and expression
9495 is OP_TYPE, strip one typedef level. Otherwise don't strip
9496 typedefs here.
9497 * valops.c (value_cast): Save "to" type before resolving
9498 stubs/typedefs. Use that type as resulting value's type.
9499
9500 2017-08-18 Tom Tromey <tom@tromey.com>
9501 Pedro Alves <palves@redhat.com>
9502
9503 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
9504 * sol-thread.c (sol_thread_resume, sol_thread_wait)
9505 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
9506 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
9507 * proc-service.c (ps_xfer_memory): Use scoped_restore.
9508 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
9509 (linux_get_siginfo_data): Add "thread" argument. Use
9510 scoped_restore.
9511 * linux-nat.c (linux_child_follow_fork)
9512 (check_stopped_by_watchpoint): Use scoped_restore.
9513 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
9514 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
9515 (restore_inferior_ptid, save_inferior_ptid): Remove.
9516 * btrace.c (btrace_fetch): Use scoped_restore.
9517 * bsd-uthread.c (bsd_uthread_fetch_registers)
9518 (bsd_uthread_store_registers): Use scoped_restore.
9519 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
9520 scoped_restore.
9521 * aix-thread.c (aix_thread_resume, aix_thread_wait)
9522 (aix_thread_xfer_partial): Use scoped_restore.
9523 * inferior.h (save_inferior_ptid): Remove.
9524
9525 2017-08-18 Yao Qi <yao.qi@linaro.org>
9526
9527 PR tdep/21818
9528 * arm-tdep.c (gdb_print_insn_arm): Mark
9529 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
9530
9531 2017-08-18 Yao Qi <yao.qi@linaro.org>
9532
9533 * NEWS: Mention GDBserver's new option "--selftest".
9534 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
9535 * selftest.c: Move it to common/selftest.c.
9536 * selftest.h: Move it to common/selftest.h.
9537 * selftest-arch.c (reset): New function.
9538 (tests_with_arch): Call reset.
9539
9540 2017-08-18 Yao Qi <yao.qi@linaro.org>
9541
9542 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
9543 instead of exception_fprintf and printf_filtered.
9544
9545 2017-08-18 Yao Qi <yao.qi@linaro.org>
9546
9547 * selftest.c (register_self_test): Rename it to
9548 selftests::register_test.
9549 (run_self_tests): selftest::run_tests.
9550 * selftest.h: Update declarations.
9551 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
9552 selftests::register_test_foreach_arch.
9553 * selftest-arch.h: Update declaration.
9554 * aarch64-tdep.c: Update.
9555 * arm-tdep.c: Likewise.
9556 * disasm-selftests.c: Likewise.
9557 * dwarf2loc.c: Likewise.
9558 * dwarf2-frame.c: Likewise.
9559 * findvar.c: Likewise.
9560 * gdbarch-selftests.c: Likewise.
9561 * maint.c (maintenance_selftest): Likewise.
9562 * regcache.c: Likewise.
9563 * rust-exp.y: Likewise.
9564 * selftest-arch.c: Likewise.
9565 * unittests/environ-selftests.c: Likewise.
9566 * unittests/function-view-selftests.c: Likewise.
9567 * unittests/offset-type-selftests.c: Likewise.
9568 * unittests/optional-selftests.c: Likewise.
9569 * unittests/scoped_restore-selftests.c: Likewise.
9570 * utils-selftests.c: Likewise.
9571
9572 2017-08-17 Pedro Alves <palves@redhat.com>
9573
9574 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
9575 local.
9576
9577 2017-08-17 Pedro Alves <palves@redhat.com>
9578
9579 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
9580 field.
9581 (reset_die_in_process): Delete, replaced by ...
9582 (process_die_scope): ... this new class. Make it responsible for
9583 freeing cu->line_header too.
9584 (process_die): Use process_die_scope.
9585 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
9586 cu->line_header_die_owner. Don't release the line header if it's
9587 owned by the CU.
9588 (setup_type_unit_groups): Make the CU/DIE own the line header.
9589 Don't release the line header here.
9590
9591 2017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
9592
9593 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
9594
9595 2017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
9596
9597 * NEWS: Mention new shortcuts for nexti and stepi in TUI
9598 Single-Key mode
9599
9600 2017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
9601
9602 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
9603 mode command list.
9604
9605 2017-08-15 Stafford Horne <shorne@gmail.com>
9606
9607 * MAINTAINERS (Write After Approval): Add Stafford Horne.
9608
9609 2017-08-15 Stafford Horne <shorne@gmail.com>
9610
9611 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
9612
9613 2017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
9614
9615 PR gdb/21954
9616 * infcmd.c (unset_environment_command): Use the 'clear' method on
9617 the environment instead of resetting it.
9618
9619 2017-08-15 John Baldwin <jhb@FreeBSD.org>
9620
9621 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
9622 platforms.
9623
9624 2017-08-14 Tom Tromey <tom@tromey.com>
9625
9626 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
9627 (print_binary_chars): Likewise.
9628 (BITS_IN_BYTES): Remove.
9629
9630 2017-08-14 Tom Tromey <tom@tromey.com>
9631
9632 PR gdb/21675
9633 * valprint.c (LOW_ZERO): Change value to 034.
9634 (print_octal_chars): Add static_asserts for octal constants.
9635 * printcmd.c (print_scalar_formatted): Add 'd' case.
9636
9637 2017-08-11 Tom Tromey <tom@tromey.com>
9638
9639 * symfile.c (add_symbol_file_command): Use std::vector.
9640
9641 2017-08-14 Tom Tromey <tom@tromey.com>
9642
9643 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
9644 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
9645 std::move.
9646 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
9647
9648 2017-08-11 Pedro Alves <palves@redhat.com>
9649
9650 * infrun.c (process_event_stop_test): Adjust
9651 function_name_is_marked_for_skip call.
9652 * skip.c: Include <list>.
9653 (skiplist_entry): Make it a class with private fields, and
9654 getters/setters.
9655 (skiplist_entry_chain): Delete.
9656 (skiplist_entries): New.
9657 (skiplist_entry_count): Delete.
9658 (highest_skiplist_entry_num): New.
9659 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
9660 (add_skiplist_entry): Delete.
9661 (skiplist_entry::skiplist_entry): New.
9662 (skiplist_entry::add_entry): New.
9663 (skip_file_command, skip_function): Adjust.
9664 (compile_skip_regexp): Delete.
9665 (skip_command): Don't compile regexp here. Adjust to use
9666 skiplist_entry::add_entry.
9667 (skip_info): Adjust to use range-for and getters.
9668 (skip_enable_command, skip_disable_command): Adjust to use
9669 range-for and setters.
9670 (skip_delete_command): Adjust to use std::list.
9671 (add_skiplist_entry): Delete.
9672 (skip_file_p): Delete, refactored as ...
9673 (skiplist_entry::do_skip_file_p): ... this new method.
9674 (skip_gfile_p): Delete, refactored as ...
9675 (skiplist_entry::do_gskip_file_p): ... this new method.
9676 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
9677 (skiplist_entry::skip_function_p): ... this new method.
9678 (function_name_is_marked_for_skip): Now returns bool, and takes
9679 the function sal by const reference. Adjust to use range-for and
9680 skiplist_entry methods.
9681 (_initialize_step_skip): Remove references to
9682 skiplist_entry_chain, skiplist_entry_count.
9683 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
9684 takes the function sal by const reference.
9685
9686 2017-08-11 Yao Qi <yao.qi@linaro.org>
9687
9688 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
9689 (dwarf2_frame_cache): Remove reset_cache_cleanup.
9690 (dwarf2_frame_cache):
9691 * frame-unwind.c (frame_unwind_try_unwinder): Catch
9692 RETURN_MASK_ALL and set *this_case to NULL.
9693 * frame-unwind.h: Update comments.
9694
9695 2017-08-11 Yao Qi <yao.qi@linaro.org>
9696
9697 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
9698 (dwarf2_frame_state_copy_regs): Remove.
9699 (dwarf2_frame_state_free_regs): Remove.
9700 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
9701 (dwarf2_restore_rule): Call method .alloc_regs instead of
9702 dwarf2_frame_state_alloc_regs.
9703 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
9704 constructor. Call std::move.
9705 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
9706 (dwarf2_frame_cache): Likewise.
9707
9708 [GDB_SELF_TEST]: Include selftest.h and
9709 selftest-arch.h.
9710 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
9711 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
9712 execute_cfa_program_test.
9713
9714 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
9715 copy ctor, assignment operator, move assignment.
9716 <alloc_regs>: New method.
9717 <swap>: New method.
9718 (struct dwarf2_frame_state): Delete dtor.
9719 (dwarf2_frame_state_alloc_regs): Remove declaration.
9720 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
9721 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
9722
9723 2017-08-11 Yao Qi <yao.qi@linaro.org>
9724
9725 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
9726 (dwarf2_frame_state::dwarf2_frame_state): New.
9727 (dwarf2_frame_state::~dwarf2_frame_state): New.
9728 (dwarf2_fetch_cfa_info): Update.
9729 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
9730 rather than a pointer. Update code.
9731 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
9732 dtor.
9733 <data_align, code_align, retaddr_column>: Change them to const.
9734 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
9735 to bool.
9736
9737 2017-08-11 Yao Qi <yao.qi@linaro.org>
9738
9739 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
9740 <loc.exp>: New field.
9741 * dwarf2-frame.c (execute_cfa_program): Update.
9742 (dwarf2_frame_prev_register): Update.
9743
9744 2017-08-10 Pedro Alves <palves@redhat.com>
9745
9746 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
9747
9748 2017-08-09 John Baldwin <jhb@FreeBSD.org>
9749
9750 * fbsd-nat.c (struct fbsd_fork_info): Remove.
9751 (fbsd_pending_children): Use std::list.
9752 (fbsd_remember_child): Likewise.
9753 (fbsd_is_child_pending): Likewise.
9754 (fbsd_pending_vfork_done): Use std::forward_list.
9755 (fbsd_add_vfork_done): Likewise.
9756 (fbsd_is_vfork_done_pending): Likewise.
9757 (fbsd_next_vfork_done): Likewise.
9758
9759 2017-08-09 John Baldwin <jhb@FreeBSD.org>
9760
9761 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
9762 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
9763 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
9764 for `mapfilename'.
9765 (fbsd_xfer_partial): Use gdb::byte_vector.
9766 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
9767
9768 2017-08-09 John Baldwin <jhb@FreeBSD.org>
9769
9770 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
9771 "filestuff.h".
9772 (fbsd_find_memory_regions): Fix `mapfile' initialization.
9773
9774 2017-08-09 Tom Tromey <tom@tromey.com>
9775
9776 * skip.c (skiplist_entry): New constructor.
9777 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
9778 (skiplist_entry::file_is_glob): Now bool.
9779 (skiplist_entry::file, skiplist_entry::function): Now
9780 std::string.
9781 (make_skip_entry): Return a unique_ptr. Use new.
9782 (free_skiplist_entry, free_skiplist_entry_cleanup)
9783 (make_free_skiplist_entry_cleanup): Remove.
9784 (skip_command, skip_disable_command, add_skiplist_entry)
9785 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
9786 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
9787 (function_name_is_marked_for_skip): Update.
9788 (skip_delete_command): Update. Use delete.
9789
9790 2017-08-09 Jiong Wang <jiong.wang@arm.com>
9791
9792 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
9793 (aarch64_linux_core_read_description): New function.
9794 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
9795
9796 2017-08-09 Pedro Alves <palves@redhat.com>
9797
9798 * cp-name-parser.y (cp_comp_to_string): Return a
9799 gdb::unique_xmalloc_ptr<char>.
9800 * cp-support.c (replace_typedefs_qualified_name)
9801 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
9802 (cp_canonicalize_string_full): Use op= instead of explicit
9803 convertion.
9804 (cp_class_name_from_physname, method_name_from_physname)
9805 (cp_func_name, cp_remove_params): Adjust to use
9806 gdb::unique_xmalloc_ptr<char>.
9807 * cp-support.h (cp_comp_to_string): Return a
9808 gdb::unique_xmalloc_ptr<char>.
9809 * python/py-type.c (typy_lookup_type): Adjust to use
9810 gdb::unique_xmalloc_ptr<char>.
9811
9812 2017-08-09 H.J. Lu <hongjiu.lu@intel.com>
9813
9814 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
9815
9816 2017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
9817 Yao Qi <yao.qi@linaro.org>
9818
9819 * cp-support.c (cp_canonicalize_string_full): Use
9820 gdb::unique_xmalloc_ptr<char>.
9821 (cp_canonicalize_string): Likewise.
9822
9823 2017-08-09 Yao Qi <yao.qi@linaro.org>
9824
9825 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
9826 * regformats/i386/amd64-avx-avx512.dat: Remove.
9827 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
9828 * regformats/i386/amd64-avx-mpx.dat:Remove.
9829 * regformats/i386/amd64-avx.dat: Remove.
9830 * regformats/i386/amd64-mpx.dat: Remove.
9831 * regformats/i386/i386-avx-avx512.dat: Remove.
9832 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
9833 * regformats/i386/i386-avx-mpx.dat: Remove.
9834 * regformats/i386/i386-mmx.dat: Remove.
9835 * regformats/i386/i386-mpx.dat: Remove.
9836
9837 2017-08-09 Yao Qi <yao.qi@linaro.org>
9838
9839 * amd64-tdep.h (tdesc_x32): Remove the declaration.
9840 * amd64-tdep.c: Don't include features/i386/x32*.c.
9841 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
9842 functions.
9843 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
9844 and i386/x32-avx-avx512.
9845 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
9846 and i386/x32.xml.
9847 * features/i386/x32-avx-avx512.c: Removed.
9848 * features/i386/x32-avx-avx512.xml: Removed.
9849 * features/i386/x32-avx.c: Removed.
9850 * features/i386/x32-avx.xml: Removed.
9851 * features/i386/x32.c: Removed.
9852 * features/i386/x32.xml: Removed.
9853 * regformats/i386/x32-avx-avx512.dat: Removed.
9854 * regformats/i386/x32-avx.dat: Removed.
9855 * regformats/i386/x32.dat: Removed.
9856
9857 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
9858
9859 PR breakpoints/21886
9860 * mem-break.c (default_memory_insert_breakpoint): Use
9861 `->placed_address' rather than `->reqstd_address' for the
9862 breakpoint location.
9863
9864 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
9865
9866 * arch-utils.c (default_print_insn): Remove arch/mach/endian
9867 assertions.
9868
9869 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
9870
9871 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
9872 a union of `tdep_info', `tdesc_data' and `id'.
9873 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
9874 rather than `info.tdep_info'.
9875 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
9876 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
9877 * i386-tdep.c (i386_gdbarch_init): Likewise.
9878 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
9879 * mips-tdep.c (mips_gdbarch_init): Likewise.
9880 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
9881 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
9882 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
9883 `info.tdep_info'.
9884 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
9885 `info.tdep_info'.
9886 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
9887 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
9888 `info.tdep_info'.
9889 * spu-tdep.c (spu_gdbarch_init): Likewise.
9890 * gdbarch.h: Regenerate.
9891
9892 2017-08-07 Leszek Swirski <leszeks@google.com>
9893
9894 PR symtab/20899
9895 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
9896
9897 2017-08-07 Simon Marchi <simon.marchi@ericsson.com>
9898
9899 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
9900 (gdbsim_open): Rename gdb_argv args object to argv.
9901
9902 2017-08-05 Tom Tromey <tom@tromey.com>
9903
9904 * compile/compile-object-load.c (compile_object_load): Use
9905 gdb::unique_xmalloc_ptr.
9906 * cli/cli-dump.c (scan_filename): Rename from
9907 scan_filename_with_cleanup. Change return type.
9908 (scan_expression): Rename from scan_expression_with_cleanup.
9909 Change return type.
9910 (dump_memory_to_file, dump_value_to_file, restore_command):
9911 Use gdb::unique_xmalloc_ptr. Update.
9912 * cli/cli-cmds.c (find_and_open_script): Use
9913 gdb::unique_xmalloc_ptr.
9914 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
9915 * symmisc.c (maintenance_print_symbols)
9916 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
9917 * symfile.c (symfile_bfd_open, generic_load)
9918 (add_symbol_file_command, remove_symbol_file_command): Use
9919 gdb::unique_xmalloc_ptr.
9920 * source.c (openp): Use gdb::unique_xmalloc_ptr.
9921 * psymtab.c (maintenance_print_psymbols): Use
9922 gdb::unique_xmalloc_ptr.
9923 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
9924 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
9925 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
9926 (reload_shared_libraries_1): Likewise.
9927
9928 2017-08-05 Tom Tromey <tom@tromey.com>
9929
9930 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
9931 (rust_op_vector, rust_set_vector): New typedefs.
9932 (current_parser): New global.
9933 (work_obstack): Change to pointer type. Update all users.
9934 (rust_ast, pstate): Remove globals.
9935 (struct rust_parser): New.
9936 (%union) <params, field_inits>: Change type.
9937 (start, tuple_expr, unit_expr, struct_expr_list, literal)
9938 (field_expr, expr_list, maybe_expr_list, type_list): Update.
9939 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
9940 (convert_params_to_types, convert_params_to_expression): Change
9941 type of "params".
9942 (ast_string): Change type of "fields".
9943 (rust_parse): Make a rust_parser. Remove cleanups.
9944 (rust_lex_tests): Make and install an auto_obstack.
9945
9946 2017-08-04 Yao Qi <yao.qi@linaro.org>
9947
9948 * configure.srv (ipa_x32_linux_regobj): New.
9949 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
9950 instead of X86_TDESC_AVX512.
9951 (initialize_low_tracepoint): Call
9952 init_registers_x32_avx_avx512_linux.
9953
9954 2017-08-04 Yao Qi <yao.qi@linaro.org>
9955
9956 * utils.h (gdb_argv): Add namespace std for nullptr_t.
9957
9958 2017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
9959
9960 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
9961
9962 2017-08-03 Tom Tromey <tom@tromey.com>
9963
9964 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
9965 Remove.
9966 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
9967
9968 2017-08-03 Tom Tromey <tom@tromey.com>
9969
9970 * python/py-param.c (compute_enum_values): Use gdb_argv.
9971
9972 2017-08-03 Tom Tromey <tom@tromey.com>
9973
9974 * utils.h (struct gdb_argv_deleter): New.
9975 (gdb_argv): New class.
9976 * utils.c (gdb_argv::reset): New method.
9977 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
9978 * tracefile.c (tsave_command): Use gdb_argv.
9979 * top.c (new_ui_command): Use gdb_argv.
9980 * symmisc.c (maintenance_print_symbols)
9981 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
9982 * symfile.c (symbol_file_command, generic_load)
9983 (remove_symbol_file_command): Use gdb_argv.
9984 * stack.c (backtrace_command): Use gdb_argv.
9985 * source.c (add_path, show_substitute_path_command)
9986 (unset_substitute_path_command, set_substitute_path_command):
9987 Use gdb_argv.
9988 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
9989 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
9990 * remote.c (extended_remote_run, remote_put_command)
9991 (remote_get_command, remote_delete_command): Use gdb_argv.
9992 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
9993 (gdbsim_open): Use gdb_argv.
9994 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
9995 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
9996 * procfs.c (procfs_info_proc): Use gdb_argv.
9997 * interps.c (interpreter_exec_cmd): Use gdb_argv.
9998 * infrun.c (handle_command): Use gdb_argv.
9999 * inferior.c (add_inferior_command, clone_inferior_command):
10000 Use gdb_argv.
10001 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
10002 * exec.c (exec_file_command): Use gdb_argv.
10003 * cli/cli-cmds.c (alias_command): Use gdb_argv.
10004 * compile/compile.c (build_argc_argv): Use gdb_argv.
10005
10006 2017-08-03 Tom Tromey <tom@tromey.com>
10007
10008 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
10009
10010 2017-08-03 Tom Tromey <tom@tromey.com>
10011
10012 * python/python.c (compute_python_string): Return std::string.
10013 (gdbpy_eval_from_control_command): Update.
10014 (do_start_initialization): Use std::string.
10015 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
10016 xstrprintf.
10017 * python/py-breakpoint.c (local_setattro): Use string_printf, not
10018 xstrprintf.
10019
10020 2017-08-03 Tom Tromey <tom@tromey.com>
10021
10022 * top.h (do_restore_instream_cleanup): Remove.
10023 * top.c (do_restore_instream_cleanup): Remove.
10024 (read_command_file): Use scoped_restore.
10025 * cli/cli-script.c (execute_user_command): Use scoped_restore.
10026
10027 2017-08-03 Tom Tromey <tom@tromey.com>
10028
10029 * cli/cli-script.c (execute_user_command)
10030 (execute_control_command): Use scoped_restore.
10031
10032 2017-08-03 Tom Tromey <tom@tromey.com>
10033
10034 * cli/cli-script.c (do_restore_user_call_depth): Remove.
10035 (execute_user_command): Remove user_call_depth; use
10036 user_args_stack's size instead.
10037
10038 2017-08-03 Tom Tromey <tom@tromey.com>
10039
10040 * top.h (in_user_command): Remove.
10041 * top.c (in_user_command): Remove.
10042 * cli/cli-script.c (do_restore_user_call_depth)
10043 (execute_user_command): Update.
10044
10045 2017-08-03 Tom Tromey <tom@tromey.com>
10046
10047 * valops.c (search_struct_method): Use gdb::byte_vector.
10048 * valarith.c (value_concat): Use std::vector.
10049 * target.c (memory_xfer_partial): Use gdb::byte_vector.
10050 (simple_search_memory): Likewise.
10051 * printcmd.c (find_string_backward): Use gdb::byte_vector.
10052 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
10053 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
10054 * elfread.c (elf_rel_plt_read): Use std::string.
10055 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
10056 * cli/cli-dump.c (restore_section_callback): Use
10057 gdb::byte_vector.
10058
10059 2017-08-03 Tom Tromey <tom@tromey.com>
10060
10061 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
10062
10063 2017-08-03 Tom Tromey <tom@tromey.com>
10064
10065 * tui/tui-regs.c (tui_restore_gdbout): Remove.
10066 (tui_register_format): Use scoped_restore.
10067
10068 2017-08-03 Tom Tromey <tom@tromey.com>
10069
10070 * reverse.c (exec_direction_default): Remove.
10071 (exec_reverse_once): Use scoped_restore.
10072 * remote.c (restore_remote_timeout): Remove.
10073 (remote_flash_erase, remote_flash_write, remote_flash_done)
10074 (readchar, remote_serial_write): Use scoped_restore.
10075 * cli/cli-script.c (struct source_cleanup_lines_args)
10076 (source_cleanup_lines): Remove.
10077 (script_from_file): Use scoped_restore.
10078 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
10079 (source_command): Use scoped_restore.
10080
10081 2017-08-03 Tom Tromey <tom@tromey.com>
10082
10083 * utils.h (make_cleanup_free_so): Remove.
10084 * utils.c (do_free_so, make_cleanup_free_so): Remove.
10085 * solist.h (struct so_deleter): New.
10086 (so_list_up): New typedef.
10087 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
10088
10089 2017-08-03 Tom Tromey <tom@tromey.com>
10090
10091 * utils.h (make_cleanup_restore_current_language): Remove.
10092 * utils.c (do_restore_current_language)
10093 (make_cleanup_restore_current_language): Remove.
10094 * parse.c (parse_exp_in_context_1)
10095 (parse_expression_with_language): Use
10096 scoped_restore_current_language.
10097 * mi/mi-main.c (mi_cmd_execute): Use
10098 scoped_restore_current_language.
10099 * language.h (scoped_restore_current_language): New class.
10100
10101 2017-08-03 Tom Tromey <tom@tromey.com>
10102
10103 * compile/compile.c (cleanup_unlink_file): Remove.
10104 (compile_to_object): Use gdb::unlinker.
10105 (eval_compile_command): Likewise.
10106
10107 2017-08-03 Tom Tromey <tom@tromey.com>
10108
10109 * utils.h (make_cleanup_fclose): Remove.
10110 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
10111
10112 2017-08-03 Tom Tromey <tom@tromey.com>
10113
10114 * top.c (open_terminal_stream): Return gdb_file_up.
10115 (new_ui_command): Update.
10116
10117 2017-08-03 Tom Tromey <tom@tromey.com>
10118
10119 * source.c (print_source_lines_base, forward_search_command)
10120 (reverse_search_command): Use gdb_file_up.
10121
10122 2017-08-03 Tom Tromey <tom@tromey.com>
10123
10124 * fbsd-nat.c (fbsd_find_memory_regions): Update.
10125
10126 2017-08-03 Tom Tromey <tom@tromey.com>
10127
10128 * cli/cli-cmds.c (find_and_open_script): Change return type.
10129 Remove "streamp" and "full_path" parameters.
10130 (source_script_with_search): Update.
10131 * auto-load.c (source_script_file): Update.
10132 * cli/cli-cmds.h (find_and_open_script): Change type.
10133 (open_script): New struct.
10134
10135 2017-08-03 Tom Tromey <tom@tromey.com>
10136
10137 * xml-support.c (xml_fetch_content_from_file): Update.
10138 * ui-file.c (stdio_file::open): Update.
10139 * tracefile-tfile.c (tfile_start): Update.
10140 * remote.c (remote_file_put, remote_file_get): Update.
10141 * nat/linux-procfs.c (linux_proc_get_int)
10142 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
10143 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
10144 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
10145 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
10146 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
10147 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
10148 * linux-nat.c (linux_proc_pending_signals): Update.
10149 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
10150 (file_closer): Remove.
10151 * compile/compile.c (compile_to_object): Update.
10152 * common/filestuff.h (struct gdb_file_deleter): New.
10153 (gdb_file_up): New typedef.
10154 (gdb_fopen_cloexec): Change return type.
10155 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
10156 * cli/cli-dump.c (fopen_with_cleanup): Remove.
10157 (dump_binary_file, restore_binary_file): Update.
10158 * auto-load.c (auto_load_objfile_script_1): Update.
10159
10160 2017-08-03 Tom Tromey <tom@tromey.com>
10161
10162 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
10163 (info_static_tracepoint_markers_command): Likewise.
10164 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
10165 * skip.c (skip_info): Use ui_out_emit_table.
10166 * progspace.c (print_program_space): Use ui_out_emit_table.
10167 * osdata.c (info_osdata): Use ui_out_emit_table.
10168 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
10169 ui_out_emit_table.
10170 * linux-thread-db.c (info_auto_load_libthread_db): Use
10171 ui_out_emit_table.
10172 * inferior.c (print_inferior): Use ui_out_emit_table.
10173 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
10174 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
10175 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
10176 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
10177 * ui-out.h (class ui_out_emit_table): New.
10178
10179 2017-08-02 Maciej W. Rozycki <macro@imgtec.com>
10180
10181 * mips-tdep.c (mips_fpu_type_str): New function.
10182 (mips_dump_tdep): Call it.
10183
10184 2017-08-01 Maciej W. Rozycki <macro@imgtec.com>
10185
10186 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
10187 `->mips_fpu_type'.
10188
10189 2017-07-31 Xavier Roirand <roirand@adacore.com>
10190
10191 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
10192
10193 2017-07-27 Xavier Roirand <roirand@adacore.com>
10194
10195 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
10196
10197 2017-07-26 Yao Qi <yao.qi@linaro.org>
10198
10199 * cli/cli-cmds.c (maintenancechecklist): New variable.
10200 * gdbcmd.h (maintenancechecklist): Declare it.
10201 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
10202 Call i386_linux_read_description with different masks.
10203 * maint.c (maintenance_check_command): New function.
10204 (_initialize_maint_cmds): Call add_prefix_cmd.
10205 * target-descriptions.c (tdesc_reg): override operator != and ==.
10206 (tdesc_type): Likewise.
10207 (tdesc_feature): Likewise.
10208 (target_desc): Likewise.
10209 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
10210 (maintenance_check_xml_descriptions): New function.
10211 (_initialize_target_descriptions) Add command "xml-descriptions".
10212 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
10213
10214 2017-07-26 Yao Qi <yao.qi@linaro.org>
10215
10216 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
10217 Include features/i386/32bit-*.c.
10218 (i386_linux_read_description): Generate target description if it
10219 doesn't exist.
10220 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
10221 functions.
10222 * features/i386/32bit-linux.c: Re-generated.
10223 * features/i386/32bit-sse.c: Likewise.
10224 * target-descriptions.c (print_c_feature::visit): Print code to
10225 set register number if needed.
10226 (print_c_feature) <m_next_regnum>: New field.
10227
10228 2017-07-26 Yao Qi <yao.qi@linaro.org>
10229
10230 * features/Makefile (CFILES): Rename with TDESC_CFILES.
10231 (FEATURE_XMLFILES): New.
10232 (FEATURE_CFILES): New.
10233 New rules.
10234 (clean-cfiles): Remove generated c files.
10235 * features/i386/32bit-avx.c: Generated.
10236 * features/i386/32bit-avx512.c: Generated.
10237 * features/i386/32bit-core.c: Generated.
10238 * features/i386/32bit-linux.c: Generated.
10239 * features/i386/32bit-mpx.c: Generated.
10240 * features/i386/32bit-pkeys.c: Generated.
10241 * features/i386/32bit-sse.c: Generated.
10242 * target-descriptions.c: Include algorithm.
10243 (tdesc_element_visitor): Add method visit_end.
10244 (print_c_tdesc): Implement visit_end.
10245 (print_c_tdesc:: m_filename_after_features): Move it to
10246 protected.
10247 (print_c_feature): New class.
10248 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
10249 name starts with "i386/32bit-".
10250
10251 2017-07-26 Yao Qi <yao.qi@linaro.org>
10252
10253 * target-descriptions.c (tdesc_element_visitor): New class.
10254 (tdesc_element): New class.
10255 (tdesc_reg): Inherit from tdesc_element.
10256 (tdesc_reg::accept): New function.
10257 (tdesc_type): Inherit from tdesc_element.
10258 (tdesc_type::accept): New function.
10259 (tdesc_feature): Inherit from tdesc_element.
10260 (tdesc_feature::accept): New function.
10261 (target_desc): Inherit from tdesc_element.
10262 (target_desc::target_desc): New.
10263 (target_desc::~target_desc): New.
10264 (target_desc::accept): New.
10265 (allocate_target_description): Use new.
10266 (free_target_description): Use delete.
10267 (print_c_tdesc): New class.
10268 (maint_print_c_tdesc_cmd): Adjust.
10269
10270 * features/aarch64.c: Re-generated.
10271 * features/arc-arcompact.c: Re-generated.
10272 * features/arc-v2.c: Re-generated.
10273 * features/arm/arm-with-iwmmxt.c: Re-generated.
10274 * features/arm/arm-with-m.c: Re-generated.
10275 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
10276 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
10277 * features/arm/arm-with-neon.c: Re-generated.
10278 * features/arm/arm-with-vfpv2.c: Re-generated.
10279 * features/arm/arm-with-vfpv3.c: Re-generated.
10280 * features/i386/amd64-avx-avx512.c: Re-generated.
10281 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
10282 * features/i386/amd64-avx.c: Re-generated.
10283 * features/i386/amd64-avx-linux.c: Re-generated.
10284 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
10285 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
10286 * features/i386/amd64-avx-mpx.c: Re-generated.
10287 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
10288 * features/i386/amd64.c: Re-generated.
10289 * features/i386/amd64-linux.c: Re-generated.
10290 * features/i386/amd64-mpx.c: Re-generated.
10291 * features/i386/amd64-mpx-linux.c: Re-generated.
10292 * features/i386/i386-avx-avx512.c: Re-generated.
10293 * features/i386/i386-avx-avx512-linux.c: Re-generated.
10294 * features/i386/i386-avx.c: Re-generated.
10295 * features/i386/i386-avx-linux.c: Re-generated.
10296 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
10297 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
10298 * features/i386/i386-avx-mpx.c: Re-generated.
10299 * features/i386/i386-avx-mpx-linux.c: Re-generated.
10300 * features/i386/i386.c: Re-generated.
10301 * features/i386/i386-linux.c: Re-generated.
10302 * features/i386/i386-mmx.c: Re-generated.
10303 * features/i386/i386-mmx-linux.c: Re-generated.
10304 * features/i386/i386-mpx.c: Re-generated.
10305 * features/i386/i386-mpx-linux.c: Re-generated.
10306 * features/i386/x32-avx-avx512.c: Re-generated.
10307 * features/i386/x32-avx-avx512-linux.c: Re-generated.
10308 * features/i386/x32-avx.c: Re-generated.
10309 * features/i386/x32-avx-linux.c: Re-generated.
10310 * features/i386/x32.c: Re-generated.
10311 * features/i386/x32-linux.c: Re-generated.
10312 * features/microblaze.c: Re-generated.
10313 * features/microblaze-with-stack-protect.c: Re-generated.
10314 * features/mips64-dsp-linux.c: Re-generated.
10315 * features/mips64-linux.c: Re-generated.
10316 * features/mips-dsp-linux.c: Re-generated.
10317 * features/mips-linux.c: Re-generated.
10318 * features/nds32.c: Re-generated.
10319 * features/nios2.c: Re-generated.
10320 * features/nios2-linux.c: Re-generated.
10321 * features/rs6000/powerpc-32.c: Re-generated.
10322 * features/rs6000/powerpc-32l.c: Re-generated.
10323 * features/rs6000/powerpc-403.c: Re-generated.
10324 * features/rs6000/powerpc-403gc.c : Re-generated.
10325 * features/rs6000/powerpc-405.c: Re-generated.
10326 * features/rs6000/powerpc-505.c: Re-generated.
10327 * features/rs6000/powerpc-601.c: Re-generated.
10328 * features/rs6000/powerpc-602.c: Re-generated.
10329 * features/rs6000/powerpc-603.c: Re-generated.
10330 * features/rs6000/powerpc-604.c: Re-generated.
10331 * features/rs6000/powerpc-64.c: Re-generated.
10332 * features/rs6000/powerpc-64l.c: Re-generated.
10333 * features/rs6000/powerpc-7400.c: Re-generated.
10334 * features/rs6000/powerpc-750.c: Re-generated.
10335 * features/rs6000/powerpc-860.c: Re-generated.
10336 * features/rs6000/powerpc-altivec32.c: Re-generated.
10337 * features/rs6000/powerpc-altivec32l.c: Re-generated.
10338 * features/rs6000/powerpc-altivec64.c: Re-generated.
10339 * features/rs6000/powerpc-altivec64l.c: Re-generated.
10340 * features/rs6000/powerpc-cell32l.c: Re-generated.
10341 * features/rs6000/powerpc-cell64l.c: Re-generated.
10342 * features/rs6000/powerpc-e500.c: Re-generated.
10343 * features/rs6000/powerpc-e500l.c: Re-generated.
10344 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
10345 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
10346 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
10347 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
10348 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
10349 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
10350 * features/rs6000/powerpc-vsx32.c: Re-generated.
10351 * features/rs6000/powerpc-vsx32l.c: Re-generated.
10352 * features/rs6000/powerpc-vsx64.c: Re-generated.
10353 * features/rs6000/powerpc-vsx64l.c: Re-generated.
10354 * features/rs6000/rs6000.c: Re-generated.
10355 * features/s390-linux32.c: Re-generated.
10356 * features/s390-linux32v1.c: Re-generated.
10357 * features/s390-linux32v2.c: Re-generated.
10358 * features/s390-linux64.c: Re-generated.
10359 * features/s390-linux64v1.c: Re-generated.
10360 * features/s390-linux64v2.c: Re-generated.
10361 * features/s390-te-linux64.c: Re-generated.
10362 * features/s390-tevx-linux64.c: Re-generated.
10363 * features/s390-vx-linux64.c: Re-generated.
10364 * features/s390x-linux64.c: Re-generated.
10365 * features/s390x-linux64v1.c: Re-generated.
10366 * features/s390x-linux64v2.c: Re-generated.
10367 * features/s390x-te-linux64.c: Re-generated.
10368 * features/s390x-tevx-linux64.c: Re-generated.
10369 * features/s390x-vx-linux64.c: Re-generated.
10370 * features/sparc/sparc32-solaris.c: Re-generated.
10371 * features/sparc/sparc64-solaris.c: Re-generated.
10372 * features/tic6x-c62x.c: Re-generated.
10373 * features/tic6x-c62x-linux.c: Re-generated.
10374 * features/tic6x-c64x.c: Re-generated.
10375 * features/tic6x-c64x-linux.c: Re-generated.
10376 * features/tic6x-c64xp.c: Re-generated.
10377 * features/tic6x-c64xp-linux.c: Re-generated.
10378
10379 2017-07-26 Yao Qi <yao.qi@linaro.org>
10380
10381 * i386-linux-tdep.c (i386_linux_read_description): New function.
10382 (i386_linux_core_read_description): Call
10383 i386_linux_read_description.
10384 * i386-linux-tdep.h (i386_linux_read_description): Declare.
10385 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
10386 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
10387 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
10388 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
10389 * x86-linux-nat.c (x86_linux_read_description): Call
10390 i386_linux_read_description.
10391
10392 2017-07-26 Yao Qi <yao.qi@linaro.org>
10393
10394 * NEWS: Mention it.
10395 * features/Makefile (%.c: %.xml): Pass the xml file name to
10396 command "maint print c-tdesc".
10397 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
10398 name from 'arg'.
10399
10400 2017-07-26 Yao Qi <yao.qi@linaro.org>
10401
10402 * target-descriptions.c (target_desc): Add ctor and dtor. Do
10403 in-class initialization.
10404 (tdesc_create_feature): Call new instead of XCNEW.
10405 (free_target_description): Ue delete.
10406
10407 2017-07-25 John Baldwin <jhb@FreeBSD.org>
10408
10409 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
10410
10411 2017-07-25 Yao Qi <yao.qi@linaro.org>
10412
10413 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
10414 constant.
10415 (amd64_x32_init_abi): Likewise.
10416 * amd64-tdep.h (amd64_init_abi): Update declaration.
10417 (amd64_x32_init_abi): Likewise.
10418
10419 2017-07-25 Yao Qi <yao.qi@linaro.org>
10420
10421 PR tdep/21717
10422 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
10423 condition for FPSCR.
10424 (arm_linux_store_inferior_registers): Likewise.
10425
10426 2017-07-22 Tom Tromey <tom@tromey.com>
10427
10428 * break-catch-syscall.c (struct catch_syscall_inferior_data)
10429 <syscalls_counts>: Now a std::vector.
10430 (get_catch_syscall_inferior_data): Use "new".
10431 (catch_syscall_inferior_data_cleanup): Use "delete".
10432 (insert_catch_syscall, remove_catch_syscall)
10433 (clear_syscall_counts): Update.
10434
10435 2017-07-22 Tom Tromey <tom@tromey.com>
10436
10437 * break-catch-syscall.c (syscall_catchpoint)
10438 <syscalls_to_be_caught>: Now a std::vector<int>
10439 (~syscall_catchpoint): Remove.
10440 (insert_catch_syscall, remove_catch_syscall)
10441 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
10442 (print_mention_catch_syscall, print_recreate_catch_syscall):
10443 Update.
10444 (create_syscall_event_catchpoint): Change type of "filter"
10445 parameter.
10446 (catch_syscall_split_args): Return a std::vector.
10447 (catch_syscall_command_1, catching_syscall_number_1): Update.
10448
10449 2017-07-22 Tom Tromey <tom@tromey.com>
10450
10451 * break-catch-throw.c (struct exception_catchpoint)
10452 <exception_rx>: Now a std::string.
10453 (~exception_catchpoint): Remove.
10454 (print_one_detail_exception_catchpoint): Update.
10455 (handle_gnu_v3_exceptions): Change type of except_rx.
10456 (extract_exception_regexp): Return a std::string.
10457 (catch_exception_command_1): Update.
10458
10459 2017-07-22 Tom Tromey <tom@tromey.com>
10460
10461 * break-catch-sig.c (gdb_signal_type): Remove typedef.
10462 (struct signal_catchpoint) <signals_to_be_caught>: Now a
10463 std::vector.
10464 <catch_all>: Now a bool.
10465 (~signal_catchpoint): Remove.
10466 (signal_catchpoint_insert_location)
10467 (signal_catchpoint_remove_location)
10468 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
10469 (signal_catchpoint_print_mention)
10470 (signal_catchpoint_print_recreate)
10471 (signal_catchpoint_explains_signal): Update.
10472 (create_signal_catchpoint): Change type of "filter" and
10473 "catch_all".
10474 (catch_signal_split_args): Return a std::vector. Change type of
10475 "catch_all".
10476 (catch_signal_command): Update.
10477
10478 2017-07-20 Pedro Alves <palves@redhat.com>
10479
10480 * ada-lang.c (ada_language_defn): Make extern.
10481 (_initialize_ada_language): Remove add_language call.
10482 * c-lang.c (c_language_defn, cplus_language_defn)
10483 (asm_language_defn, minimal_language_defn): Make extern.
10484 (_initialize_c_language): Delete.
10485 * completer.c (compare_cstrings): Delete, moved to utils.h.
10486 * d-lang.c (d_language_defn): Make extern.
10487 (_initialize_d_language): Remove add_language calls.
10488 * defs.h (enum language): Add comment.
10489 * f-lang.c (f_language_defn): Make extern.
10490 (_initialize_f_language): Remove add_language call.
10491 * go-lang.c (go_language_defn): Make extern.
10492 (_initialize_go_language): Remove add_language call.
10493 * language.c: Include <algorithm>.
10494 (languages): Redefine as const array.
10495 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
10496 (set_language_command): Handle "local". Use for-range loop.
10497 (set_language): Remove loop.
10498 (language_enum): Rewrite.
10499 (language_def, language_str): Remove loops.
10500 (add_language): Delete.
10501 (add_set_language_command): New, based on add_languages.
10502 (skip_language_trampoline): Adjust.
10503 (local_language_defn): Delete.
10504 (language_gdbarch_post_init): Adjust.
10505 (_initialize_language): Remove add_language calls. Call
10506 add_set_language_command.
10507 * language.h (add_language): Delete.
10508 (auto_language_defn)
10509 (unknown_language_defn, minimal_language_defn, ada_language_defn)
10510 (asm_language_defn, c_language_defn, cplus_language_defn)
10511 (d_language_defn, f_language_defn, go_language_defn)
10512 (m2_language_defn, objc_language_defn, opencl_language_defn)
10513 (pascal_language_defn, rust_language_defn): Declare.
10514 * m2-lang.c (m2_language_defn): Make extern.
10515 (_initialize_m2_language): Remove add_language call.
10516 * objc-lang.c (objc_language_defn): Make extern.
10517 (_initialize_objc_language): Remove add_language call.
10518 * opencl-lang.c (opencl_language_defn): Make extern.
10519 (_initialize_opencl_language): Remove add_language call.
10520 * p-lang.c (pascal_language_defn): Make extern.
10521 (_initialize_pascal_language): Delete.
10522 * rust-lang.c (rust_language_defn): Make extern.
10523 (_initialize_rust_language): Delete.
10524 * utils.h (compare_cstrings): New static inline function.
10525
10526 2017-07-20 Pedro Alves <palves@redhat.com>
10527
10528 * ada-lang.c (ada_to_fixed_type_1): Adjust.
10529 (get_var_value): Constify parameters.
10530 (get_int_var_value): Change prototype.
10531 (to_fixed_range_type): Adjust.
10532 * ada-lang.h (get_int_var_value): Change prototype.
10533
10534 2017-07-20 Pedro Alves <palves@redhat.com>
10535
10536 * dwarf2read.c (dw2_lookup_symbol): Use
10537 SYMBOL_MATCHES_SEARCH_NAME.
10538 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
10539
10540 2017-07-20 Pedro Alves <palves@redhat.com>
10541
10542 * block.c (block_iter_name_step, block_iter_name_first)
10543 (block_iter_name_next): Delete.
10544 (block_lookup_symbol_primary): Adjust to use
10545 dict_iter_match_first/dict_iter_match_next.
10546 * block.h (block_iter_name_first, block_iter_name_next): Delete
10547 declarations.
10548 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
10549 dict_iter_match_first/dict_iter_match_next.
10550
10551 2017-07-20 Pedro Alves <palves@redhat.com>
10552
10553 * cp-support.c (cp_find_first_component_aux): Add missing case for
10554 end of string.
10555
10556 2017-07-18 David Blaikie <dblaikie@gmail.com>
10557
10558 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
10559 of dwo_cu's dwo_file.
10560
10561 2017-07-18 Yao Qi <yao.qi@linaro.org>
10562
10563 * remote.c (store_registers_using_G): Remove one line comment.
10564
10565 2017-07-18 Yao Qi <yao.qi@linaro.org>
10566
10567 * regcache.c (regcache_cpy): Simplify it.
10568 (regcache::cpy_no_passthrough): Remove it.
10569 * regcache.h (cpy_no_passthrough): Remove it.
10570 (regcache_dup, regcache_cpy): Update comments.
10571
10572 2017-07-18 Pedro Alves <palves@redhat.com>
10573
10574 * remote-sim.c (sim_command_completer): Adjust to work with a
10575 completion_tracker instead of a VEC.
10576
10577 2017-07-17 Pedro Alves <palves@redhat.com>
10578
10579 * completer.c (complete_source_filenames): New function.
10580 (complete_address_and_linespec_locations): New function.
10581 (location_completer): Use complete_address_and_linespec_locations.
10582 (completion_tracker::build_completion_result): Honor the tracker's
10583 request to suppress append.
10584 * completer.h (completion_tracker::suppress_append_ws)
10585 (completion_tracker::set_suppress_append_ws): New methods.
10586 (completion_tracker::m_suppress_append_ws): New field.
10587 (complete_source_filenames): New declaration.
10588 * linespec.c (linespec_complete_what): New.
10589 (struct ls_parser) <complete_what, completion_word,
10590 completion_quote_char, completion_quote_end, completion_tracker>:
10591 New fields.
10592 (string_find_incomplete_keyword_at_end): New.
10593 (linespec_lexer_lex_string): Record quote char. If in completion
10594 mode, don't throw.
10595 (linespec_lexer_consume_token): Advance the completion word point.
10596 (linespec_lexer_peek_token): Save/restore completion info.
10597 (save_stream_and_consume_token): New.
10598 (set_completion_after_number): New.
10599 (linespec_parse_basic): Set what to complete next depending on
10600 token. Handle function and label completions specially.
10601 (parse_linespec): Disable objc shortcut in completion mode. Set
10602 what to complete next depending on token type. Skip keyword if in
10603 completion mode.
10604 (complete_linespec_component, linespec_complete): New.
10605 * linespec.h (linespec_complete): Declare.
10606
10607 2017-07-17 Pedro Alves <palves@redhat.com>
10608
10609 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
10610 Handle 'operator<' / 'operator<<'.
10611
10612 2017-07-17 Pedro Alves <palves@redhat.com>
10613
10614 * completer.c (collect_explicit_location_matches): Handle
10615 MATCH_LABEL.
10616 (convert_explicit_location_to_linespec): New, factored out from
10617 ...
10618 (convert_explicit_location_to_sals): ... this.
10619 (complete_label): New.
10620 (linespec_complete_label, find_label_symbols_in_block): New.
10621 (find_label_symbols): Add completion_mode parameter and adjust to
10622 call find_label_symbols_in_block.
10623 * linespec.h (linespec_complete_label): Declare.
10624
10625 2017-07-17 Pedro Alves <palves@redhat.com>
10626
10627 * ada-lang.c (ada_collect_symbol_completion_matches): Add
10628 complete_symbol_mode parameter.
10629 * cli/cli-cmds.c (complete_command): Get the completion result out
10630 of the handle_brkchars tracker if used a custom word point.
10631 * completer.c: Include "linespec.h".
10632 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
10633 (advance_to_expression_complete_word_point): New.
10634 (completion_tracker::completes_to_completion_word): New.
10635 (complete_files_symbols): Pass down
10636 complete_symbol_mode::EXPRESSION.
10637 (explicit_options, probe_options): New.
10638 (collect_explicit_location_matches): Complete on the
10639 explictit_loc->foo instead of word. Use
10640 linespec_complete_function. Handle MATCH_LINE. Handle offering
10641 keyword and options completions.
10642 (backup_text_ptr): Delete.
10643 (skip_keyword): New.
10644 (complete_explicit_location): Remove 'word' parameter. Add
10645 language, quoted_arg_start and quoted_arg_end parameters.
10646 Rewrite, parsing left to right.
10647 (location_completer): Rewrite.
10648 (location_completer_handle_brkchars): New function.
10649 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
10650 (enum complete_line_internal_reason): Adjust comments.
10651 (completion_tracker::discard_completions): New.
10652 (completer_handle_brkchars_func_for_completer): Handle
10653 location_completer.
10654 (gdb_custom_word_point_brkchars)
10655 (gdb_org_rl_basic_quote_characters): New.
10656 (gdb_completion_word_break_characters_throw)
10657 (completion_find_completion_word): Handle trackers that use a
10658 custom word point.
10659 (completion_tracker::advance_custom_word_point_by): New.
10660 (completion_tracker::build_completion_result): Don't rely on
10661 readline appending the quote char.
10662 (gdb_rl_attempted_completion_function_throw): Handle trackers that
10663 use a custom word point.
10664 (gdb_rl_attempted_completion_function): Restore
10665 rl_basic_quote_characters.
10666 * completer.h (class completion_tracker): Extend intro comment.
10667 (completion_tracker::set_quote_char)
10668 (completion_tracker::quote_char)
10669 (completion_tracker::set_use_custom_word_point)
10670 (completion_tracker::use_custom_word_point)
10671 (completion_tracker::custom_word_point)
10672 (completion_tracker::set_custom_word_point)
10673 (completion_tracker::advance_custom_word_point_by)
10674 (completion_tracker::completes_to_completion_word)
10675 (completion_tracker::discard_completions): New methods.
10676 (completion_tracker::m_quote_char)
10677 (completion_tracker::m_use_custom_word_point)
10678 (completion_tracker::m_custom_word_point): New fields.
10679 (advance_to_expression_complete_word_point): Declare.
10680 * f-lang.c (f_collect_symbol_completion_matches): Add
10681 complete_symbol_mode parameter.
10682 * language.h (struct language_defn)
10683 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
10684 parameter.
10685 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
10686 (linespec_complete_function): New function.
10687 (linespec_lexer_lex_keyword): Adjust.
10688 * linespec.h (linespec_keywords, linespec_complete_function): New
10689 declarations.
10690 * location.c (find_end_quote): New function.
10691 (explicit_location_lex_one): Add explicit_completion_info
10692 parameter. Save quoting info. Don't throw if being called for
10693 completion. Don't handle Ada operators here.
10694 (is_cp_operator, skip_op_false_positives, first_of)
10695 (explicit_location_lex_one_function): New function.
10696 (string_to_explicit_location): Replace 'dont_throw' parameter with
10697 an explicit_completion_info pointer parameter. Handle it. Don't
10698 use explicit_location_lex_one to lex function names. Use
10699 explicit_location_lex_one_function instead.
10700 * location.h (struct explicit_completion_info): New.
10701 (string_to_explicit_location): Replace 'dont_throw' parameter with
10702 an explicit_completion_info pointer parameter.
10703 * symtab.c (default_collect_symbol_completion_matches_break_on):
10704 Add complete_symbol_mode parameter. Handle LINESPEC mode.
10705 (default_collect_symbol_completion_matches)
10706 (collect_symbol_completion_matches): Add complete_symbol_mode
10707 parameter.
10708 (collect_symbol_completion_matches_type): Pass down
10709 complete_symbol_mode::EXPRESSION.
10710 (collect_file_symbol_completion_matches): Add complete_symbol_mode
10711 parameter. Handle LINESPEC mode.
10712 * symtab.h (complete_symbol_mode): New.
10713 (default_collect_symbol_completion_matches_break_on)
10714 (default_collect_symbol_completion_matches)
10715 (collect_symbol_completion_matches)
10716 (collect_file_symbol_completion_matches): Add complete_symbol_mode
10717 parameter.
10718
10719 2017-07-17 Pedro Alves <palves@redhat.com>
10720
10721 * utils.c (enum class strncmp_iw_mode): New.
10722 (strcmp_iw): Rename to ...
10723 (strncmp_iw_with_mode): ... this. Add string2_len and mode
10724 parameters. Handle them.
10725 (strncmp_iw): New.
10726 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
10727 * utils.h (strncmp_iw): Declare.
10728 (strcmp_iw): Move describing comments here.
10729
10730 2017-07-17 Pedro Alves <palves@redhat.com>
10731
10732 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
10733 CP_OPERATOR_STR.
10734 * c-typeprint.c (is_type_conversion_operator): Use
10735 CP_OPERATOR_STR.
10736 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
10737 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
10738 CP_OPERATOR_LEN.
10739 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
10740 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
10741 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
10742 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
10743 CP_OPERATOR_STR.
10744 * location.c: Include "cp-support.h".
10745 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
10746 CP_OPERATOR_STR.
10747 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
10748 CP_OPERATOR_LEN.
10749
10750 2017-07-17 Pedro Alves <palves@redhat.com>
10751
10752 * cli/cli-cmds.c (complete_command): Use a completion tracker
10753 along with completion_find_completion_word for handle_brkchars
10754 phase.
10755 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
10756 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
10757 (struct gdb_rl_completion_word_info): New.
10758 (gdb_rl_find_completion_word): New.
10759 (completion_find_completion_word): New.
10760 * completer.h (completion_find_completion_word): Declare.
10761
10762 2017-07-17 Pedro Alves <palves@redhat.com>
10763
10764 * ada-lang.c (symbol_completion_match): Adjust comments.
10765 (symbol_completion_add): Replace vector parameter with
10766 completion_tracker parameter. Use it.
10767 (ada_make_symbol_completion_list): Rename to...
10768 (ada_collect_symbol_completion_matches): ... this. Add
10769 completion_tracker parameter and use it.
10770 (ada_language_defn): Adjust.
10771 * break-catch-syscall.c (catch_syscall_completer): Adjust
10772 prototype and work with completion_tracker instead of VEC.
10773 * breakpoint.c (condition_completer): Adjust prototype and work
10774 with completion_tracker instead of VEC.
10775 * c-lang.c (c_language_defn, cplus_language_defn)
10776 (asm_language_defn, minimal_language_defn): Adjust to renames.
10777 * cli/cli-cmds.c (complete_command): Rework using
10778 completion_tracker. Catch exceptions when completing.
10779 * cli/cli-decode.c (integer_unlimited_completer)
10780 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
10781 with completion_tracker instead of VEC.
10782 * command.h (struct completion_tracker): Forward declare.
10783 (completer_ftype, completer_handle_brkchars_ftype): Change
10784 types.
10785 (complete_on_cmdlist, complete_on_enum): Adjust.
10786 * completer.c: Include <algorithm>.
10787 (struct gdb_completer_state): New.
10788 (current_completion): New global.
10789 (readline_line_completion_function): Delete.
10790 (noop_completer, filename_completer)
10791 (filename_completer_handle_brkchars, complete_files_symbols)
10792 (linespec_location_completer): Adjust to work with a
10793 completion_tracker instead of a VEC.
10794 (string_or_empty): New.
10795 (collect_explicit_location_matches): Adjust to work with a
10796 completion_tracker instead of a VEC.
10797 (explicit_location_completer): Rename to ...
10798 (complete_explicit_location): ... this and adjust to work with a
10799 completion_tracker instead of a VEC.
10800 (location_completer): Adjust to work with a completion_tracker
10801 instead of a VEC.
10802 (add_struct_fields): Adjust to work with a completion_list instead
10803 of VEC.
10804 (expression_completer): Rename to ...
10805 (complete_expression): ... this and adjust to work with a
10806 completion_tracker instead of a VEC. Use complete_files_symbols.
10807 (expression_completer): Reimplement on top of complete_expression.
10808 (symbol_completer): Adjust to work with a completion_tracker
10809 instead of a VEC.
10810 (enum complete_line_internal_reason): Add describing comments.
10811 (complete_line_internal_normal_command): Adjust to work with a
10812 completion_tracker instead of a VEC.
10813 (complete_line_internal): Rename to ...
10814 (complete_line_internal_1): ... this and adjust to work with a
10815 completion_tracker instead of a VEC. Assert TEXT is NULL in the
10816 handle_brkchars phase.
10817 (new_completion_tracker): Delete.
10818 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
10819 complete_line_internal_1.
10820 (free_completion_tracker): Delete.
10821 (INITIAL_COMPLETION_HTAB_SIZE): New.
10822 (completion_tracker::completion_tracker)
10823 (completion_tracker::~completion_tracker): New.
10824 (maybe_add_completion): Delete.
10825 (completion_tracker::maybe_add_completion)
10826 (completion_tracker::add_completion)
10827 (completion_tracker::add_completions): New.
10828 (throw_max_completions_reached_error): Delete.
10829 (complete_line): Adjust to work with a completion_tracker instead
10830 of a VEC. Don't create a completion_tracker_t or check for max
10831 completions here.
10832 (command_completer, command_completer_handle_brkchars)
10833 (signal_completer, reg_or_group_completer_1)
10834 (reg_or_group_completer, default_completer_handle_brkchars):
10835 Adjust to work with a completion_tracker.
10836 (gdb_completion_word_break_characters_throw): New.
10837 (gdb_completion_word_break_characters): Reimplement.
10838 (line_completion_function): Delete.
10839 (completion_tracker::recompute_lowest_common_denominator)
10840 (expand_preserving_ws)
10841 (completion_tracker::build_completion_result)
10842 (completion_result::completion_result)
10843 (completion_result::completion_result)
10844 (completion_result::~completion_result)
10845 (completion_result::completion_result)
10846 (completion_result::release_match_list, compare_cstrings)
10847 (completion_result::sort_match_list)
10848 (completion_result::reset_match_list)
10849 (gdb_rl_attempted_completion_function_throw)
10850 (gdb_rl_attempted_completion_function): New.
10851 * completer.h (completion_list, struct completion_result)
10852 (class completion_tracker): New.
10853 (complete_line): Add completion_tracker parameter.
10854 (readline_line_completion_function): Delete.
10855 (gdb_rl_attempted_completion_function): New.
10856 (noop_completer, filename_completer, expression_completer)
10857 (location_completer, symbol_completer, command_completer)
10858 (signal_completer, reg_or_group_completer): Update prototypes.
10859 (completion_tracker_t, new_completion_tracker)
10860 (make_cleanup_free_completion_tracker): Delete.
10861 (enum maybe_add_completion_enum): Delete.
10862 (maybe_add_completion): Delete.
10863 (throw_max_completions_reached_error): Delete.
10864 * corefile.c (complete_set_gnutarget): Adjust to work with a
10865 completion_tracker instead of a VEC.
10866 * cp-abi.c (cp_abi_completer): Adjust to work with a
10867 completion_tracker instead of a VEC.
10868 * d-lang.c (d_language_defn): Adjust.
10869 * disasm.c (disassembler_options_completer): Adjust to work with a
10870 completion_tracker instead of a VEC.
10871 * f-lang.c (f_make_symbol_completion_list): Rename to ...
10872 (f_collect_symbol_completion_matches): ... this. Adjust to work
10873 with a completion_tracker instead of a VEC.
10874 (f_language_defn): Adjust.
10875 * go-lang.c (go_language_defn): Adjust.
10876 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
10877 Adjust to work with a completion_tracker instead of a VEC.
10878 * infrun.c (handle_completer): Likewise.
10879 * interps.c (interpreter_completer): Likewise.
10880 * interps.h (interpreter_completer): Likewise.
10881 * language.c (unknown_language_defn, auto_language_defn)
10882 (local_language_defn): Adjust.
10883 * language.h (language_defn::la_make_symbol_completion_list):
10884 Rename to ...
10885 (language_defn::la_collect_symbol_completion_matches): ... this
10886 and adjust to work with a completion_tracker instead of a VEC.
10887 * m2-lang.c (m2_language_defn): Adjust.
10888 * objc-lang.c (objc_language_defn): Adjust.
10889 * opencl-lang.c (opencl_language_defn): Adjust.
10890 * p-lang.c (pascal_language_defn): Adjust.
10891 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
10892 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
10893 with a completion_tracker.
10894 * rust-lang.c (rust_language_defn): Adjust.
10895 * symtab.c (free_completion_list, do_free_completion_list)
10896 (return_val, completion_tracker): Delete.
10897 (completion_list_add_name, completion_list_add_symbol)
10898 (completion_list_add_msymbol, completion_list_objc_symbol)
10899 (completion_list_add_fields, add_symtab_completions): Add
10900 completion_tracker parameter and use it.
10901 (default_make_symbol_completion_list_break_on_1): Rename to...
10902 (default_collect_symbol_completion_matches_break_on): ... this.
10903 Add completion_tracker parameter and use it instead of allocating
10904 a completion tracker here.
10905 (default_make_symbol_completion_list_break_on): Delete old
10906 implementation.
10907 (default_make_symbol_completion_list): Delete.
10908 (default_collect_symbol_completion_matches): New.
10909 (make_symbol_completion_list): Delete.
10910 (collect_symbol_completion_matches): New.
10911 (make_symbol_completion_type): Rename to ...
10912 (collect_symbol_completion_matches_type): ... this. Add
10913 completion_tracker parameter and use it instead of VEC.
10914 (make_file_symbol_completion_list_1): Rename to...
10915 (collect_file_symbol_completion_matches): ... this. Add
10916 completion_tracker parameter and use it instead of VEC.
10917 (make_file_symbol_completion_list): Delete.
10918 (add_filename_to_list): Use completion_list instead of a VEC.
10919 (add_partial_filename_data::list): Now a completion_list.
10920 (make_source_files_completion_list): Work with a completion_list
10921 instead of a VEC.
10922 * symtab.h: Include "completer.h".
10923 (default_make_symbol_completion_list_break_on)
10924 (default_make_symbol_completion_list, make_symbol_completion_list)
10925 (make_symbol_completion_type, make_file_symbol_completion_list)
10926 (make_source_files_completion_list): Delete.
10927 (default_collect_symbol_completion_matches_break_on)
10928 (default_collect_symbol_completion_matches)
10929 (collect_symbol_completion_matches)
10930 (collect_symbol_completion_matches_type)
10931 (collect_file_symbol_completion_matches)
10932 (make_source_files_completion_list): New.
10933 * top.c (init_main): Don't install a rl_completion_entry_function
10934 hook. Install a rl_attempted_completion_function hook instead.
10935 * tui/tui-layout.c (layout_completer): Adjust to work with a
10936 completion_tracker.
10937 * tui/tui-regs.c (tui_reggroup_completer):
10938 * tui/tui-win.c (window_name_completer, focus_completer)
10939 (winheight_completer): Adjust to work with a completion_tracker.
10940 * value.c: Include "completer.h".
10941 (complete_internalvar): Adjust to work with a completion_tracker.
10942 * value.h (complete_internalvar): Likewise.
10943
10944 2017-07-17 Pedro Alves <palves@redhat.com>
10945
10946 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
10947 renames.
10948 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
10949 comments to completer_ftype's declaration.
10950 <completer_handle_brkchars>: Change type to
10951 completer_handle_brkchars_ftype.
10952 * command.h (completer_ftype): Add describing comment and give
10953 names to parameters.
10954 (completer_ftype_void): Rename to ...
10955 (completer_handle_brkchars_ftype) ... this. Add describing comment.
10956 (set_cmd_completer_handle_brkchars): Adjust.
10957 * completer.c (filename_completer_handle_brkchars): New function.
10958 (complete_line_internal_normal_command): New function, factored
10959 out from ...
10960 (complete_line_internal): ... here.
10961 (command_completer_handle_brkchars)
10962 (default_completer_handle_brkchars)
10963 (completer_handle_brkchars_func_for_completer): New functions.
10964 * completer.h (set_gdb_completion_word_break_characters): Delete
10965 declaration.
10966 (completer_handle_brkchars_func_for_completer): New declaration.
10967 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
10968 completer_handle_brkchars_func_for_completer.
10969
10970 2017-07-17 Pedro Alves <palves@redhat.com>
10971
10972 * completer.c (symbol_completer): New function, based on
10973 make_symbol_completion_list_fn.
10974 * completer.h (symbol_completer): New declaration.
10975 * guile/scm-cmd.c (cmdscm_completers): Adjust.
10976 * python/py-cmd.c (completers): Adjust.
10977 * symtab.c (make_symbol_completion_list_fn): Delete.
10978 * symtab.h (make_symbol_completion_list_fn): Delete.
10979 * cli/cli-decode.c (add_cmd): Adjust.
10980
10981 2017-07-17 Pedro Alves <palves@redhat.com>
10982
10983 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
10984 * dwarf2read.c: Include "filename-seen-cache.h".
10985 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
10986 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
10987 * filename-seen-cache.c: New file.
10988 * filename-seen-cache.h: New file.
10989 * symtab.c: Include "filename-seen-cache.h".
10990 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
10991 (create_filename_seen_cache, clear_filename_seen_cache)
10992 (delete_filename_seen_cache, filename_seen): Delete, parts moved
10993 to filename-seen-cache.h/filename-seen-cache.c.
10994 (output_source_filename, sources_info)
10995 (maybe_add_partial_symtab_filename)
10996 (make_source_files_completion_list): Adjust to use
10997 filename_seen_cache.
10998
10999 2017-07-17 Pedro Alves <palves@redhat.com>
11000
11001 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
11002 fields.
11003 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
11004 dwarf2_debug_sections*)): New.
11005 (dwarf2_per_objfile::dwarf2_per_objfile(const
11006 dwarf2_per_objfile&)): Declare as deleted.
11007 (dwarf2_per_objfile::operator=): Declare as deleted.
11008 (dwarf2_per_objfile::dwarf2_per_objfile)
11009 (dwarf2_per_objfile::~dwarf2_per_objfile)
11010 (dwarf2_per_objfile::free_cached_comp_units): New.
11011 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
11012 ctor. Call dwarf2_per_objfile's ctor manually.
11013 (dwarf2_locate_sections): Deleted/refactored as ...
11014 (dwarf2_per_objfile::locate_sections): ... this new method.
11015 (free_cached_comp_units): Defer to
11016 dwarf2_per_objfile::free_cached_comp_units.
11017 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
11018
11019 2017-07-14 Tom Tromey <tom@tromey.com>
11020
11021 PR rust/21764:
11022 * rust-exp.y (convert_ast_to_expression): Add "want_type"
11023 parameter.
11024 <UNOP_SIZEOF>: Split into separate case.
11025 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
11026
11027 2017-07-14 Tom Tromey <tom@tromey.com>
11028
11029 PR rust/21763:
11030 * symtab.c (symbol_matches_domain): Add language_rust to special
11031 case.
11032 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
11033 treat LOC_TYPEDEF symbols as variables.
11034
11035 2017-07-14 Pedro Alves <palves@redhat.com>
11036
11037 * symtab.c (make_file_symbol_completion_list_1): Iterate over
11038 symtabs matching all symtabs with SRCFILE as file name instead of
11039 only considering the first hit, with lookup_symtab.
11040
11041 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
11042
11043 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
11044 operator_name parameters.
11045 (gen_expr): Update function call.
11046
11047 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
11048
11049 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
11050 parameter.
11051 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
11052 Likewise.
11053 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
11054 parameter, use agent_expr::gdbarch instead, update function
11055 calls.
11056 (locexpr_tracepoint_var_ref): Likewise.
11057 (loclist_tracepoint_var_ref): Likewise.
11058 * ax-gdb.c (gen_trace_static_fields): Likewise.
11059 (gen_traced_pop): Likewise.
11060 (gen_frame_args_address): Likewise.
11061 (gen_frame_locals_address): Likewise.
11062 (gen_var_ref): Likewise.
11063 (gen_struct_ref_recursive): Likewise.
11064 (gen_static_field): Likewise.
11065 (gen_maybe_namespace_elt): Likewise.
11066 (gen_expr): Likewise.
11067 (gen_trace_for_var): Likewise.
11068 (gen_trace_for_expr): Likewise.
11069 (gen_trace_for_return_address): Likewise.
11070
11071 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
11072
11073 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
11074 parameter.
11075 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
11076
11077 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
11078
11079 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
11080 from ax, update calls.
11081 (gen_usual_arithmetic): Likewise.
11082 (gen_integral_promotions): Likewise.
11083 (gen_bitfield_ref): Likewise.
11084 (gen_primitive_field): Likewise.
11085 (gen_struct_ref_recursive): Likewise.
11086 (gen_struct_ref): Likewise.
11087 (gen_maybe_namespace_elt): Likewise.
11088 (gen_struct_elt_for_reference): Likewise.
11089 (gen_namespace_elt): Likewise.
11090 (gen_aggregate_elt_ref): Likewise.
11091 (gen_expr): Get gdbarch from ax, update calls.
11092 (gen_expr_binop_rest): Likewise.
11093
11094 2017-07-13 Pedro Alves <palves@redhat.com>
11095
11096 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
11097 as default tdesc.
11098 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
11099 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
11100 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
11101 tdesc_amd64_linux as default tdesc. Get final tdesc from the
11102 tdep.
11103 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
11104 Get final tdesc from the tdep.
11105 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
11106 default tdesc.
11107 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
11108 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
11109 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
11110 Use it as default tdesc.
11111 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
11112 down to amd_init_abi. No longer handle fallback tdesc here.
11113 * amd64-tdep.h (tdesc_x32): Declare.
11114 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
11115 parameter.
11116 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
11117 as default tdesc.
11118
11119 2017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11120
11121 * s390-linux-tdep.c (s390_process_record): Add support for
11122 instructions new in arch12.
11123
11124 2017-07-11 John Baldwin <jhb@FreeBSD.org>
11125
11126 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
11127 PT_GETFSBASE and PT_GETGSBASE.
11128 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
11129 PT_SETGSBASE.
11130
11131 2017-07-11 John Baldwin <jhb@FreeBSD.org>
11132
11133 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
11134 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
11135 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
11136 those rules.
11137 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
11138 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
11139 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
11140 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
11141 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
11142 * features/i386/amd64.xml: Add 64bit-segments.xml.
11143 * features/i386/amd64-avx-avx512.c: Regenerated.
11144 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
11145 * features/i386/amd64-avx-mpx.c: Regenerated.
11146 * features/i386/amd64-avx.c: Regenerated.
11147 * features/i386/amd64-mpx.c: Regenerated.
11148 * features/i386/amd64.c: Regenerated.
11149 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
11150 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
11151 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
11152 * regformats/i386/amd64-avx.dat: Regenerated.
11153 * regformats/i386/amd64-mpx.dat: Regenerated.
11154 * regformats/i386/amd64.dat: Regenerated.
11155
11156 2017-07-10 Yao Qi <yao.qi@linaro.org>
11157
11158 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
11159 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
11160
11161 2017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
11162
11163 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
11164 unsetenv.
11165 * gnulib/aclocal.m4: Regenerate.
11166 * gnulib/config.in: Regenerate.
11167 * gnulib/configure: Regenerate.
11168 * gnulib/import/Makefile.am: Regenerate.
11169 * gnulib/import/Makefile.in: Regenerate.
11170 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
11171 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
11172 * gnulib/import/m4/environ.m4: New file.
11173 * gnulib/import/m4/setenv.m4: New file.
11174 * gnulib/import/setenv.c: New file.
11175 * gnulib/import/unsetenv.c: New file.
11176
11177 2017-07-09 Simon Marchi <simon.marchi@ericsson.com>
11178
11179 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
11180 address when op is DW_OP_addr.
11181
11182 2017-07-09 Tom Tromey <tom@tromey.com>
11183
11184 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
11185 check and apply to outer type.
11186
11187 2017-07-07 John Baldwin <jhb@FreeBSD.org>
11188
11189 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
11190 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
11191 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
11192 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
11193
11194 2017-07-07 John Baldwin <jhb@FreeBSD.org>
11195
11196 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
11197
11198 2017-07-07 John Baldwin <jhb@FreeBSD.org>
11199
11200 * corelow.c (get_core_siginfo): Remove.
11201 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
11202 instead of get_core_siginfo.
11203 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
11204 * gdbarch.h: Re-generate.
11205 * gdbarch.c: Re-generate.
11206 * linux-tdep.c (linux_core_xfer_siginfo): New.
11207 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
11208
11209 2017-07-07 John Baldwin <jhb@FreeBSD.org>
11210
11211 * corelow.c (thread_section_name): Move to ...
11212 * gdbcore.h (thread_section_name): ... here.
11213
11214 2017-07-07 John Baldwin <jhb@FreeBSD.org>
11215
11216 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
11217 (struct siginfo32): New.
11218 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
11219 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
11220 via ptrace(PT_LWPINFO).
11221
11222 2017-07-07 John Baldwin <jhb@FreeBSD.org>
11223
11224 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
11225 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
11226 (fbsd_get_siginfo_type): New.
11227 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
11228 (_initialize_fbsd_tdep): New.
11229
11230 2017-07-06 David Blaikie <dblaikie@gmail.com>
11231
11232 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
11233 a singular dwo_unit*) to support multiple CUs in the same way that
11234 multiple TUs are supported.
11235 (create_cus_hash_table): Replace create_dwo_cu with a function for
11236 parsing multiple CUs from a DWO file.
11237 (open_and_init_dwo_file): Use create_cus_hash_table rather than
11238 create_dwo_cu.
11239 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
11240 htab_find, rather than comparing the signature to a singleton CU in
11241 the dwo_file.
11242
11243 2017-07-06 Pedro Alves <palves@redhat.com>
11244
11245 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
11246
11247 2017-07-04 Pedro Alves <palves@redhat.com>
11248
11249 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
11250 * gdbtypes.h (TYPE_STATIC): Delete.
11251 (struct fn_field) <is_public, is_abstract, is_static, is_final,
11252 is_synchronized, is_native>: Delete.
11253 <dummy>: Bump.
11254 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
11255 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
11256 (TYPE_FN_FIELD_ABSTRACT): Delete.
11257
11258 2017-07-03 Simon Marchi <simon.marchi@ericsson.com>
11259
11260 * buffer.h (buffer_finish): Fix spelling mistakes.
11261
11262 2017-07-01 Eli Zaretskii <eliz@gnu.org>
11263
11264 * .dir-locals.el: Automatically switch to C-style comments in
11265 versions of Emacs that support the feature.
11266
11267 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
11268 Pedro Alves <palves@redhat.com>
11269
11270 PR cli/21688
11271 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
11272 (process_next_line): New variable 'inline_cmd'.
11273 Adjust 'if' clauses for "python", "compile" and "guile" to use
11274 'command_name_equals' and check for '!inline_cmd'.
11275
11276 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
11277
11278 PR cli/21688
11279 * cli/cli-script.c (command_name_equals_not_inline): New function.
11280 (process_next_line): Adjust 'if' clauses for "python", "compile"
11281 and "guile" to use command_name_equals_not_inline.
11282
11283 2017-06-29 Pedro Alves <palves@redhat.com>
11284
11285 * completer.c (expression_completer): Call
11286 linespec_location_completer instead of location_completer.
11287
11288 2017-06-29 Pedro Alves <palves@redhat.com>
11289
11290 * completer.c (expression_completer): Remove code that recomputes
11291 'text' from 'word'.
11292
11293 2017-06-29 Yao Qi <yao.qi@linaro.org>
11294
11295 * regformats/regdat.sh: Generate code with
11296 "ifndef IN_PROCESS_AGENT".
11297
11298 2017-06-28 Pedro Alves <palves@redhat.com>
11299
11300 * command.h: Include "common/scoped_restore.h".
11301
11302 2017-06-28 Yao Qi <yao.qi@linaro.org>
11303
11304 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
11305 instead of obstack_grow.
11306
11307 2017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
11308
11309 PR gdb/21337
11310 * symfile.c (reread_symbols): Call objfiles_changed just before
11311 read_symbols.
11312
11313 2017-06-27 Pedro Alves <palves@redhat.com>
11314
11315 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
11316 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
11317 (completion_list_add_symbol, completion_list_add_msymbol):
11318 ... these new functions.
11319 (add_symtab_completions)
11320 (default_make_symbol_completion_list_break_on_1): Adjust.
11321
11322 2017-06-27 Pedro Alves <palves@redhat.com>
11323
11324 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
11325 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
11326 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
11327 dtor.
11328 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
11329 'storage_obstack' field an auto_obstack. In-class initialize all
11330 non-bitfield fields. Make minsyms_read bool.
11331 * symfile.c (read_symbols): Adjust.
11332
11333 2017-06-27 Alan Hayward <alan.hayward@arm.com>
11334
11335 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
11336 (gdbsim_store_register): Likewise.
11337
11338 2017-06-27 Pedro Alves <palves@redhat.com>
11339
11340 * c-exp.y (name_obstack): Now an auto_obstack.
11341 (yylex): Use auto_obstack::clear.
11342 (c_parse): Use auto_obstack::clear instead of reinitializing and
11343 freeing the obstack.
11344 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
11345 * d-exp.y (name_obstack): Now an auto_obstack.
11346 (yylex): Use auto_obstack::clear.
11347 (d_parse): Use auto_obstack::clear instead of reinitializing and
11348 freeing the obstack.
11349 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
11350 auto_obstack.
11351 * dwarf2read.c (create_addrmap_from_index)
11352 (dwarf2_build_psymtabs_hard)
11353 (update_enumeration_type_from_children): Likewise.
11354 * gdb_obstack.h (auto_obstack): New type.
11355 * go-exp.y (name_obstack): Now an auto_obstack.
11356 (build_packaged_name): Use auto_obstack::clear.
11357 (go_parse): Use auto_obstack::clear instead of reinitializing and
11358 freeing the obstack.
11359 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
11360 auto_obstack.
11361 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
11362 * rust-exp.y (work_obstack): Now an auto_obstack.
11363 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
11364 reinitializing and freeing the obstack.
11365 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
11366 (host_char_to_target): Use auto_obstack.
11367 * utils.h (make_cleanup_obstack_free): Delete declaration.
11368 * valprint.c (generic_emit_char, generic_printstr): Use
11369 auto_obstack.
11370
11371 2017-06-27 Simon Marchi <simon.marchi@ericsson.com>
11372
11373 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
11374 thread.
11375 (darwin_init_thread_list): Don't update dummy thread.
11376 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
11377
11378 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
11379
11380 * record-full.c (netorder16): Remove.
11381
11382 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
11383
11384 * common/diagnostics.h: Define macros for GCC.
11385 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
11386 * common/vec.h: Include diagnostics.h.
11387 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
11388 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
11389 warning.
11390
11391 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
11392
11393 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
11394 New macro.
11395 * ada-lex.l: Ignore deprecated register warnings.
11396
11397 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
11398
11399 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
11400 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
11401
11402 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
11403
11404 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
11405 its own line.
11406
11407 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
11408
11409 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
11410
11411 2017-06-23 Alan Hayward <alan.hayward@arm.com>
11412
11413 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
11414 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
11415 (xtensa_register_read_masked): Likewise.
11416
11417 2017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
11418
11419 * common/environ.c (gdb_environ::unset): Update comment.
11420
11421 2017-06-22 Alan Hayward <alan.hayward@arm.com>
11422
11423 * python/py-unwind.c (pyuw_sniffer): Allocate space for
11424 registers.
11425
11426 2017-06-22 Alan Hayward <alan.hayward@arm.com>
11427
11428 * record-full.c (record_full_exec_insn): Use byte_vector.
11429
11430 2017-06-22 Yao Qi <yao.qi@linaro.org>
11431
11432 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
11433 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
11434
11435 2017-06-22 Alan Hayward <alan.hayward@arm.com>
11436
11437 * remote.c (cached_reg): Move from here...
11438 * regcache.h (cached_reg): ...to here.
11439 * python/py-unwind.c (struct reg_info): Remove.
11440 (cached_frame_info): Use cached_reg_t.
11441 (pyuw_prev_register): Likewise.
11442 (pyuw_sniffer): Use cached_reg_t and allocate registers.
11443 (pyuw_dealloc_cache): Free all registers.
11444
11445 2017-06-22 Pedro Alves <palves@redhat.com>
11446 Simon Marchi <simon.marchi@ericsson.com>
11447
11448 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
11449 warning.
11450 * common/diagnostics.h: New file.
11451
11452 2017-06-22 Pedro Alves <palves@redhat.com>
11453
11454 * common/agent.h: Add include guards.
11455
11456 2017-06-21 Simon Marchi <simon.marchi@ericsson.com>
11457
11458 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
11459 talk about addressable units instead of bytes.
11460
11461 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
11462
11463 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
11464 of '::const_iterator'.
11465
11466 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
11467
11468 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11469 'unittests/environ-selftests.c'.
11470 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
11471 * charset.c (find_charset_names): Declare object 'iconv_env'.
11472 Update code to use 'iconv_env' object. Remove call to
11473 'free_environ'.
11474 * common/environ.c: Include <utility>.
11475 (make_environ): Delete function.
11476 (free_environ): Delete function.
11477 (gdb_environ::clear): New function.
11478 (gdb_environ::operator=): New function.
11479 (gdb_environ::get): Likewise.
11480 (environ_vector): Delete function.
11481 (set_in_environ): Delete function.
11482 (gdb_environ::set): New function.
11483 (unset_in_environ): Delete function.
11484 (gdb_environ::unset): New function.
11485 (gdb_environ::envp): Likewise.
11486 * common/environ.h: Include <vector>.
11487 (struct gdb_environ): Delete; transform into...
11488 (class gdb_environ): ... this class.
11489 (free_environ): Delete prototype.
11490 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
11491 environ_vector): Likewise.
11492 * infcmd.c (run_command_1): Update code to call
11493 'envp' from 'gdb_environ' class.
11494 (environment_info): Update code to call methods from 'gdb_environ'
11495 class.
11496 (unset_environment_command): Likewise.
11497 (path_info): Likewise.
11498 (path_command): Likewise.
11499 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
11500 (inferior::inferior): Initialize 'environment' using the host's
11501 information.
11502 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
11503 Include "environ.h".
11504 (class inferior) <environment>: Change type from 'struct
11505 gdb_environ' to 'gdb_environ'.
11506 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
11507 methods from 'gdb_environ' class.
11508 * solib.c (solib_find_1): Likewise
11509 * unittests/environ-selftests.c: New file.
11510
11511 2017-06-20 Yao Qi <yao.qi@linaro.org>
11512
11513 * features/i386/i386-linux.xml: Exchange the order of including
11514 32bit-linux.xml and 32bit-sse.xml.
11515 * features/i386/i386-linux.c: Regenerated.
11516
11517 2017-06-20 Yao Qi <yao.qi@linaro.org>
11518
11519 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
11520 Delete copy ctor and assignment operator.
11521 (tdesc_type): Likewise.
11522 (tdesc_feature): Likewise.
11523 (tdesc_free_reg): Remove.
11524 (tdesc_create_reg): Use new.
11525 (tdesc_free_type): Remove.
11526 (tdesc_create_vector): Use new.
11527 (tdesc_create_union): Likewise.
11528 (tdesc_create_flags): Likewise.
11529 (tdesc_create_enum): Likewise.
11530 (tdesc_free_feature): Delete.
11531 (free_target_description): Use delete.
11532
11533 2017-06-19 John Baldwin <jhb@FreeBSD.org>
11534
11535 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
11536 registers.
11537
11538 2017-06-19 Pedro Alves <palves@redhat.com>
11539
11540 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
11541 after gdb::unlinker.
11542
11543 2017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
11544
11545 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
11546 gdb_environ to access an environment variable.
11547
11548 2017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
11549
11550 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
11551 gdb_byte*.
11552
11553 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
11554
11555 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
11556
11557 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
11558
11559 * configure: Re-generate.
11560 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
11561
11562 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
11563
11564 * configure: Re-generate.
11565 * warning.m4: Pass -Werror to compiler when checking for
11566 supported warning flags.
11567
11568 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
11569
11570 * Makefile.in (COMPILE.pre): Add "-x c++".
11571
11572 2017-06-16 Alan Hayward <alan.hayward@arm.com>
11573 Pedro Alves <palves@redhat.com>
11574 Yao Qi <yao.qi@linaro.org>
11575
11576 * defs.h (RequireLongest): New.
11577 (extract_integer): Declare function template.
11578 (extract_signed_integer): Remove the declaration, but define it
11579 static inline.
11580 (extract_unsigned_integer): Likewise.
11581 (store_integer): Declare function template.
11582 (store_signed_integer): Remove the declaration, but define it
11583 static inline.
11584 (store_unsigned_integer): Likewise.
11585 * findvar.c (extract_integer): New function template.
11586 (extract_signed_integer): Remove.
11587 (extract_unsigned_integer): Remove.
11588 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
11589 instantiations.
11590 (store_integer): New function template.
11591 (store_signed_integer): Remove.
11592 (store_unsigned_integer): Remove.
11593 (store_integer): Explicit instantiations.
11594 * regcache.c (regcache_raw_read_signed): Update.
11595 (regcache::raw_read): New function.
11596 (regcache::raw_read_signed): Remove.
11597 (regcache::raw_read_unsigned): Remove.
11598 (regcache_raw_read_unsigned): Update.
11599 (regcache_raw_write_unsigned): Update.
11600 (regcache::raw_write_signed): Remove.
11601 (regcache::raw_write): New function.
11602 (regcache_cooked_read_signed): Update.
11603 (regcache::raw_write_unsigned): Remove.
11604 (regcache::cooked_read_signed): Remove.
11605 (regcache_cooked_read_unsigned): Update.
11606 (regcache::cooked_read_unsigned): Remove.
11607 (regcache_cooked_write_signed): Update.
11608 (regcache_cooked_write_unsigned): Update.
11609 * regcache.h (regcache) <raw_read_signed>: Remove.
11610 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
11611 <raw_read, raw_write>: New.
11612 <cooked_read_signed, cooked_write_signed>: Remove.
11613 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
11614 <cooked_read, cooked_write>: New.
11615 * sh64-tdep.c (sh64_pseudo_register_read): Update.
11616 (sh64_pseudo_register_write): Update.
11617
11618 2017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
11619
11620 * arc-tdep.c (arc_disassembler_options): New variable.
11621 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
11622 of default_print_insn.
11623 (arc_delayed_print_insn): Set info->section when needed,
11624 use default_print_insn to retrieve a disassembler.
11625
11626 2017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
11627
11628 PR gdb/21574
11629 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
11630 to mention $SHELL and startup-with-shell.
11631
11632 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
11633
11634 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
11635
11636 2017-06-14 Yao Qi <yao.qi@linaro.org>
11637
11638 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
11639 default_print_insn instead of print_insn_aarch64.
11640 * arm-tdep.c (gdb_print_insn_arm): Call
11641 default_print_insn instead of print_insn_big_arm
11642 and print_insn_little_arm.
11643 * i386-tdep.c (i386_print_insn): Call default_print_insn
11644 instead of print_insn_i386.
11645 * ia64-tdep.c (ia64_print_insn): Call
11646 default_print_insn instead of print_insn_ia64.
11647 * mips-tdep.c (gdb_print_insn_mips): Call
11648 default_print_insn instead of print_insn_big_mips
11649 and print_insn_little_mips.
11650 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
11651 instead of print_insn_spu.
11652
11653 2017-06-14 Pedro Alves <palves@redhat.com>
11654
11655 * ada-lang.c: Include "common/byte-vector.h".
11656 (ada_value_primitive_packed_val): Use gdb::byte_vector.
11657 * charset.c (wchar_iterator::iterate): Resize the vector instead
11658 of reserving it.
11659 * common/byte-vector.h: Include "common/def-vector.h".
11660 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
11661 * cli/cli-dump.c: Include "common/byte-vector.h".
11662 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
11663 * common/byte-vector.h: New file.
11664 * common/def-vector.h: New file.
11665 * common/default-init-alloc.h: New file.
11666 * dwarf2loc.c: Include "common/byte-vector.h".
11667 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
11668 instead of reserving it.
11669 * dwarf2read.c: Include "common/byte-vector.h".
11670 (data_buf::m_vec): Now a gdb::byte_vector.
11671 * gdb_regex.c: Include "common/def-vector.h".
11672 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
11673 * mi/mi-main.c: Include "common/byte-vector.h".
11674 (mi_cmd_data_read_memory): Use gdb::byte_vector.
11675 * printcmd.c: Include "common/byte-vector.h".
11676 (print_scalar_formatted): Use gdb::byte_vector.
11677 * valprint.c: Include "common/byte-vector.h".
11678 (maybe_negate_by_bytes, print_decimal_chars): Use
11679 gdb::byte_vector.
11680
11681 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
11682
11683 * darwin-nat.c: Include "nat/fork-inferior.h".
11684
11685 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
11686
11687 * configure.nat: Factor out Darwin bits that are not
11688 architecture-specific. Add fork-inferior.o.
11689
11690 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
11691
11692 * configure.nat: Factor out AIX bits that are not
11693 architecture-specific. Add fork-inferior.o.
11694
11695 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11696
11697 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
11698 (read_pieced_value, write_pieced_value): ...here. Reduce to
11699 wrappers that just call rw_pieced_value.
11700
11701 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11702
11703 * dwarf2loc.c (write_pieced_value): When writing the data for a
11704 memory piece, use write_memory_with_notification instead of
11705 write_memory.
11706
11707 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11708
11709 * valops.c (read_value_memory): Change embedded_offset to
11710 represent a bit offset instead of a byte offset.
11711 * value.h (read_value_memory): Adjust comment.
11712
11713 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11714
11715 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
11716 dest_offset_bits and source_offset_bits.
11717 (write_pieced_value): Likewise.
11718
11719 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11720
11721 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
11722 given by DW_OP_bit_piece.
11723 (write_pieced_value): Likewise.
11724
11725 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11726
11727 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
11728 some other preparations to the places where sufficient information
11729 is available.
11730 (write_pieced_value): Likewise.
11731
11732 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11733
11734 * dwarf2loc.c (bits_to_bytes): New function.
11735 (read_pieced_value): Fix offset calculations for register pieces
11736 on big-endian targets.
11737 (write_pieced_value): Likewise.
11738
11739 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11740
11741 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
11742 (write_pieced_value): Likewise.
11743
11744 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11745
11746 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
11747 transfer the source value's least significant bits, instead of its
11748 lowest-addressed ones. Rename type_len to max_offset.
11749 (read_pieced_value): Mirror above changes to write_pieced_value as
11750 applicable.
11751
11752 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11753
11754 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
11755 truncate full bytes from dest_offset_bits before using it as an
11756 offset into the buffer.
11757
11758 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11759
11760 * dwarf2loc.c (write_pieced_value): Include transfer size in
11761 byte-wise check.
11762
11763 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11764
11765 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
11766 calculation of this_size.
11767
11768 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11769
11770 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
11771 when targeting a bit-field.
11772 (write_pieced_value): Likewise.
11773
11774 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11775
11776 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
11777 (allocate_piece_closure): Drop addr_size parameter.
11778 (dwarf2_evaluate_loc_desc_full): Adjust call to
11779 allocate_piece_closure.
11780
11781 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11782
11783 PR gdb/21226
11784 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
11785 the LSB end, independent of endianness.
11786
11787 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11788
11789 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
11790 size capping.
11791
11792 2017-06-13 Yao Qi <yao.qi@linaro.org>
11793
11794 * mips-linux-nat.c: Move include features/mips*-linux.c to
11795 mips-linux-tdep.c.
11796 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
11797 to mips-linux-tdep.c.
11798 * mips-linux-tdep.c: Include features/mips*-linux.c
11799 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
11800 functions.
11801 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
11802 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
11803 (tdesc_mips64_dsp_linux): Declare.
11804
11805 2017-06-12 Tom Tromey <tom@tromey.com>
11806
11807 * valprint.h (val_print_type_code_int): Remove.
11808 * valprint.c (generic_val_print_int): Always call
11809 val_print_scalar_formatted.
11810 (val_print_type_code_int): Remove.
11811 * printcmd.c (print_scalar_formatted): Handle options->format==0.
11812 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
11813 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
11814 * ada-valprint.c (ada_val_print_num): Use
11815 val_print_scalar_formatted.
11816
11817 2017-06-12 Tom Tromey <tom@tromey.com>
11818
11819 * printcmd.c (print_scalar_formatted): Unify the two switches.
11820 Don't convert scalars to LONGEST.
11821
11822 2017-06-12 Tom Tromey <tom@tromey.com>
11823
11824 PR exp/16225:
11825 * valprint.h (print_decimal_chars): Update.
11826 * valprint.c (maybe_negate_by_bytes): New function.
11827 (print_decimal_chars): Add "is_signed" argument.
11828 * printcmd.c (print_scalar_formatted): Update.
11829
11830 2017-06-12 Tom Tromey <tom@tromey.com>
11831
11832 PR exp/16225:
11833 * valprint.h (print_binary_chars, print_hex_chars): Update.
11834 * valprint.c (val_print_type_code_int): Update.
11835 (print_binary_chars): Add "zero_pad" argument.
11836 (emit_octal_digit): New function.
11837 (print_octal_chars): Don't zero-pad.
11838 (print_decimal_chars): Likewise.
11839 (print_hex_chars): Add "zero_pad" argument.
11840 * sh64-tdep.c (sh64_do_fp_register): Update.
11841 * regcache.c (regcache::dump): Update.
11842 * printcmd.c (print_scalar_formatted): Update.
11843 * infcmd.c (default_print_one_register_info): Update.
11844
11845 2017-06-12 Pedro Alves <palves@redhat.com>
11846 Alan Hayward <alan.hayward@arm.com>
11847
11848 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
11849 (mips_eabi_push_dummy_call): Rename local 'regsize' to
11850 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
11851 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
11852 Assert that abi_regsize bytes fit in 'ref_valbuf'.
11853
11854 2017-06-12 Pedro Alves <palves@redhat.com>
11855
11856 * dwarf2read.c (mapped_symtab::data): Now a vector of
11857 symtab_index_entry instead of vector of
11858 std::unique_ptr<symtab_index_entry>. All users adjusted to check
11859 whether an element's name is NULL instead of checking whether the
11860 element itself is NULL.
11861 (find_slot): Change return type. Adjust.
11862 (hash_expand, , add_index_entry, uniquify_cu_indices)
11863 (write_hash_table): Adjust.
11864
11865 2017-06-12 Pedro Alves <palves@redhat.com>
11866
11867 * dwarf2read.c (recursively_count_psymbols): New function.
11868 (write_psymtabs_to_index): Call it to compute number of psyms and
11869 pass estimate size of psyms_seen to unordered_set's ctor.
11870
11871 2017-06-12 Pedro Alves <palves@redhat.com>
11872
11873 * dwarf2read.c (write_hash_table): Check if key already exists
11874 before emplacing.
11875
11876 2017-06-12 Pedro Alves <palves@redhat.com>
11877
11878 * dwarf2read.c (data_buf::append_space): Rename to...
11879 (data_buf::grow): ... this, and make private. Adjust all callers.
11880 (data_buf::append_uint): New method.
11881 (add_address_entry, write_one_signatured_type)
11882 (write_psymtabs_to_index): Use it.
11883
11884 2017-06-12 Pedro Alves <palves@redhat.com>
11885
11886 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
11887 (file_write (FILE *, const std::vector<Elem>&)): Delete.
11888 (data_buf::file_write): Call ::fwrite directly.
11889
11890 2017-06-12 Pedro Alves <palves@redhat.com>
11891
11892 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
11893 std::vector::erase.
11894
11895 2017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
11896
11897 Code cleanup: C++ify .gdb_index producer.
11898 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
11899 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
11900 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
11901 (create_strtab, add_string): Remove.
11902 (file_write, data_buf): New.
11903 (struct symtab_index_entry): Use std::vector for cu_indices.
11904 (struct mapped_symtab): Use std::vector for data.
11905 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
11906 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
11907 Remove.
11908 (find_slot): Change return type. Update it to the new data structures.
11909 (hash_expand, add_index_entry): Update it to the new data structures.
11910 (offset_type_compare): Remove.
11911 (uniquify_cu_indices): Update it to the new data structures.
11912 (c_str_view, c_str_view_hasher, vector_hasher): New.
11913 (add_indices_to_cpool): Remove.
11914 (write_hash_table): Update it to the new data structures.
11915 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
11916 (eq_psymtab_cu_index): Remove.
11917 (psym_index_map): New typedef.
11918 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
11919 reference and std::unordered_map for cu_index_htab.
11920 (add_address_entry, add_address_entry_worker, write_address_map)
11921 (write_psymbols): Update it to the new data structures.
11922 (write_obstack): Remove.
11923 (struct signatured_type_index_data): Change types_list to a data_buf
11924 reference and psyms_seen to a std::unordered_set reference.
11925 (write_one_signatured_type, recursively_write_psymbols)
11926 (write_psymtabs_to_index): Update it to the new data structures.
11927
11928 2017-06-11 Simon Marchi <simon.marchi@ericsson.com>
11929
11930 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
11931 separate-debug-file commands.
11932 * symfile.h (separate_debug_file_debug): New global.
11933 * symfile.c (separate_debug_file_debug): New global.
11934 (separate_debug_file_exists, find_separate_debug_file): Add
11935 debug output.
11936 (_initialize_symfile): Add "set debug separate-debug-file"
11937 command.
11938 * build-id.c (build_id_to_debug_bfd,
11939 find_separate_debug_file_by_buildid): Add debug output.
11940
11941 2017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
11942
11943 * gdbarch.sh (displaced_step_free_closure): Remove.
11944 * gdbarch.h, gdbarch.c: Re-generate.
11945 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
11946 displaced_step_free_closure.
11947 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
11948 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
11949 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
11950 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
11951 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
11952 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
11953 * arch-utils.h (simple_displaced_step_free_closure): Remove.
11954 * arch-utils.c (simple_displaced_step_free_closure): Remove.
11955 * infrun.c (displaced_step_clear): Call xfree instead of
11956 gdbarch_displaced_step_free_closure.
11957
11958 2017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
11959
11960 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
11961 NULL".
11962
11963 2017-06-08 Alan Hayward <alan.hayward@arm.com>
11964
11965 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
11966 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
11967 (mn10300_push_dummy_call): Likewise.
11968
11969 2017-06-08 Alan Hayward <alan.hayward@arm.com>
11970
11971 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
11972
11973 2017-06-08 Alan Hayward <alan.hayward@arm.com>
11974
11975 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
11976
11977 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
11978
11979 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
11980 able to start inferiors using a shell.
11981 (New remote packets): Announce new packet "QStartupWithShell".
11982 * remote.c: Add PACKET_QStartupWithShell.
11983 (extended_remote_create_inferior): Handle new
11984 PACKET_QStartupWithShell.
11985 (remote_protocol_features) <QStartupWithShell>: New entry for
11986 PACKET_QStartupWithShell.
11987 (_initialize_remote): Call "add_packet_config_cmd" for
11988 QStartupShell.
11989
11990 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
11991 Pedro Alves <palves@redhat.com>
11992
11993 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
11994 and "nat/fork-inferior.h".
11995 * common/common-inferior.h: New file, with contents from
11996 "gdb/inferior.h".
11997 * commom/common-utils.c: Include "common-utils.h".
11998 (stringify_argv): New function.
11999 * common/common-utils.h (stringify_argv): New prototype.
12000 * configure.nat: Add "fork-inferior.o" as a dependency for
12001 "*linux*", "fbsd*" and "nbsd*" hosts.
12002 * corefile.c (get_exec_file): Update comment.
12003 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
12004 instead of "startup_inferior".
12005 (darwin_create_inferior): Call "add_thread_silent" after
12006 "fork_inferior".
12007 * fork-child.c: Cleanup unnecessary includes.
12008 (SHELL_FILE): Move to "common/common-fork-child.c".
12009 (environ): Likewise.
12010 (exec_wrapper): Initialize.
12011 (get_exec_wrapper): New function.
12012 (breakup_args): Move to "common/common-fork-child.c"; rename to
12013 "breakup_args_for_exec".
12014 (escape_bang_in_quoted_argument): Move to
12015 "common/common-fork-child.c".
12016 (saved_ui): New variable.
12017 (prefork_hook): New function.
12018 (postfork_hook): Likewise.
12019 (postfork_child_hook): Likewise.
12020 (gdb_startup_inferior): Likewise.
12021 (fork_inferior): Move to "common/common-fork-child.c". Update
12022 function to support gdbserver.
12023 (startup_inferior): Likewise.
12024 * gdbcore.h (get_exec_file): Remove declaration.
12025 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
12026 instead of "startup_inferior". Call "add_thread_silent" after
12027 "fork_inferior".
12028 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
12029 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
12030 instead of "startup_inferior". Call "add_thread_silent" after
12031 "fork_inferior".
12032 * inferior.h: Include "common-inferior.h".
12033 (trace_start_error): Move to "common/common-utils.h".
12034 (trace_start_error_with_name): Likewise.
12035 (fork_inferior): Move prototype to "nat/fork-inferior.h".
12036 (startup_inferior): Likewise.
12037 (gdb_startup_inferior): New prototype.
12038 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
12039 * nat/fork-inferior.h: New file.
12040 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
12041 instead of "startup_inferior". Call "add_thread_silent" after
12042 "fork_inferior".
12043 * target.h (target_terminal_init): Move prototype to
12044 "target/target.h".
12045 (target_terminal_inferior): Likewise.
12046 (target_terminal_ours): Likewise.
12047 * target/target.h (target_terminal_init): New prototype, moved
12048 from "target.h".
12049 (target_terminal_inferior): Likewise.
12050 (target_terminal_ours): Likewise.
12051 * utils.c (gdb_flush_out_err): New function.
12052
12053 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
12054
12055 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
12056 * common/common-gdbthread.h: New file, with parts from
12057 "gdb/gdbthread.h".
12058 * gdbthread.h: Include "common-gdbthread.h".
12059 (switch_to_thread): Moved to "common/common-gdbthread.h".
12060
12061 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
12062
12063 * Makefile.in (SFILES): Add "common/job-control.c".
12064 (HFILES_NO_SRCDIR): Add "common/job-control.h".
12065 (COMMON_OBS): Add "job-control.o".
12066 * common/job-control.c: New file, with contents from
12067 "gdb/inflow.c".
12068 * common/job-control.h: New file, with contents from "terminal.h".
12069 * fork-child.c: Include "job-control.h".
12070 * inflow.c: Include "job-control.h".
12071 (gdb_setpgid): Move to "common/common-inflow.c".
12072 (_initialize_inflow): Move setting of "job_control" to
12073 "handle_job_control".
12074 * terminal.h (job_control): Moved to "common/common-terminal.h".
12075 (gdb_setpgid): Likewise.
12076 * top.c: Include "job_control.h".
12077 * utils.c: Likewise.
12078 (job_control): Moved to "job-control.c".
12079
12080 2017-06-07 Pedro Alves <palves@redhat.com>
12081
12082 * Makefile.in (SFILES): Add gdb_regex.c.
12083 (COMMON_OBS): Add gdb_regex.o.
12084 * ada-lang.c (ada_add_standard_exceptions)
12085 (ada_add_exceptions_from_frame, name_matches_regex)
12086 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
12087 parameter type to compiled_regex. Adjust.
12088 (ada_exceptions_list): Use compiled_regex.
12089 * break-catch-throw.c (exception_catchpoint::pattern): Now a
12090 std::unique_ptr<compiled_regex>.
12091 (exception_catchpoint::~exception_catchpoint): Remove regfree
12092 call.
12093 (check_status_exception_catchpoint): Adjust to use compiled_regex.
12094 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
12095 * breakpoint.c (solib_catchpoint::compiled): Now a
12096 std::unique_ptr<compiled_regex>.
12097 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
12098 (check_status_catch_solib): Adjust to use compiled_regex.
12099 (add_solib_catchpoint): Adjust to use compiled_regex.
12100 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
12101 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
12102 compiled_regex reference. Adjust to use it.
12103 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
12104 declaration. Include "gdb_regex.h".
12105 (apropos_cmd): Change regex parameter to compiled_regex reference.
12106 * gdb_regex.c: New file.
12107 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
12108 declarations.
12109 (class compiled_regex): New.
12110 * linux-tdep.c: Include "common/gdb_optional.h".
12111 (struct mapping_regexes): New, factored out from
12112 mapping_is_anonymous_p, and adjusted to use compiled_regex.
12113 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
12114 gdb::optional and remove cleanups. Adjust to compiled_regex.
12115 * probe.c: Include "common/gdb_optional.h".
12116 (collect_probes): Use compiled_regex and gdb::optional and remove
12117 cleanups.
12118 * skip.c: Include "common/gdb_optional.h".
12119 (skiplist_entry::compiled_function_regexp): Now a
12120 gdb::optional<compiled_regex>.
12121 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
12122 (free_skiplist_entry): Remove regfree call.
12123 (compile_skip_regexp, skip_rfunction_p): Adjust to use
12124 compiled_regex and gdb::optional.
12125 * symtab.c: Include "common/gdb_optional.h".
12126 (search_symbols): Use compiled_regex and gdb::optional.
12127 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
12128 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
12129 to gdb_regex.c.
12130
12131 2017-06-07 Alan Hayward <alan.hayward@arm.com>
12132
12133 * regcache.c (regcache::save): Avoid buffer use.
12134 (regcache::dump): Likewise.
12135
12136 2017-06-07 Alan Hayward <alan.hayward@arm.com>
12137
12138 * sh-tdep.c (sh_pseudo_register_read): Remove
12139 MAX_REGISTER_SIZE.
12140 (sh_pseudo_register_write): Likewise.
12141 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
12142 (sh64_pseudo_register_write): Likewise
12143
12144 2017-06-07 Alan Hayward <alan.hayward@arm.com>
12145
12146 * aarch64-tdep.c (aarch64_store_return_value): Use
12147 V_REGISTER_SIZE.
12148 (aarch64_pseudo_read_value): Likewise.
12149 (aarch64_pseudo_write): Likewise.
12150
12151 2017-06-06 Yao Qi <yao.qi@linaro.org>
12152
12153 * regformats/regdef.h (set_register_cache): Remove the
12154 declaration.
12155
12156 2017-06-06 Alan Hayward <alan.hayward@arm.com>
12157
12158 * frame.c (frame_unwind_register_signed): Use
12159 frame_unwind_register_value.
12160
12161 2017-06-06 Pedro Alves <palves@redhat.com>
12162
12163 PR breakpoints/21553
12164 * breakpoint.c (create_breakpoints_sal_default)
12165 (init_breakpoint_sal, create_breakpoint_sal): Use
12166 gdb::unique_xmalloc_ptr for string parameters.
12167 (create_breakpoint): Constify 'extra_string' and 'cond_string'
12168 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
12169 (base_breakpoint_create_breakpoints_sal)
12170 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
12171 (strace_marker_create_breakpoints_sal)
12172 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
12173 string parameters.
12174 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
12175 gdb::unique_xmalloc_ptr for string parameters.
12176 (create_breakpoint): Constify 'extra_string' and 'cond_string'
12177 parameters.
12178
12179 2017-06-06 Alan Hayward <alan.hayward@arm.com>
12180
12181 * alpha-tdep.c (alpha_register_to_value): Use
12182 get_frame_register_value.
12183 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
12184
12185 2017-06-06 Alan Hayward <alan.hayward@arm.com>
12186
12187 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
12188 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
12189 (ia64_value_to_register): Likewise.
12190 (ia64_extract_return_value): Likewise.
12191 (ia64_store_return_value): Likewise.
12192 (ia64_push_dummy_call): Likewise.
12193
12194 2017-06-04 Joel Brobecker <brobecker@adacore.com>
12195
12196 GDB 8.0 released.
12197
12198 2017-06-03 Simon Marchi <simon.marchi@ericsson.com>
12199
12200 * x86-linux-nat.c (struct arch_lwp_info): Remove.
12201
12202 2017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
12203
12204 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
12205 parameter.
12206 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
12207
12208 2017-06-02 Simon Marchi <simon.marchi@ericsson.com>
12209
12210 * event-loop.c (poll_timers): Unallocate timer using delete
12211 instead of xfree.
12212
12213 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
12214
12215 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
12216 (struct breakpoint) <~breakpoint>: New.
12217 (struct watchpoint): Inherit from breakpoint.
12218 <~watchpoint>: New.
12219 <base>: Remove.
12220 (struct tracepoint): Inherit from breakpoint.
12221 <base>: Remove.
12222 * breakpoint.c (longjmp_breakpoint_ops): Remove.
12223 (struct longjmp_breakpoint): Inherit from breakpoint.
12224 <~longjmp_breakpoint>: New.
12225 <base>: Remove.
12226 (new_breakpoint_from_type): Remove casts.
12227 (watchpoint_in_thread_scope): Remove reference to base field.
12228 (watchpoint_del_at_next_stop): Likewise.
12229 (update_watchpoint): Likewise.
12230 (watchpoint_check): Likewise.
12231 (bpstat_check_watchpoint): Likewise.
12232 (set_longjmp_breakpoint): Likewise.
12233 (struct fork_catchpoint): Inherit from breakpoint.
12234 <base>: Remove.
12235 (struct solib_catchpoint): Inherit from breakpoint.
12236 <~solib_catchpoint>: New.
12237 <base>: Remove.
12238 (dtor_catch_solib): Change to ...
12239 (solib_catchpoint::~solib_catchpoint): ... this.
12240 (breakpoint_hit_catch_solib): Remove reference to base field.
12241 (add_solib_catchpoint): Likewise.
12242 (create_fork_vfork_event_catchpoint): Likewise.
12243 (struct exec_catchpoint): Inherit from breakpoint.
12244 <~exec_catchpoint>: New.
12245 <base>: Remove.
12246 (dtor_catch_exec): Change to ...
12247 (exec_catchpoint::~exec_catchpoint): ... this.
12248 (dtor_watchpoint): Change to ...
12249 (watchpoint::~watchpoint): ... this.
12250 (watch_command_1): Remove reference to base field.
12251 (catch_exec_command_1): Likewise.
12252 (base_breakpoint_dtor): Change to ...
12253 (breakpoint::~breakpoint): ... this.
12254 (base_breakpoint_ops): Remove dtor field value.
12255 (longjmp_bkpt_dtor): Change to ...
12256 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
12257 (strace_marker_create_breakpoints_sal): Remove reference to base
12258 field.
12259 (delete_breakpoint): Don't manually call breakpoint destructor.
12260 (create_tracepoint_from_upload): Remove reference to base field.
12261 (trace_pass_set_count): Likewise.
12262 (initialize_breakpoint_ops): Don't initialize
12263 momentary_breakpoint_ops, don't set dtors.
12264 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
12265 <~ada_catchpoint>: New.
12266 <base>: Remove.
12267 (create_excep_cond_exprs): Remove reference to base field.
12268 (dtor_exception): Change to ...
12269 (ada_catchpoint::~ada_catchpoint): ... this.
12270 (dtor_catch_exception): Remove.
12271 (dtor_catch_exception_unhandled): Remove.
12272 (dtor_catch_assert): Remove.
12273 (create_ada_exception_catchpoint): Remove reference to base
12274 field.
12275 (initialize_ada_catchpoint_ops): Don't set dtors.
12276 * break-catch-sig.c (struct signal_catchpoint): Inherit from
12277 breakpoint.
12278 <~signal_catchpoint>: New.
12279 <base>: Remove.
12280 (signal_catchpoint_dtor): Change to ...
12281 (signal_catchpoint::~signal_catchpoint): ... this.
12282 (create_signal_catchpoint): Remove reference to base field.
12283 (initialize_signal_catchpoint_ops): Don't set dtor.
12284 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
12285 from breakpoint.
12286 <~syscall_catchpoint>: New.
12287 <base>: Remove.
12288 (dtor_catch_syscall): Change to ...
12289 (syscall_catchpoint::~syscall_catchpoint): ... this.
12290 (create_syscall_event_catchpoint): Remove reference to base
12291 field.
12292 (initialize_syscall_catchpoint_ops): Don't set dtor.
12293 * break-catch-throw.c (struct exception_catchpoint): Inherit
12294 from breakpoint.
12295 <~exception_catchpoint>: New.
12296 <base>: Remove.
12297 (dtor_exception_catchpoint): Change to ...
12298 (exception_catchpoint::~exception_catchpoint): ... this.
12299 (handle_gnu_v3_exceptions): Remove reference to base field.
12300 (initialize_throw_catchpoint_ops): Don't set dtor.
12301 * ctf.c (ctf_get_traceframe_address): Remove reference to base
12302 field.
12303 * remote.c (remote_get_tracepoint_status): Likewise.
12304 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
12305 * tracefile.c (tracefile_fetch_registers): Likewise.
12306 * tracepoint.c (actions_command): Likewise.
12307 (validate_actionline): Likewise.
12308 (tfind_1): Likewise.
12309 (get_traceframe_location): Likewise.
12310 (find_matching_tracepoint_location): Likewise.
12311 (parse_tracepoint_status): Likewise.
12312 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
12313
12314 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
12315
12316 * breakpoint.c (struct longjmp_breakpoint): New struct.
12317 (is_tracepoint_type): Change return type to bool.
12318 (is_longjmp_type): New function.
12319 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
12320 (set_raw_breakpoint_without_location): Use
12321 new_breakpoint_from_type.
12322 (set_raw_breakpoint): Likewise.
12323
12324 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
12325
12326 * breakpoint.c (new_breakpoint_from_type): New function.
12327 (create_breakpoint_sal): Use new_breakpoint_from_type and
12328 unique_ptr.
12329 (create_breakpoint): Likewise.
12330
12331 2017-05-31 Simon Marchi <simon.marchi@ericsson.com>
12332
12333 * memattr.c (mem_info_command): Rename to ...
12334 (info_mem_command): ... this.
12335 (mem_enable_command): Rename to ...
12336 (enable_mem_command): ... this.
12337 (mem_disable_command): Rename to ...
12338 (disable_mem_command): ... this.
12339 (mem_delete_command): Rename to ...
12340 (delete_mem_command): ... this.
12341 (_initialize_mem): Adjust function names.
12342
12343 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
12344
12345 * btrace.c (handle_pt_insn_events): New.
12346 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
12347 STATUS. Split into this and ...
12348 (handle_pt_insn_event_flags): ... this.
12349
12350 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
12351
12352 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
12353 and struct pt_insn.resynced.
12354 * configure: Regenerated.
12355 * config.in: Regenerated.
12356
12357 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12358
12359 * btrace.c (ftrace_find_call_by_number): New function.
12360 (ftrace_new_function): Store objects, not pointers.
12361 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
12362 ftrace_new_gap, ftrace_update_function,
12363 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
12364 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
12365 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
12366 btrace_ends_with_single_insn, btrace_call_get): Account for
12367 btrace_thread_info::functions now storing objects.
12368 * btrace.h (struct btrace_thread_info): Add constructor.
12369 (struct btrace_thread_info) <functions>: Make std::vector.
12370 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
12371 Initialize with default values.
12372 * record-btrace.c (record_btrace_frame_sniffer): Account for
12373 btrace_thread_info::functions now storing objects.
12374
12375 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12376
12377 * btrace.c: Remove typedef bfun_s.
12378 (ftrace_new_gap): Directly add gaps to the list of gaps.
12379 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
12380 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
12381 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
12382 instead of gdb VEC.
12383
12384 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12385
12386 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
12387 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
12388 with btrace_thread_info::next_segment and
12389 btrace_thread_info::prev_segment.
12390 * btrace.h: Remove struct btrace_func_link.
12391 (struct btrace_function): Replace pair of function segment pointers
12392 with pair of indices.
12393 * python/py-record-btrace.c (btpy_call_prev_sibling,
12394 btpy_call_next_sibling): Replace references to
12395 btrace_thread_info::segment with btrace_thread_info::next_segment and
12396 btrace_thread_info::prev_segment.
12397 * record-btrace.c (record_btrace_frame_this_id): Use
12398 btrace_find_call_by_number.
12399
12400 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12401
12402 * btrace.c (ftrace_new_function, ftrace_fixup_level,
12403 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
12404 btrace_insn_next, btrace_insn_prev): Remove references to
12405 btrace_thread_info::flow.
12406 * btrace.h (struct btrace_function): Remove FLOW.
12407
12408 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12409
12410 * btrace.c (ftrace_find_call_by_number): New function.
12411 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
12412 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
12413 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
12414 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
12415 index.
12416 * btrace.h (struct btrace_function): Turn UP into an index.
12417 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
12418 as an index.
12419 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
12420 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
12421 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
12422
12423 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12424
12425 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
12426 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
12427 ftrace_update_function, ftrace_compute_global_level_offset,
12428 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
12429 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
12430 btrace_insn_end, btrace_is_empty): Remove references to
12431 btrace_thread_info::begin and btrace_thread_info::end.
12432 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
12433 (struct btrace_thread_info) <functions>: Adjust comment.
12434 * record-btrace.c (record_btrace_start_replaying): Remove reference to
12435 btrace_thread_info::begin.
12436
12437 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12438
12439 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
12440 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
12441 ftrace_update_function): Remove arguments that implicitly were always
12442 BTINFO->END.
12443 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
12444 Don't pass BTINFO->END.
12445
12446 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12447
12448 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
12449 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
12450 btrace_find_insn_by_number): Replace function segment pointer with
12451 index.
12452 (btrace_insn_cmp): Simplify.
12453 * btrace.h: (struct btrace_insn_iterator) Rename index to
12454 insn_index. Replace function segment pointer with index into function
12455 segment vector.
12456 * record-btrace.c (record_btrace_call_history): Replace function
12457 segment pointer use with index.
12458 (record_btrace_frame_sniffer): Retrieve function call segment through
12459 vector.
12460 (record_btrace_set_replay): Remove defunc't safety check.
12461
12462 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12463
12464 * btrace.c (btrace_ends_with_single_insn): New function.
12465 (btrace_call_get, btrace_call_number, btrace_call_begin,
12466 btrace_call_end, btrace_call_next, btrace_call_prev,
12467 btrace_find_call_by_number): Use index into call segment vector
12468 instead of pointer.
12469 (btrace_call_cmp): Simplify.
12470 * btrace.h (struct btrace_call_iterator): Replace function call segment
12471 pointer with index into vector.
12472 * record-btrace.c (record_btrace_call_history): Use index instead of
12473 pointer.
12474
12475 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12476
12477 * btrace.c (btrace_insn_begin, btrace_insn_end,
12478 btrace_find_insn_by_number): Add btinfo to iterator.
12479 * btrace.h (struct btrace_insn_iterator): Add btinfo.
12480
12481 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12482
12483 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
12484 and save pointers directly.
12485 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
12486 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
12487 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
12488 changed signature of functions.
12489 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
12490 (btrace_fetch): Remove code that adds btrace_function pointers to
12491 vector of btrace_functions.
12492 (btrace_clear): Simplify freeing vector of btrace_functions.
12493
12494 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12495
12496 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
12497 Replace VEC_* with std::vector functions.
12498 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
12499 (struct btrace_thread_info)<functions>: Change type to std::vector.
12500
12501 2017-05-30 Simon Marchi <simon.marchi@ericsson.com>
12502
12503 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
12504 "Removed targets and native configurations" up. Merge duplicate
12505 "New commands" sub-sections. Add "New options" sub-sections.
12506
12507 2017-05-26 Alan Hayward <alan.hayward@arm.com>
12508
12509 * defs.h (copy_integer_to_size): New declaration.
12510 * findvar.c (copy_integer_to_size): New function.
12511 (do_cint_test): New selftest function.
12512 (copy_integer_to_size_test): Likewise.
12513 (_initialize_findvar): Likewise.
12514 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
12515 (mips_fbsd_collect_reg): Use raw_collect_integer.
12516 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
12517 (mips64_fill_gregset): Use raw_collect_integer
12518 (mips64_fill_fpregset): Use raw_supply_integer.
12519 * regcache.c (regcache::raw_supply_integer): New function.
12520 (regcache::raw_collect_integer): Likewise.
12521 * regcache.h: (regcache::raw_supply_integer): New declaration.
12522 (regcache::raw_collect_integer): Likewise.
12523
12524 2017-05-24 Yao Qi <yao.qi@linaro.org>
12525
12526 * Makefile.in (SFILES): Add gdbarch-selftests.c.
12527 (COMMON_OBS): Add gdbarch-selftests.o.
12528 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
12529 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
12530 * gdbarch-selftests.c: New file.
12531 * regcache.h (regcache) <~regcache>: Mark it virtual if
12532 GDB_SELF_TEST.
12533 <raw_write>: Likewise.
12534
12535 2017-05-24 Yao Qi <yao.qi@linaro.org>
12536
12537 * regcache.c (current_regcache): Change it to
12538 regcache::current_regcache.
12539 (regcache_observer_target_changed): Update.
12540 (regcache_thread_ptid_changed): Make it a regcache static
12541 method.
12542 (regcache_thread_ptid_changed): Update.
12543 (class regcache_access): New.
12544 (current_regcache_test): Update.
12545 (_initialize_regcache): Update.
12546 * regcache.h: Include forward_list.
12547 (regcache): Declare regcache_thread_ptid_changed and declare
12548 registers_changed_ptid as friend.
12549
12550 2017-05-24 Yao Qi <yao.qi@linaro.org>
12551
12552 * i387-tdep.c (i387_register_to_value): Use register_size
12553 instead of TYPE_LENGTH.
12554 * m68k-tdep.c (m68k_register_to_value): Likewise.
12555
12556 2017-05-24 Yao Qi <yao.qi@linaro.org>
12557
12558 * i387-tdep.c (i387_convert_register_p): Return false if type
12559 code isn't TYPE_CODE_FLT.
12560
12561 2017-05-24 Yao Qi <yao.qi@linaro.org>
12562
12563 * alpha-tdep.c (alpha_convert_register_p): Return true if type
12564 length is 4.
12565 (alpha_register_to_value): Remove type length check.
12566 (alpha_value_to_register): Likewise.
12567
12568 2017-05-24 Yao Qi <yao.qi@linaro.org>
12569
12570 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
12571 TYPE_CODE_FLT.
12572
12573 2017-05-24 Yao Qi <yao.qi@linaro.org>
12574
12575 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
12576 TYPE_CODE_FLT or not.
12577
12578 2017-05-24 Yao Qi <yao.qi@linaro.org>
12579
12580 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
12581 * avr-tdep.c (avr_gdbarch_init): Likewise.
12582 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
12583 * cris-tdep.c (cris_gdbarch_init): Likewise.
12584 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
12585 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
12586 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
12587 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
12588 * mep-tdep.c (mep_gdbarch_init): Likewise.
12589 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
12590 * mips-tdep.c (mips_gdbarch_init): Likewise.
12591 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
12592 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
12593 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
12594 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
12595 * v850-tdep.c (v850_gdbarch_init): Likewise.
12596
12597 2017-05-24 Yao Qi <yao.qi@linaro.org>
12598
12599 * selftest-arch.c (tests_with_arch): Call registers_changed
12600 and reinit_frame_cache.
12601 * selftest.c (run_self_tests): Likewise.
12602
12603 2017-05-24 Yao Qi <yao.qi@linaro.org>
12604
12605 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
12606 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
12607
12608 2017-05-24 Yao Qi <yao.qi@linaro.org>
12609
12610 * rl78-tdep.c (rl78_gdbarch_init): Don't call
12611 set_gdbarch_print_insn.
12612
12613 2017-05-24 Yao Qi <yao.qi@linaro.org>
12614
12615 * h8300-tdep.c (h8300_gdbarch_init): Don't call
12616 set_gdbarch_print_insn.
12617
12618 2017-05-24 Yao Qi <yao.qi@linaro.org>
12619
12620 * alpha-tdep.c (alpha_gdbarch_init): Don't call
12621 set_gdbarch_print_insn.
12622 * arc-tdep.c (arc_gdbarch_init): Likewise.
12623 * arch-utils.c: include dis-asm.h.
12624 (default_print_insn): New function.
12625 * arch-utils.h (default_print_insn): Declare.
12626 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
12627 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
12628 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
12629 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
12630 * frv-tdep.c (frv_gdbarch_init): Likewise.
12631 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
12632 * gdbarch.sh (print_insn): Use default_print_insn.
12633 * gdbarch.c: Regenerated.
12634 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
12635 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
12636 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
12637 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
12638 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
12639 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
12640 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
12641 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
12642 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
12643 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
12644 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
12645 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
12646 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
12647 * mt-tdep.c (mt_gdbarch_init): Likewise.
12648 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
12649 * nios2-tdep.c (nios2_print_insn): Remove.
12650 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
12651 * rx-tdep.c (rx_gdbarch_init): Likewise.
12652 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
12653 * score-tdep.c (score_print_insn): Remove.
12654 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
12655 * sh-tdep.c (sh_gdbarch_init): Likewise.
12656 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
12657 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
12658 * tic6x-tdep.c (tic6x_print_insn): Remove.
12659 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
12660 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
12661 * v850-tdep.c (v850_gdbarch_init): Likewise.
12662 * vax-tdep.c (vax_gdbarch_init): Likewise.
12663 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
12664 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
12665
12666 2017-05-23 John Baldwin <jhb@FreeBSD.org>
12667
12668 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
12669 (MIPS_FP0_REGNUM): Remove.
12670 (MIPS_FSR_REGNUM): Remove.
12671 (mips_fbsd_supply_fpregs): Use mips_regnum.
12672 (mips_fbsd_supply_gregs): Likewise.
12673 (mips_fbsd_collect_fpregs): Likewise.
12674 (mips_fbsd_collect_gregs): Likewise.
12675
12676 2017-05-23 John Baldwin <jhb@FreeBSD.org>
12677
12678 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
12679 (getpfpregs_supplies): New function.
12680 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
12681 getfpregs_supplies.
12682 (mips_fbsd_store_inferior_registers): Likewise.
12683
12684 2017-05-22 Pedro Alves <palves@redhat.com>
12685
12686 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
12687 maintainer.
12688
12689 2017-05-22 Alan Hayward <alan.hayward@arm.com>
12690
12691 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
12692 (store_register): Likewise.
12693 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
12694 (get_decimal_float_return_value): Likewise.
12695 (do_ppc_sysv_return_value): Likewise.
12696 (ppc64_sysv_abi_push_integer): Likewise.
12697 (ppc64_sysv_abi_push_freg): Likewise.
12698 (ppc64_sysv_abi_return_value_base): Likewise.
12699 (ppc64_sysv_abi_return_value): Likewise.
12700 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
12701 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
12702 * rs6000-nat.c: Likewise.
12703 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
12704 (rs6000_value_to_register): Likewise.
12705 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
12706
12707 2017-05-21 Tom Tromey <tom@tromey.com>
12708
12709 PR rust/21466:
12710 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
12711 arrays as "[T]", not "[T; ]".
12712
12713 2017-05-19 Tom Tromey <tom@tromey.com>
12714
12715 PR rust/21484:
12716 * rust-lang.c (exp_descriptor_rust): New function.
12717 (rust_language_defn): Use it.
12718 * p-lang.c (pascal_language_defn): Update.
12719 * opencl-lang.c (opencl_language_defn): Update.
12720 * objc-lang.c (objc_language_defn): Update.
12721 * m2-lang.c (m2_language_defn): Update.
12722 * language.h (struct language_defn)
12723 <la_watch_location_expression>: New member.
12724 * language.c (unknown_language_defn, auto_language_defn)
12725 (local_language_defn): Update.
12726 * go-lang.c (go_language_defn): Update.
12727 * f-lang.c (f_language_defn): Update.
12728 * d-lang.c (d_language_defn): Update.
12729 * c-lang.h (c_watch_location_expression): Declare.
12730 * c-lang.c (c_watch_location_expression): New function.
12731 (c_language_defn, cplus_language_defn, asm_language_defn)
12732 (minimal_language_defn): Use it.
12733 * breakpoint.c (watch_command_1): Call
12734 la_watch_location_expression.
12735 * ada-lang.c (ada_language_defn): Update.
12736
12737 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12738
12739 PR tui/21482
12740 * gdb_curses.h (NOMACROS): Define.
12741 (NCURSES_NOMACROS): Define.
12742
12743 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12744
12745 PR tui/21482
12746 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
12747 arg to char *.
12748 * tui/tui-wingeneral.c (box_win): Likewise.
12749 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
12750 (tui_show_source_line): Likewise.
12751 (tui_show_exec_info_content): Likewise.
12752
12753 2017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
12754
12755 * sparc-tdep.c (sparc_structure_return_p)
12756 (sparc_arg_on_registers_p): New functions.
12757 (sparc32_store_arguments): Use them.
12758 * sparc64-tdep.c (sparc64_16_byte_align_p)
12759 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
12760 Handle TYPE_CODE_ARRAY.
12761
12762 2017-05-17 Yao Qi <yao.qi@linaro.org>
12763
12764 * cli/cli-decode.c (add_alias_cmd): New function.
12765 * command.h (add_alias_cmd): Declare.
12766 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
12767 instead call add_alias_cmd.
12768
12769 2017-05-17 Pedro Alves <palves@redhat.com>
12770
12771 * Makefile.in (nat_extra_makefile_frag): Rename to ...
12772 (nat_makefile_frag): ... this. All references updated.
12773 * configure.ac: Likewise.
12774 * configure.nat: Likewise. Enhance comments.
12775 * configure: Regenerate.
12776
12777 2017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12778
12779 * procfs.c (procfs_create_inferior): Change prototype to match
12780 definition.
12781
12782 2017-05-13 Eli Zaretskii <eliz@gnu.org>
12783
12784 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
12785 C++ compiler warning.
12786
12787 2017-05-12 Tom Tromey <tom@tromey.com>
12788
12789 PR rust/21483:
12790 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
12791 recurse, just call value_struct_elt directly.
12792
12793 2017-05-12 Tom Tromey <tom@tromey.com>
12794
12795 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
12796 OP_RUST_ARRAY>: Fix.
12797
12798 2017-05-12 Tom Tromey <tom@tromey.com>
12799
12800 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
12801
12802 2017-05-09 Yao Qi <yao.qi@linaro.org>
12803
12804 * regcache.c: Include <forward_list>.
12805 (struct regcache_list): Remove.
12806 (current_regcache): Update.
12807 (get_thread_arch_aspace_regcache): Update for std::forward_list.
12808 (regcache_thread_ptid_changed): Likewise.
12809 (registers_changed_ptid): Likewise.
12810 (current_regcache_size): Likewise.
12811
12812 2017-05-09 Yao Qi <yao.qi@linaro.org>
12813
12814 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
12815 (current_regcache_size): New function.
12816 (current_regcache_test): New function.
12817 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
12818
12819 2017-05-08 Alan Hayward <alan.hayward@arm.com>
12820
12821 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
12822 (print_gp_register_row): Use get_frame_register_value.
12823
12824 2017-05-08 Alan Hayward <alan.hayward@arm.com>
12825
12826 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
12827 (mips_supply_fpregset): Likewise.
12828 (mips64_supply_gregset): Likewise.
12829
12830 2017-05-08 Alan Hayward <alan.hayward@arm.com>
12831
12832 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
12833 regcache->raw_supply_zeroed.
12834
12835 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
12836
12837 * configure.nat: Rearrange 'case' statements to match
12838 host before cpu.
12839
12840 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
12841
12842 * Makefile.in: Remove "@host_makefile_frag@". Add variables
12843 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
12844 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
12845 "@nat_extra_makefile_frag@".
12846 (Makefile): Remove dependency on "@frags@".
12847 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
12848 (data-directory/Makefile): Likewise.
12849 * config/aarch64/linux.mh: Deleted; moved contents to
12850 "gdb/configure.nat".
12851 * config/alpha/alpha-linux.mh: Likewise.
12852 * config/alpha/nbsd.mh: Likewise.
12853 * config/arm/linux.mh: Likewise.
12854 * config/arm/nbsdelf.mh: Likewise.
12855 * config/i386/cygwin.mh: Likewise.
12856 * config/i386/cygwin64.mh: Likewise.
12857 * config/i386/darwin.mh: Likewise.
12858 * config/i386/fbsd.mh: Likewise.
12859 * config/i386/fbsd64.mh: Likewise.
12860 * config/i386/go32.mh: Likewise.
12861 * config/i386/i386gnu.mh: Likewise.
12862 * config/i386/i386sol2.mh: Likewise.
12863 * config/i386/linux.mh: Likewise.
12864 * config/i386/linux64.mh: Likewise.
12865 * config/i386/mingw.mh: Likewise.
12866 * config/i386/mingw64.mh: Likewise.
12867 * config/i386/nbsd64.mh: Likewise.
12868 * config/i386/nbsdelf.mh: Likewise.
12869 * config/i386/nto.mh: Likewise.
12870 * config/i386/obsd.mh: Likewise.
12871 * config/i386/obsd64.mh: Likewise.
12872 * config/i386/sol2-64.mh: Likewise.
12873 * config/ia64/linux.mh: Likewise.
12874 * config/m32r/linux.mh: Likewise.
12875 * config/m68k/linux.mh: Likewise.
12876 * config/m68k/nbsdelf.mh: Likewise.
12877 * config/m68k/obsd.mh: Likewise.
12878 * config/m88k/obsd.mh: Likewise.
12879 * config/mips/fbsd.mh: Likewise.
12880 * config/mips/linux.mh: Likewise.
12881 * config/mips/nbsd.mh: Likewise.
12882 * config/mips/obsd64.mh: Likewise.
12883 * config/pa/linux.mh: Likewise.
12884 * config/pa/nbsd.mh: Likewise.
12885 * config/pa/obsd.mh: Likewise.
12886 * config/powerpc/aix.mh: Likewise.
12887 * config/powerpc/fbsd.mh: Likewise.
12888 * config/powerpc/linux.mh: Likewise.
12889 * config/powerpc/nbsd.mh: Likewise.
12890 * config/powerpc/obsd.mh: Likewise.
12891 * config/powerpc/ppc64-linux.mh: Likewise.
12892 * config/powerpc/spu-linux.mh: Likewise.
12893 * config/s390/linux.mh: Likewise.
12894 * config/sh/nbsd.mh: Likewise.
12895 * config/sparc/fbsd.mh: Likewise.
12896 * config/sparc/linux.mh: Likewise.
12897 * config/sparc/linux64.mh: Likewise.
12898 * config/sparc/nbsd64.mh: Likewise.
12899 * config/sparc/nbsdelf.mh: Likewise.
12900 * config/sparc/obsd64.mh: Likewise.
12901 * config/sparc/sol2.mh: Likewise.
12902 * config/tilegx/linux.mh: Likewise.
12903 * config/vax/nbsdelf.mh: Likewise.
12904 * config/vax/obsd.mh: Likewise.
12905 * config/xtensa/linux.mh: Likewise.
12906 * config/i386/i386gnu.mn: New file, with excerpts from
12907 "config/i386/i386gnu.mh".
12908 * configure: Regenerate.
12909 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
12910 *.mh files under "gdb/config".
12911 * configure.nat: New file, with contents from the
12912 "gdb/config/*/*.mh" files.
12913
12914 2017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
12915
12916 * btrace.c (btrace_clear): Free insn vector.
12917
12918 2017-05-05 Pedro Alves <palves@redhat.com>
12919
12920 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
12921 * configure: Regenerate.
12922
12923 2017-05-04 Pedro Alves <palves@redhat.com>
12924
12925 * Makefile.in (SFILES): Add progspace-and-thread.c.
12926 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
12927 (COMMON_OBS): Add progspace-and-thread.o.
12928 * breakpoint.c: Include "progspace-and-thread.h".
12929 (update_inserted_breakpoint_locations)
12930 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
12931 Use scoped_restore_current_pspace_and_thread.
12932 (create_std_terminate_master_breakpoint): Use
12933 scoped_restore_current_program_space.
12934 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
12935 (print_breakpoint_location): Use
12936 scoped_restore_current_program_space.
12937 (bp_loc_is_permanent): Use
12938 scoped_restore_current_pspace_and_thread.
12939 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
12940 (download_tracepoint_locations): Use
12941 scoped_restore_current_pspace_and_thread.
12942 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
12943 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
12944 (enum step_over_calls_kind): Moved from inferior.h.
12945 (class scoped_restore_current_thread): New class.
12946 * gdbthread.h (make_cleanup_restore_current_thread): Delete
12947 declaration.
12948 (scoped_restore_current_thread): New class.
12949 * infcmd.c: Include "common/gdb_optional.h".
12950 (continue_1, proceed_after_attach): Use
12951 scoped_restore_current_thread.
12952 (notice_new_inferior): Use scoped_restore_current_thread.
12953 * inferior.c: Include "progspace-and-thread.h".
12954 (restore_inferior, save_current_inferior): Delete.
12955 (add_inferior_command, clone_inferior_command): Use
12956 scoped_restore_current_pspace_and_thread.
12957 * inferior.h (scoped_restore_current_inferior): New class.
12958 * infrun.c: Include "progspace-and-thread.h" and
12959 "common/gdb_optional.h".
12960 (follow_fork_inferior): Use
12961 scoped_restore_current_pspace_and_thread.
12962 (scoped_restore_exited_inferior): New class.
12963 (handle_vfork_child_exec_or_exit): Use
12964 scoped_restore_exited_inferior,
12965 scoped_restore_current_pspace_and_thread,
12966 scoped_restore_current_thread and scoped_restore.
12967 (fetch_inferior_event): Use scoped_restore_current_thread.
12968 * linespec.c (decode_line_full, decode_line_1): Use
12969 scoped_restore_current_program_space.
12970 * mi/mi-main.c: Include "progspace-and-thread.h".
12971 (exec_continue): Use scoped_restore_current_thread.
12972 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
12973 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
12974 * proc-service.c (ps_pglobal_lookup): Use
12975 scoped_restore_current_program_space.
12976 * progspace-and-thread.c: New file.
12977 * progspace-and-thread.h: New file.
12978 * progspace.c (release_program_space, clone_program_space): Use
12979 scoped_restore_current_program_space.
12980 (restore_program_space, save_current_program_space)
12981 (save_current_space_and_thread): Delete.
12982 (switch_to_program_space_and_thread): Moved to
12983 progspace-and-thread.c.
12984 * progspace.h (save_current_program_space)
12985 (save_current_space_and_thread): Delete declarations.
12986 (scoped_restore_current_program_space): New class.
12987 * remote.c (remote_btrace_maybe_reopen): Use
12988 scoped_restore_current_thread.
12989 * symtab.c: Include "progspace-and-thread.h".
12990 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
12991 * thread.c (print_thread_info_1): Use
12992 scoped_restore_current_thread.
12993 (struct current_thread_cleanup): Delete.
12994 (do_restore_current_thread_cleanup)
12995 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
12996 (scoped_restore_current_thread::~scoped_restore_current_thread):
12997 ... this new dtor.
12998 (make_cleanup_restore_current_thread): Rename/convert to ...
12999 (scoped_restore_current_thread::scoped_restore_current_thread):
13000 ... this new ctor.
13001 (thread_apply_all_command): Use scoped_restore_current_thread.
13002 (thread_apply_command): Use scoped_restore_current_thread.
13003 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
13004 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
13005
13006 2017-05-04 Pedro Alves <palves@redhat.com>
13007
13008 * thread.c (make_cleanup_restore_current_thread): Move
13009 find_thread_ptid call before the is_stopped call. Assert that the
13010 thread is found. Replace is_stopped call by checking the thread's
13011 state directly. Remove unnecessary NULL-thread check.
13012
13013 2017-05-04 Pedro Alves <palves@redhat.com>
13014
13015 * corelow.c (thread_section_name): New class.
13016 (get_core_register_section, get_core_siginfo): Use it.
13017
13018 2017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
13019
13020 * corelow.c (sniff_core_bfd): Remove extra semicolon.
13021 (get_core_register_section): Remove xfree of NULL pointer.
13022
13023 2017-05-03 Alan Hayward <alan.hayward@arm.com>
13024
13025 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
13026 * regcache.c (regcache::raw_supply_zeroed): New function.
13027 * regcache.h (regcache::raw_supply_zeroed): New declaration.
13028
13029 2017-05-03 Simon Marchi <simon.marchi@ericsson.com>
13030
13031 * gdbarch.sh: Remove commented out definition of
13032 TARGET_CHAR_BIT.
13033 * gdbarch.h: Re-generate.
13034
13035 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
13036
13037 * configure: Regenerate.
13038
13039 2017-05-02 Simon Marchi <simon.marchi@ericsson.com>
13040
13041 * solib-target.c (solib_target_relocate_section_addresses):
13042 Remove num_section_bases, num_bases, segment_bases variables.
13043
13044 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
13045
13046 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
13047
13048 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
13049
13050 * solib-target.c: Include <vector>
13051 (struct lm_info_target) <~lm_info_target>: Remove.
13052 <segment_bases, section_bases>: Change type to
13053 std::vector<CORE_ADDR>.
13054 (library_list_start_segment, library_list_start_section,
13055 library_list_end_library,
13056 solib_target_relocate_section_addresses): Adjust.
13057
13058 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
13059
13060 * gdbarch.sh (software_single_step): Change return type to
13061 std::vector<CORE_ADDR>.
13062 * gdbarch.c, gdbarch.h: Re-generate.
13063 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
13064 Adjust.
13065 (arm_deal_with_atomic_sequence_raw): Adjust.
13066 (thumb_get_next_pcs_raw): Adjust.
13067 (arm_get_next_pcs_raw): Adjust.
13068 (arm_get_next_pcs): Adjust.
13069 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
13070 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
13071 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
13072 (alpha_software_single_step): Adjust.
13073 * alpha-tdep.h (alpha_software_single_step): Adjust.
13074 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
13075 * arm-tdep.c (arm_software_single_step): Adjust.
13076 (arm_breakpoint_kind_from_current_state): Adjust.
13077 * arm-tdep.h (arm_software_single_step): Adjust.
13078 * breakpoint.c (insert_single_step_breakpoint): Adjust.
13079 * cris-tdep.c (cris_software_single_step): Adjust.
13080 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
13081 (micromips_deal_with_atomic_sequence): Adjust.
13082 (deal_with_atomic_sequence): Adjust.
13083 (mips_software_single_step): Adjust.
13084 * mips-tdep.h (mips_software_single_step): Adjust.
13085 * moxie-tdep.c (moxie_software_single_step): Adjust.
13086 * nios2-tdep.c (nios2_software_single_step): Adjust.
13087 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
13088 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
13089 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
13090 * s390-linux-tdep.c (s390_software_single_step): Adjust.
13091 * sparc-tdep.c (sparc_software_single_step): Adjust.
13092 * spu-tdep.c (spu_software_single_step): Adjust.
13093 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
13094
13095 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
13096
13097 * gdbarch.sh: Use semi-colon as field separator instead of colon.
13098 * gdbarch.h: Re-generate.
13099
13100 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
13101
13102 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
13103 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
13104 * python/py-instruction.c, python/py-instruction.h: New file.
13105 * python/py-record.c: Add py-instruction.h include.
13106 (gdbpy_initialize_record): Make gdb.Instruction a super class of
13107 gdb.RecordInstruction.
13108 * python/python-internal.h: Add gdbpy_initialize_instruction
13109 declaration.
13110 * python/python.c (do_start_initialization): Add
13111 gdbpy_initialize_instruction.
13112
13113 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
13114
13115 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
13116 Remove.
13117 (btrace_func_from_recpy_func): New function.
13118 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
13119 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
13120 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
13121 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
13122 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
13123 Also, use new helper functions.
13124 (btpy_list_item): Use new helper functions.
13125 (recpy_bt_function_call_history): Use new type name.
13126 (btpy_call_getset): Remove.
13127 (gdbpy_initialize_btrace): Remove code to initialize
13128 gdb.BtraceFunctionCall.
13129 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
13130 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
13131 recpy_bt_func_prev, recpy_bt_func_next): New export.
13132 * python/py-record.c (recpy_func_type): New static object.
13133 (recpy_func_new, recpy_func_level, recpy_func_symbol,
13134 recpy_func_instructions, recpy_func_up, recpy_func_prev,
13135 recpy_func_next): New function.
13136 (recpy_element_hash, recpy_element_richcompare): Updated comment.
13137 (recpy_func_getset): New static object.
13138 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
13139 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
13140
13141 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
13142
13143 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
13144 (btpy_object, btpy_insn_type, btpy_new): Remove.
13145 (btpy_list_object): Use gdb.RecordInstruction type instead of
13146 gdb.BtraceInstruction type.
13147 (btrace_insn_from_recpy_insn): New function.
13148 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
13149 btpy_new.
13150 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
13151 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
13152 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
13153 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
13154 instead of btpy_object.
13155 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
13156 btpy_insn_data, btpy_insn_decode): Rename to ...
13157 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
13158 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
13159 recpy_bt_insn_decode): This. Also, use new helper functions.
13160 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
13161 recpy_insn_type.
13162 (btpy_insn_getset): Remove.
13163 (gdbpy_initialize_btrace): Remove code to initialize
13164 gdb.BtraceInstruction. Use recpy_element_object.
13165 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
13166 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
13167 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
13168 * python/py-record.c (recpy_insn_type): New static object.
13169 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
13170 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
13171 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
13172 New function.
13173 (recpy_insn_getset): New static object.
13174 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
13175 * python/py-record.h (recpy_element_object): New typedef.
13176 (recpy_insn_type, recpy_insn_new): New export.
13177
13178 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
13179
13180 * py-record-btrace.c (btpy_insn_new): Removed.
13181 (btpy_insn_or_gap_new): New function.
13182 (btpy_insn_error): Removed.
13183 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
13184 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
13185 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
13186 btpy_insn_or_gap_new instead of btpy_insn_new.
13187 (btpy_insn_getset): Remove btpy_insn_error.
13188 * py-record.c (recpy_gap_type): New static object.
13189 (recpy_gap_object): New typedef.
13190 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
13191 recpy_gap_reason_string): New function.
13192 (recpy_gap_getset): New static object.
13193 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
13194 * py-record.h (recpy_gap_new): New export.
13195
13196 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
13197
13198 * python/py-record.c (recpy_ptid): Remove.
13199 (recpy_record_getset): Remove recpy_ptid.
13200
13201 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
13202
13203 * btrace.c (btrace_fetch): Set inferior_ptid.
13204 * python/py-record-btrace.c: Add "py-record.h" include.
13205 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
13206 recpy_bt_end, recpy_bt_instruction_history,
13207 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
13208 in gdb.Record object instead of current ptid.
13209 * python/py-record.c: Include new "py-record.h" file.
13210 (recpy_record_object): Moved to py-record.h.
13211 * python/py-record.h: New file.
13212
13213 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
13214
13215 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
13216 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
13217 indentation.
13218
13219 2017-05-01 Joel Brobecker <brobecker@adacore.com>
13220
13221 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
13222 the past maintainers section.
13223
13224 2017-04-28 Yao Qi <yao.qi@linaro.org>
13225
13226 * infcmd.c (get_return_value): Use regcache ctor, and remove
13227 cleanup.
13228
13229 2017-04-28 Yao Qi <yao.qi@linaro.org>
13230 Pedro Alves <palves@redhat.com>
13231
13232 * regcache.c (regcache::regcache): New tag dispatch ctor.
13233 (do_cooked_read): Moved above.
13234 (regcache_dup): Use the tag dispatch ctor..
13235 * regcache.h (regcache): Declare ctor, delete copy ctor and
13236 assignment operator, remove friend regcache_dup.
13237
13238 2017-04-28 Yao Qi <yao.qi@linaro.org>
13239
13240 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
13241 call method save instead of regcache_cpy.
13242 * regcache.h (struct regcache): Make regcache_dup a friend.
13243
13244 2017-04-28 Yao Qi <yao.qi@linaro.org>
13245
13246 * regcache.c (struct regcache): Move to regcache.h
13247 (regcache::arch): New method.
13248 (regcache_get_ptid): Update.
13249 (get_regcache_arch): Call arch method.
13250 (get_regcache_aspace): Call method aspace.
13251 (register_buffer): Change it to method.
13252 (regcache_save): Change it to regcache::save.
13253 (regcache_restore): Likewise.
13254 (regcache_cpy_no_passthrough): Remove the declaration.
13255 (regcache_cpy): Call methods restore and cpy_no_passthrough.
13256 (regcache_cpy_no_passthrough): Change it to method
13257 cpy_no_passthrough.
13258 (regcache_register_status): Change it to method
13259 get_register_status.
13260 (regcache_invalidate): Change it to method invalidate.
13261 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
13262 (regcache_raw_update): Change it to method raw_update.
13263 (regcache_raw_read): Likewise.
13264 (regcache_raw_read_signed): Likewise.
13265 (regcache_raw_read_unsigned): Likewise.
13266 (regcache_raw_write_signed): Likewise.
13267 (regcache_raw_write_unsigned): Likewise.
13268 (regcache_cooked_read): Likewise.
13269 (regcache_cooked_read_value): Likewise.
13270 (regcache_cooked_read_signed): Likewise.
13271 (regcache_cooked_read_unsigned): Likewise.
13272 (regcache_cooked_write_signed): Likewise.
13273 (regcache_cooked_write_unsigned): Likewise.
13274 (regcache_raw_set_cached_value): Likewise.
13275 (regcache_raw_write): Likewise.
13276 (regcache_cooked_write): Likewise.
13277 (regcache_xfer_part): Likewise.
13278 (regcache_raw_read_part): Likewise.
13279 (regcache_raw_write_part): Likewise.
13280 (regcache_cooked_read_part): Likewise.
13281 (regcache_cooked_write_part): Likewise.
13282 (regcache_raw_supply): Likewise.
13283 (regcache_raw_collect): Likewise.
13284 (regcache_transfer_regset): Likewise.
13285 (regcache_supply_regset): Likewise.
13286 (regcache_collect_regset): Likewise.
13287 (regcache_debug_print_register): Likewise.
13288 (enum regcache_dump_what): Move it to regcache.h.
13289 (regcache_dump): Change it to method dump.
13290 * regcache.h (enum regcache_dump_what): New.
13291 (class regcache): New.
13292 * target.c (target_fetch_registers): Call method
13293 debug_print_register.
13294 (target_store_registers): Likewise.
13295
13296 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13297
13298 * windows-nat.c (struct lm_info_windows): Initialize field.
13299 (windows_make_so): Allocate lm_info_windows with new.
13300 (windows_free_so): Free lm_info_windows with delete.
13301
13302 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13303
13304 * solib-darwin.c (struct lm_info_darwin): Initialize field.
13305 (darwin_current_sos): Allocate lm_info_darwin with new, remove
13306 cleanup.
13307 (darwin_free_so): Free lm_info_darwin with delete.
13308
13309 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13310
13311 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
13312 <l_addr_p>: Change type to bool.
13313 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
13314 (svr4_free_so): Free lm_info_svr4 with delete.
13315 (svr4_copy_library_list): Replace memcpy with call to copy
13316 constructor.
13317 (library_list_start_library, svr4_default_sos): Allocate
13318 lm_info_svr4 with new.
13319
13320 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13321
13322 * solib-target.c (struct lm_info_target): Add destructor,
13323 initialize fields.
13324 <name>: Change type to std::string.
13325 (library_list_start_library): Allocate lm_info_target with new.
13326 (solib_target_free_library_list): Free lm_info_target with
13327 delete.
13328 (solib_target_current_sos): Adapt to std::string.
13329 (solib_target_free_so): Free lm_info_target with delete.
13330
13331 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13332
13333 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
13334 fields.
13335 (frv_current_sos): Allocate lm_info_frv with new.
13336 (frv_relocate_main_executable): Free lm_info_frv with delete,
13337 allocate with new.
13338 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
13339
13340 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13341
13342 * solib-frv.c (struct lm_info_frv): Fix indentation.
13343
13344 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13345
13346 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
13347 map field.
13348 (dsbt_current_sos): Allocate lm_info_dsbt with new.
13349 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
13350 and allocate with new.
13351 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
13352
13353 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13354
13355 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
13356 <filename, member_name>: Change type to std::string.
13357 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
13358 (library_list_start_library): Allocate lm_info_aix with new.
13359 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
13360 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
13361 with copy constructor.
13362
13363 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13364
13365 * solist.h (struct lm_info): Remove.
13366 (struct lm_info_base): New class.
13367 (struct so_list) <lm_info>: Change type to lm_info_base *.
13368 * nto-tdep.c (struct lm_info): Remove.
13369 (lm_addr): Adjust.
13370 * solib-aix.c (struct lm_info): Rename to ...
13371 (struct lm_info_aix): ... this. Extend lm_info_base.
13372 (lm_info_p): Rename to ...
13373 (lm_info_aix_p): ... this, and adjust.
13374 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
13375 solib_aix_parse_libraries, library_list_start_library,
13376 solib_aix_free_library_list, solib_aix_parse_libraries,
13377 solib_aix_get_library_list,
13378 solib_aix_relocate_section_addresses, solib_aix_free_so,
13379 solib_aix_get_section_offsets,
13380 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
13381 Adjust.
13382 (struct solib_aix_inferior_data) <library_list>: Adjust.
13383 * solib-darwin.c (struct lm_info): Rename to ...
13384 (struct lm_info_darwin): ... this. Extend lm_info_base.
13385 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
13386 * solib-dsbt.c (struct lm_info): Rename to ...
13387 (struct lm_info_dsbt): ... this. Extend lm_info_base.
13388 (struct dsbt_info) <main_executable_lm_info): Adjust.
13389 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
13390 dsbt_relocate_section_addresses): Adjust.
13391 * solib-frv.c (struct lm_info): Rename to ...
13392 (struct lm_info_frv): ... this. Extend lm_info_base.
13393 (main_executable_lm_info): Adjust.
13394 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
13395 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
13396 find_canonical_descriptor_in_load_object,
13397 frv_fdpic_find_canonical_descriptor): Adjust.
13398 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
13399 to lm_info_svr4.
13400 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
13401 svr4_clear_so, svr4_copy_library_list,
13402 library_list_start_library, svr4_default_sos, svr4_read_so_list,
13403 svr4_current_sos, svr4_fetch_objfile_link_map,
13404 solist_update_incremental): Adjust.
13405 * solib-svr4.h (struct lm_info_svr4): Move here from
13406 solib-svr4.c.
13407 * solib-target.c (struct lm_info): Rename to ...
13408 (struct lm_info_target): ... this. Extend lm_info_base.
13409 (lm_info_p): Rename to ...
13410 (lm_info_target_p): ... this.
13411 (solib_target_parse_libraries, library_list_start_segment,
13412 library_list_start_section, library_list_start_library,
13413 library_list_end_library, solib_target_free_library_list,
13414 solib_target_current_sos, solib_target_free_so,
13415 solib_target_relocate_section_addresses): Adjust.
13416 * windows-nat.c (struct lm_info): Rename to ...
13417 (struct lm_info_windows): ... this. Extend lm_info_base.
13418 (windows_make_so, handle_load_dll, handle_unload_dll,
13419 windows_xfer_shared_libraries): Adjust.
13420
13421 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13422
13423 * solib-darwin.c (struct darwin_so_list): Remove.
13424 (darwin_current_sos): Allocate an so_list object instead of a
13425 darwin_so_list, separately allocate an lm_info object.
13426 (darwin_free_so): Free lm_info.
13427
13428 2017-04-28 John Baldwin <jhb@FreeBSD.org>
13429
13430 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
13431 with fprintf_filtered.
13432
13433 2017-04-28 Yao Qi <yao.qi@linaro.org>
13434
13435 * regcache.c (regcache::regcache): New function.
13436 (regcache::~regcache): New function.
13437 (regcache_xmalloc_1): Remove.
13438 (regcache_xmalloc): Call new regcache.
13439 (regcache_xfree): Call delete regcache.
13440 (get_thread_arch_aspace_regcache): Call new regcache.
13441
13442 2017-04-28 Yao Qi <yao.qi@linaro.org>
13443
13444 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
13445 lwp instead of ptid_get_lwp.
13446
13447 2017-04-28 Yao Qi <yao.qi@linaro.org>
13448
13449 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
13450 lwp_info instead of getting from inferior_ptid.
13451
13452 2017-04-27 Keith Seitz <keiths@redhat.com>
13453
13454 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
13455 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
13456 (CV_CONVERSION_BADNESS): Define.
13457 (rank_one_type): Remove overly restrictive rvalue reference
13458 rank checks.
13459 Add cv-qualifier checks and subranks for type equality.
13460 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
13461 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
13462 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
13463
13464 2017-04-27 Simon Marchi <simon.marchi@ericsson.com>
13465
13466 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
13467 count when creating the object.
13468
13469 2017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
13470 Ulrich Weigand <uweigand@de.ibm.com>
13471
13472 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
13473 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
13474 is used in AIX.
13475 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
13476 (process_xcoff_symbol): Likewise.
13477 (scan_xcoff_symtab): Likewise.
13478
13479 2017-04-26 Alan Hayward <alan.hayward@arm.com>
13480
13481 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
13482 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
13483 (ia64_access_reg): Use get_frame_register_unsigned.
13484 (ia64_access_rse_reg): Likewise.
13485 (ia64_libunwind_frame_prev_register): Likewise.
13486
13487 2017-04-26 Jiong Wang <jiong.wang@arm.com>
13488
13489 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
13490 * gdbarch.c: Regenerated.
13491 * gdbarch.h: Regenerated.
13492 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
13493 visibility external.
13494 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
13495 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
13496 (enum cfa_how_kind): Move to ...
13497 (struct dwarf2_frame_state_reg_info): Likewise.
13498 (struct dwarf2_frame_state): Likewise.
13499 * dwarf2-frame.h: ... here.
13500 (dwarf2_frame_state_alloc_regs): New declaration.
13501 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
13502 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
13503
13504 2017-04-26 Alan Hayward <alan.hayward@arm.com>
13505
13506 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
13507 regcache_raw_read_unsigned.
13508 (xtensa_pseudo_register_write): Likewise.
13509
13510 2017-04-26 Alan Hayward <alan.hayward@arm.com>
13511
13512 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
13513 (nds32_pseudo_register_write): Likewise.
13514
13515 2017-04-25 Yao Qi <yao.qi@linaro.org>
13516
13517 * regcache.c (struct regcache) <readonly_p>: Change its type
13518 to bool.
13519 (regcache_xmalloc_1): Update parameter type and callers update.
13520
13521 2017-04-25 Yao Qi <yao.qi@linaro.org>
13522
13523 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
13524 set_gdbarch_wchar_bit.
13525 * arm-tdep.c (arm_gdbarch_init): Likewise.
13526
13527 2017-04-25 Pedro Alves <palves@redhat.com>
13528
13529 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
13530 (BothAreRelocatable, memcopy, memmove): Don't define.
13531 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
13532 macros.
13533
13534 2017-04-25 Pedro Alves <palves@redhat.com>
13535
13536 * common/common-defs.h: Include "common/poison.h".
13537 * common/function-view.h: (Not, Or, Requires): Move to traits.h
13538 and adjust.
13539 * common/poison.h: New file.
13540 * common/traits.h: Include <type_traits>.
13541 (Not, Or, Requires): New, moved from common/function-view.h.
13542
13543 2017-04-25 Pedro Alves <palves@redhat.com>
13544
13545 * breakpoint.h (struct breakpoint): In-class initialize all
13546 fields. Make boolean fields "bool".
13547 * breakpoint.c (init_raw_breakpoint_without_location): Remove
13548 memset call and initializations no longer necessary.
13549
13550 2017-04-25 Pedro Alves <palves@redhat.com>
13551
13552 * btrace.c (pt_btrace_insn_flags): Change parameter type to
13553 reference.
13554 (pt_btrace_insn): New function.
13555 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
13556
13557 2017-04-25 Pedro Alves <palves@redhat.com>
13558
13559 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
13560 "base" field and inherit from "bp_location" instead. Add
13561 non-default ctor.
13562 (allocate_location_exception): Use new non-default ctor.
13563 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
13564 (init_bp_location): Convert to ...
13565 (bp_location::bp_location): ... this new ctor, and remove memset
13566 call.
13567 (base_breakpoint_allocate_location): Use the new non-default ctor.
13568 * breakpoint.h (bp_location): Now a class. Declare default and
13569 non-default ctors. In-class initialize all members.
13570 (init_bp_location): Remove declaration.
13571
13572 2017-04-25 Pedro Alves <palves@redhat.com>
13573
13574 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
13575 assignment operator.
13576
13577 2017-04-24 Yao Qi <yao.qi@linaro.org>
13578
13579 * doublest.c (convert_doublest_to_floatformat): Call
13580 floatformat_totalsize_bytes.
13581
13582 2017-04-22 Tom Tromey <tom@tromey.com>
13583
13584 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
13585 ui_out_emit_list.
13586 * stack.c (print_frame): Use ui_out_emit_list.
13587 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
13588 ui_out_emit_list.
13589 * mi/mi-main.c (print_one_inferior)
13590 (mi_cmd_data_list_register_names)
13591 (mi_cmd_data_list_register_values, mi_cmd_list_features)
13592 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
13593 ui_out_emit_list.
13594 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
13595 (mi_output_solib_attribs): Use ui_out_emit_list,
13596 ui_out_emit_tuple.
13597 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
13598 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
13599 (mi_cmd_stack_list_args, list_args_or_locals): Use
13600 ui_out_emit_list.
13601 * disasm.c (do_assembly_only): Use ui_out_emit_list.
13602 * breakpoint.c (print_solib_event, output_thread_groups): Use
13603 ui_out_emit_list.
13604
13605 2017-04-22 Tom Tromey <tom@tromey.com>
13606
13607 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
13608 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
13609 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
13610
13611 2017-04-22 Tom Tromey <tom@tromey.com>
13612
13613 * tracepoint.c (tvariables_info_1)
13614 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
13615
13616 2017-04-22 Tom Tromey <tom@tromey.com>
13617
13618 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
13619 annotate_arg_emitter.
13620 * breakpoint.c (print_mention_watchpoint)
13621 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
13622 * annotate.h (struct annotate_arg_emitter): New.
13623
13624 2017-04-22 Tom Tromey <tom@tromey.com>
13625
13626 * record-btrace.c (record_btrace_insn_history)
13627 (record_btrace_insn_history_range, record_btrace_call_history)
13628 (record_btrace_call_history_range): Use ui_out_emit_tuple.
13629 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
13630 ui_out_emit_tuple.
13631 * stack.c (print_frame_info): Use ui_out_emit_tuple.
13632 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
13633 * skip.c (skip_info): Use ui_out_emit_tuple.
13634 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
13635 * progspace.c (print_program_space): Use ui_out_emit_tuple.
13636 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
13637 * osdata.c (info_osdata): Use ui_out_emit_tuple.
13638 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
13639 ui_out_emit_tuple.
13640 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
13641 (output_register, mi_cmd_data_read_memory)
13642 (mi_cmd_data_read_memory_bytes, mi_load_progress)
13643 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
13644 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
13645 Use ui_out_emit_tuple.
13646 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
13647 ui_out_emit_tuple.
13648 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
13649 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
13650 * linux-thread-db.c (info_auto_load_libthread_db): Use
13651 ui_out_emit_tuple.
13652 * inferior.c (print_inferior): Use ui_out_emit_tuple.
13653 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
13654 * disasm.c (do_mixed_source_and_assembly_deprecated)
13655 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
13656 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
13657 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
13658 * breakpoint.c (print_one_breakpoint_location)
13659 (print_one_breakpoint): Use ui_out_emit_tuple.
13660 * auto-load.c (print_script, info_auto_load_cmd): Use
13661 ui_out_emit_tuple.
13662 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
13663
13664 2017-04-21 Simon Marchi <simon.marchi@ericsson.com>
13665
13666 * thread.c (print_thread_info_1): Remove dead code.
13667
13668 2017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13669
13670 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
13671 GDB_SELF_TEST.
13672 * arm-tdep.c (selftests::arm_record_test): Likewise.
13673
13674 2017-04-21 Yao Qi <yao.qi@linaro.org>
13675
13676 * regcache.c (regcache_restore): Remove argument 2. Replace
13677 argument 3 with regcache. Get register status from
13678 src->register_status and get register contents from
13679 register_buffer (src, regnum).
13680 (regcache_cpy): Update.
13681
13682 2017-04-19 Pedro Alves <palves@redhat.com>
13683
13684 * gdbthread.h (thread): Add missing closing parenthesis in
13685 comment.
13686
13687 2017-04-19 Pedro Alves <palves@redhat.com>
13688
13689 * common/refcounted-object.h: New file.
13690 * gdbthread.h: Include "common/refcounted-object.h".
13691 (thread_info): Inherit from refcounted_object and add comments.
13692 (thread_info::incref, thread_info::decref)
13693 (thread_info::m_refcount): Delete.
13694 (thread_info::deletable): Use the refcounted_object::refcount()
13695 method.
13696 * inferior.c (current_inferior_): Add comment.
13697 (set_current_inferior): Increment/decrement refcounts.
13698 (prune_inferiors, remove_inferior_command): Skip inferiors marked
13699 not-deletable instead of comparing with the current inferior.
13700 (initialize_inferiors): Increment the initial inferior's refcount.
13701 * inferior.h (struct inferior): Forward declare.
13702 Include "common/refcounted-object.h".
13703 (current_inferior, set_current_inferior): Move declaration to
13704 before struct inferior's definition, and fix comment.
13705 (inferior): Inherit from refcounted_object. Add comments.
13706 * thread.c (switch_to_thread_no_regs): Reference the thread's
13707 inferior pointer directly instead of doing a ptid lookup.
13708 (switch_to_no_thread): New function.
13709 (switch_to_thread(thread_info *)): New function, factored out
13710 from ...
13711 (switch_to_thread(ptid_t)): ... this.
13712 (restore_current_thread): Delete.
13713 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
13714 fields, and add 'inf' field.
13715 (do_restore_current_thread_cleanup): Check whether old->inf is
13716 alive instead of looking up an inferior by ptid. Use
13717 switch_to_thread and switch_to_no_thread.
13718 (restore_current_thread_cleanup_dtor): Use old->inf directly
13719 instead of lookup up an inferior by id. Decref the inferior.
13720 Don't restore 'removable'.
13721 (make_cleanup_restore_current_thread): Same the inferior pointer
13722 in old, instead of the inferior number. Incref the inferior.
13723 Don't save/clear 'removable'.
13724
13725 2017-04-19 Pedro Alves <palves@redhat.com>
13726
13727 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13728 unittests/scoped_restore-selftests.c.
13729 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
13730 * common/scoped_restore.h (scoped_restore_base): Make "class".
13731 (scoped_restore_base::release): New public method.
13732 (scoped_restore_base::scoped_restore_base): New protected ctor.
13733 (scoped_restore_base::m_saved_var): New protected field.
13734 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
13735 scoped_restore_base base class instead of m_saved_var directly.
13736 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
13737 (scoped_restore_tmpl::scoped_restore_tmpl(const
13738 scoped_restore_tmpl<T>&)): Likewise.
13739 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
13740 method.
13741 (scoped_restore_tmpl::saved_var): New method.
13742 (scoped_restore_tmpl::m_saved_var): Delete.
13743 * inferior.h (inferior::detaching): Now a bool.
13744 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
13745 cleanup.
13746 * unittests/scoped_restore-selftests.c: New file.
13747
13748 2017-04-19 Pedro Alves <palves@redhat.com>
13749
13750 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
13751 Re-sort in alphabetic order.
13752
13753 2017-04-18 Pedro Alves <palves@redhat.com>
13754
13755 * xml-support.c (obstack_xml_printf): Delete.
13756 * xml-support.h (obstack_xml_printf): Delete.
13757
13758 2017-04-18 Pedro Alves <palves@redhat.com>
13759
13760 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
13761 vdebug, verror, body_text, start_element, end_element, name,
13762 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
13763 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
13764 is_xinclude>: Make private and add m_ prefix.
13765 (gdb_xml_parser::body_text): New method, based on ...
13766 (gdb_xml_body_text): ... this. Adjust.
13767 (gdb_xml_parser::vdebug): New method, based on ...
13768 (gdb_xml_debug): ... this. Adjust.
13769 (gdb_xml_parser::verror): New method, based on ...
13770 (gdb_xml_error): ... this. Adjust.
13771 (gdb_xml_parser::start_element): New method, based on ...
13772 (gdb_xml_start_element): ... this. Adjust.
13773 (gdb_xml_start_element_wrapper): Defer to
13774 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
13775 (gdb_xml_parser::end_element): New method, based on ...
13776 (gdb_xml_end_element_wrapper): ... this. Adjust.
13777 (gdb_xml_parser::~gdb_xml_parser): Adjust.
13778 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
13779 (gdb_xml_parser::use_dtd): New method, based on ...
13780 (gdb_xml_use_dtd): ... this. Adjust.
13781 (gdb_xml_parser::parse): New method, based on ...
13782 (gdb_xml_parse): ... this. Adjust.
13783 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
13784 (xinclude_start_include): Adjust to call the parser's name method.
13785 (xml_xinclude_default, xml_xinclude_start_doctype)
13786 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
13787 method.
13788 (xml_process_xincludes): Adjust to call parser methods.
13789 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
13790 declarations.
13791
13792 2017-04-18 Pedro Alves <palves@redhat.com>
13793
13794 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
13795 gdb::optional<std::string>.
13796 * xml-support.c: Include <string>.
13797 (scope_level::scope_level(scope_level &&))
13798 (scope_level::~scope_level): Delete.
13799 (scope_level::body): Now a std::string.
13800 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
13801 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
13802 parameter.
13803 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
13804 (xinclude_parsing_data::output): Now a std::string reference.
13805 (xinclude_start_include): Adjust.
13806 (xml_xinclude_default): Adjust.
13807 (xml_process_xincludes): Add 'output' parameter, and return bool.
13808 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
13809 and return bool.
13810 * xml-tdesc.c: Include <unordered_map> and <string>.
13811 (tdesc_xml_cache): Delete.
13812 (tdesc_xml_cache_s): Delete.
13813 (xml_cache): Now an std::unordered_map.
13814 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
13815 (target_fetch_description_xml): Change return type to
13816 gdb::optional<std::string>, and adjust.
13817 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
13818 (target_fetch_description_xml): Change return type to
13819 gdb::optional<std::string>.
13820
13821 2017-04-18 Pedro Alves <palves@redhat.com>
13822
13823 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13824 unittests/optional-selftests.c.
13825 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
13826 * unittests/optional-selftests.c: New file.
13827 * unittests/optional/assignment/1.cc: New file.
13828 * unittests/optional/assignment/2.cc: New file.
13829 * unittests/optional/assignment/3.cc: New file.
13830 * unittests/optional/assignment/4.cc: New file.
13831 * unittests/optional/assignment/5.cc: New file.
13832 * unittests/optional/assignment/6.cc: New file.
13833 * unittests/optional/assignment/7.cc: New file.
13834 * unittests/optional/cons/copy.cc: New file.
13835 * unittests/optional/cons/default.cc: New file.
13836 * unittests/optional/cons/move.cc: New file.
13837 * unittests/optional/cons/value.cc: New file.
13838 * unittests/optional/in_place.cc: New file.
13839 * unittests/optional/observers/1.cc: New file.
13840 * unittests/optional/observers/2.cc: New file.
13841
13842 2017-04-18 Pedro Alves <palves@redhat.com>
13843
13844 * common/gdb_optional.h: Include common/traits.h.
13845 (in_place_t): New type.
13846 (in_place): New constexpr variable.
13847 (optional::optional): Remove member initialization of
13848 m_instantiated.
13849 (optional::optional(in_place_t...)): New constructor.
13850 (optional::~optional): Use reset.
13851 (optional::optional(const optional&)): New.
13852 (optional::optional(const optional&&)): New.
13853 (optional::optional(T &)): New.
13854 (optional::optional(T &&)): New.
13855 (operator::operator=(const optional &)): New.
13856 (operator::operator=(optional &&)): New.
13857 (operator::operator= (const T &))
13858 (operator::operator= (T &&))
13859 (operator::emplace (Args &&... args)): Return a T&. Use reset.
13860 (operator::reset): New.
13861 (operator::m_instantiated):: Add in-class initializer.
13862 * common/traits.h: Include <type_traits>.
13863 (struct And): New types.
13864
13865 2017-04-18 Pedro Alves <palves@redhat.com>
13866
13867 * xml-support.c: Include <vector>.
13868 (scope_level::scope_level(const gdb_xml_element *))
13869 (scope_level::scope_level(scope_level&&)): New.
13870 (scope_level::~scope_level): New.
13871 (scope_level_s): Delete.
13872 (gdb_xml_parser::scopes): Now a std::vector.
13873 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
13874 Use std::vector.
13875 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
13876 scope cleanup code.
13877 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
13878 of the scopes member. Use std::vector::emplace_back.
13879
13880 2017-04-18 Pedro Alves <palves@redhat.com>
13881
13882 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
13883 a bool.
13884 (gdb_xml_end_element): Change type of first parameter.
13885 (gdb_xml_cleanup): Rename to ...
13886 (gdb_xml_parser::~gdb_xml_parser): ... this.
13887 (gdb_xml_create_parser_and_cleanup): Delete with ...
13888 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
13889 to this new ctor.
13890 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
13891 using gdb_xml_create_parser_and_cleanup.
13892 (xinclude_parsing_data): Add ctor/dtor.
13893 (xml_xinclude_cleanup): Delete.
13894 (xml_process_xincludes): Create a local xinclude_parsing_data
13895 instead of heap-allocating one. Create a local gdb_xml_parser
13896 instead of heap-allocating one with
13897 gdb_xml_create_parser_and_cleanup.
13898
13899 2017-04-18 John Baldwin <jhb@FreeBSD.org>
13900
13901 PR threads/20743
13902 * fbsd-nat.c (resume_one_thread_cb): Remove.
13903 (resume_all_threads_cb): Remove.
13904 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
13905 iterate_over_threads.
13906
13907 2017-04-17 Joel Brobecker <brobecker@adacore.com>
13908
13909 * NEWS: Create a new section for the next release branch.
13910 Rename the section of the current branch, now that it has
13911 been cut.
13912
13913 2017-04-17 Joel Brobecker <brobecker@adacore.com>
13914
13915 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
13916 * version.in: Bump version to 8.0.50.DATE-git.
13917
13918 2017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
13919
13920 PR gdb/21385
13921 * windows-nat.c (windows_create_inferior): Declare 'allargs'
13922 independently of the host, and fix build breakage on Cygwin.
13923
13924 2017-04-13 Pedro Alves <palves@redhat.com>
13925
13926 * inferior.c (free_inferior): Convert to ...
13927 (inferior::~inferior): ... this dtor.
13928 (inferior::inferior): New ctor, factored out from ...
13929 (add_inferior_silent): ... here. Allocate the inferior with a new
13930 expression.
13931 (delete_inferior): Call delete instead of free_inferior.
13932 * inferior.h (gdb_environ, continuation): Forward declare.
13933 (inferior): Now a class. Add in-class initialization to all
13934 members. Make boolean fields bool, except 'detaching'.
13935 (inferior::inferior): New explicit ctor.
13936 (inferior::~inferior): New.
13937
13938 2017-04-13 Pedro Alves <palves@redhat.com>
13939
13940 * inferior.c (init_inferior_list): Delete.
13941 * inferior.h (init_inferior_list): Delete.
13942
13943 2017-04-13 Pedro Alves <palves@redhat.com>
13944
13945 PR threads/13217
13946 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
13947 (top level): Call it twice, with different thread sets.
13948
13949 2017-04-13 Pedro Alves <palves@redhat.com>
13950
13951 * thread.c: Include <algorithm>.
13952 (thread_array_cleanup): Delete.
13953 (scoped_inc_dec_ref): New class.
13954 (live_threads_count): New function.
13955 (set_thread_refcount): Delete.
13956 (tp_array_compar_ascending): Now a bool.
13957 (tp_array_compar): Convert to a std::sort comparison function.
13958 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
13959 and live_threads_count.
13960
13961 2017-04-13 Pedro Alves <palves@redhat.com>
13962
13963 * infrun.c (follow_fork_inferior): Also switch the current
13964 inferior.
13965
13966 2017-04-13 Pedro Alves <palves@redhat.com>
13967
13968 * breakpoint.c (watch_command_1): Save watchpoint-frame info
13969 before calling create_internal_breakpoint.
13970
13971 2017-04-13 Pedro Alves <palves@redhat.com>
13972
13973 * fork-child.c (execv_argv): New class.
13974 (breakup_args): Refactored as ...
13975 (execv_argv::init_for_no_shell): .. this method of execv_argv.
13976 Copy arguments to storage and replace separators with NULL
13977 terminators in place.
13978 (escape_bang_in_quoted_argument): Adjust to return bool.
13979 (execv_argv::execv_argv): New ctor.
13980 (execv_argv::init_for_shell): New method, factored out from
13981 fork_inferior. Don't strdup strings into the vector.
13982 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
13983 Remove free_vector_argv call.
13984
13985 2017-04-13 Yao Qi <yao.qi@linaro.org>
13986
13987 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
13988 tdep->rx_psw_type.
13989
13990 2017-04-13 Yao Qi <yao.qi@linaro.org>
13991
13992 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
13993 * rx-tdep.c (rx_gdbarch_init): Likewise.
13994
13995 2017-04-13 Pedro Alves <palves@redhat.com>
13996
13997 * breakpoint.h (struct breakpoint): Reindent.
13998
13999 2017-04-13 Pedro Alves <palves@redhat.com>
14000
14001 * breakpoint.c (bp_location): Rename to ...
14002 (bp_locations): ... this. All references updated.
14003 (bp_location_count): Rename to ...
14004 (bp_locations_count): ... this. All references updated.
14005 (bp_location_placed_address_before_address_max): Rename to ...
14006 (bp_locations_placed_address_before_address_max): ... this. All
14007 references updated.
14008 (bp_location_shadow_len_after_address_max): Rename to ...
14009 (bp_locations_shadow_len_after_address_max): ... this. All
14010 references updated.
14011 (bp_location_compare_addrs): Rename to ...
14012 (bp_locations_compare_addrs): ... this. All references updated.
14013 (bp_location_compare):Rename to ...
14014 (bp_locations_compare): ... this. All references updated.
14015 (bp_location_target_extensions_update): Rename to ...
14016 (bp_locations_target_extensions_update): ... this. All references
14017 updated.
14018
14019 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
14020
14021 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
14022 * common/common.m4: Check headers 'termios.h', 'termio.h' and
14023 'sgtty.h'.
14024 * common/gdb_termios.h: New file, with parts of "terminal.h".
14025 * inflow.c: Include "gdb_termios.h".
14026 * ser-unix.c: Include "gdb_termios.h".
14027 * terminal.h: Move terminal-related defines to
14028 "common/gdb_termios.h".
14029
14030 2017-04-12 Tom Tromey <tom@tromey.com>
14031
14032 * probe.c (parse_probes): Update.
14033 * location.h (delete_event_location): Don't declare.
14034 (event_location_deleter::operator()): Update.
14035 * location.c (event_location_deleter::operator()): Rename from
14036 delete_event_location.
14037 * linespec.h (linespec_result) <location>: Change type to
14038 event_location_up.
14039 * linespec.c (canonicalize_linespec, event_location_to_sals)
14040 (decode_objc): Update.
14041 (linespec_result): Don't call delete_event_location.
14042 * breakpoint.c (create_breakpoints_sal)
14043 (bkpt_probe_create_sals_from_location)
14044 (strace_marker_create_sals_from_location): Update.
14045
14046 2017-04-12 Tom Tromey <tom@tromey.com>
14047
14048 * linespec.h (struct linespec_result): Add constructor and
14049 destructor.
14050 (init_linespec_result, destroy_linespec_result)
14051 (make_cleanup_destroy_linespec_result): Don't declare.
14052 * linespec.c (init_linespec_result): Remove.
14053 (linespec_result::~linespec_result): Rename from
14054 destroy_linespec_result. Update.
14055 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
14056 Remove.
14057 * breakpoint.c (create_breakpoint, break_range_command)
14058 (decode_location_default): Update.
14059 * ax-gdb.c (agent_command_1): Update.
14060
14061 2017-04-12 Tom Tromey <tom@tromey.com>
14062
14063 * remote.c (remote_download_tracepoint): Update.
14064 * python/py-breakpoint.c (bppy_get_location): Update.
14065 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
14066 (gdbscm_breakpoint_location): Update.
14067 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
14068 * breakpoint.h (struct breakpoint) <location, location_range_end>:
14069 Change type to event_location_up.
14070 * breakpoint.c (create_overlay_event_breakpoint)
14071 (create_longjmp_master_breakpoint)
14072 (create_std_terminate_master_breakpoint)
14073 (create_exception_master_breakpoint)
14074 (breakpoint_event_location_empty_p, print_breakpoint_location)
14075 (print_one_breakpoint_location, create_thread_event_breakpoint)
14076 (init_breakpoint_sal, create_breakpoint)
14077 (print_recreate_ranged_breakpoint, break_range_command)
14078 (init_ada_exception_breakpoint, say_where): Update.
14079 (base_breakpoint_dtor): Don't call delete_event_location.
14080 (bkpt_print_recreate, tracepoint_print_recreate)
14081 (dprintf_print_recreate, update_static_tracepoint)
14082 (breakpoint_re_set_default): Update.
14083
14084 2017-04-12 Tom Tromey <tom@tromey.com>
14085
14086 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
14087 type of "to_do". Update.
14088 (compute_stack_depth): Use std::vector.
14089
14090 2017-04-12 Tom Tromey <tom@tromey.com>
14091
14092 * printcmd.c (find_instruction_backward): Use std::vector.
14093
14094 2017-04-12 Tom Tromey <tom@tromey.com>
14095
14096 * symfile.c (objfilep): Remove typedef.
14097 (reread_symbols): Use a std::vector.
14098
14099 2017-04-12 Tom Tromey <tom@tromey.com>
14100
14101 * mi/mi-main.c (exec_direction_forward): Remove.
14102 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
14103 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
14104 scoped_restore.
14105 * guile/guile.c (guile_repl_command, guile_command)
14106 (gdbscm_execute_gdb_command): Use scoped_restore.
14107 * go-exp.y (go_parse): Use scoped_restore.
14108 * d-exp.y (d_parse): Use scoped_restore.
14109 * cli/cli-decode.c (cmd_func): Use scoped_restore.
14110 * c-exp.y (c_parse): Use scoped_restore.
14111
14112 2017-04-12 Tom Tromey <tom@tromey.com>
14113
14114 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
14115 (mi_parse): Update return type.
14116 (mi_parse_free): Remove.
14117 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
14118 (mi_parse::~mi_parse): Rename from mi_parse_free.
14119 (mi_parse_cleanup): Remove.
14120 (mi_parse): Return a unique_ptr. Use new.
14121 * mi/mi-main.c (mi_execute_command): Update.
14122
14123 2017-04-12 Tom Tromey <tom@tromey.com>
14124
14125 * location.c (explicit_location_lex_one): Return a
14126 unique_xmalloc_ptr.
14127 (string_to_explicit_location): Update. Remove cleanups.
14128
14129 2017-04-12 Tom Tromey <tom@tromey.com>
14130
14131 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
14132 (compare_value_and_voffset): Change type. Update.
14133 (compute_vtable_size): Change type of "offset_vec".
14134 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
14135 (gnuv3_get_typeid): Remove extraneous declaration.
14136
14137 2017-04-12 Tom Tromey <tom@tromey.com>
14138
14139 * charset.h (wchar_iterator): Fix comment.
14140
14141 2017-04-12 Tom Tromey <tom@tromey.com>
14142
14143 * charset.c (iconv_wrapper): New class.
14144 (cleanup_iconv): Remove.
14145 (convert_between_encodings): Use it.
14146
14147 2017-04-12 Tom Tromey <tom@tromey.com>
14148
14149 * symfile.h (increment_reading_symtab): Update type.
14150 * symfile.c (decrement_reading_symtab): Remove.
14151 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
14152 * psymtab.c (psymtab_to_symtab): Update.
14153 * dwarf2read.c (dw2_instantiate_symtab): Update.
14154
14155 2017-04-12 Tom Tromey <tom@tromey.com>
14156
14157 * jit.c (struct jit_reader): Declare separately. Add constructor
14158 and destructor. Change type of "handle".
14159 (loaded_jit_reader): Define separately.
14160 (jit_reader_load): Update. New "new".
14161 (jit_reader_unload_command): Use "delete".
14162 * gdb-dlfcn.h (struct dlclose_deleter): New.
14163 (gdb_dlhandle_up): New typedef.
14164 (gdb_dlopen, gdb_dlsym): Update types.
14165 (gdb_dlclose): Remove.
14166 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
14167 (gdb_dlsym): Change type of "handle".
14168 (make_cleanup_dlclose): Remove.
14169 (dlclose_deleter::operator()): Rename from gdb_dlclose.
14170 * compile/compile-c-support.c (load_libcc): Update.
14171
14172 2017-04-12 Tom Tromey <tom@tromey.com>
14173
14174 * symtab.h (find_pcs_for_symtab_line): Change return type.
14175 * symtab.c (find_pcs_for_symtab_line): Change return type.
14176 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
14177 type of "vec". Update.
14178 (ltpy_get_pcs_for_line): Update.
14179 * linespec.c (decode_digits_ordinary): Update.
14180
14181 2017-04-12 Tom Tromey <tom@tromey.com>
14182
14183 * tracepoint.c (actions_command): Update.
14184 * python/python.c (python_command, python_interactive_command):
14185 Update.
14186 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
14187 * guile/guile.c (guile_command): Update.
14188 * defs.h (read_command_lines, read_command_lines_1): Return
14189 command_line_up.
14190 (command_lines_deleter): New struct.
14191 (command_line_up): New typedef.
14192 * compile/compile.c (compile_code_command)
14193 (compile_print_command): Update.
14194 * cli/cli-script.h (get_command_line, copy_command_lines): Return
14195 command_line_up.
14196 (make_cleanup_free_command_lines): Remove.
14197 * cli/cli-script.c (get_command_line, read_command_lines_1)
14198 (copy_command_lines): Return command_line_up.
14199 (while_command, if_command, read_command_lines, define_command)
14200 (document_command): Update.
14201 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
14202 Remove.
14203 * breakpoint.h (breakpoint_set_commands): Change type of
14204 "commands".
14205 * breakpoint.c (breakpoint_set_commands): Change type of
14206 "commands". Update.
14207 (do_map_commands_command, update_dprintf_command_list)
14208 (create_tracepoint_from_upload): Update.
14209
14210 2017-04-12 Tom Tromey <tom@tromey.com>
14211
14212 * tracepoint.c (scope_info): Update.
14213 * spu-tdep.c (spu_catch_start): Update.
14214 * python/python.c (gdbpy_decode_line): Update.
14215 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
14216 * python/py-breakpoint.c (bppy_init): Update.
14217 * probe.c (parse_probes): Update.
14218 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
14219 * location.h (event_location_deleter): New struct.
14220 (event_location_up): New typedef.
14221 (new_linespec_location, new_address_location, new_probe_location)
14222 (new_explicit_location, copy_event_location)
14223 (string_to_event_location, string_to_event_location_basic)
14224 (string_to_explicit_location): Update return type.
14225 (make_cleanup_delete_event_location): Remove.
14226 * location.c (new_linespec_location, new_address_location)
14227 (new_probe_location, new_explicit_location, copy_event_location):
14228 Return event_location_up.
14229 (delete_event_location_cleanup)
14230 (make_cleanup_delete_event_location): Remove.
14231 (string_to_explicit_location, string_to_event_location_basic)
14232 (string_to_event_location): Return event_location_up.
14233 * linespec.c (canonicalize_linespec, event_location_to_sals)
14234 (decode_line_with_current_source)
14235 (decode_line_with_last_displayed, decode_objc): Update.
14236 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
14237 * completer.c (location_completer): Update.
14238 * cli/cli-cmds.c (edit_command, list_command): Update.
14239 * breakpoint.c (create_overlay_event_breakpoint)
14240 (create_longjmp_master_breakpoint)
14241 (create_std_terminate_master_breakpoint)
14242 (create_exception_master_breakpoint)
14243 (create_thread_event_breakpoint): Update.
14244 (init_breakpoint_sal): Update. Remove some dead code.
14245 (create_breakpoint_sal): Change type of "location". Update.
14246 (create_breakpoints_sal, create_breakpoint, break_command_1)
14247 (dprintf_command, break_range_command, until_break_command)
14248 (init_ada_exception_breakpoint)
14249 (strace_marker_create_sals_from_location)
14250 (update_static_tracepoint, trace_command, ftrace_command)
14251 (strace_command, create_tracepoint_from_upload): Update.
14252 * break-catch-throw.c (re_set_exception_catchpoint): Update.
14253 * ax-gdb.c (agent_command_1): Update.
14254
14255 2017-04-12 Pedro Alves <palves@redhat.com>
14256
14257 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
14258 * configure.tgt: Handle i[34567]86-*-go32* and
14259 i[34567]86-*-msdosdjgpp*.
14260 * i386-tdep.c (i386_svr4_reg_to_regnum):
14261 Make extern.
14262 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
14263 i386-go32-tdep.c.
14264 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
14265 * i386-go32-tdep.c: New file.
14266 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
14267 declarations.
14268
14269 2017-04-12 Simon Marchi <simon.marchi@ericsson.com>
14270
14271 * aix-thread.c (pd_status2str): Change return type to const char *.
14272
14273 2017-04-12 Pedro Alves <palves@redhat.com>
14274
14275 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
14276 calls to set_gdbarch_gnu_triplet_regexp.
14277
14278 2017-04-12 Pedro Alves <palves@redhat.com>
14279
14280 PR gdb/21323
14281 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
14282 New enum value.
14283 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
14284 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
14285 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
14286 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
14287 * gdbarch.h, gdbarch.c: Regenerate.
14288 * aarch64-tdep.c (aarch64_gdbarch_init): Override
14289 gdbarch_wchar_bit and gdbarch_wchar_signed.
14290 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
14291 * arm-tdep.c (arm_gdbarch_init): Likewise.
14292 * avr-tdep.c (avr_gdbarch_init): Likewise.
14293 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
14294 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
14295 * i386-tdep.c (i386_go32_init_abi): Likewise.
14296 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
14297 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
14298 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
14299 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
14300 * sh-tdep.c (sh_gdbarch_init): Likewise.
14301 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
14302 * sparc64-tdep.c (sparc64_init_abi): Likewise.
14303 * windows-tdep.c (windows_init_abi): Likewise.
14304 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
14305
14306 2017-04-12 Pedro Alves <palves@redhat.com>
14307
14308 PR c++/21323
14309 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
14310 cplus_primitive_type_char32_t>: New enum values.
14311 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
14312 and cplus_primitive_type_char32_t.
14313 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
14314 32, use the archtecture's built-in type for char16_t and char32_t,
14315 respectively. Otherwise, fallback to init_integer_type as before,
14316 but make the type unsigned, and issue a complaint.
14317 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
14318
14319 2017-04-12 Alan Hayward <alan.hayward@arm.com>
14320
14321 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
14322 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
14323
14324 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
14325
14326 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
14327 'const char *'.
14328
14329 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
14330
14331 * common/common-utils.c (free_vector_argv): New function.
14332 * common/common-utils.h: Include <vector>.
14333 (free_vector_argv): New prototype.
14334 * darwin-nat.c (darwin_create_inferior): Rewrite function
14335 prototype in order to constify "exec_file" and accept a
14336 "std::string" for "allargs".
14337 * fork-child.c: Include <vector>.
14338 (breakup_args): Rewrite function, using C++.
14339 (fork_inferior): Rewrite function header, constify "exec_file_arg"
14340 and accept "std::string" for "allargs". Update the code to
14341 calculate "argv" based on "allargs". Update calls to "exec_fun"
14342 and "execvp".
14343 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
14344 order to constify "exec_file" and accept a "std::string" for
14345 "allargs".
14346 * go32-nat.c (go32_create_inferior): Likewise.
14347 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
14348 * infcmd.c (run_command_1): Constify "exec_file". Use
14349 "std::string" for inferior arguments.
14350 * inferior.h (fork_inferior): Update prototype.
14351 * linux-nat.c (linux_nat_create_inferior): Rewrite function
14352 prototype in order to constify "exec_file" and accept a
14353 "std::string" for "allargs".
14354 * nto-procfs.c (procfs_create_inferior): Likewise.
14355 * procfs.c (procfs_create_inferior): Likewise.
14356 * remote-sim.c (gdbsim_create_inferior): Likewise.
14357 * remote.c (extended_remote_run): Update code to accept
14358 "std::string" as argument.
14359 (extended_remote_create_inferior): Rewrite function prototype in
14360 order to constify "exec_file" and accept a "std::string" for
14361 "allargs".
14362 * rs6000-nat.c (super_create_inferior): Likewise.
14363 (rs6000_create_inferior): Likewise.
14364 * target.h (struct target_ops) <to_create_inferior>: Likewise.
14365 * windows-nat.c (windows_create_inferior): Likewise.
14366
14367 2017-04-11 Pedro Alves <palves@redhat.com>
14368
14369 * thread.c: Fix whitespace throughout.
14370
14371 2017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
14372
14373 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
14374
14375 2017-04-11 Alan Hayward <alan.hayward@arm.com>
14376
14377 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
14378
14379 2017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
14380
14381 PR gdb/21364
14382 * osdata.c (info_osdata): Check if 'type' is an empty string
14383 instead of NULL.
14384
14385 2017-04-10 Pedro Alves <palves@redhat.com>
14386
14387 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
14388 (ptid_to_global_thread_id, in_thread_list)
14389 (do_captured_list_thread_ids, set_resumed, set_running)
14390 (set_executing, set_stop_requested, finish_thread_state)
14391 (validate_registers_access, can_access_registers_ptid)
14392 (print_thread_info_1, switch_to_thread)
14393 (do_restore_current_thread_cleanup)
14394 (make_cleanup_restore_current_thread, thread_command)
14395 (thread_name_command): Use operator== instead of ptid_equal.
14396
14397 2017-04-10 Pedro Alves <palves@redhat.com>
14398
14399 * thread.c (struct current_thread_cleanup) <next>: Delete field.
14400 (current_thread_cleanup_chain): Delete.
14401 (restore_current_thread_cleanup_dtor)
14402 (make_cleanup_restore_current_thread): Remove references to
14403 current_thread_cleanup_chain.
14404
14405 2017-04-10 Alan Hayward <alan.hayward@arm.com>
14406
14407 * msp430-tdep.c (msp430_pseudo_register_read): Never return
14408 REG_UNKNOWN.
14409
14410 2017-04-10 Yao Qi <yao.qi@linaro.org>
14411
14412 PR gdb/19942
14413 * gdbthread.h (thread_info::deletable): New method.
14414 (thread_info::incref): New method.
14415 (thread_info::decref): New method.
14416 (thread_info::refcount): Move it to private.
14417 * infrun.c (save_stop_context): Call inc_refcount.
14418 (release_stop_context_cleanup): Likewise.
14419 * thread.c (set_thread_exited): New function.
14420 (init_thread_list): Delete "tp" only it is deletable, otherwise
14421 call set_thread_exited.
14422 (delete_thread_1): Call set_thread_exited.
14423 (current_thread_cleanup) <inferior_pid>: Remove.
14424 <thread>: New field.
14425 (restore_current_thread_ptid_changed): Removed.
14426 (do_restore_current_thread_cleanup): Adjust.
14427 (restore_current_thread_cleanup_dtor): Don't call
14428 find_thread_ptid.
14429 (set_thread_refcount): Use dec_refcount.
14430 (make_cleanup_restore_current_thread): Adjust.
14431 (thread_apply_all_command): Call inc_refcount.
14432 (_initialize_thread): Don't call
14433 observer_attach_thread_ptid_changed.
14434
14435 2017-04-10 Yao Qi <yao.qi@linaro.org>
14436
14437 * thread.c (delete_thread_1): Hoist code on marking thread as
14438 exited.
14439
14440 2017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
14441
14442 * windows-nat.c (windows_detach): Initialize ptid with
14443 minus_one_ptid.
14444
14445 2017-04-07 Simon Marchi <simon.marchi@ericsson.com>
14446
14447 * unittests/ptid-selftests.c: Fix erroneous assert messages.
14448
14449 2017-04-07 Alan Hayward <alan.hayward@arm.com>
14450
14451 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
14452 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
14453 (bfin_pseudo_register_write): Likewise
14454
14455 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
14456
14457 * common/ptid.h (struct ptid): Change to...
14458 (class ptid_t): ... this.
14459 <ptid_t>: New constructors.
14460 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
14461 matches>: New methods.
14462 <make_null, make_minus_one>: New static methods.
14463 <pid>: Rename to...
14464 <m_pid>: ...this.
14465 <lwp>: Rename to...
14466 <m_lwp>: ...this.
14467 <tid>: Rename to...
14468 <m_tid>: ...this.
14469 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
14470 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
14471 as references, move comment to class ptid_t.
14472 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
14473 ptid_t static methods.
14474 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
14475 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
14476 Take ptid arguments as references, implement using ptid_t methods.
14477 * unittests/ptid-selftests.c: New file.
14478 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14479 unittests/ptid-selftests.c.
14480 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
14481
14482 2017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
14483
14484 * python/python.c (python_run_simple_file): Cast mode literal to
14485 non-const char pointer as expected by PyFile_FromString.
14486
14487 2017-04-05 Simon Marchi <simon.marchi@ericsson.com>
14488
14489 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
14490 minus_one_ptid and null_ptid.
14491
14492 2017-04-05 Pedro Alves <palves@redhat.com>
14493
14494 * warning.m4 (build_warnings): Remove -Wno-write-strings.
14495 * configure: Regenerate.
14496
14497 2017-04-05 Pedro Alves <palves@redhat.com>
14498
14499 * ada-exp.y (yyerror): Constify.
14500 * ada-lang.c (bound_name, get_selections)
14501 (ada_variant_discrim_type)
14502 (ada_variant_discrim_name, ada_value_struct_elt)
14503 (ada_lookup_struct_elt_type, is_unchecked_variant)
14504 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
14505 (catch_ada_exception_command_split)
14506 (catch_ada_assert_command_split, catch_assert_command)
14507 (ada_op_name): Constify.
14508 * ada-lang.h (ada_yyerror, get_selections)
14509 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
14510 * arc-tdep.c (arc_print_frame_cache): Constify.
14511 * arm-tdep.c (arm_skip_stub): Constify.
14512 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
14513 (gen_aggregate_elt_ref): Constify.
14514 * bcache.c (print_bcache_statistics): Constify.
14515 * bcache.h (print_bcache_statistics): Constify.
14516 * break-catch-throw.c (catch_exception_command_1):
14517 * breakpoint.c (struct ep_type_description::description):
14518 Constify.
14519 (add_solib_catchpoint): Constify.
14520 (catch_fork_command_1): Add cast.
14521 (add_catch_command): Constify.
14522 * breakpoint.h (add_catch_command, add_solib_catchpoint):
14523 Constify.
14524 * bsd-uthread.c (bsd_uthread_state): Constify.
14525 * buildsym.c (patch_subfile_names): Constify.
14526 * buildsym.h (next_symbol_text_func, patch_subfile_names):
14527 Constify.
14528 * c-exp.y (yyerror): Constify.
14529 (token::oper): Constify.
14530 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
14531 * c-varobj.c (cplus_describe_child): Constify.
14532 * charset.c (find_charset_names): Add cast.
14533 (find_charset_names): Constify array and add const_cast.
14534 * cli/cli-cmds.c (complete_command, cd_command): Constify.
14535 (edit_command): Constify.
14536 * cli/cli-decode.c (lookup_cmd): Constify.
14537 * cli/cli-dump.c (dump_memory_command, dump_value_command):
14538 Constify.
14539 (struct dump_context): Constify.
14540 (add_dump_command, restore_command): Constify.
14541 * cli/cli-script.c (get_command_line): Constify.
14542 * cli/cli-script.h (get_command_line): Constify.
14543 * cli/cli-utils.c (check_for_argument): Constify.
14544 * cli/cli-utils.h (check_for_argument): Constify.
14545 * coff-pe-read.c (struct read_pe_section_data): Constify.
14546 * command.h (lookup_cmd): Constify.
14547 * common/print-utils.c (decimal2str): Constify.
14548 * completer.c (gdb_print_filename): Constify.
14549 * corefile.c (set_gnutarget): Constify.
14550 * cp-name-parser.y (yyerror): Constify.
14551 * cp-valprint.c (cp_print_class_member): Constify.
14552 * cris-tdep.c (cris_register_name, crisv32_register_name):
14553 Constify.
14554 * d-exp.y (yyerror): Constify.
14555 (struct token::oper): Constify.
14556 * d-lang.h (d_yyerror): Constify.
14557 * dbxread.c (struct header_file_location::name): Constify.
14558 (add_old_header_file, add_new_header_file, last_function_name)
14559 (dbx_next_symbol_text, add_bincl_to_list)
14560 (find_corresponding_bincl_psymtab, set_namestring)
14561 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
14562 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
14563 * defs.h (command_line_input, print_address_symbolic)
14564 (deprecated_readline_begin_hook): Constify.
14565 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
14566 Constify.
14567 * event-top.c (handle_line_of_input): Constify and add cast.
14568 * exceptions.c (catch_errors): Constify.
14569 * exceptions.h (catch_errors): Constify.
14570 * expprint.c (print_subexp_standard, op_string, op_name)
14571 (op_name_standard, dump_raw_expression, dump_raw_expression):
14572 * expression.h (op_name, op_string, dump_raw_expression):
14573 Constify.
14574 * f-exp.y (yyerror): Constify.
14575 (struct token::oper): Constify.
14576 (struct f77_boolean_val::name): Constify.
14577 * f-lang.c (f_word_break_characters): Constify.
14578 * f-lang.h (f_yyerror): Constify.
14579 * fork-child.c (fork_inferior): Add cast.
14580 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
14581 (new_variant): Constify.
14582 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
14583 * gdbarch.c: Regenerate.
14584 * gdbcore.h (set_gnutarget): Constify.
14585 * go-exp.y (yyerror): Constify.
14586 (token::oper): Constify.
14587 * go-lang.h (go_yyerror): Constify.
14588 * go32-nat.c (go32_sysinfo): Constify.
14589 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
14590 * guile/scm-cmd.c (cmdscm_function): Constify.
14591 * guile/scm-param.c (pascm_param_value): Constify.
14592 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
14593 (h8300sx_register_name): Constify.
14594 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
14595 Constify.
14596 * ia64-tdep.c (ia64_register_names): Constify.
14597 * infcmd.c (construct_inferior_arguments): Constify.
14598 (path_command, attach_post_wait): Constify.
14599 * language.c (show_range_command, show_case_command)
14600 (unk_lang_error): Constify.
14601 * language.h (language_defn::la_error)
14602 (language_defn::la_name_of_this): Constify.
14603 * linespec.c (decode_line_2): Constify.
14604 * linux-thread-db.c (thread_db_err_str): Constify.
14605 * lm32-tdep.c (lm32_register_name): Constify.
14606 * m2-exp.y (yyerror): Constify.
14607 * m2-lang.h (m2_yyerror): Constify.
14608 * m32r-tdep.c (m32r_register_names): Constify and make static.
14609 * m68hc11-tdep.c (m68hc11_register_names): Constify.
14610 * m88k-tdep.c (m88k_register_name): Constify.
14611 * macroexp.c (appendmem): Constify.
14612 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
14613 (upgrade_type, parse_external, parse_partial_symbols)
14614 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
14615 (new_symbol): Constify.
14616 * memattr.c (mem_info_command): Constify.
14617 * mep-tdep.c (register_name_from_keyword): Constify.
14618 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
14619 Constify.
14620 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
14621 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
14622 * mi/mi-main.c (captured_mi_execute_command): Constify and add
14623 cast.
14624 (mi_execute_async_cli_command): Constify.
14625 * mips-tdep.c (mips_register_name): Constify.
14626 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
14627 (am33_register_name, am33_2_register_name)
14628 * moxie-tdep.c (moxie_register_names): Constify.
14629 * nat/linux-osdata.c (osdata_type): Constify fields.
14630 * nto-tdep.c (nto_parse_redirection): Constify.
14631 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
14632 (lookup_child_selector): Constify.
14633 (objc_methcall::name): Constify.
14634 * objc-lang.h (lookup_objc_class, lookup_child_selector)
14635 (lookup_struct_typedef): Constify.
14636 * objfiles.c (pc_in_section): Constify.
14637 * objfiles.h (pc_in_section): Constify.
14638 * p-exp.y (struct token::oper): Constify.
14639 (yyerror): Constify.
14640 * p-lang.h (pascal_yyerror): Constify.
14641 * parser-defs.h (op_name_standard): Constify.
14642 (op_print::string): Constify.
14643 (exp_descriptor::op_name): Constify.
14644 * printcmd.c (print_address_symbolic): Constify.
14645 * psymtab.c (print_partial_symbols): Constify.
14646 * python/py-breakpoint.c (stop_func): Constify.
14647 (bppy_get_expression): Constify.
14648 * python/py-cmd.c (cmdpy_completer::name): Constify.
14649 (cmdpy_function): Constify.
14650 * python/py-event.c (evpy_add_attribute)
14651 (gdbpy_initialize_event_generic): Constify.
14652 * python/py-event.h (evpy_add_attribute)
14653 (gdbpy_initialize_event_generic): Constify.
14654 * python/py-evts.c (add_new_registry): Constify.
14655 * python/py-finishbreakpoint.c (outofscope_func): Constify.
14656 * python/py-framefilter.c (get_py_iter_from_func): Constify.
14657 * python/py-inferior.c (get_buffer): Add cast.
14658 * python/py-param.c (parm_constant::name): Constify.
14659 * python/py-unwind.c (fprint_frame_id): Constify.
14660 * python/python.c (gdbpy_parameter_value): Constify.
14661 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
14662 * remote.c (memory_packet_config::name): Constify.
14663 (show_packet_config_cmd, remote_write_bytes)
14664 (remote_buffer_add_string):
14665 * reverse.c (exec_reverse_once): Constify.
14666 * rs6000-tdep.c (variant::name, variant::description): Constify.
14667 * rust-exp.y (rustyyerror): Constify.
14668 * rust-lang.c (rust_op_name): Constify.
14669 * rust-lang.h (rustyyerror): Constify.
14670 * serial.h (serial_ops::name): Constify.
14671 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
14672 (sh_sh3e_register_name, sh_sh2e_register_name)
14673 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
14674 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
14675 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
14676 (sh_sh4al_dsp_register_name): Constify.
14677 * sh64-tdep.c (sh64_register_name): Constify.
14678 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
14679 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
14680 * stabsread.c (patch_block_stabs, read_type_number)
14681 (ref_map::stabs, ref_add, process_reference)
14682 (symbol_reference_defined, define_symbol, define_symbol)
14683 (error_type, read_type, read_member_functions, read_cpp_abbrev)
14684 (read_one_struct_field, read_struct_fields, read_baseclasses)
14685 (read_tilde_fields, read_struct_type, read_array_type)
14686 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
14687 (read_huge_number, read_range_type, read_args, common_block_start)
14688 (find_name_end): Constify.
14689 * stabsread.h (common_block_start, define_symbol)
14690 (process_one_symbol, symbol_reference_defined, ref_add):
14691 * symfile.c (get_section_index, add_symbol_file_command):
14692 * symfile.h (get_section_index): Constify.
14693 * target-descriptions.c (tdesc_type::name): Constify.
14694 (tdesc_free_type): Add cast.
14695 * target.c (find_default_run_target):
14696 (add_deprecated_target_alias, find_default_run_target)
14697 (target_announce_detach): Constify.
14698 (do_option): Constify.
14699 * target.h (add_deprecated_target_alias): Constify.
14700 * thread.c (print_thread_info_1): Constify.
14701 * top.c (deprecated_readline_begin_hook, command_line_input):
14702 Constify.
14703 (init_main): Add casts.
14704 * top.h (handle_line_of_input): Constify.
14705 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
14706 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
14707 (tfind_command): Rename to ...
14708 (tfind_command_1): ... this and constify.
14709 (tfind_command): New function.
14710 (tfind_end_command, tfind_start_command): Adjust.
14711 (encode_source_string): Constify.
14712 * tracepoint.h (encode_source_string): Constify.
14713 * tui/tui-data.c (tui_partial_win_by_name): Constify.
14714 * tui/tui-data.h (tui_partial_win_by_name): Constify.
14715 * tui/tui-source.c (tui_set_source_content_nil): Constify.
14716 * tui/tui-source.h (tui_set_source_content_nil): Constify.
14717 * tui/tui-win.c (parse_scrolling_args): Constify.
14718 * tui/tui-windata.c (tui_erase_data_content): Constify.
14719 * tui/tui-windata.h (tui_erase_data_content): Constify.
14720 * tui/tui-winsource.c (tui_erase_source_content): Constify.
14721 * tui/tui.c (tui_enable): Add cast.
14722 * utils.c (defaulted_query): Constify.
14723 (init_page_info): Add cast.
14724 (puts_debug, subset_compare): Constify.
14725 * utils.h (subset_compare): Constify.
14726 * varobj.c (varobj_format_string): Constify.
14727 * varobj.h (varobj_format_string): Constify.
14728 * vax-tdep.c (vax_register_name): Constify.
14729 * windows-nat.c (windows_detach): Constify.
14730 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
14731 * xml-support.c (gdb_xml_end_element): Constify.
14732 * xml-tdesc.c (tdesc_start_reg): Constify.
14733 * xstormy16-tdep.c (xstormy16_register_name): Constify.
14734 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
14735 * xtensa-tdep.h (xtensa_register_t::name): Constify.
14736
14737 2017-04-05 Pedro Alves <palves@redhat.com>
14738
14739 * proc-api.c (struct trans): Constify.
14740 (procfs_note): Constify.
14741 * proc-events.c (struct trans, syscall_table):
14742 * proc-flags.c (struct trans): Constify.
14743 * proc-utils.h (procfs_note): Constify.
14744 * proc-why.c (struct trans): Constify.
14745 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
14746 (procfs_detach): Constify.
14747 * sol-thread.c (struct string_map): Constify.
14748 (td_err_string, td_state_string): Constify.
14749
14750 2017-04-05 Pedro Alves <palves@redhat.com>
14751
14752 * proc-api.c (procfs_filename): Don't initialize
14753 procfs_filename.
14754 (prepare_to_trace): Assume procfs_filename is non-NULL.
14755 (_initialize_proc_api): Give procfs_filename a default value here.
14756
14757 2017-04-05 Pedro Alves <palves@redhat.com>
14758
14759 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
14760 'cond_string' parameter.
14761 (extract_exception_regexp): Constify 'string' parameter.
14762 (catch_exception_command_1): Constify.
14763 * breakpoint.c (init_catchpoint)
14764 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
14765 parameter.
14766 (ep_parse_optional_if_clause, catch_fork_command_1)
14767 (catch_exec_command_1): Constify.
14768 * breakpoint.h (init_catchpoint): Constify 'cond_string'
14769 parameter.
14770 (ep_parse_optional_if_clause): Constify.
14771 * cli/cli-utils.c (remove_trailing_whitespace)
14772 (check_for_argument): Constify.
14773 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
14774 non-const overload.
14775 (check_for_argument): Likewise.
14776
14777 2017-04-05 Pedro Alves <palves@redhat.com>
14778
14779 * event-top.c (command_line_handler): Add cast to execute_command
14780 call.
14781 * record-btrace.c (cmd_record_btrace_bts_start)
14782 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
14783 (cmd_record_btrace_start): Add cast to execute_command call.
14784 * record-full.c (record_full_goto_insn):
14785 * record.c (record_start, record_stop): Add cast to
14786 execute_command_to_string calls.
14787 (cmd_record_start): Add cast to execute_command calls.
14788
14789 2017-04-05 Pedro Alves <palves@redhat.com>
14790
14791 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
14792 static inline function.
14793 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
14794 array and use gdb_PyArg_ParseTupleAndKeywords.
14795 * python/py-cmd.c (cmdpy_init): Likewise.
14796 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
14797 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
14798 (infpy_search_memory): Likewise.
14799 * python/py-objfile.c (objfpy_add_separate_debug_file)
14800 (gdbpy_lookup_objfile): Likewise.
14801 * python/py-symbol.c (gdbpy_lookup_symbol)
14802 (gdbpy_lookup_global_symbol): Likewise.
14803 * python/py-type.c (gdbpy_lookup_type): Likewise.
14804 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
14805 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
14806 Likewise.
14807
14808 2017-04-05 Pedro Alves <palves@redhat.com>
14809
14810 * python/python-internal.h (gdb_PyGetSetDef): New type.
14811 * python/py-block.c (block_object_getset)
14812 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
14813 * python/py-event.c (event_object_getset)
14814 (finish_breakpoint_object_getset): Likewise.
14815 * python/py-inferior.c (inferior_object_getset): Likewise.
14816 * python/py-infthread.c (thread_object_getset): Likewise.
14817 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
14818 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
14819 * python/py-objfile.c (objfile_getset): Likewise.
14820 * python/py-progspace.c (pspace_getset): Likewise.
14821 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
14822 Likewise.
14823 * python/py-record.c (recpy_record_getset): Likewise.
14824 * python/py-symbol.c (symbol_object_getset): Likewise.
14825 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
14826 Likewise.
14827 * python/py-type.c (type_object_getset, field_object_getset):
14828 Likewise.
14829 * python/py-value.c (value_object_getset): Likewise.
14830
14831 2017-04-05 Pedro Alves <palves@redhat.com>
14832
14833 * python/python-internal.h (gdb_PyObject_CallMethod)
14834 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
14835 New functions.
14836 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
14837 (PySys_GetObject, PySys_SetPath): New macros.
14838
14839 2017-04-05 Pedro Alves <palves@redhat.com>
14840
14841 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
14842 info_osdata_command.
14843 * osdata.c (info_osdata_command): Rename to ...
14844 (info_osdata): ... this. Constify 'type' parameter, and remove
14845 the 'from_tty' parameter. Accept NULL TYPE.
14846 (info_osdata_command): New function.
14847 * osdata.h (info_osdata_command): Remove declaration.
14848 (info_osdata): New declaration.
14849
14850 2017-04-05 Pedro Alves <palves@redhat.com>
14851
14852 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
14853 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
14854 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
14855 parameter.
14856 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
14857 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
14858 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
14859 parameter.
14860 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
14861 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
14862 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
14863 (mi_cmd_file_list_exec_source_files)
14864 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
14865 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
14866 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
14867 parameter.
14868 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
14869 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
14870 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
14871 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
14872 (mi_cmd_stack_info_frame): Constify 'command' parameter.
14873 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
14874 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
14875 'command' parameter.
14876 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
14877 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
14878 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
14879 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
14880 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
14881 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
14882 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
14883 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
14884 (mi_cmd_var_set_update_range): Constify 'command' parameter.
14885 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
14886 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
14887 parameter.
14888 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
14889 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
14890 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
14891 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
14892 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
14893 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
14894 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
14895 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
14896 (mi_cmd_data_list_changed_registers)
14897 (mi_cmd_data_write_register_values)
14898 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
14899 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
14900 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
14901 (mi_cmd_list_features, mi_cmd_list_target_features)
14902 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
14903 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
14904 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
14905 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
14906 (mi_cmd_trace_frame_collected): Constify 'command'
14907 parameter.
14908 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
14909 'command' parameter.
14910
14911 2017-04-05 Pedro Alves <palves@redhat.com>
14912
14913 * ada-lang.c (ada_completer_word_break_characters): Now a const
14914 array.
14915 (ada_get_gdb_completer_word_break_characters): Constify.
14916 * completer.c (gdb_completer_command_word_break_characters)
14917 (gdb_completer_file_name_break_characters)
14918 (gdb_completer_quote_characters): Now const arrays.
14919 (get_gdb_completer_quote_characters): Constify.
14920 (set_rl_completer_word_break_characters): New function.
14921 (set_gdb_completion_word_break_characters)
14922 (complete_line_internal): Use it.
14923 * completer.h (get_gdb_completer_quote_characters): Constify.
14924 (set_rl_completer_word_break_characters): Declare.
14925 * f-lang.c (f_word_break_characters): Constify.
14926 * language.c (default_word_break_characters): Constify.
14927 * language.h (language_defn::la_word_break_characters): Constify.
14928 (default_word_break_characters): Constify.
14929 * top.c (init_main): Use set_rl_completer_word_break_characters.
14930
14931 2017-04-05 Pedro Alves <palves@redhat.com>
14932
14933 * aix-thread.c (aix_thread_pid_to_str)
14934 (aix_thread_extra_thread_info): Constify.
14935 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
14936 * bsd-uthread.c (bsd_uthread_extra_thread_info)
14937 (bsd_uthread_pid_to_str): Constify.
14938 * corelow.c (core_pid_to_str): Constify.
14939 * darwin-nat.c (darwin_pid_to_str): Constify.
14940 * fbsd-nat.c (fbsd_pid_to_str): Constify.
14941 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
14942 Constify.
14943 * gnu-nat.c (gnu_pid_to_str): Constify.
14944 * go32-nat.c (go32_pid_to_str): Constify.
14945 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
14946 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
14947 * inferior.c (inferior_pid_to_str): Constify.
14948 * linux-nat.c (linux_nat_pid_to_str): Constify.
14949 * linux-tdep.c (linux_core_pid_to_str): Constify.
14950 * linux-thread-db.c (thread_db_pid_to_str)
14951 (thread_db_extra_thread_info): Constify.
14952 * nto-tdep.c (nto_extra_thread_info): Constify.
14953 * nto-tdep.h (nto_extra_thread_info): Constify.
14954 * obsd-nat.c (obsd_pid_to_str): Constify.
14955 * procfs.c (procfs_pid_to_str): Constify.
14956 * ravenscar-thread.c (ravenscar_extra_thread_info)
14957 (ravenscar_pid_to_str): Constify.
14958 * remote-sim.c (gdbsim_pid_to_str): Constify.
14959 * remote.c (remote_threads_extra_info, remote_pid_to_str):
14960 Constify.
14961 * sol-thread.c (solaris_pid_to_str): Constify.
14962 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
14963 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
14964 * target.c (default_pid_to_str, target_pid_to_str)
14965 (normal_pid_to_str, default_pid_to_str): Constify.
14966 * target.h (target_ops::to_pid_to_str)
14967 (target_ops::to_extra_thread_info): Constify.
14968 (target_pid_to_str, normal_pid_to_str): Constify.
14969 * windows-nat.c (windows_pid_to_str): Constify.
14970 * gdbarch.sh (core_pid_to_str): Constify.
14971 * target-delegates.c: Regenerate.
14972 * gdbarch.h, gdbarch.c: Regenerate.
14973
14974 2017-04-05 Pedro Alves <palves@redhat.com>
14975
14976 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
14977 the memory of the temporary warning_pre_print override.
14978 * utils.c (warning_pre_print): Constify.
14979 * utils.h (warning_pre_print): Constify.
14980
14981 2017-04-05 Pedro Alves <palves@redhat.com>
14982
14983 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
14984 (shell_command): New function.
14985 (make_command): Use std::string.
14986 (init_cli_cmds): Register shell_command instead of shell_escape.
14987
14988 2017-04-05 Pedro Alves <palves@redhat.com>
14989
14990 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
14991 * tracepoint.c (default_collect): Don't initialize.
14992
14993 2017-04-05 Pedro Alves <palves@redhat.com>
14994
14995 * macroexp.c (macro_buffer::shared): Now a bool.
14996 (init_buffer): Update.
14997 (init_shared_buffer): Constify 'addr' parameter.
14998 (substitute_args, expand, macro_expand, macro_expand_next): Remove
14999 casts.
15000
15001 2017-04-05 Pedro Alves <palves@redhat.com>
15002
15003 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
15004 * disasm.c (set_disassembler_options): Constify local.
15005 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
15006
15007 2017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
15008
15009 PR gdb/21352
15010 * tracefile.c (tsave_command): Fix argument parsing for '-r'
15011 option.
15012
15013 2017-04-05 Yao Qi <yao.qi@linaro.org>
15014
15015 * frame.c (frame_unwind_register_unsigned): Call
15016 frame_unwind_register_value.
15017
15018 2017-04-05 Yao Qi <yao.qi@linaro.org>
15019
15020 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
15021 Use gdb_test_multiple, and don't match anchor.
15022
15023 2017-04-05 Pedro Alves <palves@redhat.com>
15024
15025 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
15026 (Write After Approval): Remove Simon Marchi.
15027
15028 2017-04-05 Pedro Alves <palves@redhat.com>
15029
15030 * common/gdb_optional.h (optional::optional): Make constexpr and
15031 initialize m_dummy.
15032
15033 2017-04-04 John Baldwin <jhb@FreeBSD.org>
15034
15035 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
15036 (amd64fbsd_jmp_buf_reg_offset): Remove.
15037 (amd64fbsd_supply_uthread): Remove function.
15038 (amd64fbsd_collect_uthread): Remove function.
15039 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
15040 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
15041 (x86_64-*-freebsd*): Remove bsd-uthread.o.
15042 (fbsd-nat.c): Update comment.
15043 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
15044 (i386fbsd_jmp_buf_reg_offset): Remove.
15045 (i386fbsd_supply_uthread): Remove function.
15046 (i386fbsd_collect_uthread): Remove function.
15047 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
15048
15049 2017-04-04 John Baldwin <jhb@FreeBSD.org>
15050
15051 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
15052 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
15053 * NEWS: Mention that support for FreeBSD/alpha was removed.
15054 * alpha-fbsd-tdep.c: Delete file.
15055 * config/alpha/fbsd.mh: Delete file.
15056 * configure.host: Delete alpha*-*-freebsd* and
15057 alpha*-*-kfreebsd*-gnu.
15058 * configure.tgt: Delete alpha*-*-freebsd* and
15059 alpha*-*-kfreebsd*-gnu.
15060
15061 2017-04-04 John Baldwin <jhb@FreeBSD.org>
15062
15063 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
15064 amd64bsd_store_inferior_registers): Use ptid from regcache.
15065
15066 2017-04-04 Pedro Alves <palves@redhat.com>
15067
15068 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
15069 data fields, make them private and add "m_" prefixes.
15070 (lnp_state_machine::lnp_state_machine): New ctor.
15071 (record_line, check_line_address, handle_set_discriminator)
15072 (handle_set_address, handle_advance_pc, handle_special_opcode)
15073 (handle_advance_line, handle_set_file, handle_negate_stmt)
15074 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
15075 (end_sequence, advance_line): New methods.
15076 (m_gdbarch, m_record_lines_p): New fields.
15077 (lnp_reader_state): Delete.
15078 (dwarf_record_line): Rename to ...
15079 (lnp_state_machine::record_line): ... adjust.
15080 (init_lnp_state_machine): Delete.
15081 (lnp_state_machine::lnp_state_machine): New.
15082 (check_line_address): Rename to ...
15083 (lnp_state_machine::check_line_address): This.
15084 (dwarf_decode_lines_1): Remove reference to "reader_state".
15085 Adjust lnp_state_machine having a non-default ctor. Use bool.
15086 State machine internal state manipulation moved to
15087 lnp_state_machine methods.
15088
15089 2017-04-04 Pedro Alves <palves@redhat.com>
15090
15091 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
15092 unittests/offset-type-selftests.c.
15093 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
15094 * common/offset-type.h: New file.
15095 * common/preprocessor.h: New file.
15096 * common/traits.h: New file.
15097 * common/valid-expr.h: New file.
15098 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
15099 sect_offset and cu_offset strong typedefs throughout.
15100 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
15101 typedefs throughout.
15102 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
15103 sect_offset and cu_offset strong typedefs throughout.
15104 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
15105 typedefs throughout.
15106 * gdbtypes.h: Include "common/offset-type.h".
15107 (cu_offset): Now an offset type (strong typedef) instead of a
15108 struct.
15109 (sect_offset): Likewise.
15110 (union call_site_parameter_u): Rename "param_offset" field to
15111 "param_cu_off".
15112 * unittests/offset-type-selftests.c: New file.
15113
15114 2017-04-04 Pedro Alves <palves@redhat.com>
15115
15116 * common/underlying.h: New file.
15117 * dwarf2read.c: Include "common/gdb_optional.h" and
15118 "common/underlying.h".
15119 (dir_index, file_name_index): New types.
15120 (file_entry): Use them.
15121 (file_entry::include): Use to_underlying.
15122 (line_header::add_file_name): Use dir_index.
15123 (read_formatted_entries): Use gdb::optional. Read form before
15124 writting to file_entry.
15125 (dwarf_decode_line_header): Use dir_index.
15126 (lnp_state_machine::current_file): Use to_underlying.
15127 (lnp_state_machine::file): Change type to file_name_index.
15128 (dwarf_record_line): Use to_underlying.
15129 (init_lnp_state_machine): Use file_name_index.
15130 (dwarf_decode_lines_1): Use dir_index and file_name_index.
15131
15132 2017-04-04 Pedro Alves <palves@redhat.com>
15133
15134 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
15135 operator bool, has_value and get methods.
15136
15137 2017-04-04 Pedro Alves <palves@redhat.com>
15138
15139 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
15140 fields.
15141 (line_header): Initialize all data fields. Change type of
15142 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
15143 Change type of include_dirs to std::vector<const char *>. Remove
15144 num_include_dirs, include_dirs_size. Change type of file_names to
15145 std::vector<file_entry>. Remove num_file_names, file_names_size.
15146 (line_header::line_header): New.
15147 (line_header::add_include_dir, line_header::add_file_name): New
15148 methods.
15149 (line_header::include_dir_at): Remove NULL check.
15150 (line_header::file_name_at): Add const overload.
15151 (line_header_up): New unique_ptr typedef.
15152 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
15153 std::vector. Remove free_line_header call.
15154 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
15155 free_line_header call.
15156 (free_cu_line_header): Delete.
15157 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
15158 (setup_type_unit_groups): Use line_header_up instead of cleanups.
15159 Adjust to use std::vector.
15160 (free_line_header): Delete.
15161 (free_line_header_voidp): Use delete.
15162 (add_include_dir): Replace with ...
15163 (line_header::add_include_dir): ... this method. Use std::vector.
15164 (add_file_name): Replace with ...
15165 (line_header::add_file_name): ... this method. Use std::vector.
15166 (add_include_dir_stub): Delete.
15167 (read_formatted_entries): Remove memset.
15168 (dwarf_decode_line_header): Return a line_header_up instead of a
15169 raw pointer. Remove cleanup handling. Pass lambdas to
15170 read_formatted_entries. Adjust to use line_header methods.
15171 (dwarf_decode_lines_1): Adjust to use line_header methods.
15172 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
15173 use std::vector.
15174
15175 2017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
15176
15177 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
15178 instead of struct ptid.
15179
15180 2017-05-04 Alan Hayward <alan.hayward@arm.com>
15181
15182 * frame.c (get_frame_register_bytes): Unwind using value.
15183 (put_frame_register_bytes): Likewise.
15184
15185 2017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
15186
15187 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
15188 aggregate-like.
15189
15190 2017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
15191
15192 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
15193
15194 2017-03-29 Yao Qi <yao.qi@linaro.org>
15195
15196 * gdbthread.h (struct thread_info): Declare constructor and
15197 destructor. Add some in-class member initializers.
15198 * thread.c (free_thread): Remove.
15199 (init_thread_list): Call delete instead of free_thread.
15200 (new_thread): Call thread_info constructor.
15201 (thread_info::thread_info): New function.
15202 (thread_info::~thread_info): New function.
15203 (delete_thread_1): Call delete instead of free_thread.
15204 (make_cleanup_restore_current_thread): Move tp and frame to
15205 inner block.
15206
15207 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
15208
15209 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
15210 (arc_skip_prologue): Likewise.
15211 (arc_make_frame_cache): Likewise.
15212 (arc_pv_get_operand): New function.
15213 (arc_is_in_prologue): Likewise.
15214 (arc_analyze_prologue): Likewise.
15215 (arc_print_frame_cache): Likewise.
15216 (MAX_PROLOGUE_LENGTH): New constant.
15217
15218 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
15219
15220 * configure.tgt: Add arc-insn.o.
15221 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
15222 (dump_arc_instruction_command): New function.
15223 (arc_fprintf_disasm): Likewise.
15224 (arc_disassemble_info): Likewise.
15225 (arc_insn_get_operand_value): Likewise.
15226 (arc_insn_get_operand_value_signed): Likewise.
15227 (arc_insn_get_memory_base_reg): Likewise.
15228 (arc_insn_get_memory_offset): Likewise.
15229 (arc_insn_get_branch_target): Likewise.
15230 (arc_insn_dump): Likewise.
15231 (arc_insn_get_linear_next_pc): Likewise.
15232 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
15233 (arc_disassemble_info): Likewise.
15234 (arc_insn_get_branch_target): Likewise.
15235 (arc_insn_get_linear_next_pc): Likewise.
15236 * NEWS: Mention new "maint print arc arc-instruction".
15237
15238 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
15239
15240 * arc-tdep (maintenance_print_arc_list): New variable.
15241 (maintenance_print_arc_command): New function.
15242
15243 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
15244
15245 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
15246 Add "limm" and "reserved".
15247 (arc_cannot_fetch_register, arc_cannot_store_register): Add
15248 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
15249 * arc-tdep.h (arc_regnum): Likewise.
15250
15251 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
15252
15253 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
15254 for THREADPTR register.
15255 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
15256 register.
15257 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
15258 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
15259 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
15260
15261 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
15262
15263 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
15264 registers above gdbarch_num_regs (gdbarch) as privileged in
15265 call0 ABI.
15266
15267 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
15268
15269 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
15270 for a single specified register or for all registers in
15271 a0_base..a0_base + C0_NREGS range.
15272 (supply_gregset_reg): Call regcache_raw_supply for a single
15273 specified register or for all registers in a0_base..a0_base +
15274 C0_NREGS range.
15275
15276 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
15277
15278 * arch/xtensa.h (C0_NREGS): Add definition.
15279 * xtensa-tdep.c (C0_NREGS): Remove definition.
15280
15281 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
15282
15283 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
15284 Drop xtensa_default_isa initialization.
15285 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
15286
15287 2017-03-27 Pedro Alves <palves@redhat.com>
15288
15289 * dwarf2read.c (file_entry) <dir_index>: Add comment.
15290 (file_entry::include_dir): New method.
15291 (line_header::include_dir_at, line_header::file_name_at): New
15292 methods.
15293 (setup_type_unit_groups, setup_type_unit_groups)
15294 (psymtab_include_file_name): Simplify using the new methods.
15295 (lnp_state_machine) <the_line_header>: New field.
15296 <file>: Add comment.
15297 (lnp_state_machine::current_file): New method.
15298 (dwarf_record_line): Simplify using the new methods.
15299 (init_lnp_state_machine): Initialize the "the_line_header" field.
15300 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
15301 Simplify using the new methods.
15302
15303 2017-03-27 Pedro Alves <palves@redhat.com>
15304
15305 * cp-name-parser.y (make_empty): Delete.
15306 (demangler_special, nested_name, ptr_operator, array_indicator)
15307 (direct_declarator, declarator_1): Use fill_comp instead of
15308 make_empty.
15309
15310 2017-03-27 Pedro Alves <palves@redhat.com>
15311
15312 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
15313 to ATTRIBUTE_PRINTF.
15314 * solib-target.c (library_list_start_list): Print "string" not
15315 "version".
15316 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
15317 gdb_xml_error call.
15318
15319 2017-03-27 Pedro Alves <palves@redhat.com>
15320
15321 * dwarf2read.c (struct file_and_directory): New.
15322 (dwarf2_get_dwz_file): Adjust to use std::string.
15323 (dw2_get_file_names_reader): Adjust to use file_and_directory.
15324 (find_file_and_directory): Adjust to return a file_and_directory
15325 object.
15326 (read_file_scope): Adjust to use file_and_directory. Remove
15327 make_cleanup/do_cleanups calls.
15328 (open_and_init_dwp_file): Adjust to use std::string. Remove
15329 make_cleanup/do_cleanups calls.
15330 * python/python.c (do_start_initialization): Adjust to ldirname
15331 returning a std::string.
15332 * utils.c (ldirname): Now returns a std::string.
15333 * utils.h (ldirname): Change return type to std::string.
15334 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
15335 returning a std::string.
15336 * xml-tdesc.c (file_read_description_xml): Likewise.
15337
15338 2017-03-24 Alan Hayward <alan.hayward@arm.com>
15339
15340 * regcache.c (regcache_debug_print_register): New function.
15341 * regcache.h (regcache_debug_print_register): New declaration.
15342 * target.c (debug_print_register): Remove.
15343 (target_fetch_registers): Call regcache_debug_print_register.
15344 (target_store_registers): Likewise.
15345
15346 2017-03-24 Pádraig Brady <pbrady@fb.com>
15347
15348 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
15349 reference beyond the 'lh->include_dirs' array before accessing to
15350 it.
15351 (psymtab_include_file_name): Likewise.
15352 (dwarf_decode_lines_1): Likewise.
15353 (dwarf_decode_lines): Likewise.
15354 (file_file_name): Likewise.
15355
15356 2017-03-23 Simon Marchi <simon.marchi@ericsson.com>
15357
15358 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
15359 inferior_ptid.
15360 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
15361 ps_lsetfpregs): Likewise.
15362 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
15363 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
15364 ps_lsetfpregs): Likewise.
15365 * target.c (target_fetch_registers, target_store_registers):
15366 Remove asserts.
15367
15368 2017-03-23 Alan Hayward <alan.hayward@arm.com>
15369
15370 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
15371
15372 2017-03-23 Yao Qi <yao.qi@linaro.org>
15373
15374 * aarch64-tdep.c (aarch64_process_record_test): Declare.
15375 (_initialize_aarch64_tdep): Register it.
15376 (aarch64_record_load_store): Handle PRFM instruction.
15377 (aarch64_process_record_test): New function.
15378
15379 2017-03-23 Yao Qi <yao.qi@linaro.org>
15380
15381 * aarch64-tdep.c (aarch64_record_load_store): Fix code
15382 indentation.
15383
15384 2017-03-23 Yao Qi <yao.qi@linaro.org>
15385
15386 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
15387
15388 2017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
15389
15390 python/python.c (do_start_initialization): Fix memory leak.
15391
15392 2017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
15393
15394 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
15395 using get_ptrace_pid.
15396 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
15397 inferior_ptid.
15398 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
15399 inferior_ptid instead of pid.
15400
15401 2017-03-22 Yao Qi <yao.qi@linaro.org>
15402
15403 * aarch64-tdep.c: Wrap locally used classes in anonymous
15404 namespace.
15405 * arm-tdep.c: Likewise.
15406 * linespec.c: Likewise.
15407 * ui-out.c: Likewise.
15408
15409 2017-03-22 Jonah Graham <jonah@kichwacoders.com>
15410
15411 PR gdb/19637
15412 * python/lib/gdb/printer/bound_registers.py: Import sys.
15413
15414 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
15415
15416 * windows-nat.c (do_windows_fetch_inferior_registers): Add
15417 windows_thread_info parameter and use it instead of
15418 current_thread.
15419 (windows_fetch_inferior_registers): Don't set current_thread,
15420 pass the thread to do_windows_fetch_inferior_registers. Use
15421 ptid from regcache instead of inferior_ptid.
15422 (do_windows_store_inferior_registers): Add windows_thread_info
15423 parameter and use it instead of current_thread.
15424 (windows_store_inferior_registers): Don't set current_thread,
15425 pass the thread to do_windows_store_inferior_registers. Use
15426 ptid from regcache instead of inferior_ptid.
15427
15428 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
15429
15430 * ser-mingw.c (ser_windows_raw): Remove reference to
15431 struct serial::current_timeout.
15432
15433 2017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
15434
15435 PR tdep/20928
15436 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
15437 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
15438 (sparc64_fsr_type): Fix %fsr decoding.
15439
15440 2017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
15441
15442 * python/py-record-btrace.c (btpy_insn_data): Change return type
15443 for Python 2.
15444
15445 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
15446
15447 * spu-linux-nat.c (spu_fetch_inferior_registers,
15448 spu_store_inferior_registers): Use ptid from regcache, set and
15449 restore inferior_ptid.
15450 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
15451 Likewise.
15452
15453 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
15454
15455 * i386-linux-nat.c (fetch_register, store_register,
15456 i386_linux_fetch_inferior_registers,
15457 i386_linux_store_inferior_registers): Use ptid from regcache.
15458 * ia64-linux-nat.c (ia64_linux_fetch_register,
15459 ia64_linux_store_register): Likewise.
15460 * inf-ptrace.c (inf_ptrace_fetch_register,
15461 inf_ptrace_store_register): Likewise.
15462 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
15463 m32r_linux_store_inferior_registers): Likewise.
15464 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
15465 m68kbsd_store_inferior_registers): Likewise.
15466 * m68k-linux-nat.c (fetch_register, store_register,
15467 m68k_linux_fetch_inferior_registers,
15468 m68k_linux_store_inferior_registers): Likewise.
15469 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
15470 m88kbsd_store_inferior_registers): Likewise.
15471 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
15472 mips_fbsd_store_inferior_registers): Likewise.
15473 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
15474 mips64_linux_regsets_store_registers): Likewise.
15475 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
15476 mipsnbsd_store_inferior_registers): Likewise.
15477 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
15478 mips64obsd_store_inferior_registers): Likewise.
15479 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
15480 Likewise.
15481 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
15482 ppcfbsd_store_inferior_registers): Likewise.
15483 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
15484 ppc_linux_store_inferior_registers): Likewise.
15485 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
15486 ppcnbsd_store_inferior_registers): Likewise.
15487 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
15488 ppcobsd_store_registers): Likewise.
15489 * procfs.c (procfs_fetch_registers, procfs_store_registers):
15490 Likewise.
15491 * ravenscar-thread.c (ravenscar_fetch_registers,
15492 ravenscar_store_registers, ravenscar_prepare_to_store):
15493 Likewise.
15494 * record-btrace.c (record_btrace_fetch_registers,
15495 record_btrace_store_registers, record_btrace_prepare_to_store):
15496 Likewise.
15497 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
15498 Lookup inferior using ptid from regcache, instead of
15499 current_inferior.
15500 * remote.c (remote_fetch_registers, remote_store_registers): Use
15501 ptid from regcache.
15502 * rs6000-nat.c (fetch_register, store_register): Likewise.
15503 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
15504 s390_linux_store_inferior_registers): Likewise.
15505 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
15506 shnbsd_store_inferior_registers): Likewise.
15507 * sol-thread.c (sol_thread_fetch_registers,
15508 sol_thread_store_registers): Likewise.
15509 * sparc-nat.c (sparc_fetch_inferior_registers,
15510 sparc_store_inferior_registers): Likewise.
15511 * tilegx-linux-nat.c (fetch_inferior_registers,
15512 store_inferior_registers): Likewise.
15513 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
15514 vaxbsd_store_inferior_registers): Likewise.
15515 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
15516 store_xtregs): Likewise.
15517
15518 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15519
15520 PR gdb/14441
15521 * NEWS: Mention support for rvalue references in GDB and python.
15522 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
15523 supports both lvalue and rvalue references.
15524
15525 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15526
15527 PR gdb/14441
15528 * gdbtypes.c (rank_one_type): Implement overloading
15529 resolution rules regarding rvalue references.
15530
15531 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15532
15533 PR gdb/14441
15534 * aarch64-tdep.c (aarch64_type_align)
15535 (aarch64_extract_return_value, aarch64_store_return_value): Change
15536 lvalue reference type checks to general reference type checks.
15537 * amd64-tdep.c (amd64_classify): Likewise.
15538 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
15539 Likewise.
15540 * arm-tdep.c (arm_type_align, arm_extract_return_value)
15541 (arm_store_return_value): Likewise.
15542 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
15543 * c-typeprint.c (c_print_type): Likewise.
15544 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
15545 (cplus_number_of_children, cplus_describe_child): Likewise.
15546 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
15547 * completer.c (expression_completer): Likewise.
15548 * cp-support.c (make_symbol_overload_list_adl_namespace):
15549 Likewise.
15550 * darwin-nat-info.c (info_mach_region_command): Likewise.
15551 * dwarf2loc.c (entry_data_value_coerce_ref)
15552 (value_of_dwarf_reg_entry): Likewise.
15553 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
15554 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
15555 Likewise.
15556 * findvar.c (extract_typed_address, store_typed_address):
15557 Likewise.
15558 * gdbtypes.c (rank_one_type): Likewise.
15559 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
15560 * infcall.c (value_arg_coerce): Likewise.
15561 * language.c (pointer_type): Likewise.
15562 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
15563 Likewise.
15564 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
15565 * mn10300-tdep.c (mn10300_type_align): Likewise.
15566 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
15567 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
15568 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
15569 Likewise.
15570 * printcmd.c (print_formatted, x_command): Likewise.
15571 * python/py-type.c (typy_get_composite, typy_template_argument):
15572 Likewise.
15573 * python/py-value.c (valpy_referenced_value)
15574 (valpy_get_dynamic_type, value_has_field): Likewise.
15575 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
15576 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
15577 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
15578 * spu-tdep.c (spu_scalar_value_p): Likewise.
15579 * symtab.c (lookup_symbol_aux): Likewise.
15580 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
15581 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
15582 Likewise.
15583 * valops.c (value_cast_pointers, value_cast)
15584 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
15585 (value_struct_elt, value_struct_elt_bitpos)
15586 (value_find_oload_method_list, find_overload_match)
15587 (value_rtti_indirect_type): Likewise.
15588 * valprint.c (val_print_scalar_type_p, generic_val_print):
15589 Likewise.
15590 * value.c (value_actual_type, value_as_address, unpack_long)
15591 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
15592 (coerce_ref): Likewise.
15593 * varobj.c (varobj_get_value_type): Likewise.
15594
15595 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15596
15597 PR gdb/14441
15598 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
15599 table of constants.
15600 * python/lib/gdb/command/explore.py: Support exploring values
15601 of rvalue reference types.
15602 * python/lib/gdb/types.py: Implement get_basic_type() for
15603 rvalue reference types.
15604 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
15605 constant.
15606 * python/py-value.c (valpy_getitem): Add an rvalue reference
15607 check.
15608 (valpy_reference_value): Add new parameter "refcode".
15609 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
15610 New wrappers for valpy_reference_value().
15611 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
15612 (gdbpy_invoke_xmethod): Likewise.
15613
15614 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15615
15616 PR gdb/14441
15617 * dwarf2read.c (process_die, read_type_die_1): Handle the
15618 DW_TAG_rvalue_reference_type DIE.
15619 (read_tag_reference_type): Add new parameter "refcode".
15620
15621 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15622
15623 PR gdb/14441
15624 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
15625 (c_type_print_modifier, c_type_print_varspec_suffix)
15626 (c_type_print_base): Support printing rvalue reference types.
15627 * c-valprint.c (c_val_print, c_value_print): Support printing
15628 rvalue reference values.
15629
15630 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15631
15632 PR gdb/14441
15633 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
15634 typename.
15635 * cp-support.c (replace_typedefs): Handle
15636 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
15637 * python/py-type.c (typy_lookup_type): Likewise.
15638
15639 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15640
15641 PR gdb/14441
15642 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
15643 * parse.c (insert_type): Change assert statement.
15644 (follow_types): Handle rvalue reference types.
15645 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
15646 constant.
15647
15648 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15649
15650 PR gdb/14441
15651 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
15652 value_ref() interface.
15653 * c-valprint.c (c_value_print): Likewise.
15654 * infcall.c (value_arg_coerce): Likewise.
15655 * python/py-value.c (valpy_reference_value): Likewise.
15656 * valops.c (value_cast, value_reinterpret_cast)
15657 (value_dynamic_cast, typecmp): Likewise.
15658 (value_ref): Parameterize by kind of return value reference type.
15659 * value.h (value_ref): Add new parameter "refcode".
15660
15661 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15662
15663 PR gdb/14441
15664 * dwarf2read.c (read_tag_reference_type): Use
15665 lookup_lvalue_reference_type() instead of lookup_reference_type().
15666 * eval.c (evaluate_subexp_standard): Likewise.
15667 * f-exp.y: Likewise.
15668 * gdbtypes.c (make_reference_type, lookup_reference_type):
15669 Generalize with rvalue reference types.
15670 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
15671 convenience wrappers for lookup_reference_type().
15672 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
15673 reference kind parameter.
15674 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
15675 wrappers for lookup_reference_type().
15676 * guile/scm-type.c (gdbscm_type_reference): Use
15677 lookup_lvalue_reference_type() instead of lookup_reference_type().
15678 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
15679 * parse.c (follow_types): Likewise.
15680 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
15681 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
15682 Likewise.
15683 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
15684 (gdbpy_invoke_xmethod): Likewise.
15685 * stabsread.c: Provide extra argument to make_reference_type()
15686 call.
15687 * valops.c (value_ref, value_rtti_indirect_type): Use
15688 lookup_lvalue_reference_type() instead of lookup_reference_type().
15689
15690 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15691
15692 PR gdb/14441
15693 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
15694 (TYPE_IS_REFERENCE): New macro.
15695 (struct type): Add rvalue_reference_type field.
15696 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
15697
15698 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
15699
15700 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
15701 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
15702 New function definition.
15703 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
15704 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
15705 New function declaration.
15706 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
15707 * mi/mi-interp.h: New file.
15708 * solib.c (info_sharedlibrary_command): Replace for loop with
15709 ALL_SO_LIBS macro
15710 * solib.h (update_solib_list): New function declaration.
15711 (so_list_head): Move macro.
15712 * solist.h (ALL_SO_LIBS): New macro.
15713
15714 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
15715
15716 * infcmd.c (post_create_inferior): Remove unused argument in
15717 call to solib_add.
15718 * remote.c (remote_start_remote): Likewise.
15719 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
15720 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
15721 (enable_break): Likewise.
15722 * solib.c (update_solib_list): Remove unused target argument
15723 and its documentation.
15724 (solib_add): Remove unused target argument. Remove unused
15725 argument in call to update_solib_list.
15726 (info_sharedlibrary_command): Remove unused argument in call
15727 to update_solib_list.
15728 (sharedlibrary_command): Remove unused argument in call to
15729 solib_add.
15730 (handle_solib_event): Likewise.
15731 (reload_shared_libraries): Likewise.
15732 * solib.h (solib_add): Remove unused target argument.
15733
15734 2017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
15735
15736 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
15737 (s390_displaced_step_fixup): Cover relative branches with the
15738 default fixup handling. This fixes lack of support for some
15739 relative branch instructions.
15740
15741 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15742
15743 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
15744 ptid from regcache.
15745
15746 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15747
15748 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
15749 i386_darwin_store_inferior_registers): Use ptid from regcache.
15750
15751 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15752
15753 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
15754 i386bsd_store_inferior_registers): Use ptid from regcache.
15755
15756 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15757
15758 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
15759 hppaobsd_store_registers): Use ptid from regcache.
15760
15761 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15762
15763 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
15764 hppanbsd_store_registers): Use ptid from regcache.
15765
15766 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15767
15768 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
15769 from regcache. Use get_ptrace_pid.
15770
15771 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15772
15773 * corelow.c (get_core_register_section): Use ptid from regcache,
15774 update doc.
15775
15776 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15777
15778 * bsd-uthread.c (bsd_uthread_fetch_registers,
15779 bsd_uthread_store_registers): Use ptid from regcache, set and
15780 restore inferior_ptid.
15781
15782 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15783
15784 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
15785 fetch_fp_regs, store_register, store_regs, store_fp_register,
15786 store_fp_regs): Use ptid from regcache.
15787
15788 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15789
15790 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
15791 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
15792 store_vfp_regs): Use ptid from regcache.
15793
15794 2017-03-17 Pedro Alves <palves@redhat.com>
15795
15796 PR remote/21188
15797 * ser-base.c (ser_base_wait_for): Add comment.
15798 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
15799 version.
15800 * ser-unix.c (hardwire_raw): Remove reference to
15801 scb->current_timeout.
15802 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
15803 (hardwire_ops): Install ser_base_readchar instead of
15804 hardwire_readchar.
15805 * serial.h (struct serial) <current_timeout, timeout_remaining>:
15806 Remove fields.
15807
15808 2017-03-17 Jonah Graham <jonah@kichwacoders.com>
15809
15810 PR gdb/19637
15811 * python/lib/gdb/printer/bound_registers.py: Add support for
15812 Python 3.
15813
15814 2017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
15815
15816 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
15817 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
15818 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
15819 byte_offset to subobj_byte_offset. Fix the handling of
15820 DWARF_VALUE_STACK on big-endian targets when coming via an
15821 implicit pointer.
15822 (dwarf2_evaluate_loc_desc): Adjust call to
15823 dwarf2_evaluate_loc_desc_full.
15824 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
15825 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
15826
15827 2017-03-16 Yao Qi <yao.qi@linaro.org>
15828
15829 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
15830 and REVSH instructions.
15831
15832 2017-03-16 Yao Qi <yao.qi@linaro.org>
15833
15834 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
15835 (arm_record_test): Declare.
15836 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
15837 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
15838 align with the manual.
15839 (thumb_record_misc): Adjust the code order to align with the
15840 manual.
15841 (thumb2_record_decode_insn_handler): Fix instruction matching.
15842 (instruction_reader_thumb): New class.
15843 (arm_record_test): New function.
15844
15845 2017-03-16 Yao Qi <yao.qi@linaro.org>
15846
15847 * arm-tdep.c (abstract_memory_reader): New class.
15848 (instruction_reader): New class.
15849 (extract_arm_insn): Add argument 'reader'. Callers updated.
15850 (decode_insn): Likewise.
15851
15852 2017-03-16 Doug Evans <dje@google.com>
15853
15854 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
15855 member. Change type of TYPE member to SCM. All uses updated.
15856 (lsscm_make_lazy_string_smob): Add assert.
15857 (lsscm_make_lazy_string): Flag bad length values.
15858 (lsscm_elt_type): New function.
15859 (gdbscm_lazy_string_to_value): Rewrite to use
15860 lsscm_safe_lazy_string_to_value.
15861 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
15862 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
15863 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
15864 in incoming type.
15865 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
15866 * guile/scm-type.c (tyscm_scm_to_type): New function.
15867
15868 2017-03-15 Doug Evans <dje@google.com>
15869
15870 PR python/17728, python/18439, python/18779
15871 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
15872 member. Change type of TYPE member to PyObject *. All uses updated.
15873 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
15874 (gdbpy_create_lazy_string_object): Flag bad length values.
15875 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
15876 Handle typedefs in incoming type.
15877 (stpy_lazy_string_elt_type): New function.
15878 (gdbpy_extract_lazy_string): Call it.
15879 * python/py-value.c (valpy_lazy_string): Flag bad length values.
15880 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
15881 typedefs in incoming type.
15882
15883 2017-03-16 Doug Evans <dje@google.com>
15884
15885 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
15886 * guile/scm-type.c (tyscm_scm_to_type): New function.
15887
15888 2017-03-16 Jiong Wang <jiong.wang@arm.com>
15889
15890 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
15891 "ULONGEST" for "skip".
15892
15893 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
15894
15895 PR gdb/21220
15896 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
15897 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
15898 (inf_ptrace_peek_poke): ...here. New function. Now also loop
15899 over ptrace peek/poke until end of buffer or error.
15900
15901 2017-03-14 Simon Marchi <simon.marchi@ericsson.com>
15902
15903 * parse.c (length_of_subexp): Make static.
15904 * parser-defs.h (length_of_subexp): Remove.
15905
15906 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
15907
15908 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
15909 as well.
15910
15911 2017-03-14 Pedro Alves <palves@redhat.com>
15912
15913 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
15914 (main): Use std::unique_ptr. Remove calls to
15915 cp_demangled_name_parse_free.
15916
15917 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
15918
15919 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
15920 alphabsd_store_inferior_registers): Use regcache->ptid instead
15921 of inferior_ptid.
15922
15923 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
15924
15925 * aix-thread.c (aix_thread_fetch_registers,
15926 aix_thread_store_registers): Use regcache->ptid instead of
15927 inferior_ptid.
15928
15929 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
15930
15931 * aarch64-linux-nat.c (fetch_gregs_from_thread,
15932 store_gregs_to_thread, fetch_fpregs_from_thread,
15933 store_fpregs_to_thread): Use regcache->ptid instead of
15934 inferior_ptid.
15935
15936 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
15937
15938 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
15939 amd64_linux_fetch_inferior_registers): Use regcache->ptid
15940 instead of inferior_ptid.
15941
15942 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
15943
15944 * target.c (target_fetch_registers, target_store_registers): Add
15945 assert.
15946
15947 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
15948
15949 * regcache.h (regcache_get_ptid): New function.
15950 * regcache.c (regcache_get_ptid): New function.
15951
15952 2017-03-13 Mark Wielaard <mark@klomp.org>
15953
15954 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
15955
15956 2017-03-10 Keith Seitz <keiths@redhat.com>
15957
15958 PR c++/8218
15959 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
15960
15961 2017-03-08 Pedro Alves <palves@redhat.com>
15962
15963 PR gdb/18360
15964 * infrun.c (start_step_over, do_target_resume, resume)
15965 (restart_threads): Assert we're not resuming a thread that is
15966 meant to be stopped.
15967 (infrun_thread_stop_requested_callback): Delete.
15968 (infrun_thread_stop_requested): If the thread is internally
15969 stopped, queue a pending stop event and clear the thread's
15970 inline-frame state.
15971 (handle_stop_requested): New function.
15972 (handle_syscall_event, handle_inferior_event_1): Use
15973 handle_stop_requested.
15974 (handle_stop_requested): New function.
15975 (handle_signal_stop): Set the thread's stop_signal here instead of
15976 at caller.
15977 (finish_step_over): Clear step over info unconditionally.
15978 (handle_signal_stop): If the user had interrupted the event
15979 thread, consider the stop a random signal.
15980 (handle_signal_stop) <signal arrived while stepping over
15981 breakpoint>: Don't restart threads here.
15982 (stop_waiting): Don't clear step-over info here.
15983
15984 2017-03-08 Pedro Alves <palves@redhat.com>
15985
15986 PR 21206
15987 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
15988 goes to argument 2, not 1.
15989
15990 2017-03-08 Pedro Alves <palves@redhat.com>
15991
15992 PR cli/21218
15993 * top.c (gdb_readline_wrapper): Avoid passing NULL to
15994 display_gdb_prompt.
15995 (command_line_input): Add comment.
15996
15997 2017-03-08 Pedro Alves <palves@redhat.com>
15998
15999 PR tui/21216
16000 * tui/tui-file.c (tui_file::write): New.
16001 * tui/tui-file.h (tui_file): Override "write".
16002 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
16003 factored out from ...
16004 (tui_puts): ... here.
16005 (tui_putc): Use them.
16006 (tui_write): New function.
16007 * tui/tui-io.h (tui_write): Declare.
16008
16009 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
16010
16011 * Makefile.in (SFILES): Replace "environ.c" with
16012 "common/environ.c".
16013 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
16014 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
16015 to...
16016 * common/environ.c: ... here.
16017 * environ.h: Moved to...
16018 * common/environ.h: ... here.
16019
16020 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
16021
16022 * gdbarch.sh (pstring_ptr): New static function.
16023 (gdbarch_disassembler_options): Use it.
16024 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
16025 not valid_disassembler_option->name.
16026 * gdbarch.c: Regenerate.
16027
16028 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
16029
16030 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
16031
16032 2017-03-07 Pedro Alves <palves@redhat.com>
16033
16034 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
16035
16036 2017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
16037
16038 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
16039 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
16040 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
16041 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
16042
16043 2017-03-06 Simon Marchi <simon.marchi@ericsson.com>
16044
16045 * xtensa-linux-nat.c (fetch_gregs): Remove const.
16046
16047 2017-03-03 Simon Marchi <simon.marchi@ericsson.com>
16048
16049 * remote.c (remote_add_target_side_commands): Use range-based
16050 for loop.
16051
16052 2017-03-03 Yao Qi <yao.qi@linaro.org>
16053
16054 PR gdb/21165
16055 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
16056 value is lazy.
16057 * valprint.c (common_val_print): Likewise.
16058
16059 2017-02-28 Peter Bergner <bergner@vnet.ibm.com>
16060
16061 * NEWS: Mention new set/show disassembler-options commands.
16062 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
16063 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
16064 (prospective_options): New static variable.
16065 (gdb_disassembler::gdb_disassembler): Initialize
16066 m_di.disassembler_options.
16067 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
16068 (get_disassembler_options): New function.
16069 (set_disassembler_options): Likewise.
16070 (set_disassembler_options_sfunc): Likewise.
16071 (show_disassembler_options_sfunc): Likewise.
16072 (disassembler_options_completer): Likewise.
16073 (_initialize_disasm): Likewise.
16074 * disasm.h (get_disassembler_options): New prototype.
16075 (set_disassembler_options): Likewise.
16076 * gdbarch.sh (gdbarch_disassembler_options): New variable.
16077 (gdbarch_verify_disassembler_options): Likewise.
16078 * gdbarch.c: Regenerate.
16079 * gdbarch.h: Likewise.
16080 * arm-tdep.c (num_disassembly_options): Delete.
16081 (set_disassembly_style): Likewise.
16082 (arm_disassembler_options): New static variable.
16083 (set_disassembly_style_sfunc): Convert short style name into long
16084 option name. Call set_disassembler_options.
16085 (show_disassembly_style_sfunc): New function.
16086 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
16087 set_gdbarch_verify_disassembler_options.
16088 (_initialize_arm_tdep): Delete regnames variable and update callers.
16089 (arm_disassembler_options): Initialize.
16090 (disasm_options): New variable.
16091 (num_disassembly_options): Rename from this...
16092 (num_disassembly_styles): ...to this. Compute by scanning through
16093 disasm_options.
16094 (valid_disassembly_styles): Initialize using disasm_options.
16095 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
16096 set_arm_regname_option.
16097 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
16098 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
16099 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
16100 set_gdbarch_verify_disassembler_options.
16101 * s390-tdep.c (s390_disassembler_options): New static variable.
16102 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
16103 set_gdbarch_verify_disassembler_options.
16104
16105 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
16106
16107 * remote.c (remote_add_target_side_condition): Remove "struct"
16108 keyword from range-based for loop.
16109
16110 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
16111
16112 * remote.c (remote_add_target_side_condition): Use range-based
16113 for loop. Update comment.
16114
16115 2017-02-27 Yao Qi <yao.qi@linaro.org>
16116
16117 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
16118
16119 2017-02-26 Alan Hayward <alan.hayward@arm.com>
16120
16121 * regcache.c (regcache_raw_update): New function.
16122 (regcache_raw_read): Move code to regcache_raw_update.
16123 * regcache.h (regcache_raw_update): New declaration.
16124 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
16125
16126 2017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
16127
16128 * dwarf2read.c (create_debug_type_hash_table): Initialize
16129 header.signature and header.type_offset_in_tu.
16130
16131 2017-02-24 Pedro Alves <palves@redhat.com>
16132
16133 * symtab.c (make_file_symbol_completion_list_1): Use
16134 add_symtab_completions.
16135
16136 2017-02-24 Alan Hayward <alan.hayward@arm.com>
16137
16138 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
16139
16140 2017-02-24 Alan Hayward <alan.hayward@arm.com>
16141
16142 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
16143 I386_MAX_REGISTER_SIZE.
16144 (i386_pseudo_register_write): Likewise.
16145 (i386_process_record): Likewise.
16146 * i387-tdep.c (i387_supply_xsave): Likewise.
16147 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
16148 (store_register): Likewise.
16149
16150 2017-02-23 Pedro Alves <palves@redhat.com>
16151
16152 * ada-lang.c: Include "common/function-view.h".
16153 (ada_iterate_over_symbols): Adjust to use function_view as
16154 callback type.
16155 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
16156 (ada_make_symbol_completion_list): Use a lambda.
16157 (ada_exc_search_name_matches): Delete.
16158 (name_matches_regex): New.
16159 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
16160 * compile/compile-c-support.c: Include "common/function-view.h".
16161 (print_one_macro): Change prototype to accept a ui_file pointer.
16162 (write_macro_definitions): Use a lambda.
16163 * dwarf2read.c: Include "common/function-view.h".
16164 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
16165 (dw2_expand_symtabs_matching): Adjust to use function_view as
16166 callback type.
16167 * language.h: Include "common/function-view.h".
16168 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
16169 function_view as callback type.
16170 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
16171 * linespec.c: Include "common/function-view.h".
16172 (collect_info::add_symbol): New method.
16173 (struct symbol_and_data_callback, iterate_inline_only, struct
16174 symbol_matcher_data, iterate_name_matcher): Delete.
16175 (iterate_over_all_matching_symtabs): Adjust to use function_view
16176 as callback type and lambdas.
16177 (iterate_over_file_blocks): Adjust to use function_view as
16178 callback type.
16179 (decode_compound_collector): Now a class with private fields.
16180 (decode_compound_collector::release_symbols): New method.
16181 (collect_one_symbol): Rename to...
16182 (decode_compound_collector::operator()): ... this and adjust.
16183 (lookup_prefix_sym): decode_compound_collector construction bits
16184 move to decode_compound_collector ctor. Pass the
16185 decode_compound_collector object directly as callback. Remove
16186 cleanups and use decode_compound_collector::release_symbols
16187 instead.
16188 (symtab_collector): Now a class with private fields.
16189 (symtab_collector::release_symtabs): New method.
16190 (add_symtabs_to_list): Rename to...
16191 (symtab_collector::operator()): ... this and adjust.
16192 (collect_symtabs_from_filename): symtab_collector construction
16193 bits move to symtab_collector ctor. Pass the symtab_collector
16194 object directly as callback. Remove cleanups and use
16195 symtab_collector::release_symtabs instead.
16196 (collect_symbols): Delete.
16197 (add_matching_symbols_to_info): Use lambdas.
16198 * macrocmd.c (print_macro_callback): Delete.
16199 (info_macro_command): Use a lambda.
16200 (info_macros_command): Pass print_macro_definition as callable
16201 directly.
16202 (print_one_macro): Remove 'ignore' parameter.
16203 (macro_list_command): Adjust.
16204 * macrotab.c (macro_for_each_data::fn): Now a function_view.
16205 (macro_for_each_data::user_data): Delete field.
16206 (foreach_macro): Adjust to call the function_view.
16207 (macro_for_each): Adjust to use function_view as callback type.
16208 (foreach_macro_in_scope): Adjust to call the function_view.
16209 (macro_for_each_in_scope): Adjust to use function_view as callback
16210 type.
16211 * macrotab.h: Include "common/function-view.h".
16212 (macro_callback_fn): Declare a prototype instead of a pointer.
16213 Remove "user_data" parameter.
16214 (macro_for_each, macro_for_each_in_scope): Adjust to use
16215 function_view as callback type.
16216 * psymtab.c (partial_map_expand_apply)
16217 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
16218 Adjust to use function_view as callback type and to return bool.
16219 (psym_expand_symtabs_matching): Adjust to use function_view as
16220 callback types.
16221 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
16222 to use function_view as callback type and to return bool.
16223 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
16224 callback types.
16225 * symfile.c (expand_symtabs_matching): Adjust to use function_view
16226 as callback types.
16227 * symfile.h: Include "common/function-view.h".
16228 (expand_symtabs_file_matcher_ftype)
16229 (expand_symtabs_symbol_matcher_ftype)
16230 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
16231 return bool.
16232 (quick_symbol_functions::map_symtabs_matching_filename)
16233 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
16234 function_view as callback type and return bool.
16235 (expand_symtabs_matching): Adjust to use function_view as callback
16236 type.
16237 (maintenance_expand_name_matcher)
16238 (maintenance_expand_file_matcher): Delete.
16239 (maintenance_expand_symtabs): Use lambdas.
16240 * symtab.c (iterate_over_some_symtabs): Adjust to use
16241 function_view as callback types and return bool.
16242 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
16243 of a cleanup.
16244 (lookup_symtab_callback): Delete.
16245 (lookup_symtab): Use a lambda.
16246 (iterate_over_symbols): Adjust to use function_view as callback
16247 type.
16248 (struct search_symbols_data, search_symbols_file_matches)
16249 (search_symbols_name_matches): Delete.
16250 (search_symbols): Use a pair of lambdas.
16251 (struct add_name_data, add_macro_name, symbol_completion_matcher)
16252 (symtab_expansion_callback): Delete.
16253 (default_make_symbol_completion_list_break_on_1): Use lambdas.
16254 * symtab.h: Include "common/function-view.h".
16255 (iterate_over_some_symtabs): Adjust to use function_view as
16256 callback type and return bool.
16257 (iterate_over_symtabs): Adjust to use function_view as callback
16258 type.
16259 (symbol_found_callback_ftype): Remove 'data' parameter and return
16260 bool.
16261 (iterate_over_symbols): Adjust to use function_view as callback
16262 type.
16263
16264 2017-02-23 Pedro Alves <palves@redhat.com>
16265
16266 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
16267 (%.o) <unittests/%.c>: New pattern.
16268 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
16269 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
16270 * common/function-view.h: New file.
16271 * unittests/function-view-selftests.c: New file.
16272 * configure: Regenerate.
16273
16274 2017-02-23 Simon Marchi <simon.marchi@ericsson.com>
16275
16276 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
16277 inferior_ptid.
16278 * go32-nat.c (go32_thread_alive): Likewise.
16279
16280 2017-02-23 Yao Qi <yao.qi@linaro.org>
16281
16282 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
16283 delete.
16284
16285 2017-02-23 Yao Qi <yao.qi@linaro.org>
16286
16287 * varobj.c (varobj_clear_saved_item): Use delete instead of
16288 xfree.
16289 (update_dynamic_varobj_children): Likewise.
16290
16291 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
16292
16293 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
16294
16295 2017-02-21 Simon Marchi <simon.marchi@ericsson.com>
16296
16297 * common/enum-flags.h (enum_flags::enum_flags): Initialize
16298 m_enum_value to 0 in default constructor.
16299
16300 2017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
16301
16302 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
16303 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
16304 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
16305 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
16306 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
16307 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
16308 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
16309 IS_STORE_CONDITIONAL_INSN.
16310
16311 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
16312
16313 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
16314
16315 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
16316
16317 * NEWS (Changes since GDB 7.12): Add DWARF-5.
16318
16319 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
16320
16321 * dwarf2read.c (skip_one_die, read_attribute_value)
16322 (dwarf2_const_value_attr, dump_die_shallow)
16323 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
16324 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
16325
16326 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
16327
16328 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
16329 (dwarf_parse_macro_header): Accept DWARF version 5.
16330 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
16331
16332 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
16333
16334 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
16335 DW_AT_GNU_*.
16336 * common/common-exceptions.h (enum errors): Likewise.
16337 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
16338 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
16339 (dwarf_expr_context::execute_stack_op): Likewise.
16340 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
16341 Likewise.
16342 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
16343 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
16344 (show_entry_values_debug, call_site_to_target_addr)
16345 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
16346 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
16347 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
16348 (value_of_dwarf_block_entry, indirect_pieced_value)
16349 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
16350 (disassemble_dwarf_expression): Likewise.
16351 * dwarf2read.c (process_die, inherit_abstract_dies)
16352 (read_call_site_scope): Likewise.
16353 * gdbtypes.h (struct func_type, struct call_site_parameter)
16354 (struct call_site): Likewise.
16355 * stack.c (read_frame_arg): Likewise.
16356 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
16357
16358 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
16359
16360 * defs.h (read_unsigned_leb128): New declaration.
16361 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
16362 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
16363 (dwarf2_find_location_expression): Call also
16364 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
16365 * dwarf2loc.h (dwarf2_version): New declaration.
16366 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
16367 rnglists.
16368 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
16369 .debug_rnglists.
16370 (struct dwop_section_names): Add loclists_dwo.
16371 (dwop_section_names): Add .debug_loclists.dwo.
16372 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
16373 (struct dwarf2_per_cu_data): Add dwarf_version.
16374 (struct dwo_sections): Add loclists.
16375 (struct attr_abbrev): Add implicit_const.
16376 (read_indirect_line_string): New declaration.
16377 (read_unsigned_leb128): Delete declaration.
16378 (rcuh_kind): New definition.
16379 (read_and_check_comp_unit_head): Change parameter
16380 is_debug_types_section to section_kind.
16381 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
16382 (read_comp_unit_head): Change parameter abfd to section, add parameter
16383 section_kind. Handle DWARF-5.
16384 (error_check_comp_unit_head): Accept also DWARF version 5.
16385 (read_and_check_comp_unit_head): Change parameter
16386 is_debug_types_section to section_kind.
16387 (read_and_check_type_unit_head): Delete function.
16388 (read_abbrev_offset): Handle DWARF-5.
16389 (create_debug_type_hash_table): Add parameter section_kind. Process
16390 only DW_UT_type. Use signature and type_offset_in_tu from struct
16391 comp_unit_head.
16392 (create_debug_types_hash_table): Update create_debug_type_hash_table
16393 caller.
16394 (create_all_type_units): Call create_debug_type_hash_table.
16395 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
16396 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
16397 caller.
16398 (skip_one_die): Handle DW_FORM_implicit_const.
16399 (dwarf2_rnglists_process): New function.
16400 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
16401 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
16402 (read_attribute_value): Handle DW_FORM_implicit_const,
16403 DW_FORM_line_strp.
16404 (read_attribute): Handle DW_FORM_implicit_const.
16405 (read_indirect_string_at_offset_from): New function from
16406 read_indirect_string_at_offset.
16407 (read_indirect_string_at_offset): Call
16408 read_indirect_string_at_offset_from.
16409 (read_indirect_line_string_at_offset): New function.
16410 (read_indirect_string): New function comment.
16411 (read_indirect_line_string): New function.
16412 (read_unsigned_leb128): Make it global.
16413 (dwarf2_string_attr): Handle DWARF-5.
16414 (add_include_dir_stub, read_formatted_entries): New functions.
16415 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
16416 Handle DWARF-5.
16417 (per_cu_header_read_in): Update read_comp_unit_head caller.
16418 (dwarf2_version): New function.
16419 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
16420 rnglists.
16421 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
16422 fields.
16423
16424 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
16425
16426 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
16427
16428 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
16429
16430 * dwarf2read.c (dwarf2_ranges_process): New function from
16431 dwarf2_ranges_read.
16432 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
16433 dwarf2_ranges_process.
16434
16435 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
16436
16437 * dwarf2read.c (create_debug_type_hash_table): New function from
16438 create_debug_types_hash_table.
16439 (create_debug_types_hash_table): Call create_debug_type_hash_table.
16440 (create_all_type_units, open_and_init_dwo_file): Update
16441 create_debug_types_hash_table callers.
16442
16443 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
16444
16445 PR gdb/16188
16446 * fork-child.c (trace_start_error): Fix thinko. va_end should
16447 refer to 'ap', not 'args'.
16448
16449 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
16450 Pedro Alves <palves@redhat.com>
16451
16452 PR gdb/16188
16453 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
16454 calls succeeded.
16455 * fork-child.c (trace_start_error): New function.
16456 (trace_start_error_with_name): Likewise.
16457 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
16458 * inf-ptrace.c (inf_ptrace_me): Likewise.
16459 * inferior.h (trace_start_error): New prototype.
16460 (trace_start_error_with_name): Likewise.
16461
16462 2017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
16463
16464 PR gdb/21164
16465 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
16466 NULL before using it.
16467 * symmisc.c (maintenance_print_symbols): Likewise.
16468 (maintenance_print_msymbols): Likewise.
16469
16470 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16471
16472 * NEWS: Add record Python bindings entry.
16473
16474 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16475
16476 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
16477 py-record-full.o.
16478 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
16479 * python/py-record-btrace.c, python/py-record-btrace.h,
16480 python/py-record-full.c, python/py-record-full.h: New file.
16481 * python/py-record.c: Add include for py-record-btrace.h and
16482 py-record-full.h.
16483 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
16484 recpy_instruction_history, recpy_function_call_history, recpy_begin,
16485 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
16486 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
16487 New definition.
16488 (gdbpy_initialize_btrace): New export.
16489 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
16490
16491 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16492
16493 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
16494 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
16495 * python/py-record.c: New file.
16496 * python/python-internal.h (gdbpy_start_recording,
16497 gdbpy_current_recording, gdpy_stop_recording,
16498 gdbpy_initialize_record): New export.
16499 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
16500 (python_GdbMethods): Add gdbpy_start_recording,
16501 gdbpy_current_recording and gdbpy_stop_recording.
16502
16503 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16504
16505 * record-btrace.c (record_btrace_record_method): New function.
16506 (init_record_btrace_ops): Initialize to_record_method.
16507 * record-full.c (record_full_record_method): New function.
16508 (init_record_full_ops, init_record_full_core_ops): Add
16509 record_full_record_method.
16510 * record.h (enum record_method): New enum.
16511 * target-debug.h (target_debug_print_enum_record_method: New define.
16512 * target-delegates.c: Regenerate.
16513 * target.c (target_record_method): New function.
16514 * target.h: Include record.h.
16515 (struct target_ops) <to_record_method>: New field.
16516 (target_record_method): New export.
16517
16518 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16519
16520 * record.h (record_start, record_stop): New export.
16521 * record.c (record_start, record_stop): New function.
16522
16523 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16524
16525 * btrace.c (btrace_fetch): Copy function call segments pointer
16526 into a vector.
16527 (btrace_clear): Clear the vector.
16528 (btrace_find_insn_by_number): Use binary search to find the correct
16529 function call segment.
16530 * btrace.h (brace_fun_p): New typedef.
16531 (struct btrace_thread_info) <functions>: New field.
16532
16533 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16534
16535 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
16536 * btrace.c (btrace_decode_error): ... here. New function.
16537 * btrace.h (btrace_decode_error): New export.
16538
16539 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16540
16541 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
16542 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
16543 btrace_find_insn_by_number): Remove special case for gaps.
16544 * btrace.h (btrace_insn_get_error): New export.
16545 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
16546 * record-btrace.c (btrace_insn_history): Print number for gaps.
16547 (record_btrace_info, record_btrace_goto): Handle gaps.
16548
16549 2017-02-14 Tom Tromey <tom@tromey.com>
16550
16551 PR python/13598:
16552 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
16553 event.
16554 * python/py-evts.c (gdbpy_initialize_py_events): Add
16555 before_prompt registry.
16556 * python/py-events.h (events_object) <before_prompt>: New field.
16557
16558 2017-02-14 Markus Metzger <markus.t.metzger@intel.com>
16559
16560 * btrace.c (ftrace_new_switch): Preserve up link and flags.
16561
16562 2017-02-13 Luis Machado <lgustavo@codesourcery.com>
16563
16564 * symfile (_initialize_symfile): Add usage text to the load command's
16565 help text.
16566
16567 2017-02-10 Simon Marchi <simon.marchi@ericsson.com>
16568
16569 * utils.c (defaulted_query): Don't query on secondary UIs.
16570
16571 2017-02-10 Tom Tromey <tom@tromey.com>
16572
16573 * rust-lang.c (rust_get_disr_info): Remove unused variable.
16574
16575 2017-02-10 Tom Tromey <tom@tromey.com>
16576
16577 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
16578 "cleanup" local.
16579 * python/py-type.c (typy_legacy_template_argument): Remove
16580 unnecessary "cleanup" local.
16581
16582 2017-02-10 Tom Tromey <tom@tromey.com>
16583
16584 * python/python.c (do_start_initialization): New function, from
16585 _initialize_python.
16586 (_initialize_python): Call do_start_initialization.
16587 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
16588 goto.
16589
16590 2017-02-10 Tom Tromey <tom@tromey.com>
16591
16592 * python/py-prettyprint.c (pretty_print_one_value): Use
16593 gdbpy_ref.
16594
16595 2017-02-10 Tom Tromey <tom@tromey.com>
16596
16597 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
16598 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
16599 gdbpy_ref.
16600 * python/py-type.c (field_new): Use gdbpy_ref.
16601 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
16602 gdbpy_ref.
16603 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
16604 (py_free_pspace): Likewise.
16605 (pspace_to_pspace_object): Likewise.
16606 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
16607 (py_free_objfile): Likewise.
16608 (objfile_to_objfile_object): Likewise.
16609 * python/py-inferior.c (delete_thread_object): Use
16610 gdbpy_ref.
16611 (infpy_read_memory): Likewise.
16612 (py_free_inferior): Likewise.
16613 * python/py-evtregistry.c (create_eventregistry_object): Use
16614 gdbpy_ref.
16615 * python/py-event.c (create_event_object): Use gdbpy_ref.
16616
16617 2017-02-10 Tom Tromey <tom@tromey.com>
16618
16619 * python/py-ref.h (gdbpy_ref_policy): Now a template.
16620 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
16621 used.
16622 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
16623 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
16624 python/py-exitedevent.c, python/py-finishbreakpoint.c,
16625 python/py-framefilter.c, python/py-function.c,
16626 python/py-inferior.c, python/py-infevents.c,
16627 python/py-linetable.c, python/py-newobjfileevent.c,
16628 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
16629 python/py-signalevent.c, python/py-stopevent.c,
16630 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
16631 python/py-unwind.c, python/py-utils.c, python/py-value.c,
16632 python/py-varobj.c, python/py-xmethods.c, python/python.c,
16633 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
16634
16635 2017-02-10 Tom Tromey <tom@tromey.com>
16636
16637 * ui-out.h (ui_out_emit_type): New class.
16638 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
16639 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
16640 and ui_out_emit_tuple.
16641 (enumerate_locals): Likewise.
16642 (py_mi_print_variables, py_print_locals, py_print_args): Use
16643 ui_out_emit_list.
16644 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
16645 ui_out_emit_list.
16646 * common/gdb_optional.h: New file.
16647
16648 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
16649
16650 * MAINTAINERS (Write After Approval): Update my e-mail address.
16651
16652 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
16653
16654 PR gdb/21122
16655 * breakpoint.c (_initialize_breakpoint): Update the help description
16656 of the 'commands' command to indicate that it takes a list argument.
16657
16658 2017-02-09 Simon Marchi <simon.marchi@ericsson.com>
16659
16660 * interps.c (current_interp_set_logging): Remove "return".
16661
16662 2017-02-09 Gary Benson <gbenson@redhat.com>
16663
16664 * symtab.c (add_symtab_completions): Prevent NULL pointer
16665 dereference.
16666
16667 2017-02-08 Pedro Alves <palves@redhat.com>
16668
16669 * interps.c (interp::interp): Remove reference to quiet_p.
16670 (interp_set): Make static. Remove dead "Switching to" output
16671 code.
16672 (interp_quiet_p, interp_set_quiet): Delete.
16673 (interpreter_exec_cmd): Don't set the interpreter quiet.
16674 * interps.h (interp_quiet_p): Make static.
16675 (class interp) <quiet_p>: Remove field
16676
16677 2017-02-08 Jerome Guitton <guitton@adacore.com>
16678
16679 * cli/cli-decode.c (find_command_name_length): Make it extern.
16680 * cli/cli-decode.h (find_command_name_length): Declare.
16681 * cli/cli-script.c (command_name_equals, line_first_arg):
16682 New functions.
16683 (process_next_line): Use cli-decode to parse command names.
16684 (build_command_line): Make args a constant pointer.
16685
16686 2017-02-08 Jerome Guitton <guitton@adacore.com>
16687
16688 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
16689 Remove case-insensitive search.
16690
16691 2017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
16692
16693 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
16694 at the end of the line. Avoids an ARI warning.
16695
16696 2017-02-06 Luis Machado <lgustavo@codesourcery.com>
16697
16698 * NEWS: Mention support for record/replay of Intel 64 rdrand and
16699 rdseed instructions.
16700 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
16701
16702 2017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
16703
16704 PR tdep/20936
16705 Provide and use sparc32 and sparc64 target description XML files.
16706 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
16707 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
16708 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
16709 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
16710 * features/sparc/sparc32-solaris.xml: New file.
16711 * features/sparc/sparc64-solaris.xml: New file.
16712 * features/sparc/sparc32-solaris.c: Generated.
16713 * features/sparc/sparc64-solaris.c: Generated.
16714 * sparc-tdep.h: Account for differences in target descriptions.
16715 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
16716 (sparc32_register_type): Use target provided registers.
16717 (validate_tdesc_registers): New function.
16718 (sparc32_gdbarch_init): Use tdesc_has_registers.
16719 Set pseudoregister functions.
16720 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
16721 (sparc64_register_type): Use target provided registers.
16722 (sparc64_init_abi): Set pseudoregister functions.
16723
16724 2017-02-03 Tom Tromey <tom@tromey.com>
16725
16726 PR rust/21097:
16727 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
16728 with a single member.
16729
16730 2017-02-03 Pedro Alves <palves@redhat.com>
16731
16732 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
16733 (cli_interp_base::~cli_interp_base): New.
16734 (cli_interp): New struct.
16735 (as_cli_interp): Cast the interp itself to cli_interp.
16736 (cli_interpreter_pre_command_loop): Rename to ...
16737 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
16738 parameter.
16739 (cli_interpreter_init): Rename to ...
16740 (cli_interp::init): ... this. Remove 'self' parameter. Use
16741 boolean. Make extern.
16742 (cli_interpreter_resume): Rename to ...
16743 (cli_interp::resume): ... this. Remove 'data' parameter. Make
16744 extern.
16745 (cli_interpreter_suspend): Rename to ...
16746 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
16747 extern.
16748 (cli_interpreter_exec): Rename to ...
16749 (cli_interp::exec): ... this. Remove 'data' parameter. Make
16750 extern.
16751 (cli_interpreter_supports_command_editing): Rename to ...
16752 (cli_interp_base::supports_command_editing): ... this. Remove
16753 'interp' parameter. Make extern.
16754 (cli_ui_out): Rename to ...
16755 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
16756 Make extern.
16757 (cli_set_logging): Rename to ...
16758 (cli_interp_base::set_logging): ... this. Remove 'interp'
16759 parameter. Make extern.
16760 (cli_interp_procs): Delete.
16761 (cli_interp_factory): Adjust to use "new".
16762 * cli/cli-interp.h: Include "interps.h".
16763 (struct cli_interp_base): New struct.
16764 * interps.c (struct interp): Delete. Fields moved to interps.h.
16765 (interp_new): Delete.
16766 (interp::interp, interp::~interp): New.
16767 (interp_set): Use bool, and return void. Assume the interpreter
16768 has suspend, init and resume methods, and that the all return
16769 void.
16770 (set_top_level_interpreter): interp_set returns void.
16771 (interp_ui_out): Adapt.
16772 (current_interp_set_logging): Adapt.
16773 (interp_data): Delete.
16774 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
16775 (interp_exec): Adapt.
16776 (top_level_interpreter_data): Delete.
16777 * interps.h (interp_init_ftype, interp_resume_ftype)
16778 (interp_suspend_ftype, interp_exec_ftype)
16779 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
16780 (class interp): New.
16781 (interp_new): Delete.
16782 (interp_set): Now returns void. Use bool.
16783 (interp_data, top_level_interpreter_data): Delete.
16784 * mi/mi-common.h: Include interps.h.
16785 (class mi_interp): Inherit from interp. Define a ctor. Declare
16786 init, resume, suspect, exec, interp_ui_out, set_logging and
16787 pre_command_loop methods.
16788 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
16789 (mi_interpreter_init): Rename to ...
16790 (mi_interp::init): ... this. Remove the 'interp' parameter, use
16791 bool, return void and make extern. Adjust.
16792 (mi_interpreter_resume): ... Rename to ...
16793 (mi_interp::resume): ... this. Remove the 'data' parameter,
16794 return void and make extern. Adjust.
16795 (mi_interpreter_suspend): ... Rename to ...
16796 (mi_interp::suspend): ... this. Remove the 'data' parameter,
16797 return void and make extern. Adjust.
16798 (mi_interpreter_exec): ... Rename to ...
16799 (mi_interp::exec): ... this. Remove the 'data' parameter and make
16800 extern. Adjust.
16801 (mi_interpreter_pre_command_loop): ... Rename to ...
16802 (mi_interp::pre_command_loop): ... this. Remove the 'self'
16803 parameter and make extern.
16804 (mi_on_normal_stop_1): Adjust.
16805 (mi_ui_out): Rename to ...
16806 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
16807 parameter and make extern. Adjust.
16808 (mi_set_logging): Rename to ...
16809 (mi_interp::set_logging): ... this. Remove the 'interp'
16810 parameter and make extern. Adjust.
16811 (mi_interp_procs): Delete.
16812 (mi_interp_factory): Adjust to use 'new'.
16813 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
16814 (mi_print_exception, mi_execute_command, mi_load_progress):
16815 Adjust.
16816 * tui/tui-interp.c (tui_interp): New class.
16817 (as_tui_interp): Return a tui_interp pointer.
16818 (tui_on_normal_stop, tui_on_signal_received)
16819 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
16820 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
16821 to use interp::interp_ui_out.
16822 (tui_init): Rename to ...
16823 (tui_interp::init): ... this. Remove the 'self' parameter, use
16824 bool, return void and make extern. Adjust.
16825 (tui_resume): Rename to ...
16826 (tui_interp::resume): ... this. Remove the 'data' parameter,
16827 return void and make extern. Adjust.
16828 (tui_suspend): Rename to ...
16829 (tui_interp::suspend): ... this. Remove the 'data' parameter,
16830 return void and make extern. Adjust.
16831 (tui_ui_out): Rename to ...
16832 (tui_interp::interp_ui_out): ... this. Remove the 'self'
16833 parameter, and make extern. Adjust.
16834 (tui_exec): Rename to ...
16835 (tui_interp::exec): ... this. Remove the 'data' parameter and
16836 make extern.
16837 (tui_interp_procs): Delete.
16838 (tui_interp_factory): Use "new".
16839
16840 2017-02-02 Tom Tromey <tom@tromey.com>
16841
16842 * rust-exp.y (ends_raw_string, space_then_number)
16843 (rust_identifier_start_p): Return bool.
16844 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
16845 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
16846 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
16847 (rust_chartype_p): Return bool.
16848 (val_print_struct, rust_print_struct_def, rust_print_type):
16849 Update.
16850 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
16851 Return bool.
16852
16853 2017-02-02 Tom Tromey <tom@tromey.com>
16854
16855 * rust-lang.c: Reindent.
16856
16857 2017-02-02 Tom Tromey <tom@tromey.com>
16858
16859 * rust-lang.h (rust_crate_for_block): Update.
16860 * rust-lang.c (rust_crate_for_block): Return std::string.
16861 (rust_get_disr_info): Use std:;string, not
16862 gdb::unique_xmalloc_ptr.
16863 * rust-exp.y (crate_name): Update.
16864
16865 2017-02-02 Pedro Alves <palves@redhat.com>
16866
16867 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
16868 field out of gdb_disassembler_test and make it static.
16869
16870 2017-02-02 Pedro Alves <palves@redhat.com>
16871
16872 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
16873 mi1_interp and mi_interp fields.
16874
16875 2017-02-02 Pedro Alves <palves@redhat.com>
16876
16877 * cli/cli-interp.c (struct saved_output_files, saved_output):
16878 Moved from cli/cli-logging.c.
16879 (cli_set_logging): New function.
16880 (cli_interp_procs): Install cli_set_logging.
16881 * cli/cli-interp.h (make_logging_output, cli_set_logging):
16882 Declare.
16883 * cli/cli-logging.c (struct saved_output_files, saved_output):
16884 Moved to cli/cli-interp.c.
16885 (pop_output_files): Don't save outputs here.
16886 (make_logging_output): New function.
16887 (handle_redirections): Don't build tee nor save previous outputs
16888 here.
16889 * interps.c (current_interp_set_logging): Change prototype.
16890 Assume there's always a set_logging_proc method installed.
16891 * interps.h (interp_set_logging_ftype): Change prototype.
16892 (current_interp_set_logging): Change prototype and adjust comment.
16893 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
16894 use make_logging_output.
16895 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
16896 2017-02-02 Pedro Alves <palves@redhat.com>
16897
16898 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
16899 from ...
16900 (set_logging_overwrite): ... here.
16901 (logging_no_redirect_file): Delete.
16902 (set_logging_redirect): Don't handle redirection on the fly.
16903 Instead warn that "logging off" / "logging on" is necessary.
16904 (pop_output_files): Delete references to logging_no_redirect_file.
16905 (show_logging_command): Always speak in terms of what will happen
16906 once logging is reenabled.
16907
16908 2017-02-02 Pedro Alves <palves@redhat.com>
16909
16910 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
16911
16912 2017-02-02 Pedro Alves <palves@redhat.com>
16913
16914 * disasm.c (gdb_pretty_print_insn): Rename to ...
16915 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
16916 Remove gdbarch parameter. Adapt to clear the object's buffers
16917 instead of allocating new buffers, and to print using the object's
16918 gdb_disassembler instead of calling gdb_print_insn.
16919 (dump_insns): Use gdb_pretty_print_disassembler.
16920 * disasm.h (gdb_pretty_print_insn): Delete declaration.
16921 (gdb_pretty_print_disassembler): New class.
16922 * record-btrace.c (btrace_insn_history): Use
16923 gdb_pretty_print_disassembler.
16924
16925 2017-02-02 Pedro Alves <palves@redhat.com>
16926
16927 * ada-lang.c (type_as_string): Use string_file.
16928 * ada-valprint.c (ada_print_floating): Use string_file.
16929 * ada-varobj.c (ada_varobj_scalar_image)
16930 (ada_varobj_get_value_image): Use string_file.
16931 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
16932 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
16933 * breakpoint.c (update_inserted_breakpoint_locations)
16934 (insert_breakpoint_locations, reattach_breakpoints)
16935 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
16936 (print_it_watchpoint): Use string_file.
16937 (save_breakpoints): Use stdio_file.
16938 * c-exp.y (oper): Use string_file.
16939 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
16940 tee_file.
16941 (pop_output_files): Use delete.
16942 (handle_redirections): Use stdio_file and tee_file.
16943 * cli/cli-setshow.c (do_show_command): Use string_file.
16944 * compile/compile-c-support.c (c_compute_program): Use
16945 string_file.
16946 * compile/compile-c-symbols.c (generate_vla_size): Take a
16947 'string_file &' instead of a 'ui_file *'.
16948 (generate_c_for_for_one_variable): Take a 'string_file &' instead
16949 of a 'ui_file *'. Use string_file.
16950 (generate_c_for_variable_locations): Take a 'string_file &'
16951 instead of a 'ui_file *'.
16952 * compile/compile-internal.h (generate_c_for_for_one_variable):
16953 Take a 'string_file &' instead of a 'ui_file *'.
16954 * compile/compile-loc2c.c (push, pushf, unary, binary)
16955 (print_label, pushf_register_address, pushf_register)
16956 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
16957 'ui_file *'. Adjust.
16958 * compile/compile.c (compile_to_object): Use string_file.
16959 * compile/compile.h (compile_dwarf_expr_to_c)
16960 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
16961 'ui_file *'.
16962 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
16963 (replace_typedefs_qualified_name): Use string_file and
16964 obstack_copy0.
16965 * disasm.c (gdb_pretty_print_insn): Use string_file.
16966 (gdb_disassembly): Adjust reference the null_stream global.
16967 (do_ui_file_delete): Delete.
16968 (gdb_insn_length): Use null_stream.
16969 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
16970 * dwarf2loc.c (dwarf2_compile_property_to_c)
16971 (locexpr_generate_c_location, loclist_generate_c_location): Take a
16972 'string_file &' instead of a 'ui_file *'.
16973 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
16974 * dwarf2read.c (do_ui_file_peek_last): Delete.
16975 (dwarf2_compute_name): Use string_file.
16976 * event-top.c (gdb_setup_readline): Use stdio_file.
16977 * gdbarch.sh (verify_gdbarch): Use string_file.
16978 * gdbtypes.c (safe_parse_type): Use null_stream.
16979 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
16980 string_file.
16981 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
16982 'string_file *' instead of a 'ui_file *'.
16983 (gdbscm_arch_disassemble): Use string_file.
16984 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
16985 * guile/scm-ports.c (class ioscm_file_port): Now a class that
16986 inherits from ui_file.
16987 (ioscm_file_port_delete, ioscm_file_port_rewind)
16988 (ioscm_file_port_put): Delete.
16989 (ioscm_file_port_write): Rename to ...
16990 (ioscm_file_port::write): ... this. Remove file_port_magic
16991 checks.
16992 (ioscm_file_port_new): Delete.
16993 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
16994 ui_file_up.
16995 * guile/scm-type.c (tyscm_type_name): Use string_file.
16996 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
16997 Use string_file.
16998 * infcmd.c (print_return_value_1): Use string_file.
16999 * infrun.c (print_target_wait_results): Use string_file.
17000 * language.c (add_language): Use string_file.
17001 * location.c (explicit_to_string_internal): Use string_file.
17002 * main.c (captured_main_1): Use null_file.
17003 * maint.c (maintenance_print_architecture): Use stdio_file.
17004 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
17005 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
17006 event_channel>: Change type to mi_console_file pointer.
17007 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
17008 (mi_console_file_delete): Delete.
17009 (struct mi_console_file): Delete.
17010 (mi_console_file_magic): Delete.
17011 (mi_console_file_new): Delete.
17012 (mi_console_file::mi_console_file): New.
17013 (mi_console_file_delete): Delete.
17014 (mi_console_file_fputs): Delete.
17015 (mi_console_file::write): New.
17016 (mi_console_raw_packet): Delete.
17017 (mi_console_file::flush): New.
17018 (mi_console_file_flush): Delete.
17019 (mi_console_set_raw): Rename to ...
17020 (mi_console_file::set_raw): ... this.
17021 * mi/mi-console.h (class mi_console_file): New class.
17022 (mi_console_file_new, mi_console_set_raw): Delete.
17023 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
17024 (mi_set_logging): Use delete and tee_file. Adjust.
17025 * mi/mi-main.c (output_register): Use string_file.
17026 (mi_cmd_data_evaluate_expression): Use string_file.
17027 (mi_cmd_data_read_memory): Use string_file.
17028 (mi_cmd_execute, print_variable_or_computed): Use string_file.
17029 * mi/mi-out.c (mi_ui_out::main_stream): New.
17030 (mi_ui_out::rewind): Use main_stream and
17031 string_file.
17032 (mi_ui_out::put): Use main_stream and string_file.
17033 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
17034 Allocate a 'string_file' instead.
17035 (mi_out_new): Don't allocate a mem_fileopen stream here.
17036 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
17037 (mi_ui_out::main_stream): Declare method.
17038 * printcmd.c (eval_command): Use string_file.
17039 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
17040 * python/py-arch.c (archpy_disassemble): Use string_file.
17041 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
17042 * python/py-frame.c (frapy_str): Use string_file.
17043 * python/py-framefilter.c (py_print_type, py_print_single_arg):
17044 Use string_file.
17045 * python/py-type.c (typy_str): Use string_file.
17046 * python/py-unwind.c (unwind_infopy_str): Use string_file.
17047 * python/py-value.c (valpy_str): Use string_file.
17048 * record-btrace.c (btrace_insn_history): Use string_file.
17049 * regcache.c (regcache_print): Use stdio_file.
17050 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
17051 * remote.c (escape_buffer): Use string_file.
17052 * rust-lang.c (rust_get_disr_info): Use string_file.
17053 * serial.c (serial_open_ops_1): Use stdio_file.
17054 (do_serial_close): Use delete.
17055 * stack.c (print_frame_arg): Use string_file.
17056 (print_frame_args): Remove local mem_fileopen stream, not used.
17057 (print_frame): Use string_file.
17058 * symmisc.c (maintenance_print_symbols): Use stdio_file.
17059 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
17060 Take a 'string_file *' instead of a 'ui_file *'.
17061 * top.c (new_ui): Use stdio_file and stderr_file.
17062 (free_ui): Use delete.
17063 (execute_command_to_string): Use string_file.
17064 (quit_confirm): Use string_file.
17065 * tracepoint.c (collection_list::append_exp): Use string_file.
17066 * tui/tui-disasm.c (tui_disassemble): Use string_file.
17067 * tui/tui-file.c: Don't include "ui-file.h".
17068 (enum streamtype, struct tui_stream): Delete.
17069 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
17070 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
17071 (tui_file::tui_file): New method.
17072 (tui_file_fputs): Delete.
17073 (tui_file_get_strbuf): Delete.
17074 (tui_file::puts): New method.
17075 (tui_file_adjust_strbuf): Delete.
17076 (tui_file_flush): Delete.
17077 (tui_file::flush): New method.
17078 * tui/tui-file.h: Tweak intro comment.
17079 Include ui-file.h.
17080 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
17081 (tui_file_adjust_strbuf): Delete declarations.
17082 (class tui_file): New class.
17083 * tui/tui-io.c (tui_initialize_io): Use tui_file.
17084 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
17085 (tui_register_format): Use string_stream.
17086 * tui/tui-stack.c (tui_make_status_line): Use string_file.
17087 (tui_get_function_from_frame): Use string_file.
17088 * typeprint.c (type_to_string): Use string_file.
17089 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
17090 (null_stream): New global.
17091 (ui_file_delete): Delete.
17092 (ui_file::ui_file): New.
17093 (null_file_isatty): Delete.
17094 (ui_file::~ui_file): New.
17095 (null_file_rewind): Delete.
17096 (ui_file::printf): New.
17097 (null_file_put): Delete.
17098 (null_file_flush): Delete.
17099 (ui_file::putstr): New.
17100 (null_file_write): Delete.
17101 (ui_file::putstrn): New.
17102 (null_file_read): Delete.
17103 (ui_file::putc): New.
17104 (null_file_fputs): Delete.
17105 (null_file_write_async_safe): Delete.
17106 (ui_file::vprintf): New.
17107 (null_file_delete): Delete.
17108 (null_file::write): New.
17109 (null_file_fseek): Delete.
17110 (null_file::puts): New.
17111 (ui_file_data): Delete.
17112 (null_file::write_async_safe): New.
17113 (gdb_flush, ui_file_isatty): Adjust.
17114 (ui_file_put, ui_file_rewind): Delete.
17115 (ui_file_write): Adjust.
17116 (ui_file_write_for_put): Delete.
17117 (ui_file_write_async_safe, ui_file_read): Adjust.
17118 (ui_file_fseek): Delete.
17119 (fputs_unfiltered): Adjust.
17120 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
17121 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
17122 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
17123 (set_ui_file_data): Delete.
17124 (string_file::~string_file, string_file::write)
17125 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
17126 (do_ui_file_as_string, ui_file_as_string): Delete.
17127 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
17128 (struct mem_file): Delete.
17129 (mem_file_new): Delete.
17130 (stdio_file::stdio_file): New.
17131 (mem_file_delete): Delete.
17132 (stdio_file::stdio_file): New.
17133 (mem_fileopen): Delete.
17134 (stdio_file::~stdio_file): New.
17135 (mem_file_rewind): Delete.
17136 (stdio_file::set_stream): New.
17137 (mem_file_put): Delete.
17138 (stdio_file::open): New.
17139 (mem_file_write): Delete.
17140 (stdio_file_magic, struct stdio_file): Delete.
17141 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
17142 (stdio_file::flush): New.
17143 (stdio_file_read): Rename to ...
17144 (stdio_file::read): ... this. Adjust.
17145 (stdio_file_write): Rename to ...
17146 (stdio_file::write): ... this. Adjust.
17147 (stdio_file_write_async_safe): Rename to ...
17148 (stdio_file::write_async_safe) ... this. Adjust.
17149 (stdio_file_fputs): Rename to ...
17150 (stdio_file::puts) ... this. Adjust.
17151 (stdio_file_isatty): Delete.
17152 (stdio_file_fseek): Delete.
17153 (stdio_file::isatty): New.
17154 (stderr_file_write): Rename to ...
17155 (stderr_file::write) ... this. Adjust.
17156 (stderr_file_fputs): Rename to ...
17157 (stderr_file::puts) ... this. Adjust.
17158 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
17159 (stderr_file::stderr_file): New.
17160 (tee_file_magic): Delete.
17161 (struct tee_file): Delete.
17162 (tee_file::tee_file): New.
17163 (tee_file_new): Delete.
17164 (tee_file::~tee_file): New.
17165 (tee_file_delete): Delete.
17166 (tee_file_flush): Rename to ...
17167 (tee_file::flush): ... this. Adjust.
17168 (tee_file_write): Rename to ...
17169 (tee_file::write): ... this. Adjust.
17170 (tee_file::write_async_safe): New.
17171 (tee_file_fputs): Rename to ...
17172 (tee_file::puts): ... this. Adjust.
17173 (tee_file_isatty): Rename to ...
17174 (tee_file::isatty): ... this. Adjust.
17175 * ui-file.h (struct obstack, struct ui_file): Don't
17176 forward-declare.
17177 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
17178 (ui_file_write_ftype)
17179 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
17180 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
17181 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
17182 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
17183 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
17184 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
17185 (set_ui_file_fseek): Delete.
17186 (ui_file_data, ui_file_delete, ui_file_rewind)
17187 (struct ui_file): New.
17188 (ui_file_up): New.
17189 (class null_file): New.
17190 (null_stream): Declare.
17191 (ui_file_write_for_put, ui_file_put): Delete.
17192 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
17193 Delete.
17194 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
17195 (gdb_fopen, tee_file_new): Delete.
17196 (struct string_file): New.
17197 (struct stdio_file): New.
17198 (stdio_file_up): New.
17199 (struct stderr_file): New.
17200 (class tee_file): New.
17201 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
17202 of a 'ui_file *'. Adjust.
17203 * ui-out.h (class ui_out) <field_stream>: Likewise.
17204 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
17205 (null_stream): Delete.
17206 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
17207 Adjust.
17208 * utils.h (struct ui_file): Delete forward declaration..
17209 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
17210 (error_stream): Take a 'string_file &' instead of a
17211 'ui_file *'.
17212 * varobj.c (varobj_value_get_print_value): Use string_file.
17213 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
17214 * gdbarch.c: Regenerate.
17215
17216 2017-02-02 Pedro Alves <palves@redhat.com>
17217
17218 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
17219 (gdb_pretty_print_insn): ... this. Now a free function. Add back
17220 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
17221 Adjust to call gdb_print_insn instead of
17222 gdb_disassembler::print_insn.
17223 (dump_insns, do_mixed_source_and_assembly_deprecated)
17224 (do_mixed_source_and_assembly, do_assembly_only): Add back a
17225 'gdbarch' parameter. Remove gdb_disassembler parameter.
17226 (gdb_disassembly): Don't allocate a gdb_disassembler here.
17227 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
17228 declaration.
17229 (gdb_pretty_print_insn): Re-add declaration.
17230 * record-btrace.c (btrace_insn_history): Don't allocate a
17231 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
17232
17233 2017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
17234
17235 * disasm.h (gdb_disassembly): Remove file_string parameter.
17236 * disasm.c (gdb_disassembly): Likewise.
17237 * cli/cli-cmds.c (print_disassembly): Adapt.
17238 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
17239 * stack.c (do_gdb_disassembly): Likewise.
17240
17241 2017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
17242
17243 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
17244 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
17245 targets. And if the implicit value is longer than needed, extract
17246 the first bytes instead of the "least significant" ones.
17247
17248 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
17249
17250 * btrace.c (btrace_enable): Do not call btrace_add_pc for
17251 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
17252 (btrace_fetch): Assert can_access_registers_ptid.
17253 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
17254 validate_registers_access.
17255
17256 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
17257
17258 * gdbthread.h (can_access_registers_ptid): New.
17259 * thread.c (can_access_registers_ptid): New.
17260
17261 2017-02-01 Pedro Alves <palves@redhat.com>
17262
17263 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
17264
17265 2017-01-31 Pedro Alves <palves@redhat.com>
17266
17267 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
17268 Fix typos.
17269
17270 2017-01-31 Pedro Alves <palves@redhat.com>
17271
17272 * stack.c (print_frame_args): Remove local mem_fileopen stream,
17273 not used.
17274
17275 2017-01-31 Pedro Alves <palves@redhat.com>
17276
17277 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
17278
17279 2017-01-31 Pedro Alves <palves@redhat.com>
17280
17281 * common/scoped_restore.h
17282 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
17283 change the value's parameter type to T2.
17284 (make_scoped_restore): Likewise.
17285
17286 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
17287 Richard Henderson <rth@redhat.com>
17288
17289 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
17290 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
17291 GS_BASE for older kernels.
17292 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
17293 GS_BASE for older kernels.
17294 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
17295 and GS_BASE to the offset table.
17296 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
17297 system register group.
17298 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
17299 for older kernels.
17300 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
17301 amd64 ABI.
17302 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
17303 AMD64_GSBASE_REGNUM.
17304 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
17305 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
17306 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
17307 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
17308 i386/64bit-segments.xml in those rules.
17309 * features/i386/64bit-segments.xml: New file.
17310 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
17311 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
17312 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
17313 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
17314 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
17315 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
17316 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
17317 * features/i386/amd64-avx-linux.c: Regenerated.
17318 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
17319 * features/i386/amd64-avx-mpx.c: Regenerated.
17320 * features/i386/amd64-avx512-linux.c: Regenerated.
17321 * features/i386/amd64-linux.c: Regenerated.
17322 * features/i386/amd64-mpx-linux.c: Regenerated.
17323 * features/i386/i386-avx-mpx-linux.c: Regenerated.
17324 * features/i386/i386-avx-mpx.c: Regenerated.
17325 * features/i386/x32-avx-linux.c: Regenerated.
17326 * features/i386/x32-avx512-linux.c: Regenerated.
17327 * regformats/i386/amd64-avx-linux.dat: Regenerated.
17328 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
17329 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
17330 * regformats/i386/amd64-linux.dat: Regenerated.
17331 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
17332 * regformats/i386/x32-avx-linux.dat: Regenerated.
17333 * regformats/i386/x32-avx512-linux.dat: Regenerated.
17334 * regformats/i386/x32-linux.dat: Regenerated.
17335
17336 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
17337
17338 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
17339 Set to AMD64_NUM_REGS.
17340
17341 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
17342
17343 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
17344 that checks validity of a register number.
17345
17346 2017-01-27 Kees Cook <keescook@google.com>
17347
17348 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
17349 fetch_fpregs if target has fpa registers.
17350 (arm_linux_store_inferior_registers): Call store_fpregs if target
17351 has fpa registers.
17352
17353 2017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
17354
17355 * cris-tdep.c (cris_gdbarch_init): Remove check for
17356 info.byte_order and force it to BFD_ENDIAN_LITTLE.
17357
17358 2017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
17359
17360 * corelow.c (get_core_register_section): Check for regset
17361 existence before checking for REGSET_VARIABLE_SIZE.
17362
17363 2017-01-26 Yao Qi <yao.qi@linaro.org>
17364 Pedro Alves <palves@redhat.com>
17365
17366 PR gdb/20939
17367 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
17368 call memory_error, save memaddr instead.
17369 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
17370 negative, cal memory_error.
17371 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
17372
17373 2017-01-26 Yao Qi <yao.qi@linaro.org>
17374
17375 * disasm-selftests.c (memory_error_test): New function.
17376 (_initialize_disasm_selftests): Register memory_error_test.
17377
17378 2017-01-26 Yao Qi <yao.qi@linaro.org>
17379
17380 * Makefile.in (SFILES): Add disasm-selftests.c and
17381 selftest-arch.c.
17382 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
17383 * disasm-selftests.c: New file.
17384 * selftest-arch.c: New file.
17385 * selftest-arch.h: New file.
17386
17387 2017-01-26 Yao Qi <yao.qi@linaro.org>
17388
17389 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
17390 to bfd_arch_mep. Don't return 0 if section is not
17391 found. Call print_insn_mep.
17392
17393 2017-01-26 Pedro Alves <palves@redhat.com>
17394 Yao Qi <yao.qi@linaro.org>
17395
17396 * arm-tdep.c: Include "disasm.h".
17397 (gdb_print_insn_arm): Update code to get gdbarch.
17398 * disasm.c (dis_asm_read_memory): Change it to
17399 gdb_disassembler::dis_asm_read_memory.
17400 (dis_asm_memory_error): Likewise.
17401 (dis_asm_print_address): Likewise.
17402 (gdb_pretty_print_insn): Change it to
17403 gdb_disassembler::pretty_print_insn.
17404 (dump_insns): Add one argument gdb_disassemlber. All
17405 callers updated.
17406 (do_mixed_source_and_assembly_deprecated): Likewise.
17407 (do_mixed_source_and_assembly): Likewise.
17408 (do_assembly_only): Likewise.
17409 (gdb_disassembler::gdb_disassembler): New.
17410 (gdb_disassembler::print_insn): New.
17411 * disasm.h (class gdb_disassembler): New.
17412 (gdb_pretty_print_insn): Remove declaration.
17413 (gdb_disassemble_info): Likewise.
17414 * guile/scm-disasm.c (class gdbscm_disassembler): New.
17415 (gdbscm_disasm_read_memory_worker): Update.
17416 (gdbscm_disasm_read_memory): Update.
17417 (gdbscm_disasm_memory_error): Remove.
17418 (gdbscm_disasm_print_address): Remove.
17419 (gdbscm_disassembler::gdbscm_disassembler): New.
17420 (gdbscm_print_insn_from_port): Update.
17421 * mips-tdep.c: Include disasm.h.
17422 (gdb_print_insn_mips): Update code to get gdbarch.
17423 * record-btrace.c (btrace_insn_history): Update.
17424 * spu-tdep.c: Include disasm.h.
17425 (struct spu_dis_asm_data): Remove.
17426 (struct spu_dis_asm_info): New.
17427 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
17428 SPU id.
17429 (gdb_print_insn_spu): Cast disassemble_info to
17430 spu_dis_asm_info.
17431
17432 2017-01-26 Yao Qi <yao.qi@linaro.org>
17433
17434 * disasm.c (do_ui_file_delete): Delete.
17435 (gdb_insn_length): Move code creating stream to ...
17436 * utils.c (null_stream): ... here. New function.
17437 * utils.h (null_stream): Declare.
17438
17439 2017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
17440
17441 * python/py-inferior.c (find_thread_object): Return directly
17442 from the loop. Remove "found" variable.
17443
17444 2017-01-21 Joel Brobecker <brobecker@adacore.com>
17445
17446 GDB 7.12.1 released.
17447
17448 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
17449
17450 * python/py-function.c (fnpy_call): Reorder declarations to have
17451 the gdbpy_enter object declared first.
17452 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
17453
17454 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
17455
17456 PR python/21068
17457 * python/python-internal.h (PyMem_RawMalloc): Define for
17458 Python < 3.4.
17459 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
17460 PyMem_RawMalloc instead of PyMem_Malloc.
17461
17462 2017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
17463 Luis Machado <lgustavo@codesourcery.com>
17464
17465 * NEWS (New commands): Mention flash-erase.
17466 (New MI commands): Mention target-flash-erase.
17467 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
17468 command.
17469 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
17470 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
17471 * target.c (flash_erase_command): New function.
17472 (initialize_targets): Add new flash-erase command.
17473 * target.h (flash_erase_command): New declaration.
17474
17475 2017-01-20 Joel Brobecker <brobecker@adacore.com>
17476
17477 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
17478 HAVE_SYS_PROCFS_H is defined.
17479
17480 2017-01-18 Alan Hayward <alan.hayward@arm.com>
17481
17482 * remote.c (struct cached_reg): Change data into a pointer.
17483 * (stop_reply_dtr): Free data pointers before deleting vector.
17484 (process_stop_reply): Likewise.
17485 (remote_parse_stop_reply): Allocate space for data
17486
17487 2017-01-18 Alan Hayward <alan.hayward@arm.com>
17488
17489 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
17490 MAX_REGISTER_SIZE.
17491 (amd64_pseudo_register_read_value): Likewise.
17492 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
17493 (store_register_using_P): Likewise.
17494 * regcache.c (regcache_xfer_part): Likewise.
17495
17496 2017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
17497
17498 Split real and pseudo registers.
17499 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
17500 (sparc32_pseudo_regnum): New enum.
17501 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
17502 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
17503 (SPARC32_CP0_REGISTERS): New macro.
17504 (sparc32_pseudo_register_name): New function.
17505 (sparc32_register_name): Use sparc32_pseudo_register_name.
17506 (sparc32_pseudo_register_type): New function.
17507 (sparc32_register_type): Use sparc32_pseudo_register_type.
17508 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
17509 pseudo register numbers.
17510 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
17511 (SPARC64_CP0_REGISTERS): New macro.
17512 (sparc64_pseudo_register_name): New function.
17513 (sparc64_register_name): Use sparc64_pseudo_register_name.
17514 (sparc64_pseudo_register_type): New function.
17515 (sparc64_register_type): Use sparc64_pseudo_register_type.
17516 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
17517 pseudo register numbers.
17518 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
17519 sparc64_store_arguments): Handle pseudo register numbers.
17520
17521 2017-01-13 Yao Qi <yao.qi@linaro.org>
17522
17523 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
17524 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
17525 output.
17526 (getpkt_or_notif_sane_1): Likewise.
17527
17528 2017-01-13 Yao Qi <yao.qi@linaro.org>
17529
17530 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
17531 of CC. Pass "-x c++-header" instead of "-x c".
17532
17533 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
17534
17535 * remote.c (remote_can_async_p): Update comment.
17536
17537 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
17538
17539 * linux-nat.c (linux_nat_can_async_p): Update comment.
17540
17541 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
17542
17543 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
17544
17545 2017-01-11 Simon Marchi <simon.marchi@ericsson.com>
17546
17547 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
17548
17549 2017-01-10 Tom Tromey <tom@tromey.com>
17550
17551 * python/py-type.c (typy_legacy_template_argument): Update.
17552 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
17553 ~demangle_parse_info): Declare new members.
17554 (cp_demangled_name_to_comp): Return unique_ptr.
17555 (cp_demangled_name_parse_free)
17556 (make_cleanup_cp_demangled_name_parse_free)
17557 (cp_new_demangle_parse_info): Remove.
17558 * cp-support.c (do_demangled_name_parse_free_cleanup)
17559 (make_cleanup_cp_demangled_name_parse_free): Remove.
17560 (inspect_type, cp_canonicalize_string_full)
17561 (cp_canonicalize_string): Update.
17562 (mangled_name_to_comp): Change return type.
17563 (cp_class_name_from_physname, method_name_from_physname)
17564 (cp_func_name, cp_remove_params): Update.
17565 * cp-name-parser.y (demangle_parse_info): New constructor, from
17566 cp_new_demangle_parse_info.
17567 (~demangle_parse_info): New destructor, from
17568 cp_demangled_name_parse_free.
17569 (cp_merge_demangle_parse_infos): Update.
17570 (cp_demangled_name_to_comp): Change return type.
17571
17572 2017-01-10 Tom Tromey <tom@tromey.com>
17573
17574 * top.c (prevent_dont_repeat): Change return type.
17575 * python/python.c (execute_gdb_command): Use std::string.
17576 Update.
17577 * guile/guile.c (gdbscm_execute_gdb_command): Update.
17578 * command.h (prevent_dont_repeat): Change return type.
17579 * breakpoint.c (bpstat_do_actions_1): Update.
17580
17581 2017-01-10 Tom Tromey <tom@tromey.com>
17582
17583 * value.h (scoped_value_mark::~scoped_value_mark): Call
17584 free_to_mark.
17585 (scoped_value_mark::free_to_mark): New method.
17586 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
17587 scoped_value_mark.
17588
17589 2017-01-10 Tom Tromey <tom@tromey.com>
17590
17591 * python/py-value.c (valpy_dereference, valpy_referenced_value)
17592 (valpy_reference_value, valpy_const_value, valpy_get_address)
17593 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
17594 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
17595 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
17596 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
17597 scoped_value_mark.
17598 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
17599 * value.h (scoped_value_mark): New class.
17600
17601 2017-01-10 Tom Tromey <tom@tromey.com>
17602
17603 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
17604 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
17605 * psymtab.c (discard_psymtabs_upto): Remove.
17606 (make_cleanup_discard_psymtabs): Remove.
17607 (struct psymtab_state): Remove.
17608
17609 2017-01-10 Tom Tromey <tom@tromey.com>
17610
17611 * record-full.c (record_full_save_cleanups): Remove.
17612 (record_full_save): Use gdb::unlinker.
17613 * gcore.c (do_bfd_delete_cleanup): Remove.
17614 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
17615 cleanups.
17616 * dwarf2read.c (unlink_if_set): Remove.
17617 (write_psymtabs_to_index): Use gdb::unlinker.
17618 * common/gdb_unlinker.h: New file.
17619
17620 2017-01-10 Tom Tromey <tom@tromey.com>
17621
17622 * windows-tdep.c (windows_xfer_shared_library): Update.
17623 * windows-nat.c (windows_make_so): Update.
17624 * utils.h (make_cleanup_bfd_unref): Remove.
17625 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
17626 * symfile.h (symfile_bfd_open)
17627 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
17628 * symfile.c (read_symbols, symbol_file_add)
17629 (separate_debug_file_exists): Update.
17630 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
17631 (generic_load, reread_symbols): Update.
17632 * symfile-mem.c (symbol_file_add_from_memory): Update.
17633 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
17634 (spu_symbol_file_add_from_memory): Update.
17635 * solist.h (struct target_so_ops) <bfd_open>: Return
17636 gdb_bfd_ref_ptr.
17637 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
17638 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
17639 gdb_bfd_ref_ptr.
17640 (solib_map_sections, reload_shared_libraries_1): Update.
17641 * solib-svr4.c (enable_break): Update.
17642 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
17643 * solib-frv.c (enable_break2): Update.
17644 * solib-dsbt.c (enable_break): Update.
17645 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
17646 gdb_bfd_ref_ptr.
17647 (darwin_solib_get_all_image_info_addr_at_init): Update.
17648 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
17649 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
17650 * record-full.c (record_full_save): Update.
17651 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
17652 * procfs.c (insert_dbx_link_bpt_in_file): Update.
17653 * minidebug.c (find_separate_debug_file_in_section): Return
17654 gdb_bfd_ref_ptr.
17655 * machoread.c (macho_add_oso_symfile): Change abfd to
17656 gdb_bfd_ref_ptr.
17657 (macho_symfile_read_all_oso): Update.
17658 (macho_check_dsym): Return gdb_bfd_ref_ptr.
17659 (macho_symfile_read): Update.
17660 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
17661 (jit_bfd_try_read_symtab): Update.
17662 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
17663 (gdb_bfd_openw, gdb_bfd_openr_iovec)
17664 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
17665 gdb_bfd_ref_ptr.
17666 (gdb_bfd_ref_policy): New struct.
17667 (gdb_bfd_ref_ptr): New typedef.
17668 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
17669 (gdb_bfd_openw, gdb_bfd_openr_iovec)
17670 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
17671 gdb_bfd_ref_ptr.
17672 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
17673 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
17674 (gcore_command): Update.
17675 * exec.c (exec_file_attach): Update.
17676 * elfread.c (elf_symfile_read): Update.
17677 * dwarf2read.c (dwarf2_get_dwz_file): Update.
17678 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
17679 (open_and_init_dwo_file): Update.
17680 (open_dwp_file): Return gdb_bfd_ref_ptr.
17681 (open_and_init_dwp_file): Update.
17682 * corelow.c (core_open): Update.
17683 * compile/compile-object-load.c (compile_object_load): Update.
17684 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
17685 * coffread.c (coff_symfile_read): Update.
17686 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
17687 gdb_bfd_ref_ptr. Rename.
17688 (dump_bfd_file, restore_command): Update.
17689 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
17690 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
17691 (find_separate_debug_file_by_buildid): Update.
17692
17693 2017-01-10 Tom Tromey <tom@tromey.com>
17694
17695 * common/gdb_ref_ptr.h: New file.
17696 * python/py-ref.h (struct gdbpy_ref_policy): New.
17697 (gdbpy_ref): Now a typedef.
17698
17699 2017-01-10 Tom Tromey <tom@tromey.com>
17700
17701 * utils.h (make_cleanup_htab_delete): Don't declare.
17702 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
17703 Remove.
17704 * linespec.c (decode_compound_collector): Add constructor,
17705 destructor.
17706 (lookup_prefix_sym): Remove cleanup.
17707 (symtab_collector): Add constructor, destructor.
17708 (collect_symtabs_from_filename): Remove cleanup.
17709 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
17710 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
17711 Use htab_up.
17712 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
17713 * dwarf2read.c (dw2_expand_symtabs_matching)
17714 (dw2_map_symbol_filenames, dwarf_decode_macros)
17715 (write_psymtabs_to_index): Use htab_up.
17716 * dwarf2loc.c (func_verify_no_selftailcall)
17717 (call_site_find_chain_1, func_verify_no_selftailcall)
17718 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
17719 std::vector, gdb::unique_xmalloc_ptr.
17720 (call_sitep): Remove typedef.
17721 (dwarf2_locexpr_baton_eval): Remove unused variable.
17722
17723 2017-01-10 Tom Tromey <tom@tromey.com>
17724
17725 * python/python-internal.h (make_cleanup_py_decref)
17726 (make_cleanup_py_xdecref): Don't declare.
17727 * python/py-utils.c (py_decref, make_cleanup_py_decref)
17728 (py_xdecref, make_cleanup_py_xdecref): Remove.
17729
17730 2017-01-10 Tom Tromey <tom@tromey.com>
17731
17732 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
17733 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
17734
17735 2017-01-10 Tom Tromey <tom@tromey.com>
17736
17737 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
17738
17739 2017-01-10 Tom Tromey <tom@tromey.com>
17740
17741 * python/py-utils.c (unicode_to_encoded_string)
17742 (python_string_to_target_string)
17743 (python_string_to_target_python_string)
17744 (python_string_to_host_string, gdbpy_obj_to_string)
17745 (get_addr_from_python): Use gdbpy_ref.
17746
17747 2017-01-10 Tom Tromey <tom@tromey.com>
17748
17749 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
17750 gdbpy_ref.
17751
17752 2017-01-10 Tom Tromey <tom@tromey.com>
17753
17754 * python/python.c (eval_python_command, gdbpy_decode_line)
17755 (gdbpy_run_events, gdbpy_start_type_printers)
17756 (gdbpy_apply_type_printers): Use gdbpy_ref.
17757
17758 2017-01-10 Tom Tromey <tom@tromey.com>
17759
17760 * python/py-param.c (get_doc_string, compute_enum_values): Use
17761 gdbpy_ref.
17762
17763 2017-01-10 Tom Tromey <tom@tromey.com>
17764
17765 * python/py-inferior.c (find_thread_object, build_inferior_list):
17766 Use gdbpy_ref.
17767
17768 2017-01-10 Tom Tromey <tom@tromey.com>
17769
17770 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
17771
17772 2017-01-10 Tom Tromey <tom@tromey.com>
17773
17774 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
17775 gdbpy_ref.
17776
17777 2017-01-10 Tom Tromey <tom@tromey.com>
17778
17779 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
17780 extra incref.
17781 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
17782 Use gdbpy_ref.
17783
17784 2017-01-10 Tom Tromey <tom@tromey.com>
17785
17786 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
17787 gdbpy_ref.
17788
17789 2017-01-10 Tom Tromey <tom@tromey.com>
17790
17791 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
17792 decref results of PyArg_ParseTupleAndKeywords.
17793
17794 2017-01-10 Tom Tromey <tom@tromey.com>
17795
17796 * python/python.c (python_run_simple_file): Use
17797 unique_xmalloc_ptr, gdbpy_ref.
17798
17799 2017-01-10 Tom Tromey <tom@tromey.com>
17800
17801 * python/py-prettyprint.c (print_stack_unless_memory_error)
17802 (print_string_repr, print_children): Use gdbpy_ref.
17803 (dummy_python_frame): New class.
17804 (dummy_python_frame::dummy_python_frame): Rename from
17805 push_dummy_python_frame.
17806 (py_restore_tstate): Remove.
17807
17808 2017-01-10 Tom Tromey <tom@tromey.com>
17809
17810 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
17811
17812 2017-01-10 Tom Tromey <tom@tromey.com>
17813
17814 * python/python.c (ensure_python_env, restore_python_env):
17815 Remove.
17816 * python/python-internal.h (ensure_python_env): Don't declare.
17817 * varobj.h (varobj_ensure_python_env): Don't declare.
17818 * varobj.c (varobj_ensure_python_env): Remove.
17819
17820 2017-01-10 Tom Tromey <tom@tromey.com>
17821
17822 * varobj.c (varobj_value_get_print_value): Use
17823 gdbpy_enter_varobj.
17824
17825 2017-01-10 Tom Tromey <tom@tromey.com>
17826
17827 * python/py-prettyprint.c (print_string_repr, print_children):
17828 Update.
17829 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
17830 of "encoding".
17831 * varobj.c (varobj_value_get_print_value): Update.
17832 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
17833
17834 2017-01-10 Tom Tromey <tom@tromey.com>
17835
17836 * varobj.c (varobj_get_display_hint)
17837 (dynamic_varobj_has_child_method, install_new_value_visualizer)
17838 (varobj_set_visualizer, free_variable): Use
17839 gdbpy_enter_varobj.
17840
17841 2017-01-10 Tom Tromey <tom@tromey.com>
17842
17843 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
17844 (do_finish_initialization): New function. Use gdbpy_ref.
17845 (gdbpy_finish_initialization): Use gdbpy_enter. Call
17846 do_finish_initialization.
17847
17848 2017-01-10 Tom Tromey <tom@tromey.com>
17849
17850 * python/py-param.c (get_set_value, get_show_value): Use
17851 gdbpy_enter, gdbpy_ref.
17852
17853 2017-01-10 Tom Tromey <tom@tromey.com>
17854
17855 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
17856
17857 2017-01-10 Tom Tromey <tom@tromey.com>
17858
17859 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
17860
17861 2017-01-10 Tom Tromey <tom@tromey.com>
17862
17863 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
17864 Use gdbpy_enter_varobj.
17865
17866 2017-01-10 Tom Tromey <tom@tromey.com>
17867
17868 * varobj.c (gdbpy_enter_varobj): New constructor.
17869 * python/python-internal.h (gdbpy_enter_varobj): New class.
17870 * python/py-varobj.c (py_varobj_get_iterator): Use
17871 gdbpy_enter_varobj.
17872
17873 2017-01-10 Tom Tromey <tom@tromey.com>
17874
17875 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
17876 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
17877 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
17878 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
17879 unique_xmalloc_ptr.
17880 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
17881
17882 2017-01-10 Tom Tromey <tom@tromey.com>
17883
17884 * python/py-xmethods.c (invoke_match_method): Use
17885 gdbpy_ref.
17886
17887 2017-01-10 Tom Tromey <tom@tromey.com>
17888
17889 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
17890 gdbpy_enter, gdbpy_ref.
17891
17892 2017-01-10 Tom Tromey <tom@tromey.com>
17893
17894 * python/python.c (python_interactive_command): Use gdbpy_enter.
17895
17896 2017-01-10 Tom Tromey <tom@tromey.com>
17897
17898 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
17899 gdbpy_ref.
17900
17901 2017-01-10 Tom Tromey <tom@tromey.com>
17902
17903 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
17904 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
17905
17906 2017-01-10 Tom Tromey <tom@tromey.com>
17907
17908 * utils.h (htab_deleter): New struct.
17909 (htab_up): New typedef.
17910 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
17911 gdbpy_enter, gdbpy_ref, htab_up.
17912
17913 2017-01-10 Tom Tromey <tom@tromey.com>
17914
17915 * python/py-unwind.c (pending_frame_invalidate): Remove.
17916 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
17917
17918 2017-01-10 Tom Tromey <tom@tromey.com>
17919
17920 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
17921 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
17922
17923 2017-01-10 Tom Tromey <tom@tromey.com>
17924
17925 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
17926
17927 2017-01-10 Tom Tromey <tom@tromey.com>
17928
17929 * python/python.c (gdbpy_eval_from_control_command)
17930 (gdbpy_source_script, gdbpy_run_events)
17931 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
17932 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
17933 gdbpy_enter.
17934
17935 2017-01-10 Tom Tromey <tom@tromey.com>
17936
17937 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
17938
17939 2017-01-10 Tom Tromey <tom@tromey.com>
17940
17941 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
17942
17943 2017-01-10 Tom Tromey <tom@tromey.com>
17944
17945 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
17946 (python_on_inferior_call_pre, python_on_inferior_call_post)
17947 (python_on_memory_change, python_on_register_change)
17948 (python_inferior_exit, python_new_objfile, add_thread_object)
17949 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
17950
17951 2017-01-10 Tom Tromey <tom@tromey.com>
17952
17953 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
17954 (bpfinishpy_handle_exit): Use gdbpy_enter.
17955
17956 2017-01-10 Tom Tromey <tom@tromey.com>
17957
17958 * python/py-cmd.c (cmdpy_destroyer)
17959 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
17960 gdbpy_enter.
17961
17962 2017-01-10 Tom Tromey <tom@tromey.com>
17963
17964 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
17965 gdbpy_enter.
17966 (gdbpy_breakpoint_has_cond): Likewise.
17967
17968 2017-01-10 Tom Tromey <tom@tromey.com>
17969
17970 * python/python.c (gdbpy_enter): New constructor.
17971 (~gdbpy_enter): New destructor.
17972 (restore_python_env, ensure_python_env): Rewrite.
17973 * python/python-internal.h (gdbpy_enter): New class.
17974
17975 2017-01-10 Tom Tromey <tom@tromey.com>
17976
17977 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
17978
17979 2017-01-10 Tom Tromey <tom@tromey.com>
17980
17981 * python/py-value.c (value_has_field, get_field_flag)
17982 (get_field_type, valpy_getitem, convert_value_from_python): Use
17983 gdbpy_ref.
17984
17985 2017-01-10 Tom Tromey <tom@tromey.com>
17986
17987 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
17988 gdbpy_ref.
17989
17990 2017-01-10 Tom Tromey <tom@tromey.com>
17991
17992 * python/py-prettyprint.c (search_pp_list)
17993 (find_pretty_printer_from_objfiles)
17994 (find_pretty_printer_from_progspace)
17995 (find_pretty_printer_from_gdb, find_pretty_printer)
17996 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
17997 gdbpy_ref.
17998
17999 2017-01-10 Tom Tromey <tom@tromey.com>
18000
18001 * python/py-param.c (call_doc_function): Use gdbpy_ref.
18002
18003 2017-01-10 Tom Tromey <tom@tromey.com>
18004
18005 * python/py-linetable.c (build_line_table_tuple_from_pcs)
18006 (ltpy_get_all_source_lines): Use gdbpy_ref.
18007
18008 2017-01-10 Tom Tromey <tom@tromey.com>
18009
18010 * python/py-framefilter.c (extract_sym, extract_value)
18011 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
18012 gdbpy_ref.
18013
18014 2017-01-10 Tom Tromey <tom@tromey.com>
18015
18016 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
18017
18018 2017-01-10 Tom Tromey <tom@tromey.com>
18019
18020 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
18021
18022 2017-01-10 Tom Tromey <tom@tromey.com>
18023
18024 * python/py-function.c (convert_values_to_python, fnpy_init): Use
18025 gdbpy_ref.
18026
18027 2017-01-10 Tom Tromey <tom@tromey.com>
18028
18029 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
18030
18031 2017-01-10 Tom Tromey <tom@tromey.com>
18032
18033 * python/py-type.c (convert_field, make_fielditem, typy_fields)
18034 (typy_range): Use gdbpy_ref.
18035
18036 2017-01-10 Tom Tromey <tom@tromey.com>
18037
18038 * python/py-threadevent.c (create_thread_event_object): Use
18039 gdbpy_ref.
18040 * python/py-stopevent.c (create_stop_event_object): Simplify.
18041 (emit_stop_event): Use gdbpy_ref.
18042 * python/py-signalevent.c (create_signal_event_object): Use
18043 gdbpy_ref.
18044 * python/py-newobjfileevent.c (create_new_objfile_event_object)
18045 (emit_new_objfile_event, create_clear_objfiles_event_object)
18046 (emit_clear_objfiles_event): Use gdbpy_ref.
18047 * python/py-infevents.c (create_inferior_call_event_object)
18048 (create_register_changed_event_object)
18049 (create_memory_changed_event_object, emit_inferior_call_event)
18050 (emit_memory_changed_event, emit_register_changed_event): Use
18051 gdbpy_ref.
18052 * python/py-exitedevent.c (create_exited_event_object)
18053 (emit_exited_event): Use gdbpy_ref.
18054 * python/py-event.h (evpy_emit_event): Remove
18055 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
18056 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
18057 * python/py-continueevent.c (emit_continue_event): Use
18058 gdbpy_ref.
18059 * python/py-breakpoint.c (gdbpy_breakpoint_created)
18060 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
18061 gdbpy_ref.
18062 * python/py-bpevent.c (create_breakpoint_event_object): Use
18063 gdbpy_ref.
18064
18065 2017-01-10 Tom Tromey <tom@tromey.com>
18066
18067 * python/py-ref.h: New file.
18068
18069 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
18070
18071 * cli-out.c (cli_ui_out::do_redirect): Change return type to
18072 void.
18073 * cli-out.h (cli_ui_out::do_redirect): Likewise.
18074 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
18075 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
18076 * ui-out.c (ui_out::redirect): Likewise.
18077 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
18078 * cli/cli-logging.c (set_logging_redirect): Update call site of
18079 ui_out::redirect.
18080 (handle_redirections): Likewise.
18081 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
18082 * top.c (execute_command_to_string): Likewise.
18083 * utils.c (do_ui_out_redirect_pop): Likewise.
18084
18085 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
18086
18087 * stack.c (_initialize_stack): Update "frame" command help message.
18088
18089 2017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
18090
18091 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
18092
18093 2017-01-06 Yao Qi <yao.qi@linaro.org>
18094
18095 * x86-linux-nat.h: Include gdb_proc_service.h.
18096
18097 2017-01-06 Yao Qi <yao.qi@linaro.org>
18098
18099 * ser-base.h: Include serial.h.
18100
18101 2017-01-06 Yao Qi <yao.qi@linaro.org>
18102
18103 * ppc-linux-tdep.h: Include ppc-tdep.h.
18104
18105 2017-01-06 Yao Qi <yao.qi@linaro.org>
18106
18107 * nat/amd64-linux-siginfo.h: Include signal.h.
18108
18109 2017-01-06 Yao Qi <yao.qi@linaro.org>
18110
18111 * nat/aarch64-linux-hw-point.h: Include break-common.h.
18112
18113 2017-01-06 Yao Qi <yao.qi@linaro.org>
18114
18115 * mi/mi-parse.h: Include mi-cmds.h.
18116
18117 2017-01-06 Yao Qi <yao.qi@linaro.org>
18118
18119 * inf-loop.c: Don't include "target.h".
18120 * inf-loop.h: Include it here.
18121
18122 2017-01-06 Yao Qi <yao.qi@linaro.org>
18123
18124 * dfp.h: Include "dboulest.h" and "expression.h".
18125
18126 2017-01-06 Yao Qi <yao.qi@linaro.org>
18127
18128 * ax-gdb.h: Include "ax.h".
18129
18130 2017-01-06 Yao Qi <yao.qi@linaro.org>
18131
18132 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
18133 with nat/gdb_ptrace.h.
18134
18135 2017-01-05 Yao Qi <yao.qi@linaro.org>
18136
18137 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
18138 new line.
18139 (mips64_fbsd_sigframe_init): Likewise.
18140
18141 2017-01-04 John Baldwin <jhb@FreeBSD.org>
18142
18143 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
18144 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
18145
18146 2017-01-04 John Baldwin <jhb@FreeBSD.org>
18147
18148 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
18149 * NEWS: Mention new FreeBSD/mips native configuration.
18150 * config/mips/fbsd.mh: New file.
18151 * configure.host: Add mips*-*-freebsd*.
18152 * mips-fbsd-nat.c: New file.
18153
18154 2017-01-04 John Baldwin <jhb@FreeBSD.org>
18155
18156 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
18157 (ALLDEPFILES): Add mips-fbsd-tdep.c.
18158 * NEWS: Mention new FreeBSD/mips target.
18159 * configure.tgt: Add mips*-*-freebsd*.
18160 * mips-fbsd-tdep.c: New file.
18161 * mips-fbsd-tdep.h: New file.
18162
18163 2017-01-04 Yao Qi <yao.qi@linaro.org>
18164
18165 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
18166 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
18167
18168 2017-01-01 Joel Brobecker <brobecker@adacore.com>
18169
18170 Update copyright year range in all GDB files.
18171
18172 2017-01-01 Joel Brobecker <brobecker@adacore.com>
18173
18174 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
18175
18176 For older changes see ChangeLog-2016.
18177 \f
18178 Local Variables:
18179 mode: change-log
18180 left-margin: 8
18181 fill-column: 74
18182 version-control: never
18183 coding: utf-8
18184 End:
This page took 0.481962 seconds and 4 git commands to generate.