Fix regression: expression completer and scope operator (PR gdb/22584)
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2017-12-13 Pedro Alves <palves@redhat.com>
2
3 * completer.c (completion_tracker::maybe_add_completion): New
4 'text' and 'word' parameters. Use make_completion_match_str.
5 (completion_tracker::add_completion): New 'text' and 'word'
6 parameters. Pass down.
7 (completion_tracker::recompute_lowest_common_denominator): Change
8 parameter type to gdb::unique_xmalloc_ptr rval ref. Adjust.
9 * completer.h (completion_tracker::add_completion): New 'text' and
10 'word' parameters.
11 (completion_tracker::recompute_lowest_common_denominator): Change
12 parameter type to gdb::unique_xmalloc_ptr rval ref.
13 (completion_tracker::recompute_lowest_common_denominator): Change
14 parameter type to gdb::unique_xmalloc_ptr rval ref.
15 * symtab.c (completion_list_add_name): Pass down 'text' and 'word'
16 as well.
17
18 2017-12-13 Pedro Alves <palves@redhat.com>
19
20 * cli/cli-decode.c (complete_on_cmdlist, complete_on_enum): Use
21 make_completion_match_str.
22 * completer.c: Use gdb::unique_xmalloc_ptr and
23 make_completion_match_str.
24 (make_completion_match_str_1): New.
25 (make_completion_match_str(const char *, const char *,
26 const char *)): New.
27 (make_completion_match_str(gdb::unique_xmalloc_ptr<char> &&,
28 const char *, const char *)): New.
29 * completer.h (make_completion_match_str(const char *,
30 const char *, const char *)): New.
31 (make_completion_match_str(gdb::unique_xmalloc_ptr<char> &&,
32 const char *, const char *)): New.
33 * interps.c (interpreter_completer): Use make_completion_match_str.
34 * symtab.c (completion_list_add_name, add_filename_to_list): Use
35 make_completion_match_str.
36
37 2017-12-13 Stafford Horne <shorne@gmail.com>
38
39 * or1k-tdep.c (or1k_analyse_inst): Use _() wrapper for message
40 strings.
41 (or1k_unwind_pc): Use paddress() instead of %p.
42 (or1k_unwind_sp): Likewise.
43 (or1k_frame_cache): Use host_address_to_string()/paddress()
44 instead of %p and use _() wrapper for message strings.
45
46 2017-12-13 Simon Marchi <simon.marchi@ericsson.com>
47
48 * contrib/ari/gdb_ari.sh: Fix typo in help.
49
50 2017-12-13 Joel Brobecker <brobecker@adacore.com>
51
52 * event-top.c (handle_line_of_input): Set server_command.
53
54 2017-12-12 Stafford Horne <shorne@gmail.com>
55 Stefan Wallentowitz <stefan@wallentowitz.de>
56 Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
57 Franck Jullien <franck.jullien@gmail.com>
58 Jeremy Bennett <jeremy.bennett@embecosm.com>
59
60 * configure.tgt: Add targets for or1k and or1knd.
61 * or1k-tdep.c: New file.
62 * or1k-tdep.h: New file.
63 * features/Makefile: Add or1k.xml to build.
64 * features/or1k.xml: New file.
65 * features/or1k-core.xml: New file.
66 * features/or1k.c: Generated.
67
68 2017-12-12 Alan Modra <amodra@gmail.com>
69
70 PR tdep/22576
71 * ppc64-tdep.c (ppc64_plt_entry_point): Rewrite to take TOC-relative
72 PLT offset, and retrieve r2 from stack when executing in reverse.
73 (ppc64_standard_linkage1_target): Drop pc param. Calculate offset
74 rather than PLT address.
75 (ppc64_standard_linkage2_target): Likewise.
76 (ppc64_standard_linkage3_target): Likewise.
77 (ppc64_standard_linkage4_target): Likewise.
78 (ppc64_skip_trampoline_code_1): Adjust to suit.
79
80 2017-12-11 Simon Marchi <simon.marchi@ericsson.com>
81
82 PR gdb/22556
83 * remote.c (remote_thread_name): Return NULL if name is empty.
84 (remote_threads_extra_info): Return NULL if extra info is empty.
85
86 2017-12-11 Pedro Alves <palves@redhat.com>
87
88 * defs.h (elf_sym_fns_lazy_psyms, elf_sym_fns_gdb_index)
89 (elf_sym_fns_debug_names): Move to elfread.c.
90 * dwarf2read.c (dwarf2_initialize_objfile): Return a boolean
91 instead of a sym_fns and add 'index_kind' output parameter. Fill
92 the latter in with the index variant kind if using an index.
93 (enum dw_index_kind): Moved to symfile.h.
94 * elfread.c (elf_sym_fns_gdb_index, elf_sym_fns_debug_names)
95 (elf_sym_fns_lazy_psyms): Move from defs.h.
96 (elf_symfile_read): Adjust to new dwarf2_initialize_objfile
97 interface.
98 * symfile.h (enum class dw_index_kind): New, moved from
99 dwarf2read.c.
100 (dwarf2_initialize_objfile): Change prototype.
101
102 2017-12-11 Ulrich Weigand <uweigand@de.ibm.com>
103
104 * target-float.c (mpfr_float_ops::from_target): Use mpfr_set_ui
105 instead of mpfr_set_si to convert mantissa bits.
106
107 2017-12-11 Xavier Roirand <roirand@adacore.com>
108 Joel Brobecker <brobecker@adacore.com>
109
110 * ada-lang.c (ada_tag_value_at_base_address): Change the way
111 tagged type base address is computed.
112 (enum ada_primitive_types) <ada_primitive_type_storage_offset>:
113 New enumerate.
114 (ada_language_arch_info): Set the ada_primitive_type_storage_offset
115 element of lai->primitive_type_vector.
116
117 2017-12-08 Pedro Alves <palves@redhat.com>
118
119 * dwarf2read.c (mock_mapped_index): Reimplement as an extension of
120 mapped_index_base.
121 (check_match): Adjust to use mock_index directly.
122 (check_find_bounds_finds)
123 (test_mapped_index_find_name_component_bounds): Adjust to work
124 with a mapped_index_base.
125
126 2017-12-08 Pedro Alves <palves@redhat.com>
127
128 * dwarf2read.c (struct mapped_index_base): New, partially factored
129 out from ...
130 (struct mapped_index): ... this. Inherit mapped_index_base.
131 (mapped_index::symbol_name_slot_invalid):
132 (mapped_index::symbol_name_at): Add override marker.
133 (mapped_index::symbol_name_count): New.
134 (struct mapped_debug_names): Inherit mapped_index_base.
135 (mapped_debug_names::symbol_name_at): New.
136 (mapped_debug_names::symbol_name_count): New.
137 (mapped_index::find_name_components_bounds): Rename to ...
138 (mapped_index_base::find_name_components_bounds): ... this.
139 (mapped_index::build_name_components): Rename to ...
140 (mapped_index_base::build_name_components): ... this. Adjust to
141 use mapped_index_base::symbol_name_count and
142 mapped_index_base::symbol_name_slot_invalid.
143 (dw2_expand_symtabs_matching_symbol): Take a mapped_index_base
144 instead of a mapped_index. Use
145 dw2_expand_symtabs_matching_symbol.
146
147 2017-12-08 Pedro Alves <palves@redhat.com>
148
149 * dwarf2read.c (mapped_index::symbol_table_slot): New.
150 (mapped_index::address_table): Now a gdb::array_view of const
151 gdb_byte.
152 (mapped_index::symbol_table): Now a gdb::array_view of
153 symbol_table_slot.
154 (mapped_index::address_table_size)
155 (mapped_index::symbol_table_slots): Delete.
156 (create_addrmap_from_index): Adjust.
157 (find_slot_in_mapped_hash): Adjust.
158 (read_index_from_section): Adjust.
159 (dwarf2_read_index): Adjust.
160
161 2017-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
162 Pedro Alves <palves@redhat.com>
163
164 * defs.h (elf_sym_fns_debug_names): New declaration.
165 * dwarf2read.c: Include "hash_enum.h".
166 (mapped_debug_names): New.
167 (struct dwarf2_per_objfile): Add debug_names, debug_aranges and
168 debug_names_table.
169 (dwarf2_elf_names): Add ".debug_names" and ".debug_aranges".
170 (struct dwz_file): Add debug_names.
171 (dwarf2_per_objfile::locate_sections): Handle debug_names and
172 debug_aranges.
173 (locate_dwz_sections): Handle debug_names.
174 (create_signatured_type_table_from_debug_names)
175 (create_addrmap_from_aranges): New.
176 (dwarf2_read_index): Update function comment.
177 (dwarf5_augmentation): Moved up.
178 (read_debug_names_from_section, create_cus_from_debug_names_list)
179 (create_cus_from_debug_names, dwarf2_read_debug_names): New.
180 (dwarf5_djb_hash): Moved up.
181 (dw2_debug_names_iterator): New.
182 (read_indirect_string_at_offset): New declaration.
183 (mapped_debug_names::namei_to_name)
184 (dw2_debug_names_iterator::find_vec_in_debug_names)
185 (dw2_debug_names_iterator::next, dw2_debug_names_lookup_symbol)
186 (dw2_debug_names_dump, dw2_debug_names_expand_symtabs_for_function)
187 (dw2_debug_names_expand_symtabs_matching, dwarf2_debug_names_functions):
188 New.
189 (dwarf2_initialize_objfile): Return also elf_sym_fns_debug_names.
190 (debug_names::djb_hash): Rename it to dwarf5_djb_hash.
191 (debug_names::build): Update djb_hash caller.
192 (write_debug_names): Move out and rename augmentation to
193 dwarf5_augmentation.
194 * elfread.c (elf_sym_fns_debug_names): New.
195 * psymtab.h (dwarf2_debug_names_functions): New declaration.
196 * symfile.h (struct dwarf2_debug_sections): Add debug_names and
197 debug_aranges.
198 * xcoffread.c (dwarf2_xcoff_names): Add debug_names and debug_aranges.
199
200 2017-12-08 Pedro Alves <palves@redhat.com>
201
202 * common/hash_enum.h: New file.
203
204 2017-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
205
206 * dwarf2read.c (create_cu_from_index_list): New from ...
207 (create_cus_from_index_list): ... this function, use it.
208 (dw_expand_symtabs_matching_file_matcher)
209 (dw2_expand_symtabs_matching_one): New from ...
210 (dw2_expand_symtabs_matching): ... this function, use them.
211
212 2017-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
213
214 * defs.h (elf_sym_fns_lazy_psyms, elf_sym_fns_gdb_index): Move here
215 declarations from elfread.c.
216 (dwarf2_initialize_objfile): Change return value.
217 * elfread.c (elf_sym_fns_lazy_psyms, elf_sym_fns_gdb_index): Move these
218 declarations to defs.h.
219 (elf_symfile_read): Adjust dwarf2_initialize_objfile caller.
220 * symfile.h (dwarf2_initialize_objfile): Change return type.
221
222 2017-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
223 Pedro Alves <palves@redhat.com>
224
225 * contrib/gdb-add-index.sh (index): Rename to ...
226 (index4): ... here.
227 (index5, debugstr, debugstrmerge, debugstrerr): New variables.
228 Support also .debug_names and .debug_str.
229 * dwarf2read.c: Include cmath, set, list.
230 (INDEX_SUFFIX): Rename to ...
231 (INDEX4_SUFFIX): ... here.
232 (INDEX5_SUFFIX, DEBUG_STR_SUFFIX): New.
233 (file_write(FILE *, const void *, size_t)): New.
234 (file_write(FILE *, const std::vector<Elem, Alloc> &)): New.
235 (data_buf::append_unsigned_leb128, data_buf::empty): New.
236 (data_buf::file_write): Use ::file_write.
237 (data_buf::c_str, dwarf5_djb_hash, debug_names)
238 (check_dwarf64_offsets): New.
239 (psyms_seen_size, write_gdbindex): New from
240 write_psymtabs_to_index code.
241 (dwarf5_gdb_augmentation, write_debug_names, assert_file_size)
242 (enum dw_index_kind): New.
243 (write_psymtabs_to_index): New parameter index_kind. Support
244 filename_str and out_file_str. Move code to write_gdbindex,
245 possibly call write_debug_names.
246 (save_gdb_index_command): New parameter -dwarf-5.
247 (_initialize_dwarf2_read): Document the new parameter -dwarf-5.
248
249 2017-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
250 Pedro Alves <palves@redhat.com>
251
252 * contrib/cc-with-tweaks.sh: Change interpreter to bash, incl. initial
253 comment.
254 (GDB_ADD_INDEX): New variable.
255 <$want_index>: Call $GDB_ADD_INDEX.
256
257 2017-12-08 Sergio Durigan Junior <sergiodj@redhat.com>
258
259 * dtrace-probe.c (dtrace_process_dof_probe): Do not declare a new
260 "expression_up" inside the TRY block.
261
262 2017-12-08 Yao Qi <yao.qi@linaro.org>
263
264 * breakpoint.c (update_watchpoint): Call
265 address_significant.
266
267 2017-12-08 Yao Qi <yao.qi@linaro.org>
268
269 * breakpoint.c (adjust_breakpoint_address): Call
270 address_significant.
271
272 2017-12-08 Yao Qi <yao.qi@linaro.org>
273
274 * aarch64-tdep.c (aarch64_gdbarch_init): Install gdbarch
275 significant_addr_bit.
276 * gdbarch.sh (significant_addr_bit): New.
277 * gdbarch.c, gdbarch.h: Re-generated.
278 * target.c (memory_xfer_partial): Call address_significant.
279 * utils.c (address_significant): New function.
280 * utils.h (address_significant): Declare.
281
282 2017-12-08 Tom Tromey <tom@tromey.com>
283
284 * printcmd.c (ui_printf): Update. Use std::vector.
285 * common/format.h (struct format_piece): Add constructor.
286 <string>: Now const.
287 (class format_pieces): New class.
288 (parse_format_string, free_format_pieces)
289 (free_format_pieces_cleanup): Remove.
290 * common/format.c (format_pieces::format_pieces): Rename from
291 parse_format_string. Update.
292 (free_format_pieces, free_format_pieces_cleanup): Remove.
293 * breakpoint.c (parse_cmd_to_aexpr): Update. Use std::vector.
294 * ax-gdb.h (gen_printf): Remove argument.
295 * ax-gdb.c (gen_printf): Remove "frags" argument.
296 (maint_agent_printf_command): Update. Use std::vector.
297
298 2017-12-08 Yao Qi <yao.qi@linaro.org>
299
300 PR breakpionts/22567
301 * linespec.c (minsym_found): Set sal.section.
302
303 2017-12-08 Andreas Arnez <arnez@linux.vnet.ibm.com>
304
305 * configure.tgt (s390*-*-linux*): Add symfile-mem.o.
306
307 2017-12-07 Keith Seitz <keiths@redhat.com>
308
309 PR breakpoints/22569
310 * location.c (string_to_explicit_location): When terminating
311 parsing early, break out of enclosing loop instead of returning.
312
313 2017-12-07 Keith Seitz <keiths@redhat.com>
314
315 * NEWS (New commands): Mention set/show print type nested-type-limit.
316 * c-typeprint.c (c_type_print_base): Print out nested types.
317 * dwarf2read.c (struct typedef_field_list): Rename to ...
318 (struct decl_field_list): ... this. Change all uses.
319 (struct field_info) <nested_types_list, nested_types_list_count>:
320 New fields.
321 (add_partial_symbol): Look for nested type definitions in C++, too.
322 (dwarf2_add_typedef): Rename to ...
323 (dwarf2_add_type_defn): ... this.
324 (type_can_define_types): New function.
325 Update assertion to use type_can_define_types.
326 Permit NULL for a field's name.
327 (process_structure_scope): Handle child DIEs of types that can
328 define types.
329 Copy the list of nested types into the type struct.
330 * gdbtypes.h (struct typedef_field): Rename to ...
331 (struct decl_field): ... this. Change all uses.
332 [is_protected, is_private]: New fields.
333 (struct cplus_struct_type) <nested_types, nested_types_count>: New
334 fields.
335 (TYPE_NESTED_TYPES_ARRAY, TYPE_NESTED_TYPES_FIELD)
336 (TYPE_NESTED_TYPES_FIELD_NAME, TYPE_NESTED_TYPES_FIELD_TYPE)
337 (TYPE_NESTED_TYPES_COUNT, TYPE_NESTED_TYPES_FIELD_PROTECTED)
338 (TYPE_NESTED_TYPES_FIELD_PRIVATE): New macros.
339 * typeprint.c (type_print_raw_options, default_ptype_flags): Add
340 default value for print_nested_type_limit.
341 (print_nested_type_limit): New static variable.
342 (set_print_type_nested_types, show_print_type_nested_types): New
343 functions.
344 (_initialize_typeprint): Register new commands for set/show
345 `print-nested-type-limit'.
346 * typeprint.h (struct type_print_options) [print_nested_type_limit]:
347 New field.
348
349 2017-12-07 Tom Tromey <tom@tromey.com>
350
351 PR breakpoints/22511:
352 * breakpoint.c (commands_command_1): Don't throw an exception when
353 no commands have been read.
354
355 2017-12-07 Adam Stylinski <adam.stylinski@etegent.com>
356
357 PR c++/21222
358 * target-descriptions.c (print_c_tdesc::visit_pre): Change type of
359 range-for variable.
360
361 2017-12-07 Simon Marchi <simon.marchi@ericsson.com>
362
363 * common/selftest.h (struct selftest): Add virtual destructor.
364
365 2017-12-07 Phil Muldoon <pmuldoon@redhat.com>
366
367 * python/py-breakpoint.c (bppy_init): Use string_to_event_location
368 over basic location code. Implement explicit location keywords.
369 (bppy_init_validate_args): New function.
370 * NEWS: Document Python explicit breakpoint locations.
371
372 2017-12-07 Joel Brobecker <brobecker@adacore.com>
373
374 * MAINTAINERS: Restore target entries for m68hc11-elf,
375 score-elf and xstormy16-elf, incorrectly removed in a previous
376 patch meant to only update the list of active maintainers.
377
378 2017-12-06 Pedro Alves <palves@redhat.com>
379
380 * break-catch-syscall.c (insert_catch_syscall)
381 (remove_catch_syscall): Adjust to pass reference to
382 inf_data->syscalls_counts directly via gdb::array_view.
383 * fbsd-nat.c (fbsd_set_syscall_catchpoint): Adjust to use bool
384 and gdb::array_view.
385 * linux-nat.c (linux_child_set_syscall_catchpoint): Likewise.
386 * remote.c (remote_set_syscall_catchpoint): Likewise.
387 * target-debug.h (target_debug_print_bool): New.
388 (define target_debug_print_gdb_array_view_const_int): New.
389 * target-delegates.c: Regenerate.
390 * target.h (target_ops) <to_set_syscall_catchpoint>: Use
391 gdb::array_view and bool.
392 (target_set_syscall_catchpoint): Likewise.
393
394 2017-12-06 Simon Marchi <simon.marchi@ericsson.com>
395
396 * break-catch-syscall.c (catch_syscall_completer): Get pointers
397 to syscall group strings after building the string vector.
398
399 2017-12-06 Pedro Alves <palves@redhat.com>
400
401 * remote.c (remote_query_supported): Don't send "xmlRegisters=" if
402 "qXfer:features:read"" is disabled.
403 (remote_write_qxfer, remote_read_qxfer, remote_search_memory):
404 Check packet_config_support instead of packet->support directly.
405
406 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
407
408 * target-descriptions.c (struct tdesc_feature) <registers>: Use
409 tdesc_reg_up typedef.
410 (struct target_desc) <features>: Use tdesc_feature_up typedef.
411
412 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
413
414 * target-descriptions.c (struct tdesc_type): Use default
415 destructor.
416 <u>: Remove.
417 <accept>: Remove.
418 (struct tdesc_type_builtin): New.
419 (struct tdesc_type_vector): New.
420 (struct tdesc_type_with_fields): New.
421 (tdesc_predefined_types): Change type to tdesc_type_builtin[].
422 (tdesc_gdb_type): Remove.
423 (tdesc_register_type): Adjust.
424 (tdesc_create_vector): Create tdesc_type_vector.
425 (tdesc_create_struct): Create tdesc_type_with_fields.
426 (tdesc_set_struct_size): Change parameter type.
427 (tdesc_create_union): Create tdesc_type_with_fields.
428 (tdesc_create_flags): Likewise.
429 (tdesc_create_enum): Likewise.
430 (tdesc_add_field): Change parameter type.
431 (tdesc_add_typed_bitfield): Likewise.
432 (tdesc_add_bitfield): Likewise.
433 (tdesc_add_flag): Likewise.
434 (tdesc_add_enum_value): Likewise.
435 (print_c_tdesc) <visit>: Remove overload with tdesc_type
436 parameter, add overloads for tdesc_type_builtin,
437 tdesc_type_with_fields and tdesc_type_vector.
438 <m_printed_type>: Remove.
439 <m_printed_element_type, m_printed_type_with_fields>: Add.
440 * target-descriptions.h (tdesc_create_enum): Change return type.
441 (tdesc_add_typed_bitfield): Change parameter type.
442 (tdesc_add_enum_value): Change parameter type.
443 * xml-tdesc.c (struct tdesc_parsing_data) <current_type>: Change
444 type to tdesc_type_with_fields.
445 (tdesc_start_struct): Adjust.
446 (tdesc_start_flags): Adjust.
447 (tdesc_start_enum): Adjust.
448 (tdesc_start_field): Adjust.
449 * arch/tdesc.h (struct tdesc_type_builtin): Forward-declare.
450 (struct tdesc_type_vector): Forward-declare.
451 (struct tdesc_type_with_fields): Forward-declare.
452 (tdesc_create_struct): Change return type.
453 (tdesc_create_union): Likewise.
454 (tdesc_create_flags): Likewise.
455 (tdesc_add_field): Change parameter type.
456 (tdesc_set_struct_size): Likewise.
457 (tdesc_add_bitfield): Likewise.
458 (tdesc_add_flag): Likewise.
459 * features: Re-generate C files.
460
461 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
462
463 * target-descriptions.c (tdesc_arch_reg): Remove typedef.
464 (struct tdesc_arch_reg): Add constructor.
465 (DEF_VEC_O (tdesc_arch_reg)): Remove.
466 (struct tdesc_arch_data): Initialize fields.
467 <arch_regs>: Change type to std::vector.
468 (target_find_description): Adjust.
469 (tdesc_find_type): Adjust.
470 (tdesc_data_init): Call tdesc_arch_data constructor.
471 (tdesc_data_alloc): Allocate tdesc_arch_data with new.
472 (tdesc_data_cleanup): Free data with delete.
473 (tdesc_numbered_register): Adjust.
474 (tdesc_find_arch_register): Adjust.
475 (tdesc_use_registers): Adjust.
476
477 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
478
479 * target-descriptions.c (tdesc_type_field): Remove typedef.
480 (DEF_VEC_O (tdesc_type_field)): Remove.
481 (struct tdesc_type_field): Add constructor.
482 <name>: Change type to std::string.
483 (struct tdesc_type) <tdesc_type>: Instantiate vector if the type
484 kind uses it.
485 <~tdesc_type>: Destroy vector if the type kind uses it.
486 <u::u::fields>: Change type to std::vector.
487 (tdesc_gdb_type): Adjust.
488 (tdesc_add_field): Adjust.
489 (tdesc_add_typed_bitfield): Adjust.
490 (tdesc_add_field): Adjust.
491 (tdesc_add_enum_value): Adjust.
492 (class print_c_tdesc) <visit>: Adjust.
493
494 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
495
496 * target-descriptions.c (struct tdesc_type) <name>: Change type
497 to std::string.
498 <~tdesc_type>: Don't manually free name.
499 <operator==>: Adjust.
500 (tdesc_named_type): Adjust.
501 (tdesc_find_type): Adjust.
502 (tdesc_gdb_type): Adjust.
503 (class print_c_tdesc) <visit>: Adjust.
504
505 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
506
507 * target-descriptions.c (tdesc_type_p): Remove typedef.
508 (DEF_VEC_P (tdesc_type_p)): Remove.
509 (struct tdesc_feature) <types>: Change type to std::vector.
510 <~tdesc_feature>: Replace with default implementation.
511 <accept>: Adjust.
512 (tdesc_named_type): Adjust.
513 (tdesc_create_vector): Adjust.
514 (tdesc_create_struct): Adjust.
515 (tdesc_create_union): Adjust.
516 (tdesc_create_flags): Adjust.
517 (tdesc_create_enum): Adjust.
518
519 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
520
521 * target-descriptions.c (struct tdesc_reg) <tdesc_reg>: Change
522 type of name_ parameter, adjust to std::string change.
523 <name, group, type>: Change type to std::string.
524 <~tdesc_reg>: Replace with default implementation.
525 <operator==>: Adjust.
526 (tdesc_find_register_early): Adjust.
527 (tdesc_register_name): Adjust.
528 (tdesc_register_type): Adjust.
529 (tdesc_register_in_reggroup_p): Adjust.
530 (class print_c_tdesc) <visit>: Adjust.
531 (class print_c_feature) <visit>: Adjust.
532 * features/arc-arcompact.c: Re-generate.
533 * features/arc-v2.c: Re-generate.
534
535 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
536
537 * target-descriptions.c (tdesc_reg_p): Remove typedef.
538 (DEF_VEC_P (tdesc_reg_p)): Remove.
539 (struct tdesc_feature) <registers>: Change type to std::vector.
540 <~tdesc_feature>: Don't manually free registers.
541 <accept>: Adjust.
542 <operator==>: Adjust.
543 (tdesc_has_registers): Adjust.
544 (tdesc_find_register_early): Adjust.
545 (tdesc_use_registers): Adjust.
546 (tdesc_create_reg): Adjust.
547
548 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
549
550 * target-descriptions.c (tdesc_feature) <name>: Change type to
551 std::string.
552 <~tdesc_feature>: Don't manually free name.
553 <operator==>: Adjust.
554 (tdesc_find_feature): Adjust.
555 (tdesc_feature_name): Adjust.
556 (class print_c_tdesc) <visit_pre>: Adjust.
557 (class print_c_feature) <visit_pre>: Adjust.
558
559 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
560
561 * target-descriptions.c (tdesc_feature_p): Remove typedef.
562 (DEF_VEC_P (tdesc_feature_p)): Remove.
563 (struct target_desc) <features>: Change type to std::vector.
564 <~target_desc>: Replace with default implementation.
565 <accept>: Adjust.
566 <operator==>: Adjust.
567 (tdesc_has_registers): Adjust.
568 (tdesc_find_feature): Adjust.
569 (tdesc_use_registers): Adjust.
570 (tdesc_create_feature): Adjust.
571
572 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
573
574 * target-descriptions.c (arch_p): Remove typedef.
575 (DEF_VEC_P (arch_p)): Remove.
576 (struct target_desc) <compatible>: Change type to std::vector.
577 <~target_desc>: Don't manually free compatible.
578 (tdesc_compatible_p): Adjust.
579 (tdesc_add_compatible): Adjust.
580 (class print_c_tdesc) <visit_pre>: Adjust.
581
582 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
583
584 * target-descriptions.c (property_s): Remove typedef.
585 (DEF_VEC_O (property_s)): Remove.
586 (struct target_desc) <properties>: Make an std::vector.
587 <~target_desc>: Don't manually free properties.
588 (tdesc_property): Adjust.
589 (set_tdesc_property): Adjust.
590 (class print_c_tdesc) <visit_pre>: Adjust.
591
592 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
593
594 * common/gdb_assert.h (gdb_static_assert): Redefine using
595 static_assert.
596
597 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
598
599 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
600 unused variables.
601 (ada_is_redundant_range_encoding): Likewise.
602 * ada-varobj.c (ada_varobj_get_value_of_array_variable):
603 Likewise.
604 * alpha-tdep.c (alpha_software_single_step): Likewise.
605 * arm-tdep.c (_initialize_arm_tdep): Likewise.
606 * auto-load.c (info_auto_load_cmd): Likewise.
607 * break-catch-syscall.c (insert_catch_syscall): Likewise.
608 (remove_catch_syscall): Likewise.
609 * breakpoint.c (condition_completer): Likewise.
610 (clear_command): Likewise.
611 (update_breakpoint_locations): Likewise.
612 * btrace.c (btrace_disable): Likewise.
613 (btrace_teardown): Likewise.
614 (btrace_maint_update_pt_packets): Likewise.
615 (maint_btrace_clear_cmd): Likewise.
616 * cli/cli-decode.c (lookup_cmd_1): Likewise.
617 (lookup_cmd_composition): Likewise.
618 * cli/cli-dump.c (scan_filename): Likewise.
619 (restore_command): Likewise.
620 * compile/compile-loc2c.c (compute_stack_depth): Likewise.
621 * compile/compile-object-load.c (compile_object_load): Likewise.
622 * compile/compile-object-run.c (compile_object_run): Likewise.
623 * compile/compile.c (compile_to_object): Likewise.
624 * completer.c (filename_completer): Likewise.
625 (complete_files_symbols): Likewise.
626 (complete_expression): Likewise.
627 * corelow.c (core_open): Likewise.
628 * ctf.c (ctf_start): Likewise.
629 (ctf_write_status): Likewise.
630 (ctf_write_uploaded_tsv): Likewise.
631 (ctf_write_definition_end): Likewise.
632 (ctf_open_dir): Likewise.
633 (ctf_xfer_partial): Likewise.
634 (ctf_trace_find): Likewise.
635 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
636 Likewise.
637 * dwarf2loc.c (allocate_piece_closure): Likewise.
638 (indirect_pieced_value): Likewise.
639 (dwarf2_evaluate_loc_desc_full): Likewise.
640 * dwarf2read.c (dw2_expand_marked_cus): Likewise.
641 (dw2_expand_symtabs_matching): Likewise.
642 (dw2_map_symbol_filenames): Likewise.
643 (read_and_check_comp_unit_head): Likewise.
644 (read_cutu_die_from_dwo): Likewise.
645 (lookup_dwo_unit): Likewise.
646 (read_comp_units_from_section): Likewise.
647 (dwarf2_compute_name): Likewise.
648 (handle_DW_AT_stmt_list): Likewise.
649 (create_cus_hash_table): Likewise.
650 (create_dwp_v2_section): Likewise.
651 (dwarf2_rnglists_process): Likewise.
652 (dwarf2_ranges_process): Likewise.
653 (dwarf2_record_block_ranges): Likewise.
654 (is_vtable_name): Likewise.
655 (read_formatted_entries): Likewise.
656 (skip_form_bytes): Likewise.
657 * elfread.c (elf_symtab_read): Likewise.
658 * exec.c (exec_file_command): Likewise.
659 * f-valprint.c (f_val_print): Likewise.
660 (info_common_command_for_block): Likewise.
661 * guile/guile.c (initialize_scheme_side): Likewise.
662 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Likewise.
663 * guile/scm-cmd.c (cmdscm_completer): Likewise.
664 (gdbscm_register_command_x): Likewise.
665 * guile/scm-frame.c (gdbscm_frame_read_var): Likewise.
666 * guile/scm-param.c (gdbscm_parameter_value): Likewise.
667 * guile/scm-ports.c (file_port_magic): Likewise.
668 * guile/scm-pretty-print.c (ppscm_search_pp_list): Likewise.
669 (ppscm_pretty_print_one_value): Likewise.
670 (ppscm_print_children): Likewise.
671 * guile/scm-string.c (gdbscm_string_to_argv): Likewise.
672 * guile/scm-symtab.c (gdbscm_sal_symtab): Likewise.
673 * guile/scm-type.c (gdbscm_type_next_field_x): Likewise.
674 * guile/scm-utils.c (gdbscm_parse_function_args): Likewise.
675 * i386-tdep.c (i386_register_reggroup_p): Likewise.
676 * infcmd.c (run_command_1): Likewise.
677 (until_next_fsm_clean_up): Likewise.
678 * linespec.c (linespec_complete): Likewise.
679 (find_label_symbols): Likewise.
680 * m2-valprint.c (m2_val_print): Likewise.
681 * memattr.c (require_user_regions): Likewise.
682 (lookup_mem_region): Likewise.
683 (disable_mem_command): Likewise.
684 (mem_delete): Likewise.
685 * mep-tdep.c (mep_register_name): Likewise.
686 (mep_analyze_prologue): Likewise.
687 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Likewise.
688 * mi/mi-interp.c (mi_on_sync_execution_done): Likewise.
689 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
690 * microblaze-linux-tdep.c (microblaze_linux_init_abi): Likewise.
691 * minidebug.c (lzma_open): Likewise.
692 * minsyms.c (lookup_minimal_symbol): Likewise.
693 * mips-linux-tdep.c (mips64_fill_fpregset): Likewise.
694 * mips-tdep.c (mips_stub_frame_sniffer): Likewise.
695 (mips_o64_return_value): Likewise.
696 (mips_single_step_through_delay): Likewise.
697 (_initialize_mips_tdep): Likewise.
698 * nios2-tdep.c (nios2_push_dummy_call): Likewise.
699 (nios2_software_single_step): Likewise.
700 * parse.c (find_minsym_type_and_address): Likewise.
701 * psymtab.c (psym_relocate): Likewise.
702 * python/py-breakpoint.c (bppy_get_commands): Likewise.
703 (gdbpy_breakpoint_modified): Likewise.
704 * python/py-infevents.c (create_inferior_call_event_object):
705 Likewise.
706 * python/py-record-btrace.c (btpy_list_item): Likewise.
707 * python/py-type.c (typy_str): Likewise.
708 * python/py-value.c (valpy_call): Likewise.
709 * python/python.c (do_start_initialization): Likewise.
710 * record-btrace.c (record_btrace_insn_history_range): Likewise.
711 (record_btrace_call_history_range): Likewise.
712 (record_btrace_record_method): Likewise.
713 (record_btrace_xfer_partial): Likewise.
714 (btrace_get_frame_function): Likewise.
715 * record-full.c (record_full_open): Likewise.
716 * record.c (get_context_size): Likewise.
717 * registry.h (DEFINE_REGISTRY): Likewise.
718 * remote-fileio.c (remote_fileio_request): Likewise.
719 * remote.c (remote_update_thread_list): Likewise.
720 (remote_check_symbols): Likewise.
721 (remote_commit_resume): Likewise.
722 (remote_interrupt): Likewise.
723 (remote_insert_breakpoint): Likewise.
724 (compare_sections_command): Likewise.
725 * rust-exp.y (super_name): Likewise.
726 (lex_string): Likewise.
727 (convert_ast_to_type): Likewise.
728 (convert_ast_to_expression): Likewise.
729 * rust-lang.c (rust_print_struct_def): Likewise.
730 (rust_print_type): Likewise.
731 (rust_evaluate_subexp): Likewise.
732 * rx-tdep.c (rx_register_type): Likewise.
733 * ser-event.c (serial_event_clear): Likewise.
734 * serial.c (serial_open): Likewise.
735 * spu-tdep.c (spu_overlay_new_objfile): Likewise.
736 * symfile.c (section_is_overlay): Likewise.
737 (overlay_unmapped_address): Likewise.
738 (overlay_mapped_address): Likewise.
739 (simple_overlay_update_1): Likewise.
740 (simple_overlay_update): Likewise.
741 * symtab.c (symbol_find_demangled_name): Likewise.
742 (search_symbols): Likewise.
743 * target-descriptions.c (tdesc_predefined_type): Likewise.
744 * target.c (target_commit_resume): Likewise.
745 * thread.c (print_selected_thread_frame): Likewise.
746 * top.c (new_ui_command): Likewise.
747 (gdb_readline_no_editing): Likewise.
748 * tracefile-tfile.c (tfile_open): Likewise.
749 * tracepoint.c (create_tsv_from_upload): Likewise.
750 * utils.c (quit): Likewise.
751 (defaulted_query): Likewise.
752 * valarith.c (value_concat): Likewise.
753 * xml-syscall.c (xml_list_syscalls_by_group): Likewise.
754 * xml-tdesc.c (target_fetch_description_xml): Likewise.
755 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
756 (xtensa_pseudo_register_write): Likewise.
757
758 2017-12-04 Tom Tromey <tom@tromey.com>
759
760 * NEWS: Mention Rust trait object inspection.
761
762 2017-12-04 Pedro Alves <palves@redhat.com>
763
764 PR gdb/22499
765 * amd64-tdep.c (amd64_insn::rex_offset): Rename to...
766 (amd64_insn::enc_prefix_offset): ... this, and tweak comment.
767 (vex2_prefix_p, vex3_prefix_p): New functions.
768 (amd64_get_insn_details): Adjust to rename. Also skip VEX2 and
769 VEX3 prefixes.
770 (fixup_riprel): Set VEX3.!B.
771
772 2017-12-03 Simon Marchi <simon.marchi@ericsson.com>
773
774 * target.h (mem_region_vector): Remove.
775 (struct target_ops) <to_memory_map>: Change return type to
776 std::vector<mem_region>.
777 * target-debug.h (target_debug_print_mem_region_vector): Rename
778 to ...
779 (target_debug_print_std_vector_mem_region): ... this.
780 * target-delegates.c: Re-generate.
781
782 2017-12-03 Pedro Alves <palves@redhat.com>
783
784 * make-target-delegates (munge_type): Also munge '<', '>', and
785 ':'. Avoid double underscores in identifiers, and trailing
786 underscores.
787 * target-debug.h
788 (target_debug_print_VEC_static_tracepoint_marker_p__p): Rename to
789 ...
790 (target_debug_print_VEC_static_tracepoint_marker_p_p): ... this.
791 * target-delegates.c: Regenerate.
792
793 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
794
795 * common/poison.h (XDELETE): Fix typo.
796
797 2017-12-01 Andrew Cagney <cagney@redhat.com>
798 Joel Brobecker <brobecker@adacore.com>
799 Sergio Durigan Junior <sergiodj@redhat.com>
800
801 * NEWS (Changes since GDB 8.0: Mention new '--readnever'
802 feature.
803 * coffread.c (coff_symfile_read): Do not map over sections with
804 'coff_locate_sections' if readnever is on.
805 * dwarf2read.c (dwarf2_has_info): Return 0 if
806 readnever is on.
807 * elfread.c (elf_symfile_read): Do not map over sections with
808 'elf_locate_sections' if readnever is on.
809 * main.c (validate_readnow_readnever): New function.
810 (captured_main_1): Add support for --readnever.
811 (print_gdb_help): Document --readnever.
812 * objfile-flags.h (enum objfile_flag) <OBJF_READNEVER>: New
813 flag.
814 * symfile.c (readnever_symbol_files): New global.
815 (symbol_file_add_with_addrs): Set 'OBJF_READNEVER' when
816 'READNEVER_SYMBOL_FILES' is set.
817 (validate_readnow_readnever): New function.
818 (symbol_file_command): Handle '-readnever' option.
819 Call 'validate_readnow_readnever'.
820 (add_symbol_file_command): Handle '-readnever' option.
821 Call 'validate_readnow_readnever'.
822 (_initialize_symfile): Document new '-readnever' option for
823 both 'symbol-file' and 'add-symbol-file' commands.
824 * top.h (readnever_symbol_files): New extern global.
825 * xcoffread.c (xcoff_initial_scan): Do not read debug
826 information if readnever is on.
827
828 2017-12-01 Sergio Durigan Junior <sergiodj@redhat.com>
829
830 * symfile.c (symbol_file_command): Call
831 'symbol_file_add_main_1' only after processing all command
832 line options.
833 (add_symbol_file_command): Modify logic to make arguments
834 position-independent.
835
836 2017-12-01 Joel Brobecker <brobecker@adacore.com>
837
838 * ada-lang.c (symbol_list_obstack): Delete.
839 (resolve_subexp): Make sure "candidates" gets xfree'ed.
840 (ada_lookup_symbol_list_worker): Remove the limitation that
841 the result is only good until the next call, now making it
842 the responsibility of the caller to free the result when no
843 longer needed. Adjust the function's intro comment accordingly.
844 (ada_lookup_symbol_list): Adjust the function's intro comment.
845 (ada_iterate_over_symbols): Make sure "results" gets xfree'ed.
846 (ada_lookup_encoded_symbol, get_var_value): Likewise.
847 (_initialize_ada_language): Remove symbol_list_obstack
848 initialization.
849 * ada-exp.y (block_lookup): Make sure "syms" gets xfree'ed.
850 (write_var_or_type, write_name_assoc): Likewise.
851
852 2017-12-01 Tom Tromey <tom@tromey.com>
853
854 * Makefile.in (all_deps_files): New variable.
855 Include .Po files using all_deps_files.
856
857 2017-12-01 Joel Brobecker <brobecker@adacore.com>
858
859 * MAINTAINERS: Update list of maintainers, moving those who
860 stepped down or became inactive to the "Past Maintainers"
861 section.
862
863 2017-11-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
864
865 * configure.ac Don't check for sys/fault.h, sys/syscall.h,
866 sys/proc.h.
867 (NEW_PROC_API): Remove.
868 (prsysent_t, pr_sigset_t, pr_sigaction64_t, pr_siginfo64_t):
869 Likewise.
870 * common/common.m4 (GDB_AC_COMMON): Don't check for sys/syscall.h.
871 * configure: Regenerate.
872 * config.in: Regenerate.
873 * gdbserver/configure: Regenerate.
874 * gdbserver/config.in: Regenerate.
875
876 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Remove
877 NEW_PROC_API test.
878 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Likewise.
879
880 * linux-btrace.c: Remove HAVE_SYS_SYSCALL_H test.
881
882 * proc-api.c: Remove !NEW_PROC_API support.
883 Remove HAVE_SYS_PROC_H and HAVE_SYS_USER_H tests.
884 Remove tests for macros always defined on Solaris.
885 * proc-events.c: Remove !NEW_PROC_API support.
886 Remove Remove HAVE_SYS_SYSCALL_H, HAVE_SYS_PROC_H and
887 HAVE_SYS_USER_H tests.
888 (init_syscall_table): Remove non-Solaris syscalls.
889 Remove tests for syscalls present on all Solaris versions.
890 Add missing Solaris 10+ syscalls.
891 (signal_table): Remove non-Solaris signals.
892 Remove tests for signals present on all Solaris versions.
893 (fault_table): Remove non-Solaris faults.
894 Remove tests for faults present on all Solaris versions.
895 * proc-flags.c: Remove !NEW_PROC_API support.
896 (pr_flag_table): Remove non-Solaris and pre-Solaris 7 comments.
897 Remove non-Solaris flags.
898 * proc-why.c: Remove !NEW_PROC_API support.
899 (pr_why_table): Remove meaningless comments.
900 Remove tests for reasons present on all Solaris versions.
901 Remove OSF/1 cases.
902 (proc_prettyfprint_why): Likewise.
903
904 * procfs.c: Remove !NEW_PROC_API and DYNAMIC_SYSCALLS support.
905 Remove HAVE_SYS_FAULT_H and HAVE_SYS_SYSCALL_H tests.
906 Remove WA_READ test, IRIX watchpoint support.
907 (gdb_sigset_t, gdb_sigaction_t, gdb_siginfo_t): Replace by base
908 types. Change users.
909 (gdb_praddset, gdb_prdelset, gdb_premptysysset, gdb_praddsysset)
910 (gdb_prdelset, gdb_pr_issyssetmember): Replace by base macros.
911 Change callers.
912 Remove CTL_PROC_NAME_FMT tests.
913 (gdb_prstatus_t, gdb_lwpstatus_t): Replace by base types. Change
914 users.
915 (sysset_t_size): Remove. Use sizeof (sysset_t) in callers.
916 Remove PROCFS_DONT_PIOCSSIG_CURSIG support.
917 (proc_modify_flag): Replace GDBRESET by PCUNSET.
918 Remove PR_ASYNC, PR_KLC tests.
919 (proc_unset_inherit_on_fork): Remove PR_ASYNC test.
920 (proc_parent_pid): Remove PCWATCH etc. tests.
921 (proc_set_watchpoint): Remove !PCWATCH && !PIOCSWATCH support.
922 Remove PCAGENT test.
923 (proc_get_nthreads) [PIOCNTHR && PIOCTLIST]: Remove.
924 Remove SYS_lwpcreate || SYS_lwp_create test.
925 (proc_get_current_thread): Likewise.
926 [PIOCNTHR && PIOCTLIST]: Remove.
927 [PIOCLSTATUS]: Remove.
928 (procfs_debug_inferior): Remove non-Solaris cases, conditionals.
929 [PRFS_STOPEXEC]: Remove.
930 (syscall_is_lwp_exit): Remove non-Solaris cases, conditionals.
931 (syscall_is_exit): Likewise.
932 (syscall_is_exec): Likewise.
933 (syscall_is_lwp_create): Likewise.
934 Remove SYS_syssgi support.
935 (procfs_wait): Remove PR_ASYNC, !PIOCSSPCACT tests.
936 [SYS_syssgi]: Remove.
937 Remove non-Solaris cases, conditionals.
938 (unconditionally_kill_inferior) [PROCFS_NEED_PIOCSSIG_FOR_KILL]:
939 Remove.
940 (procfs_init_inferior) [SYS_syssgi]: Remove.
941 (procfs_set_exec_trap) [PRFS_STOPEXEC]: Remove.
942 (procfs_inferior_created) [SYS_syssgi]: Remove.
943 (procfs_set_watchpoint): Remove !AIX5 test.
944 (procfs_stopped_by_watchpoint): Remove FLTWATCH test, FLTKWATCH
945 case.
946 (mappingflags) [MA_PHYS]: Remove.
947 (info_mappings_callback): Remove PCAGENT test.
948 Remove PIOCOPENLWP || PCAGENT test.
949
950 2017-11-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
951
952 * sol-thread.c (info_solthreads): Constify args.
953 Cast args to void *.
954
955 2017-11-29 John Baldwin <jhb@FreeBSD.org>
956
957 * target-float.c [HAVE_LIBMPFR]: Define MPFR_USE_INTMAX_T.
958
959 2017-11-29 Joel Brobecker <brobecker@adacore.com>
960
961 * ada-lang.c (to_fixed_range_type): Make sure that the size
962 of the range type being returned is the same as the size
963 of the range type being fixed.
964
965 2017-11-29 Pedro Alves <palves@redhat.com>
966
967 PR c++/19436
968 * NEWS: Mention setting breakpoints on functions with C++ ABI
969 tags.
970 * completer.h (completion_match_for_lcd) <match,
971 mark_ignored_range>: New methods.
972 <finish>: Consider ignored ranges.
973 <clear>: Clear ignored ranges.
974 <m_ignored_ranges, m_finished_storage>: New fields.
975 * cp-support.c (cp_search_name_hash): Ignore ABI tags.
976 (cp_symbol_name_matches_1, cp_fq_symbol_name_matches): Pass the
977 completion_match_for_lcd pointer to strncmp_iw_with_mode.
978 (test_cp_symbol_name_cmp): Add [abi:...] tags unit tests.
979 * language.c (default_symbol_name_matcher): Pass the
980 completion_match_for_lcd pointer to strncmp_iw_with_mode.
981 * linespec.c (linespec_lexer_lex_string): Don't tokenize ABI tags.
982 * utils.c (skip_abi_tag): New function.
983 (strncmp_iw_with_mode): Add completion_match_for_lcd parameter.
984 Handle ABI tags.
985 * utils.h (strncmp_iw_with_mode): Add completion_match_for_lcd
986 parameter.
987
988 2017-11-29 Pedro Alves <palves@redhat.com>
989
990 PR c++/19436
991 * NEWS: Mention setting breakpoints on functions with C++ ABI
992 tags.
993 * completer.h (completion_match_for_lcd) <match,
994 mark_ignored_range>: New methods.
995 <finish>: Consider ignored ranges.
996 <clear>: Clear ignored ranges.
997 <m_ignored_ranges, m_finished_storage>: New fields.
998 * cp-support.c (cp_search_name_hash): Ignore ABI tags.
999 (cp_symbol_name_matches_1, cp_fq_symbol_name_matches): Pass the
1000 completion_match_for_lcd pointer to strncmp_iw_with_mode.
1001 (test_cp_symbol_name_cmp): Add [abi:...] tags unit tests.
1002 * language.c (default_symbol_name_matcher): Pass the
1003 completion_match_for_lcd pointer to strncmp_iw_with_mode.
1004 * linespec.c (linespec_lexer_lex_string): Don't tokenize ABI tags.
1005 * utils.c (skip_abi_tag): New function.
1006 (strncmp_iw_with_mode): Add completion_match_for_lcd parameter.
1007 Handle ABI tags.
1008 * utils.h (strncmp_iw_with_mode): Add completion_match_for_lcd
1009 parameter.
1010
1011 2017-11-29 Pedro Alves <palves@redhat.com>
1012
1013 * NEWS: Mention that breakpoints on C++ functions are now set on
1014 on all namespaces/classes by default, and mention "break
1015 -qualified".
1016 * ax-gdb.c (agent_command_1): Adjust to pass a
1017 symbol_name_match_type to new_linespec_location.
1018 * breakpoint.c (parse_breakpoint_sals): Adjust to
1019 get_linespec_location's return type change.
1020 (strace_marker_create_sals_from_location): Adjust to pass a
1021 symbol_name_match_type to new_linespec_location.
1022 (strace_marker_decode_location): Adjust to get_linespec_location's
1023 return type change.
1024 (strace_command): Adjust to pass a symbol_name_match_type to
1025 new_linespec_location.
1026 (LOCATION_HELP_STRING): Add paragraph about wildmatching, and
1027 mention "-qualified".
1028 * c-lang.c (cplus_language_defn): Install cp_search_name_hash.
1029 * completer.c (explicit_location_match_type::MATCH_QUALIFIED): New
1030 enumerator.
1031 (complete_address_and_linespec_locations): New parameter
1032 'match_type'. Pass it down.
1033 (explicit_options): Add "-qualified".
1034 (collect_explicit_location_matches): Pass the requested match type
1035 to the linespec completers. Handle MATCH_QUALIFIED.
1036 (location_completer): Handle "-qualified" combined with linespecs.
1037 * cp-support.c (cp_search_name_hash): New.
1038 (cp_symbol_name_matches_1): Implement wild matching for C++.
1039 (cp_fq_symbol_name_matches): Reimplement.
1040 (cp_get_symbol_name_matcher): Return different matchers depending
1041 on the lookup name's match type.
1042 (selftests::test_cp_symbol_name_matches): Add wild matching tests.
1043 * cp-support.h (cp_search_name_hash): New declaration.
1044 * dwarf2read.c
1045 (selftests::dw2_expand_symtabs_matching::test_symbols): Add
1046 symbols.
1047 (test_dw2_expand_symtabs_matching_symbol): Add wild matching
1048 tests.
1049 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Adjust to
1050 pass a symbol_name_match_type to new_linespec_location.
1051 * linespec.c (linespec_parse_basic): Lookup function symbols using
1052 the parser's symbol name match type.
1053 (convert_explicit_location_to_linespec): New
1054 symbol_name_match_type parameter. Pass it down to
1055 find_linespec_symbols.
1056 (convert_explicit_location_to_sals): Pass the location's name
1057 match type to convert_explicit_location_to_linespec.
1058 (parse_linespec): New match_type parameter. Save it in the
1059 parser.
1060 (linespec_parser_new): Default to symbol_name_match_type::WILD.
1061 (linespec_complete_function): New symbol_name_match_type
1062 parameter. Use it.
1063 (complete_linespec_component): Pass down the parser's recorded
1064 name match type.
1065 (linespec_complete_label): New symbol_name_match_type parameter.
1066 Use it.
1067 (linespec_complete): New symbol_name_match_type parameter. Save
1068 it in the parser and pass it down. Adjust to
1069 get_linespec_location's prototype change.
1070 (find_function_symbols, find_linespec_symbols): New
1071 symbol_name_match_type parameter. Pass it down instead of
1072 assuming symbol_name_match_type::WILD.
1073 * linespec.h (linespec_complete, linespec_complete_function)
1074 (linespec_complete_label): New symbol_name_match_type parameter.
1075 * location.c (event_location::linespec_location): Now a struct
1076 linespec_location.
1077 (EL_LINESPEC): Adjust.
1078 (initialize_explicit_location): Default to
1079 symbol_name_match_type::WILD.
1080 (new_linespec_location): New symbol_name_match_type parameter.
1081 Record it in the location.
1082 (get_linespec_location): Now returns a struct linespec_location.
1083 (new_explicit_location): Also copy func_name_match_type.
1084 (explicit_to_string_internal)
1085 (string_to_explicit_location): Handle "-qualified".
1086 (copy_event_location): Adjust to LINESPEC_LOCATION type change.
1087 Copy symbol_name_match_type fields.
1088 (event_location_deleter::operator()): Adjust to LINESPEC_LOCATION
1089 type change.
1090 (event_location_to_string): Adjust to LINESPEC_LOCATION type
1091 change. Handle "-qualfied".
1092 (string_to_explicit_location): Handle "-qualified".
1093 (string_to_event_location_basic): New symbol_name_match_type
1094 parameter. Pass it down.
1095 (string_to_event_location): Handle "-qualified".
1096 * location.h (struct linespec_location): New.
1097 (explicit_location::func_name_match_type): New field.
1098 (new_linespec_location): Now returns a const linespec_location *.
1099 (string_to_event_location_basic): New symbol_name_match_type
1100 parameter.
1101 (explicit_completion_info::saw_explicit_location_option): New
1102 field.
1103 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Adjust to pass a
1104 symbol_name_match_type to new_linespec_location.
1105 * python/py-breakpoint.c (bppy_init): Likewise.
1106 * python/python.c (gdbpy_decode_line): Likewise.
1107
1108 2017-11-29 Pedro Alves <palves@redhat.com>
1109
1110 * ada-lang.c (ada_lookup_name_info::matches): Change type of
1111 parameter from completion_match to completion_match_result.
1112 Adjust.
1113 (do_wild_match, do_full_match, ada_symbol_name_matches): Likewise.
1114 * completer.c (completion_tracker::maybe_add_completion): Add
1115 match_for_lcd parameter and use it.
1116 (completion_tracker::add_completion): Likewise.
1117 * completer.h (class completion_match_for_lcd): New class.
1118 (completion_match_result::match_for_lcd): New field.
1119 (completion_match_result::set_match): New method.
1120 (completion_tracker): Add comments.
1121 (completion_tracker::add_completion): Add match_for_lcd parameter.
1122 (completion_tracker::reset_completion_match_result): Reset
1123 match_for_lcd too.
1124 (completion_tracker::maybe_add_completion): Add match_for_lcd
1125 parameter.
1126 (completion_tracker::m_lowest_common_denominator_unique): Extend
1127 comments.
1128 * cp-support.c (cp_symbol_name_matches_1)
1129 (cp_fq_symbol_name_matches): Change type of parameter from
1130 completion_match to completion_match_result. Adjust.
1131 * language.c (default_symbol_name_matcher): Change type of
1132 parameter from completion_match to completion_match_result.
1133 Adjust.
1134 * language.h (completion_match_for_lcd): Forward declare.
1135 (default_symbol_name_matcher): Change type of parameter from
1136 completion_match to completion_match_result.
1137 * symtab.c (compare_symbol_name): Adjust.
1138 (completion_list_add_name): Pass the match_for_lcd to the tracker.
1139 * symtab.h (ada_lookup_name_info::matches): Change type of
1140 parameter from completion_match to completion_match_result.
1141 (symbol_name_matcher_ftype): Likewise, and update comments.
1142
1143 2017-11-29 Pedro Alves <palves@redhat.com>
1144
1145 * linespec.c (minsym_found, add_minsym): Use msymbol_is_function.
1146 * minsyms.c (msymbol_is_text): Delete.
1147 (msymbol_is_function): New function.
1148 * minsyms.h (msymbol_is_text): Delete.
1149 (msymbol_is_function): New declaration.
1150 * symtab.c (find_function_alias_target): Use msymbol_is_function.
1151
1152 2017-11-29 Tom Tromey <tom@tromey.com>
1153
1154 * Makefile.in (distclean): Handle the case where rmdir fails.
1155
1156 2017-11-29 Tom Tromey <tom@tromey.com>
1157
1158 * symfile.c (_initialize_symfile): Update usage text for
1159 add-symbol-file, symbol-file, load.
1160
1161 2017-11-29 Tom Tromey <tom@tromey.com>
1162
1163 * symfile.c (add_symbol_file_command): Error if some arguments to
1164 -s are missing. Change unrecognized-argument error message.
1165 (_initialize_symfile): Fix usage text for add-symbol-file.
1166
1167 2017-11-27 Tom Tromey <tom@tromey.com>
1168
1169 * Makefile.in (REMOTE_OBS): Remove.
1170 (SFILES): Remove remote sources.
1171 (COMMON_SFILES): Add remote sources.
1172 (ALLDEPFILES): Remove dcache.c.
1173
1174 2017-11-27 Tom Tromey <tom@tromey.com>
1175
1176 * Makefile.in (SUBDIR_TARGET_SRCS, SUBDIR_TARGET_OBS): New
1177 variables.
1178 (SFILES): Use SUBDIR_TARGET_SRCS.
1179 (COMMON_OBS): Use SUBDIR_TARGET_OBS. Remove waitstatus.o.
1180 (CONFIG_SRC_SUBDIR): Add target.
1181 (%.o): Remove target rule.
1182
1183 2017-11-27 Tom Tromey <tom@tromey.com>
1184
1185 * Makefile.in (COMMON_OBS): Remove filename-seen-cache.o,
1186 registry.o, thread-fsm.o, debug.o.
1187 (COMMON_SFILES): Add filename-seen-cache.c, registry.c,
1188 thread-fsm.c, debug.c.
1189
1190 2017-11-27 Tom Tromey <tom@tromey.com>
1191
1192 * Makefile.in (COMMON_SFILES): New.
1193 (SFILES): Move some entries to COMMON_SFILES.
1194 (COMMON_OBS): Use COMMON_SFILES.
1195
1196 2017-11-27 Tom Tromey <tom@tromey.com>
1197
1198 * Makefile.in (YYFILES): Update comment.
1199 (YYOBJ): Redefine.
1200
1201 2017-11-27 Tom Tromey <tom@tromey.com>
1202
1203 * Makefile.in (SUBDIR_PYTHON_OBS): Redefine.
1204 (CONFIG_SRC_SUBDIR): Add python.
1205 (%.o): Remove python rule.
1206 (python/%.o): New rule.
1207 * configure: Rebuild.
1208 * configure.ac (CONFIG_OBS): Refer to python/python.o
1209
1210 2017-11-27 Tom Tromey <tom@tromey.com>
1211
1212 * configure: Rebuild.
1213 * configure.ac (CONFIG_OBS): Refer to guile/guile.o.
1214 * Makefile.in (SUBDIR_GUILE_OBS): Redefine.
1215 (CONFIG_SRC_SUBDIR): Add guile.
1216 (%.o): Remove guile rule.
1217
1218 2017-11-27 Tom Tromey <tom@tromey.com>
1219
1220 * Makefile.in (SUBDIR_UNITTESTS_OBS): Redefine.
1221 (%.o): Remove unittests rule.
1222 (CONFIG_SRC_SUBDIR): Add unittests.
1223
1224 2017-11-27 Tom Tromey <tom@tromey.com>
1225
1226 * Makefile.in (SUBDIR_TUI_OBS): Redefine.
1227 (CONFIG_SRC_SUBDIR): Add tui.
1228 (%.o): Remove tui rule.
1229
1230 2017-11-27 Tom Tromey <tom@tromey.com>
1231
1232 * Makefile.in (SUBDIR_GCC_COMPILE_OBS): Redefine.
1233 (%.o): Remove compile rule.
1234 (CONFIG_SRC_SUBDIR): Add compile.
1235
1236 2017-11-27 Tom Tromey <tom@tromey.com>
1237
1238 * Makefile.in (SUBDIR_MI_OBS): Redefine.
1239 (%.o): Remove mi rule.
1240 (CONFIG_SRC_SUBDIR): Add mi.
1241 (COMMON_OBS): Use mi/mi-common.o
1242
1243 2017-11-27 Tom Tromey <tom@tromey.com>
1244
1245 * Makefile.in (SUBDIR_CLI_OBS): Redefine.
1246 (%.o): Remove cli rule.
1247 (CONFIG_SRC_SUBDIR): Add cli.
1248
1249 2017-11-27 Tom Tromey <tom@tromey.com>
1250
1251 * configure.ac (CONFIG_SRC_SUBDIR): Don't subst.
1252 * configure: Rebuild.
1253 * Makefile.in (CONFIG_SRC_SUBDIR): Redefine.
1254 (CONFIG_DEP_SUBDIR): New variable.
1255 (%.o): Add order-only dependency.
1256 ($(CONFIG_DEP_SUBDIR)): New target.
1257
1258 2017-11-26 Dominik Czarnota <dominik.b.czarnota@gmail.com>
1259
1260 PR gdb/21945
1261 * findcmd.c (_initialize_mem_search): Update find command help
1262 text.
1263
1264 2017-11-26 Simon Marchi <simon.marchi@polymtl.ca>
1265
1266 * python/python.c (do_start_initialization): Change progname
1267 type to gdb::unique_xmalloc_ptr. Release the pointer when using
1268 Python 2.
1269
1270 2017-11-26 Tom Tromey <tom@tromey.com>
1271
1272 * common/format.h: Add include guards.
1273
1274 2017-11-26 Tom Tromey <tom@tromey.com>
1275
1276 * nat/linux-personality.h (class
1277 maybe_disable_address_space_randomization): New class.
1278 (maybe_disable_address_space_randomization): Don't declare
1279 function.
1280 * nat/linux-personality.c (restore_personality)
1281 (make_disable_asr_cleanup): Remove.
1282 (maybe_disable_address_space_randomization): Now a constructor.
1283 (~maybe_disable_address_space_randomization): New destructor.
1284 * linux-nat.c (linux_nat_create_inferior): Update.
1285
1286 2017-11-26 Tom Tromey <tom@tromey.com>
1287
1288 * gcore.c (write_gcore_file_1): Use gdb::unique_xmalloc_ptr.
1289
1290 2017-11-26 Ulrich Weigand <uweigand@de.ibm.com>
1291
1292 * spu-tdep.c (spu_software_single_step): Access SPU_LSLR_REGNUM as
1293 "cooked" register. Access only first four bytes of branch target
1294 registers.
1295
1296 2017-11-25 Sergio Durigan Junior <sergiodj@redhat.com>
1297
1298 PR gdb/22491
1299 * stap-probe.c (relocate_address): New function.
1300 (stap_probe::get_relocated_address): Use 'relocate_address'.
1301 (stap_probe::set_semaphore): Use 'relocate_address' and pass
1302 'm_sem_addr'.
1303 (stap_probe::clear_semaphore): Likewise.
1304
1305 2017-11-25 Pedro Alves <palves@redhat.com>
1306
1307 * dictionary.c: Include "safe-ctype.h".
1308 * minsyms.c: Include "safe-ctype.h".
1309 * minsyms.c (SYMBOL_HASH_NEXT): Use TOLOWER instead of tolower.
1310
1311 2017-11-25 Pedro Alves <palves@redhat.com>
1312
1313 * completer.c (complete_line_internal_1): Skip spaces until the
1314 start of the command.
1315
1316 2017-11-24 Pedro Alves <palves@redhat.com>
1317
1318 * cp-support.c (cp_symbol_name_matches_1): New, factored out from
1319 cp_fq_symbol_name_matches. Pass language_cplus to
1320 strncmp_with_mode.
1321 (cp_fq_symbol_name_matches): Call cp_symbol_name_matches_1.
1322 (selftests::test_cp_symbol_name_cmp): New.
1323 (_initialize_cp_support): Register "cp_symbol_name_matches"
1324 selftests.
1325 * language.c (default_symbol_name_matcher): Pass language_minimal
1326 to strncmp_iw_with_mode.
1327 * utils.c: Include "cp-support.h" and <algorithm>.
1328 (valid_identifier_name_char, cp_skip_operator_token, skip_ws)
1329 (cp_is_operator): New functions.
1330 (strncmp_iw_with_mode): Use them. Add language parameter. Don't
1331 skip whitespace in the symbol name when the lookup name doesn't
1332 have spaces, and vice versa.
1333 (strncmp_iw, strcmp_iw): Pass language to strncmp_iw_with_mode.
1334 * utils.h (strncmp_iw_with_mode): Add language parameter.
1335
1336 2017-11-24 Joel Brobecker <brobecker@adacore.com>
1337
1338 * ada-lang.c (ada_exception_message_1, ada_exception_message):
1339 New functions.
1340 (print_it_exception): If available, display the exception
1341 message as well.
1342 * NEWS: Document new feature.
1343
1344 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
1345
1346 * configure.nat <spu-linux>: Add fork-inferior.o to NATDEPFILES.
1347
1348 2017-11-24 Philipp Rudo <prudo@linux.vnet.ibm.com>
1349
1350 * dtrace-probe.c (dtrace_probe::build_arg_exprs)
1351 (dtrace_probe::is_enabled, dtrace_probe::enable)
1352 (dtrace_probe::disable): Remove keyword 'struct' at for-range
1353 variable
1354 * probe.c (gen_ui_out_table_header_info)
1355 (print_ui_out_not_applicables): Remove keyword 'struct' at
1356 for-range variable
1357
1358 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1359
1360 * configure.tgt: Add arch/aarch64.o
1361
1362 2017-11-24 Simon Marchi <simon.marchi@polymtl.ca>
1363
1364 * common/common-utils.h: Include poison.h.
1365 (xfree): Remove declaration, add definition with static_assert.
1366 * common/common-utils.c (xfree): Remove.
1367 * common/poison.h (IsMallocatable): Define.
1368 (IsFreeable): Define.
1369 (free): Delete for non-freeable types.
1370 (xnew): New.
1371 (XNEW): Undef and redefine.
1372 (xcnew): New.
1373 (XCNEW): Undef and redefine.
1374 (xdelete): New.
1375 (XDELETE): Undef and redefine.
1376 (xnewvec): New.
1377 (XNEWVEC): Undef and redefine.
1378 (xcnewvec): New.
1379 (XCNEWVEC): Undef and redefine.
1380 (xresizevec): New.
1381 (XRESIZEVEC): Undef and redefine.
1382 (xdeletevec): New.
1383 (XDELETEVEC): Undef and redefine.
1384 (xnewvar): New.
1385 (XNEWVAR): Undef and redefine.
1386 (xcnewvar): New.
1387 (XCNEWVAR): Undef and redefine.
1388 (xresizevar): New.
1389 (XRESIZEVAR): Undef and redefine.
1390
1391 2017-11-24 Simon Marchi <simon.marchi@polymtl.ca>
1392
1393 * gdbthread.h (private_thread_info): Define structure type, add
1394 virtual pure destructor.
1395 (thread_info) <priv>: Change type to unique_ptr.
1396 <private_dtor>: Remove.
1397 * thread.c (add_thread_with_info): Adjust to use of unique_ptr.
1398 (private_thread_info::~private_thread_info): Provide default
1399 implementation.
1400 (thread_info::~thread_info): Don't call private_dtor nor
1401 manually free priv.
1402 * aix-thread.c (private_thread_info): Rename to ...
1403 (aix_thread_info): ... this.
1404 (get_aix_thread_info): New.
1405 (sync_threadlists): Adjust.
1406 (iter_tid): Adjust.
1407 (aix_thread_resume): Adjust.
1408 (aix_thread_fetch_registers): Adjust.
1409 (aix_thread_store_registers): Adjust.
1410 (aix_thread_extra_thread_info): Adjust.
1411 * darwin-nat.h (private_thread_info): Rename to ...
1412 (darwin_thread_info): ... this.
1413 (get_darwin_thread_info): New.
1414 * darwin-nat.c (darwin_init_thread_list): Adjust.
1415 (darwin_check_new_threads): Adjust.
1416 (thread_info_from_private_thread_info): Adjust.
1417 * linux-thread-db.c (private_thread_info): Rename to ...
1418 (thread_db_thread_info): ... this, initialize fields.
1419 (get_thread_db_thread_info): New.
1420 <dying>: Change type to bool.
1421 (update_thread_state): Adjust to type rename.
1422 (record_thread): Adjust to type rename an use of unique_ptr.
1423 (thread_db_pid_to_str): Likewise.
1424 (thread_db_extra_thread_info): Likewise.
1425 (thread_db_thread_handle_to_thread_info): Likewise.
1426 (thread_db_get_thread_local_address): Likewise.
1427 * nto-tdep.h (private_thread_info): Rename to ...
1428 (nto_thread_info): ... this, initialize fields.
1429 (get_nto_thread_info): New.
1430 <name>: Change type to std::string.
1431 * nto-tdep.c (nto_extra_thread_info): Adjust to type rename and
1432 use of unique_ptr.
1433 * nto-procfs.c (update_thread_private_data_name): Adjust to
1434 std::string change, allocate nto_private_thread_info with new.
1435 (update_thread_private_data): Adjust to unique_ptr.
1436 * remote.c (private_thread_info): Rename to ...
1437 (remote_thread_info): ... this, initialize data members with
1438 default values.
1439 <extra, name>: Change type to std::string.
1440 <thread_handle>: Change type to non-pointer.
1441 (free_private_thread_info): Remove.
1442 (get_private_info_thread): Rename to...
1443 (get_remote_thread_info): ... this, change return type, adjust to
1444 use of unique_ptr, use remote_thread_info constructor.
1445 (remote_add_thread): Adjust.
1446 (get_private_info_ptid): Rename to...
1447 (get_remote_thread_info): ...this, change return type.
1448 (remote_thread_name): Use get_remote_thread_info, adjust to
1449 change to std::string.
1450 (struct thread_item) <~thread_item>: Remove.
1451 <thread_handle>: Make non pointer.
1452 (start_thread): Adjust to thread_item::thread_handle type
1453 change.
1454 (remote_update_thread_list): Adjust to type name change, move
1455 strings from temporary to long-lived object instead of
1456 duplicating.
1457 (remote_threads_extra_info): Use get_remote_thread_info.
1458 (process_initial_stop_replies): Likewise.
1459 (resume_clear_thread_private_info): Likewise.
1460 (remote_resume): Adjust to type name change.
1461 (remote_commit_resume): Use get_remote_thread_info.
1462 (process_stop_reply): Adjust to type name change.
1463 (remote_stopped_by_sw_breakpoint): Use get_remote_thread_info.
1464 (remote_stopped_by_hw_breakpoint): Likewise.
1465 (remote_stopped_by_watchpoint): Likewise.
1466 (remote_stopped_data_address): Likewise.
1467 (remote_core_of_thread): Likewise.
1468 (remote_thread_handle_to_thread_info): Use
1469 get_private_info_thread, adjust to thread_handle field type
1470 change.
1471
1472 2017-11-24 Simon Marchi <simon.marchi@polymtl.ca>
1473
1474 * remote.c (struct thread_item): Add constructor, disable copy
1475 construction and copy assignment, define default move
1476 construction and move assignment.
1477 <extra, name>: Change type to std::string.
1478 <core>: Initialize.
1479 <thread_handle>: Make non-pointer.
1480 (thread_item_t): Remove typedef.
1481 (DEF_VEC_O(thread_item_t)): Remove.
1482 (threads_listing_context) <contains_thread>: New method.
1483 <remove_thread>: New method.
1484 <items>: Change type to std::vector.
1485 (clear_threads_listing_context): Remove.
1486 (threads_listing_context_remove): Remove.
1487 (remote_newthread_step): Use thread_item constructor, adjust to
1488 change to std::vector.
1489 (start_thread): Use thread_item constructor, adjust to change to
1490 std::vector.
1491 (end_thread): Adjust to change to std::vector and std::string.
1492 (remote_get_threads_with_qthreadinfo): Use thread_item
1493 constructor, adjust to std::vector.
1494 (remote_update_thread_list): Adjust to change to std::vector and
1495 std::string, use threads_listing_context methods.
1496 (remove_child_of_pending_fork): Adjust.
1497 (remove_new_fork_children): Adjust.
1498 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add rsp-low-selftests.c.
1499 (SUBDIR_UNITTESTS_OBS): Add rsp-low-selftests.o.
1500 * unittests/rsp-low-selftests.c: New file.
1501 * common/rsp-low.h: Include common/byte-vector.h.
1502 (hex2bin): New overload.
1503 * common/rsp-low.c (hex2bin): New overload.
1504
1505 2017-11-24 Simon Marchi <simon.marchi@ericsson.com>
1506
1507 * inferior.h (private_inferior): Define structure type, add
1508 virtual pure destructor.
1509 (inferior) <priv>: Change type to unique_ptr.
1510 * inferior.c (private_inferior::~private_inferior): Provide
1511 default implementation.
1512 (inferior::~inferior): Don't free priv field.
1513 (exit_inferior_1): Likewise.
1514 * darwin-nat.h (struct darwin_exception_info): Initialize fields.
1515 (darwin_exception_info): Remove typedef.
1516 (DEF_VEC_O (darwin_thread_t)); Remove.
1517 (private_inferior): Rename to ...
1518 (darwin_private_inferior): ... this, extend private_inferior.
1519 (get_darwin_inferior): New.
1520 <threads>: Change type to std::vector of darwin_thread_t pointers.
1521 * darwin-nat.c (darwin_check_new_threads): Adjust.
1522 (find_inferior_task_it): Adjust.
1523 (darwin_find_thread); Adjust.
1524 (darwin_suspend_inferior): Adjust.
1525 (darwin_resume_inferior): Adjust.
1526 (darwin_find_new_inferior): Adjust.
1527 (darwin_decode_notify_message): Adjust.
1528 (darwin_send_reply): Adjust.
1529 (darwin_resume_inferior_threads): Adjust.
1530 (darwin_suspend_inferior_threads): Adjust.
1531 (darwin_decode_message): Adjust.
1532 (darwin_wait): Adjust.
1533 (darwin_interrupt): Adjust.
1534 (darwin_deallocate_threads): Adjust.
1535 (darwin_mourn_inferior): Adjust, don't free private data.
1536 (darwin_reply_to_all_pending_messages): Adjust.
1537 (darwin_stop_inferior): Adjust.
1538 (darwin_setup_exceptions): Adjust.
1539 (darwin_kill_inferior): Adjust.
1540 (darwin_setup_request_notification): Adjust.
1541 (darwin_attach_pid): Adjust.
1542 (darwin_init_thread_list): Adjust.
1543 (darwin_setup_fake_stop_event): Adjust.
1544 (darwin_attach): Adjust.
1545 (darwin_detach): Adjust.
1546 (darwin_xfer_partial): Adjust.
1547 (set_enable_mach_exceptions): Adjust.
1548 (darwin_pid_to_exec_file): Adjust.
1549 (darwin_get_ada_task_ptid): Adjust.
1550 * darwin-nat-info.c (get_task_from_args): Adjust.
1551 (info_mach_ports_command): Adjust.
1552 (info_mach_region_command): Adjust.
1553 (info_mach_exceptions_command): Adjust.
1554 * remote.c (private_inferior): Rename to ...
1555 (remote_private_inferior): ... this, initialize fields.
1556 (get_remote_inferior); New.
1557 (remote_commit_resume): Use get_remote_inferior.
1558 (check_pending_event_prevents_wildcard_vcont_callback): Likewise.
1559
1560 2017-11-24 Pedro Alves <palves@redhat.com>
1561
1562 * NEWS: Mention linespecs and explicit locations, and completion
1563 improvements.
1564
1565 2017-11-24 Yao Qi <yao.qi@linaro.org>
1566
1567 * regcache.c (regcache::dump): Remove footnote_register_size.
1568
1569 2017-11-24 Yao Qi <yao.qi@linaro.org>
1570
1571 * regcache.c (cooked_read_test): Add more test for readonly
1572 regcache.
1573
1574 2017-11-24 Yao Qi <yao.qi@linaro.org>
1575
1576 * gdbarch-selftests.c (test_target_has_registers): Move it to
1577 target.c.
1578 (test_target_has_stack): Likewise.
1579 (test_target_has_memory): Likewise.
1580 (test_target_prepare_to_store): Likewise.
1581 (test_target_store_registers): Likewise.
1582 (test_target_ops): Likewise.
1583 * regcache.c: Include selftest-arch.h and gdbthread.h.
1584 (target_ops_no_register): New class.
1585 (test_target_fetch_registers): New.
1586 (test_target_store_registers): New.
1587 (test_target_xfer_partial): New.
1588 (readwrite_regcache): New.
1589 (cooked_read_test): New.
1590 (_initialize_regcache): Register the test.
1591 * target.c: (test_target_has_registers): Moved from
1592 gdbarch-selftests.c.
1593 (test_target_has_stack): Likewise.
1594 (test_target_has_memory): Likewise.
1595 (test_target_prepare_to_store): Likewise.
1596 (test_target_store_registers): Likewise.
1597 * target.h (test_target_ops): New class.
1598
1599 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1600
1601 * aarch64-tdep.c (_initialize_aarch64_tdep): Add target desc
1602 selftest.
1603
1604 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1605
1606 * aarch64-tdep.c (_initialize_aarch64_tdep): Remove init.
1607 * arch/aarch64.c (aarch64_create_target_description): Create
1608 new target description.
1609 * features/Makefile: Add new files.
1610 * features/aarch64.c: Remove file.
1611 * features/aarch64-core.c: New autogenerated file.
1612 * features/aarch64-fpu.c: New autogenerated file.
1613 * target-descriptions.c (maint_print_c_tdesc_cmd): Check for aarch64.
1614
1615 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1616
1617 * Makefile.in: Add new files.
1618 * aarch64-linux-nat.c (aarch64_linux_read_description): Call
1619 aarch64_read_description.
1620 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
1621 Call aarch64_read_description.
1622 * aarch64-tdep.c (aarch64_read_description): New function.
1623 (aarch64_gdbarch_init): Call aarch64_read_description.
1624 * aarch64-tdep.h (aarch64_read_description): New function.
1625 * arch/aarch64.c: New file.
1626 * configure.tgt: Add new files.
1627
1628 2017-11-24 Yao Qi <yao.qi@linaro.org>
1629
1630 * mi/mi-main.c (register_changed_p): Update.
1631 * value.c (value_contents_bits_eq): Change return type.
1632 (value_contents_eq): Likewise.
1633 * value.h: Update comments.
1634
1635 2017-11-24 Yao Qi <yao.qi@linaro.org>
1636
1637 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Remove
1638 local 'changed'. Remove error.
1639 (register_changed_p): Change return type to bool.
1640
1641 2017-11-24 Yao Qi <yao.qi@linaro.org>
1642
1643 * arch/tic6x.c: New file.
1644 * arch/tic6x.h: New file.
1645 * features/Makefile (FEATURE_XMLFILES): Add tic6x-c6xp.xml,
1646 tic6x-core.xml and tic6x-gp.xml.
1647 * features/tic6x-c6xp.c: Generated.
1648 * features/tic6x-core.c: Generated.
1649 * features/tic6x-gp.c: Generated.
1650 * target-descriptions.c (maint_print_c_tdesc_cmd): Match
1651 "tic6x-".
1652
1653 2017-11-23 Simon Marchi <simon.marchi@ericsson.com>
1654
1655 * mi/mi-main.c (list_available_thread_groups): Change map value
1656 type to std::vector.
1657
1658 2017-11-23 Simon Marchi <simon.marchi@ericsson.com>
1659
1660 * osdata.c (osdata_end_column, get_osdata): Remove std::move.
1661
1662 2017-11-23 Simon Marchi <simon.marchi@ericsson.com>
1663
1664 * varobj.c (struct varobj_dynamic) <children_requested_>: Rename
1665 back to...
1666 <children_requested>: ... this.
1667 (varobj_get_num_children, varobj_update): Adjust.
1668
1669 2017-11-23 Simon Marchi <simon.marchi@ericsson.com>
1670
1671 * ada-varobj.c (ada_value_is_changeable_p): Change int to bool where applicable.
1672 (ada_value_has_mutated): Likewise.
1673 * c-varobj.c (varobj_is_anonymous_child): Likewise.
1674 (c_is_path_expr_parent): Likewise.
1675 * mi/mi-cmd-var.c (varobj_update_one): Likewise.
1676 (mi_cmd_var_set_frozen): Likewise.
1677 (mi_cmd_var_update_iter): Likewise.
1678 (mi_cmd_var_update): Likewise.
1679 * varobj.c (pretty_printing): Likewise.
1680 (varobj_enable_pretty_printing): Likewise.
1681 (struct varobj_root) <floating, is_valid>: Likewise.
1682 (struct varobj_dynamic) <children_requested>: Likewise.
1683 (delete_variable): Likewise.
1684 (delete_variable_1): Likewise.
1685 (install_variable): Likewise.
1686 (update_type_if_necessary): Likewise.
1687 (install_new_value): Likewise.
1688 (value_of_root): Likewise.
1689 (is_root_p): Likewise.
1690 (varobj_create): Likewise.
1691 (varobj_delete): Likewise.
1692 (varobj_has_more): Likewise.
1693 (varobj_set_frozen): Likewise.
1694 (varobj_get_frozen): Likewise.
1695 (install_dynamic_child): Likewise.
1696 (dynamic_varobj_has_child_method): Likewise.
1697 (update_dynamic_varobj_children): Likewise.
1698 (varobj_get_num_children): Likewise.
1699 (varobj_list_children): Likewise.
1700 (is_path_expr_parent): Likewise.
1701 (varobj_default_is_path_expr_parent): Likewise.
1702 (varobj_is_dynamic_p): Likewise.
1703 (varobj_set_value): Likewise.
1704 (varobj_value_has_mutated): Likewise.
1705 (varobj_update): Likewise.
1706 (check_scope): Likewise.
1707 (value_of_root_1): Likewise.
1708 (varobj_value_get_print_value): Likewise.
1709 (varobj_editable_p): Likewise.
1710 (varobj_value_is_changeable_p): Likewise.
1711 (varobj_floating_p): Likewise.
1712 (varobj_default_value_is_changeable_p): Likewise.
1713 (varobj_invalidate_iter): Likewise.
1714 * varobj.h (struct varobj_update_result) <type_changed,
1715 children_changed, changed, value_installed>: Likewise.
1716 (struct varobj) <updated, frozen, not_fetched>: Likewise.
1717 (struct lang_varobj_ops) <value_is_changeable_p,
1718 value_has_mutated, is_path_expr_parent>: Likewise.
1719 (varobj_delete): Likewise.
1720 (varobj_set_frozen): Likewise.
1721 (varobj_get_frozen): Likewise.
1722 (varobj_set_value): Likewise.
1723 (varobj_update): Likewise.
1724 (varobj_editable_p): Likewise.
1725 (varobj_floating_p): Likewise.
1726 (varobj_has_more): Likewise.
1727 (varobj_is_dynamic_p): Likewise.
1728 (varobj_default_value_is_changeable_p): Likewise.
1729 (varobj_value_is_changeable_p): Likewise.
1730 (varobj_is_anonymous_child): Likewise.
1731 (varobj_default_is_path_expr_parent): Likewise.
1732
1733 2017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
1734
1735 * dtrace-probe.c (struct probe_ops dtrace_probe_ops): Delete.
1736 (struct dtrace_probe_arg) <dtrace_probe_arg>: New constructor.
1737 <type_str>: Convert to 'std::string'.
1738 <expr>: Convert to 'expression_up'.
1739 (dtrace_probe_arg_s): Delete type and VEC.
1740 (dtrace_probe_enabler_s): Likewise.
1741 (struct dtrace_probe): Replace by...
1742 (class dtrace_static_probe_ops): ...this and...
1743 (class dtrace_probe): ...this.
1744 (dtrace_probe_is_linespec): Rename to...
1745 (dtrace_static_probe_ops::is_linespec): ...this. Adjust code
1746 to reflect change.
1747 (dtrace_process_dof_probe): Use 'std::vector' instead of VEC.
1748 Adjust code. Create new instance of 'dtrace_probe'.
1749 (dtrace_build_arg_exprs): Rename to...
1750 (dtrace_probe::build_arg_exprs): ...this. Adjust code to
1751 reflect change.
1752 (dtrace_get_probes): Rename to...
1753 (dtrace_static_probe_ops::get_probes): ...this. Adjust code
1754 to reflect change.
1755 (dtrace_get_arg): Rename to...
1756 (dtrace_probe::get_arg_by_number): ...this. Adjust code to
1757 reflect change.
1758 (dtrace_probe_is_enabled): Rename to...
1759 (dtrace_probe::is_enabled): ...this. Adjust code to reflect
1760 change.
1761 (dtrace_get_probe_address): Rename to...
1762 (dtrace_probe::get_relocated_address): ...this. Adjust code
1763 to reflect change.
1764 (dtrace_get_probe_argument_count): Rename to...
1765 (dtrace_probe::get_argument_count): ...this. Adjust code to
1766 reflect change.
1767 (dtrace_can_evaluate_probe_arguments): Rename to...
1768 (dtrace_probe::can_evaluate_arguments): ...this. Adjust code
1769 to reflect change.
1770 (dtrace_evaluate_probe_argument): Rename to...
1771 (dtrace_probe::evaluate_argument): ...this. Adjust code to
1772 reflect change.
1773 (dtrace_compile_to_ax): Rename to...
1774 (dtrace_probe::compile_to_ax): ...this. Adjust code to
1775 reflect change.
1776 (dtrace_probe_destroy): Delete.
1777 (dtrace_type_name): Rename to...
1778 (dtrace_static_probe_ops::type_name): ...this. Adjust code to
1779 reflect change.
1780 (dtrace_probe::get_static_ops): New method.
1781 (dtrace_gen_info_probes_table_header): Rename to...
1782 (dtrace_static_probe_ops::gen_info_probes_table_header):
1783 ...this. Adjust code to reflect change.
1784 (dtrace_gen_info_probes_table_values): Rename to...
1785 (dtrace_probe::gen_info_probes_table_values): ...this. Adjust
1786 code to reflect change.
1787 (dtrace_enable_probe): Rename to...
1788 (dtrace_probe::enable_probe): ...this. Adjust code to reflect
1789 change.
1790 (dtrace_disable_probe): Rename to...
1791 (dtrace_probe::disable_probe): ...this. Adjust code to reflect
1792 change.
1793 (struct probe_ops dtrace_probe_ops): Delete.
1794 (info_probes_dtrace_command): Call 'info_probes_for_spops'
1795 instead of 'info_probes_for_ops'.
1796 (_initialize_dtrace_probe): Use 'all_static_probe_ops' instead
1797 of 'all_probe_ops'.
1798
1799 2017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
1800 Simon Marchi <simark@simark.ca>
1801
1802 * stap-probe.c (struct probe_ops stap_probe_ops): Delete
1803 variable.
1804 (struct stap_probe_arg) <stap_probe_arg>: New constructor.
1805 <aexpr>: Change type to 'expression_up'.
1806 (stap_probe_arg_s): Delete type and VEC.
1807 (struct stap_probe): Delete. Replace by...
1808 (class stap_static_probe_ops): ...this and...
1809 (class stap_probe): ...this. Rename variables to add 'm_'
1810 prefix. Do not use 'union' for arguments anymore.
1811 (stap_get_expected_argument_type): Receive probe name instead
1812 of 'struct stap_probe'. Adjust code.
1813 (stap_parse_probe_arguments): Rename to...
1814 (stap_probe::parse_arguments): ...this. Adjust code to
1815 reflect change.
1816 (stap_get_probe_address): Rename to...
1817 (stap_probe::get_relocated_address): ...this. Adjust code
1818 to reflect change.
1819 (stap_get_probe_argument_count): Rename to...
1820 (stap_probe::get_argument_count): ...this. Adjust code
1821 to reflect change.
1822 (stap_get_arg): Rename to...
1823 (stap_probe::get_arg_by_number'): ...this. Adjust code to
1824 reflect change.
1825 (can_evaluate_probe_arguments): Rename to...
1826 (stap_probe::can_evaluate_arguments): ...this. Adjust code
1827 to reflect change.
1828 (stap_evaluate_probe_argument): Rename to...
1829 (stap_probe::evaluate_argument): ...this. Adjust code
1830 to reflect change.
1831 (stap_compile_to_ax): Rename to...
1832 (stap_probe::compile_to_ax): ...this. Adjust code to
1833 reflect change.
1834 (stap_probe_destroy): Delete.
1835 (stap_modify_semaphore): Adjust comment.
1836 (stap_set_semaphore): Rename to...
1837 (stap_probe::set_semaphore): ...this. Adjust code to reflect
1838 change.
1839 (stap_clear_semaphore): Rename to...
1840 (stap_probe::clear_semaphore): ...this. Adjust code to
1841 reflect change.
1842 (stap_probe::get_static_ops): New method.
1843 (handle_stap_probe): Adjust code to create instance of
1844 'stap_probe'.
1845 (stap_get_probes): Rename to...
1846 (stap_static_probe_ops::get_probes): ...this. Adjust code to
1847 reflect change.
1848 (stap_probe_is_linespec): Rename to...
1849 (stap_static_probe_ops::is_linespec): ...this. Adjust code to
1850 reflect change.
1851 (stap_type_name): Rename to...
1852 (stap_static_probe_ops::type_name): ...this. Adjust code to
1853 reflect change.
1854 (stap_gen_info_probes_table_header): Rename to...
1855 (stap_static_probe_ops::gen_info_probes_table_header):
1856 ...this. Adjust code to reflect change.
1857 (stap_gen_info_probes_table_values): Rename to...
1858 (stap_probe::gen_info_probes_table_values): ...this. Adjust
1859 code to reflect change.
1860 (struct probe_ops stap_probe_ops): Delete.
1861 (info_probes_stap_command): Use 'info_probes_for_spops'
1862 instead of 'info_probes_for_ops'.
1863 (_initialize_stap_probe): Use 'all_static_probe_ops' instead
1864 of 'all_probe_ops'.
1865
1866 2017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
1867
1868 * break-catch-throw.c (fetch_probe_arguments): Use
1869 'probe.prob' instead of 'probe.probe'.
1870 * breakpoint.c (create_longjmp_master_breakpoint): Call
1871 'can_evaluate_arguments' and 'get_relocated_address' methods
1872 from probe.
1873 (create_exception_master_breakpoint): Likewise.
1874 (add_location_to_breakpoint): Use 'sal->prob' instead of
1875 'sal->probe'.
1876 (bkpt_probe_insert_location): Call 'set_semaphore' method from
1877 probe.
1878 (bkpt_probe_remove_location): Likewise, for 'clear_semaphore'.
1879 * elfread.c (elf_get_probes): Use 'static_probe_ops' instead
1880 of 'probe_ops'.
1881 (probe_key_free): Call 'delete' on probe.
1882 (check_exception_resume): Use 'probe.prob' instead of
1883 'probe.probe'.
1884 * location.c (string_to_event_location_basic): Call
1885 'probe_linespec_to_static_ops'.
1886 * probe.c (class any_static_probe_ops): New class.
1887 (any_static_probe_ops any_static_probe_ops): New variable.
1888 (parse_probes_in_pspace): Receive 'static_probe_ops' as
1889 argument. Adjust code to reflect change.
1890 (parse_probes): Use 'static_probe_ops' instead of
1891 'probe_ops'. Adjust code to reflect change.
1892 (find_probes_in_objfile): Call methods to get name and
1893 provider from probe.
1894 (find_probe_by_pc): Use 'result.prob' instead of
1895 'result.probe'. Call 'get_relocated_address' method from
1896 probe.
1897 (collect_probes): Adjust comment and argument list to receive
1898 'static_probe_ops' instead of 'probe_ops'. Adjust code to
1899 reflect change. Call necessary methods from probe.
1900 (compare_probes): Call methods to get name and provider from
1901 probes.
1902 (gen_ui_out_table_header_info): Receive 'static_probe_ops'
1903 instead of 'probe_ops'. Use 'std::vector' instead of VEC,
1904 adjust code accordingly.
1905 (print_ui_out_not_applicables): Likewise.
1906 (info_probes_for_ops): Rename to...
1907 (info_probes_for_spops): ...this. Receive 'static_probe_ops'
1908 as argument instead of 'probe_ops'. Adjust code. Call
1909 necessary methods from probe.
1910 (info_probes_command): Use 'info_probes_for_spops'.
1911 (enable_probes_command): Pass correct argument to
1912 'collect_probes'. Call methods from probe.
1913 (disable_probes_command): Likewise.
1914 (get_probe_address): Move to 'any_static_probe_ops::get_address'.
1915 (get_probe_argument_count): Move to
1916 'any_static_probe_ops::get_argument_count'.
1917 (can_evaluate_probe_arguments): Move to
1918 'any_static_probe_ops::can_evaluate_arguments'.
1919 (evaluate_probe_argument): Move to
1920 'any_static_probe_ops::evaluate_argument'.
1921 (probe_safe_evaluate_at_pc): Use 'probe.prob' instead of
1922 'probe.probe'.
1923 (probe_linespec_to_ops): Rename to...
1924 (probe_linespec_to_static_ops): ...this. Adjust code.
1925 (probe_any_is_linespec): Rename to...
1926 (any_static_probe_ops::is_linespec): ...this.
1927 (probe_any_get_probes): Rename to...
1928 (any_static_probe_ops::get_probes): ...this.
1929 (any_static_probe_ops::type_name): New method.
1930 (any_static_probe_ops::gen_info_probes_table_header): New
1931 method.
1932 (compute_probe_arg): Use 'pc_probe.prob' instead of
1933 'pc_probe.probe'. Call methods from probe.
1934 (compile_probe_arg): Likewise.
1935 (std::vector<const probe_ops *> all_probe_ops): Delete.
1936 (std::vector<const static_probe_ops *> all_static_probe_ops):
1937 New variable.
1938 (_initialize_probe): Use 'all_static_probe_ops' instead of
1939 'all_probe_ops'.
1940 * probe.h (struct info_probe_column) <field_name>: Delete
1941 extraneous newline
1942 (info_probe_column_s): Delete type and VEC.
1943 (struct probe_ops): Delete. Replace with...
1944 (class static_probe_ops): ...this and...
1945 (clas probe): ...this.
1946 (struct bound_probe) <bound_probe>: Delete extraneous
1947 newline. Adjust constructor to receive 'probe' instead of
1948 'struct probe'.
1949 <probe>: Rename to...
1950 <prob>: ...this. Delete extraneous newline.
1951 <objfile>: Delete extraneous newline.
1952 (register_probe_ops): Delete unused prototype.
1953 (info_probes_for_ops): Rename to...
1954 (info_probes_for_spops): ...this. Adjust comment.
1955 (get_probe_address): Move to 'probe::get_address'.
1956 (get_probe_argument_count): Move to
1957 'probe::get_argument_count'.
1958 (can_evaluate_probe_arguments): Move to
1959 'probe::can_evaluate_arguments'.
1960 (evaluate_probe_argument): Move to 'probe::evaluate_argument'.
1961 * solib-svr4.c (struct svr4_info): Adjust comment.
1962 (struct probe_and_action) <probe>: Rename to...
1963 <prob>: ...this.
1964 (register_solib_event_probe): Receive 'probe' instead of
1965 'struct probe' as argument. Use 'prob' instead of 'probe'
1966 when applicable.
1967 (solib_event_probe_action): Call 'get_argument_count' method
1968 from probe. Adjust comment.
1969 (svr4_handle_solib_event): Adjust comment. Call
1970 'evaluate_argument' method from probe.
1971 (svr4_create_probe_breakpoints): Call 'get_relocated_address'
1972 from probe.
1973 (svr4_create_solib_event_breakpoints): Use 'probe' instead of
1974 'struct probe'. Call 'can_evaluate_arguments' from probe.
1975 * symfile.h: Forward declare 'class probe' instead of 'struct
1976 probe'.
1977 * symtab.h: Likewise.
1978 (struct symtab_and_line) <probe>: Rename to...
1979 <prob>: ...this.
1980 * tracepoint.c (start_tracing): Use 'prob' when applicable.
1981 Call probe methods.
1982 (stop_tracing): Likewise.
1983
1984 2017-11-22 Joel Brobecker <brobecker@adacore.com>
1985
1986 * ravenscar-thread.c (ravenscar_inferior_created): Remove
1987 trailing newline at end of string in call to warning.
1988
1989 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
1990
1991 * osdata.h: Include vector isntead of vec.h.
1992 (osdata_column_s): Remove typedef.
1993 (struct osdata_column): Add constructor.
1994 <name, value>: Change type to std::string.
1995 (DEF_VEC_O (osdata_column_s)): Remove.
1996 (osdata_item_s): Remove typedef.
1997 (struct osdata_item) <columns>: Change type to std::vector.
1998 (DEF_VEC_O (osdata_item_s)): Remove.
1999 (struct osdata): Add constructor.
2000 <type>: Change type to std::string.
2001 <items>: Change type to std::vector.
2002 (osdata_p): Remove typedef.
2003 (DEF_VEC_P (osdata_p)): Remove.
2004 (osdata_parse): Return a unique_ptr.
2005 (osdata_free): Remove.
2006 (make_cleanup_osdata_free): Remove.
2007 (get_osdata): Return a unique_ptr.
2008 (get_osdata_column): Return pointer to std::string, take a
2009 reference to osdata_item as parameter.
2010 * osdata.c (struct osdata_parsing_data) <osdata>: Change type to
2011 unique_ptr.
2012 <property_name>: Change type to std::string.
2013 (osdata_start_osdata): Allocate osdata with new and adjust.
2014 (osdata_start_item): Adjust.
2015 (osdata_start_column): Adjust.
2016 (osdata_end_column): Adjust.
2017 (clear_parsing_data): Remove.
2018 (osdata_parse): Return a unique_ptr and adjust, remove cleanup.
2019 (osdata_item_clear): Remove.
2020 (get_osdata): return a unique_ptr and adjust.
2021 (get_osdata_column): Return a pointer to std::string and adjust.
2022 (info_osdata): Adjust.
2023 * mi/mi-main.c: Include <map>.
2024 (free_vector_of_osdata_items): Remove.
2025 (list_available_thread_groups): Adjust, use std::map instead of
2026 splay tree.
2027
2028 2017-11-22 Simon Marchi <simon.marchi@ericsson.com>
2029
2030 * stack.c (iterate_over_block_locals): Add LOC_OPTIMIZED_OUT
2031 case in switch.
2032
2033 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2034
2035 * varobj.h (DEF_VEC_P (varobj_p)): Remove.
2036
2037 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2038
2039 * varobj.h (struct varobj_update_result): Add constructor, add
2040 move constructor, disable copy and assign, initialize fields.
2041 <newobj>: Change type to std::vector.
2042 (varobj_update): Return std::vector.
2043 * varobj.c (install_dynamic_child): Change VEC parameters to
2044 std::vector and adjust.
2045 (update_dynamic_varobj_children): Likewise.
2046 (varobj_update): Return std::vector and adjust.
2047 * mi/mi-cmd-var.c (varobj_update_one): Adjust to vector changes.
2048
2049 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2050
2051 * varobj.h (struct varobj) <parent>: Remove const.
2052 <children>: Change type to std::vector.
2053 (varobj_list_children): Return std::vector const reference.
2054 (varobj_restrict_range): Change parameter type to std::vector
2055 const reference.
2056 * varobj.c (varobj_has_more): Adjust.
2057 (varobj_restrict_range): Change parameter type to std::vector
2058 const reference and adjust.
2059 (install_dynamic_child): Adjust.
2060 (update_dynamic_varobj_children): Adjust.
2061 (varobj_list_children): Return std::vector const reference and
2062 adjust.
2063 (varobj_add_child): Adjust.
2064 (update_type_if_necessary): Adjust.
2065 (varobj_update): Adjust.
2066 (delete_variable_1): Adjust.
2067 * ada-varobj.c (ada_value_has_mutated): Adjust.
2068 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Adjust.
2069
2070 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2071
2072 * varobj.h (struct varobj): Add constructor and destructor,
2073 initialize fields.
2074 * varobj.c (struct varobj_root): Initialize fields.
2075 (struct varobj_dynamic): Initialize fields.
2076 (varobj_create): Use unique_ptr instead of cleanup. Create
2077 varobj with new instead of new_root_variable.
2078 (delete_variable_1): Free variable with delete instead of
2079 free_variable.
2080 (create_child_with_value): Create variable with new instead of
2081 new_variable.
2082 (varobj::varobj): New.
2083 (varobj::~varobj): New (body mostly coming from free_variable).
2084 (new_variable): Remove.
2085 (free_variable): Remove.
2086 (do_free_variable_cleanup): Remove.
2087 (make_cleanup_free_variable): Remove.
2088
2089 2017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
2090
2091 * core-regset.c: Remove file.
2092 * Makefile.in (ALLDEPFILES): Remove core-regset.c.
2093
2094 2017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
2095
2096 * NEWS: Document use of GNU MPFR.
2097 * README: Likewise.
2098
2099 * Makefile.in (LIBMPFR): Add define.
2100 (CLIBS): Add $(LIBMPFR).
2101 * configure.ac: Add --with-mpfr configure option.
2102 * configure: Regenerate.
2103 * config.in: Regenerate.
2104
2105 * target-float.c [HAVE_LIBMPFR]: Include <mpfr.h>.
2106 (class mpfr_float_ops): New type.
2107 (mpfr_float_ops::from_target): Two new overloaded functions.
2108 (mpfr_float_ops::to_target): Likewise.
2109 (mpfr_float_ops::to_string): New function.
2110 (mpfr_float_ops::from_string): Likewise.
2111 (mpfr_float_ops::to_longest): Likewise.
2112 (mpfr_float_ops::from_longest): Likewise.
2113 (mpfr_float_ops::from_ulongest): Likewise.
2114 (mpfr_float_ops::to_host_double): Likewise.
2115 (mpfr_float_ops::from_host_double): Likewise.
2116 (mpfr_float_ops::convert): Likewise.
2117 (mpfr_float_ops::binop): Likewise.
2118 (mpfr_float_ops::compare): Likewise.
2119 (get_target_float_ops): Use mpfr_float_ops if available.
2120
2121 2017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
2122
2123 * target-float.c: Do not include <math.h>.
2124 Include <cmath> and <limits>.
2125 (DOUBLEST): Do not define.
2126 (class target_float_ops): New type.
2127 (class host_float_ops): New templated type.
2128 (class decimal_float_ops): New type.
2129
2130 (floatformat_to_doublest): Rename to ...
2131 (host_float_ops<T>::from_target): ... this. Use template type T
2132 instead of DOUBLEST. Use C++ math routines. Update recursive calls.
2133 (host_float_ops<T>::from_target): New overload using a type argument.
2134 (floatformat_from_doublest): Rename to ...
2135 (host_float_ops<T>::to_target): ... this. Use template type T
2136 instead of DOUBLEST. Use C++ math routines. Update recursive calls.
2137 (host_float_ops<T>::to_target): New overload using a type argument.
2138 (floatformat_printf_format): New function.
2139 (struct printf_length_modifier): New templated type.
2140 (floatformat_to_string): Rename to ...
2141 (host_float_ops<T>::to_string): ... this. Use type instead of
2142 floatformat argument. Use floatformat_printf_format and
2143 printf_length_modifier. Remove special handling of invalid numbers,
2144 infinities and NaN (moved to target_float_to_string).
2145 (struct scanf_length_modifier): New templated type.
2146 (floatformat_from_string): Rename to ...
2147 (host_float_ops<T>::from_string): ... this. Use type instead of
2148 floatformat argument. Use scanf_length_modifier.
2149 (floatformat_to_longest): Rename to ...
2150 (host_float_ops<T>::to_longest): ... this. Use type instead of
2151 floatformat argument. Handle out-of-range values deterministically.
2152 (floatformat_from_longest): Rename to ...
2153 (host_float_ops<T>::from_longest): ... this. Use type instead of
2154 floatformat argument.
2155 (floatformat_from_ulongest): Rename to ...
2156 (host_float_ops<T>::from_ulongest): ... this. Use type instead of
2157 floatformat argument.
2158 (floatformat_to_host_double): Rename to ...
2159 (host_float_ops<T>::to_host_double): ... this. Use type instead of
2160 floatformat argument.
2161 (floatformat_from_host_double): Rename to ...
2162 (host_float_ops<T>::from_host_double): ... this. Use type instead of
2163 floatformat argument.
2164 (floatformat_convert): Rename to ...
2165 (host_float_ops<T>::convert): ... this. Use type instead of
2166 floatformat arguments. Remove handling of no-op conversions.
2167 (floatformat_binop): Rename to ...
2168 (host_float_ops<T>::binop): ... this. Use type instead of
2169 floatformat arguments.
2170 (floatformat_compare): Rename to ...
2171 (host_float_ops<T>::compare): ... this. Use type instead of
2172 floatformat arguments.
2173
2174 (match_endianness): Use type instead of length/byte_order arguments.
2175 (set_decnumber_context): Likewise.
2176 (decimal_from_number): Likewise. Update calls.
2177 (decimal_to_number): Likewise.
2178 (decimal_is_zero): Likewise. Update calls. Move to earlier in file.
2179 (decimal_float_ops::to_host_double): New dummy function.
2180 (decimal_float_ops::from_host_double): Likewise.
2181 (decimal_to_string): Rename to ...
2182 (decimal_float_ops::to_string): ... this. Use type instead of
2183 length/byte_order arguments. Update calls.
2184 (decimal_from_string): Rename to ...
2185 (decimal_float_ops::from_string): ... this. Use type instead of
2186 length/byte_order arguments. Update calls.
2187 (decimal_from_longest): Rename to ...
2188 (decimal_float_ops::from_longest): ... this. Use type instead of
2189 length/byte_order arguments. Update calls.
2190 (decimal_from_ulongest): Rename to ...
2191 (decimal_float_ops::from_ulongest): ... this. Use type instead of
2192 length/byte_order arguments. Update calls.
2193 (decimal_to_longest): Rename to ...
2194 (decimal_float_ops::to_longest): ... this. Use type instead of
2195 length/byte_order arguments. Update calls.
2196 (decimal_binop): Rename to ...
2197 (decimal_float_ops::binop): ... this. Use type instead of
2198 length/byte_order arguments. Update calls.
2199 (decimal_compare): Rename to ...
2200 (decimal_float_ops::compare): ... this. Use type instead of
2201 length/byte_order arguments. Update calls.
2202 (decimal_convert): Rename to ...
2203 (decimal_float_ops::convert): ... this. Use type instead of
2204 length/byte_order arguments. Update calls.
2205
2206 (target_float_same_category_p): New function.
2207 (target_float_same_format_p): Likewise.
2208 (target_float_format_length): Likewise.
2209 (enum target_float_ops_kind): New type.
2210 (get_target_float_ops_kind): New function.
2211 (get_target_float_ops): Three new overloaded functions.
2212
2213 (target_float_is_zero): Update call.
2214 (target_float_to_string): Add special handling of invalid numbers,
2215 infinities and NaN (moved from floatformat_to_string). Use
2216 target_float_ops callback.
2217 (target_float_from_string): Use target_float_ops callback.
2218 (target_float_to_longest): Likewise.
2219 (target_float_from_longest): Likewise.
2220 (target_float_from_ulongest): Likewise.
2221 (target_float_to_host_double): Likewise.
2222 (target_float_from_host_double): Likewise.
2223 (target_float_convert): Add special case for no-op conversions.
2224 Use target_float_ops callback.
2225 (target_float_binop): Use target_float_ops callback.
2226 (target_float_compare): Likewise.
2227
2228 2017-11-22 Yao Qi <yao.qi@linaro.org>
2229
2230 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use strcpy.
2231
2232 2017-11-22 Yao Qi <yao.qi@linaro.org>
2233
2234 * cli/cli-decode.c (help_list): Use memcpy instead of strncpy.
2235 * cp-namespace.c (cp_lookup_transparent_type_loop): Likewise.
2236
2237 2017-11-21 Jerome Guitton <guitton@adacore.com>
2238
2239 * ravenscar-thread.c (ravenscar_wait): Update inferior ptid
2240 with event ptid from the lower layer before doing the
2241 ravenscar-specific update.
2242
2243 2017-11-21 Joel Brobecker <brobecker@adacore.com>
2244
2245 * ravenscar-thread.c (is_ravenscar_task): Also verify that
2246 the ptid's TID is nonzero.
2247
2248 2017-11-21 Joel Brobecker <brobecker@adacore.com>
2249
2250 * ada-lang.h (ada_get_tcb_types_info): Add declaration.
2251 * ada-tasks.c (ada_get_tcb_types_info): Renames get_tcb_types_info.
2252 Make non-static. Change return type to char *. Adjust code
2253 accordingly. Rewrite the function's documentation.
2254 (read_atcb): Adjust call to get_tcb_types_info accordingly.
2255 * ravenscar-thread.c (ravenscar_inferior_created): Check that
2256 we have enough debugging information in the runtime to support
2257 Ada task debugging before we enable the ravenscar-thread layer.
2258
2259 2017-11-21 Joel Brobecker <brobecker@adacore.com>
2260
2261 * ada-lang.h (ada_get_task_info_from_ptid): Add declaration.
2262 * ada-tasks.c (ada_get_task_info_from_ptid): New function.
2263 * ravenscar-thread.c: Add into comment.
2264 (base_magic_null_ptid): Delete.
2265 (base_ptid): Change documentation.
2266 (ravenscar_active_task): Renames ravenscar_running_thread.
2267 All callers updated throughout.
2268 (is_ravenscar_task, ravenscar_get_thread_base_cpu): New function.
2269 (ravenscar_task_is_currently_active): Likewise.
2270 (get_base_thread_from_ravenscar_task): Ditto.
2271 (ravenscar_update_inferior_ptid): Adjust to handle multiple CPUs.
2272 (ravenscar_runtime_initialized): Likewise.
2273 (get_running_thread_id): Add new parameter "cpu". Adjust
2274 implementation to handle this new parameter.
2275 (ravenscar_fetch_registers): Small adjustment to use
2276 is_ravenscar_task and ravenscar_task_is_currently_active in
2277 order to decide whether to use the target beneath or this
2278 module's arch_ops.
2279 (ravenscar_store_registers, ravenscar_prepare_to_store): Likewise.
2280 (ravenscar_stopped_by_sw_breakpoint): Use
2281 get_base_thread_from_ravenscar_task to get the underlying
2282 thread, rather than using base_ptid.
2283 (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
2284 (ravenscar_stopped_data_address, ravenscar_core_of_thread):
2285 Likewise.
2286 (ravenscar_inferior_created): Do not set base_magic_null_ptid.
2287
2288 2017-11-21 Joel Brobecker <brobecker@adacore.com>
2289
2290 * ada-lang.h (struct ada_task_info) <base_cpu>: New field.
2291 * ada-lang.c (struct atcb_fieldno) <base_cpu>: New field.
2292 (get_tcb_types_info): Set fieldnos.base_cpu.
2293 (read_atcb): Set task_info->base_cpu.
2294 (info_task): Print "Base CPU" info if set by runtime.
2295
2296 2017-11-21 Joel Brobecker <brobecker@adacore.com>
2297
2298 * ravenscar-thread.c (ravenscar_stopped_by_sw_breakpoint)
2299 (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
2300 (ravenscar_stopped_data_address, ravenscar_core_of_thread):
2301 New functions.
2302 (init_ravenscar_thread_ops): Set the to_stopped_by_sw_breakpoint,
2303 to_stopped_by_hw_breakpoint, to_stopped_by_watchpoint,
2304 to_stopped_data_address and to_core_of_thread fields of
2305 ravenscar_ops.
2306
2307 2017-11-21 Ulrich Weigand <uweigand@de.ibm.com>
2308
2309 * ppc-tdep.h (enum powerpc_long_double_abi): New data type.
2310 (struct gdbarch_tdep): New member long_double_abi.
2311 * rs6000-tdep.c (rs6000_gdbarch_init): Initialize long_double_abi
2312 member of tdep struct based on Tag_GNU_Power_ABI_FP attribute.
2313 * ppc-linux-tdep.c (ppc_linux_init_abi): Install long double data
2314 format depending on long_double_abi tdep member.
2315 (ppc_floatformat_for_type): Handle __ibm128 type.
2316
2317 2017-11-20 Simon Marchi <simon.marchi@polymtl.ca>
2318
2319 * darwin-nat.c (set_enable_mach_exceptions): Constify parameter.
2320
2321 2017-11-21 Pedro Alves <palves@redhat.com>
2322
2323 * dwarf2read.c (mapped_index::find_name_components_bounds)
2324 <completion mode, upper bound>: Use std::lower_bound instead of
2325 std::upper_bound.
2326 (test_mapped_index_find_name_component_bounds): Remove incorrect
2327 "t1_fund" from expected symbols.
2328
2329 2017-11-21 Pedro Alves <palves@redhat.com>
2330
2331 * dwarf2read.c (mapped_index::name_components_casing): New field.
2332 (mapped_index) <build_name_components,
2333 find_name_components_bounds): Declare new methods.
2334 (mapped_index::find_name_components_bounds)
2335 (mapped_index::build_name_components): New methods, factored out
2336 from dw2_expand_symtabs_matching_symbol.
2337 (check_find_bounds_finds)
2338 (test_mapped_index_find_name_component_bounds): New.
2339 (run_test): Rename to ...
2340 (test_dw2_expand_symtabs_matching_symbol): ... this.
2341 (run_test): Reimplement.
2342
2343 2017-11-21 Pedro Alves <palves@redhat.com>
2344
2345 * cp-name-parser.y (cp_ident_is_alpha, cp_ident_is_alnum): New.
2346 (symbol_end): Use cp_ident_is_alnum.
2347 (yylex): Use cp_ident_is_alpha and cp_ident_is_alnum.
2348 * dwarf2read.c (make_sort_after_prefix_name): New function.
2349 (dw2_expand_symtabs_matching_symbol): Use it.
2350 (test_symbols): Add more symbols.
2351 (run_test): Add tests.
2352
2353 2017-11-17 Tom Tromey <tom@tromey.com>
2354
2355 * symtab.h (enum symbol_subclass_kind): New.
2356 (struct symbol) <is_cplus_template_function, is_rust_vtable>:
2357 Remove.
2358 <subclass>: New member.
2359 (SYMBOL_IS_CPLUS_TEMPLATE_FUNCTION): Update.
2360 * rust-lang.c (rust_get_trait_object_pointer): Update.
2361 * dwarf2read.c (read_func_scope): Update.
2362 (read_variable): Update.
2363
2364 2017-11-17 Tom Tromey <tom@tromey.com>
2365
2366 * dwarf2read.c (read_func_scope): Update.
2367 * symtab.h (struct template_symbol): Derive from symbol.
2368 <base>: Remove.
2369
2370 2017-11-17 Tom Tromey <tom@tromey.com>
2371
2372 * symtab.h (struct symbol) <is_rust_vtable>: New member.
2373 (struct rust_vtable_symbol): New.
2374 (find_symbol_at_address): Declare.
2375 * symtab.c (find_symbol_at_address): New function.
2376 * symfile.h (struct quick_symbol_functions)
2377 <find_compunit_symtab_by_address>: New member.
2378 * symfile-debug.c (debug_qf_find_compunit_symtab_by_address): New
2379 function.
2380 (debug_sym_quick_functions): Link to
2381 debug_qf_find_compunit_symtab_by_address.
2382 * rust-lang.c (rust_get_trait_object_pointer): New function.
2383 (rust_evaluate_subexp) <case UNOP_IND>: New case. Call
2384 rust_get_trait_object_pointer.
2385 * psymtab.c (psym_relocate): Clear psymbol_map.
2386 (psym_fill_psymbol_map, psym_find_compunit_symtab_by_address): New
2387 functions.
2388 (psym_functions): Link to psym_find_compunit_symtab_by_address.
2389 * objfiles.h (struct objfile) <psymbol_map>: New member.
2390 * dwarf2read.c (dwarf2_gdb_index_functions): Update.
2391 (process_die) <DW_TAG_variable>: New case. Call read_variable.
2392 (rust_containing_type, read_variable): New functions.
2393
2394 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2395
2396 * common/gdb_vecs.h (DEF_VEC_I (int)): Remove.
2397
2398 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2399
2400 * common/filestuff.c: Include <algorithm>.
2401 (open_fds): Change type to std::vector<int>.
2402 (do_mark_open_fd): Adjust.
2403 (unmark_fd_no_cloexec): Adjust.
2404 (do_close): Adjust.
2405
2406 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2407
2408 * breakpoint.c (output_thread_groups): Take an std::vector.
2409 (print_one_breakpoint_location): Adjust.
2410
2411 2017-11-17 Joel Brobecker <brobecker@adacore.com>
2412
2413 * ada-lang.c (resolve_subexp): Add handling of OP_VAR_MSYM_VALUE.
2414 (ada_evaluate_subexp_for_cast): New function.
2415 (ada_evaluate_subexp) <UNOP_CAST>: Replace code by call to
2416 ada_evaluate_subexp_for_cast.
2417 (ada_evaluate_subexp) <nosideret>: Replace code by call to
2418 eval_skip_value.
2419 * eval.c (evaluate_var_value): Make non-static.
2420 (evaluate_var_msym_value, eval_skip_value): Likewise.
2421 * value.h (evaluate_var_value, evaluate_var_msym_value)
2422 (eval_skip_value): Declare.
2423
2424 2017-11-16 Joel Brobecker <brobecker@adacore.com>
2425
2426 * ada-lang.c (ada_value_cast): Remove parameter "noside".
2427 Update all callers.
2428
2429 2017-11-16 Pedro Alves <palves@redhat.com>
2430
2431 * python/py-unwind.c (pyuw_sniffer): Translate
2432 PyExc_KeyboardInterrupt to a GDB Quit exception.
2433
2434 2017-11-16 Pedro Alves <palves@redhat.com>
2435
2436 * infrun.c (resume_cleanups): Delete.
2437 (resume): No longer install a resume_cleanups cleanup nor call
2438 QUIT.
2439 (proceed): Pass the terminal to the inferior.
2440 (keep_going_pass_signal): No longer install a resume_cleanups
2441 cleanup.
2442
2443 2017-11-16 Pedro Alves <palves@redhat.com>
2444
2445 * inf-loop.c (inferior_event_handler): Don't swallow the exception
2446 if the prompt is blocked.
2447
2448 2017-11-16 Pedro Alves <palves@redhat.com>
2449
2450 * breakpoint.c (insert_bp_location): Replace bp_err and
2451 bp_err_message locals by a gdb_exception local.
2452
2453 2017-11-16 Pedro Alves <palves@redhat.com>
2454
2455 * inflow.c (scoped_ignore_sigttou): New class.
2456 (child_terminal_ours_1, new_tty): Use it.
2457
2458 2017-11-16 Ulrich Weigand <uweigand@de.ibm.com>
2459
2460 * target-float.c (decimal_from_number): Add byte_order argument and
2461 call match_endianness. Error if unknown floating-point type.
2462 (decimal_to_number): Add byte_order argument and call match_endianness.
2463 (decimal_from_longest): Update call. Do not call match_endianness.
2464 (decimal_from_ulongest): Likewise.
2465 (decimal_binop): Likewise.
2466 (decimal_is_zero): Likewise.
2467 (decimal_compare): Likewise.
2468 (decimal_convert): Likewise.
2469
2470 2017-11-16 Phil Muldoon <pmuldoon@redhat.com>
2471
2472 * python/python.c (gdbpy_rbreak): New function.
2473 * NEWS: Document Python rbreak feature.
2474
2475 2017-11-16 Yao Qi <yao.qi@linaro.org>
2476
2477 * features/tic6x-c62x.xml: Remove.
2478 * features/tic6x-c64x.xml: Remove.
2479 * features/tic6x-c64xp.xml: Remove.
2480
2481 2017-11-15 John Baldwin <jhb@FreeBSD.org>
2482
2483 * symtab.h: Include <array>.
2484
2485 2017-11-15 John Baldwin <jhb@FreeBSD.org>
2486
2487 * bsd-kvm.c (bsd_kvm_cmd): Constify 'arg'.
2488 (bsd_kvm_proc_cmd): Likewise.
2489
2490 2017-11-15 Simon Marchi <simon.marchi@ericsson.com>
2491
2492 * tui/tui-win.c (window_name_completer): Replace VEC with
2493 std::vector.
2494
2495 2017-11-15 Andrew Cagney <cagney@gnu.org>
2496
2497 * MAINTAINERS: Remove no-longer applicable entries.
2498
2499 2017-11-15 Andrew Cagney <cagney@gnu.org>
2500
2501 * MAINTAINERS: Move self to Past Maintainers.
2502
2503 2017-11-15 Yao Qi <yao.qi@linaro.org>
2504
2505 * features/Makefile (XMLTOC): Remove nios2-linux.xml.
2506 * features/nios2-linux.c: Remove.
2507 * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Don't call
2508 initialize_tdesc_nios2_linux.
2509
2510 2017-11-15 Yao Qi <yao.qi@linaro.org>
2511
2512 * m68hc11-tdep.c (M68HC11_NUM_REGS): Change it to
2513 M68HC11_LAST_HARD_REG + 1.
2514
2515 2017-11-14 Paul Carroll <pcarroll@codesourcery.com>
2516
2517 PR gdb/22388
2518 * remote.c (remote_write_bytes_aux, remote_read_bytes_1,
2519 remote_read_bytes, remote_write_qxfer, remote_xfer_partial):
2520 Return TARGET_XFER_EOF if size of returned data is 0.
2521
2522 2017-11-14 Simon Marchi <simon.marchi@ericsson.com>
2523
2524 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2525 memory-map-selftests.c.
2526 (SUBDIR_UNITTESTS_OBS): Add memory-map-selftests.o.
2527 * memory-map.c (memory_map_start_memory): Fix computation of hi
2528 address.
2529 * unittests/memory-map-selftests.c: New file.
2530
2531 2017-11-09 Joel Brobecker <brobecker@adacore.com>
2532
2533 * ada-lang.c: Fix some typos in the general command documenting
2534 how Ada expressions are being evaluated and how their result
2535 is printed.
2536
2537 2017-11-09 Tom Tromey <tom@tromey.com>
2538
2539 * psymtab.c (psymbol_hash): Do not hash string contents.
2540 (psymbol_compare): Add comment.
2541
2542 2017-11-09 Tom Tromey <tom@tromey.com>
2543
2544 * dictionary.c (dict_hash): Move "TKB" check into the "switch".
2545
2546 2017-11-08 Joel Brobecker <brobecker@adacore.com>
2547
2548 * ada-exp.y (write_var_from_sym): Remove parameter
2549 "orig_left_context". Update all callers.
2550
2551 2017-11-08 Simon Marchi <simon.marchi@ericsson.com>
2552
2553 * tracepoint.h (class collection_list) <stringify>: Return
2554 std::vector<std::string>.
2555 (encode_actions_rsp): Change parameters to
2556 std::vector<std::string> *.
2557 * tracepoint.c (collection_list::stringify): Return
2558 std::vector<std::string> and adjust accordingly.
2559 (encode_actions_rsp): Changee parameters to
2560 std::vector<std::string> and adjust accordingly.
2561 * remote.c (free_actions_list),
2562 free_actions_list_cleanup_wrapper): Remove.
2563 (remote_download_tracepoint): Adjust to std::vector.
2564
2565 2017-11-08 Tom Tromey <tom@tromey.com>
2566
2567 * dwarf2read.c (symbolp): Remove typedef.
2568 (read_func_scope): Use std::vector.
2569 (process_structure_scope): Use std::vector.
2570
2571 2017-11-08 Pedro Alves <palves@redhat.com>
2572
2573 * ada-lang.c (ada_make_symbol_completion_list): Use
2574 completion_skip_symbol.
2575 * symtab.c (symbol_is_function_or_method(minimal_symbol*)): New.
2576 (symbol_is_function_or_method(symbol*)): New.
2577 (add_symtab_completions): Add complete_symbol_mode parameter. Use
2578 completion_skip_symbol.
2579 (default_collect_symbol_completion_matches_break_on): Use
2580 completion_skip_symbol. Pass down mode.
2581 (collect_file_symbol_completion_matches): Pass down mode.
2582 * symtab.h (symbol_is_function_or_method): New declarations.
2583 (completion_skip_symbol): New template function.
2584
2585 2017-11-08 Pedro Alves <palves@redhat.com>
2586
2587 * linespec.c (iterate_over_all_matching_symtabs): Add
2588 search_domain parameter. Pass it down to expand_symtabs_matching.
2589 (decode_objc): Request FUNCTIONS_DOMAIN symbols only.
2590 (lookup_prefix_sym): Adjust by passing ALL_DOMAIN as
2591 search_domain.
2592 (add_all_symbol_names_from_pspace): Add search_domain parameter.
2593 Pass it down.
2594 (find_method, find_function_symbols): Request FUNCTIONS_DOMAIN
2595 symbols.
2596 (add_matching_symbols_to_info): Add search_domain parameter. Pass
2597 it down.
2598
2599 2017-11-08 Pedro Alves <palves@redhat.com>
2600
2601 * ada-lang.c (ada_make_symbol_completion_list): Remove text and
2602 text_len locals and don't pass them down.
2603 * symtab.c (completion_list_add_name): Remove
2604 sym_text/sym_text_len parameters and adjust.
2605 (completion_list_add_symbol, completion_list_add_msymbol)
2606 (completion_list_objc_symbol, completion_list_add_fields)
2607 (add_symtab_completions): Likewise.
2608 (default_collect_symbol_completion_matches_break_on)
2609 (collect_file_symbol_completion_matches): Remove sym_text_len
2610 local and don't pass it down.
2611 * symtab.h (completion_list_add_name): Remove
2612 sym_text/sym_text_len parameters.
2613
2614 2017-11-08 Pedro Alves <palves@redhat.com>
2615
2616 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2617 unittests/lookup_name_info-selftests.c.
2618 (SUBDIR_UNITTESTS_OBS): Add lookup_name_info-selftests.o.
2619 * cp-support.c: Include "selftest.h".
2620 (cp_remove_params_1): Rename from cp_remove_params. Add
2621 'require_param' parameter, and handle it.
2622 (cp_remove_params): Reimplement.
2623 (cp_remove_params_if_any): New.
2624 (selftests::quote): New.
2625 (selftests::check_remove_params): New.
2626 (selftests::test_cp_remove_params): New.
2627 (_initialize_cp_support): Install
2628 selftests::test_cp_remove_params.
2629 * cp-support.h (cp_remove_params_if_any): Declare.
2630 * dwarf2read.c :Include "selftest.h".
2631 (dw2_expand_symtabs_matching_symbol): Use
2632 lookup_name_info::make_ignore_params.
2633 (selftests::dw2_expand_symtabs_matching::mock_mapped_index)
2634 (selftests::dw2_expand_symtabs_matching::string_or_null)
2635 (selftests::dw2_expand_symtabs_matching::check_match)
2636 (selftests::dw2_expand_symtabs_matching::test_symbols)
2637 (selftests::dw2_expand_symtabs_matching::run_test): New.
2638 (_initialize_dwarf2_read): Register
2639 selftests::dw2_expand_symtabs_matching::run_test.
2640 * psymtab.c (psym_expand_symtabs_matching): Use
2641 lookup_name_info::make_ignore_params.
2642 * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info):
2643 If the lookup name wants to ignore parameters, strip them.
2644 (compare_symbol_name): Remove sym_text/sym_text_len parameters and
2645 code handling '('.
2646 (completion_list_add_name): Don't pass down sym_text/sym_text_len.
2647 (default_collect_symbol_completion_matches_break_on): Don't try to
2648 strip parameters.
2649 * symtab.h (lookup_name_info::lookup_name_info): Add
2650 'ignore_parameters' parameter.
2651 (lookup_name_info::ignore_parameters)
2652 (lookup_name_info::make_ignore_params): New methods.
2653 (lookup_name_info::m_ignore_parameters): New field.
2654 * unittests/lookup_name_info-selftests.c: New file.
2655
2656 2017-11-08 Pedro Alves <palves@redhat.com>
2657
2658 * dwarf2read.c (dw2_expand_marked_cus)
2659 (dw2_expand_symtabs_matching_symbol): Remove forward declarations.
2660 (dw2_expand_symtabs_matching): Move further below.
2661 (dw2_expand_marked_cus): Reindent.
2662
2663 2017-11-08 Pedro Alves <palves@redhat.com>
2664
2665 * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
2666 (struct name_component): New.
2667 (mapped_index::name_components): New field.
2668 (mapped_index::symbol_name_at): New method.
2669 (dwarf2_read_index): Call mapped_index ctor.
2670 (dw2_map_matching_symbols): Add comment about name_components
2671 table.
2672 (dw2_expand_symtabs_matching): Factor part to...
2673 (dw2_expand_symtabs_matching_symbol): ... this new function.
2674 Build name components table, and lookup symbols in it before
2675 calling the name matcher.
2676 (dw2_expand_marked_cus): New, factored out from
2677 dw2_expand_symtabs_matching.
2678 (dwarf2_per_objfile_free): Call the mapped_index's dtor.
2679
2680 2017-11-08 Pedro Alves <palves@redhat.com>
2681
2682 * ada-lang.c (ada_encode): Rename to ..
2683 (ada_encode_1): ... this. Add throw_errors parameter and handle
2684 it.
2685 (ada_encode): Reimplement.
2686 (match_name): Delete, folded into full_name.
2687 (resolve_subexp): No longer pass the encoded name to
2688 ada_lookup_symbol_list.
2689 (should_use_wild_match): Delete.
2690 (name_match_type_from_name): New.
2691 (ada_lookup_simple_minsym): Use lookup_name_info and the
2692 language's symbol_name_matcher_ftype.
2693 (add_symbols_from_enclosing_procs, ada_add_local_symbols)
2694 (ada_add_block_renamings): Adjust to use lookup_name_info.
2695 (ada_lookup_name): New.
2696 (add_nonlocal_symbols, ada_add_all_symbols)
2697 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
2698 (ada_iterate_over_symbols): Adjust to use lookup_name_info.
2699 (ada_name_for_lookup): Delete.
2700 (ada_lookup_encoded_symbol): Construct a verbatim name.
2701 (wild_match): Reverse sense of return type. Use bool.
2702 (full_match): Reverse sense of return type. Inline bits of old
2703 match_name here.
2704 (ada_add_block_symbols): Adjust to use lookup_name_info.
2705 (symbol_completion_match): Delete, folded into...
2706 (ada_lookup_name_info::matches): ... .this new method.
2707 (symbol_completion_add): Delete.
2708 (ada_collect_symbol_completion_matches): Add name_match_type
2709 parameter. Adjust to use lookup_name_info and
2710 completion_list_add_name.
2711 (get_var_value, ada_add_global_exceptions): Adjust to use
2712 lookup_name_info.
2713 (ada_get_symbol_name_cmp): Delete.
2714 (do_wild_match, do_full_match): New functions.
2715 (ada_lookup_name_info::ada_lookup_name_info): New method.
2716 (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
2717 functions.
2718 (ada_language_defn): Install ada_get_symbol_name_matcher.
2719 * ada-lex.l (processId): If name starts with '<', copy it
2720 verbatim.
2721 * block.c (block_iter_match_step, block_iter_match_first)
2722 (block_iter_match_next, block_lookup_symbol)
2723 (block_lookup_symbol_primary, block_find_symbol): Adjust to use
2724 lookup_name_info.
2725 * block.h (block_iter_match_first, block_iter_match_next)
2726 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
2727 * c-lang.c (c_language_defn, cplus_language_defn)
2728 (asm_language_defn, minimal_language_defn): Adjust comments to
2729 refer to la_get_symbol_name_matcher.
2730 * completer.c (complete_files_symbols)
2731 (collect_explicit_location_matches, symbol_completer): Pass a
2732 symbol_name_match_type down.
2733 * completer.h (class completion_match, completion_match_result):
2734 New classes.
2735 (completion_tracker::reset_completion_match_result): New method.
2736 (completion_tracker::m_completion_match_result): New field.
2737 * cp-support.c (make_symbol_overload_list_block): Adjust to use
2738 lookup_name_info.
2739 (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
2740 functions.
2741 * cp-support.h (cp_get_symbol_name_matcher): New declaration.
2742 * d-lang.c: Adjust comments to refer to
2743 la_get_symbol_name_matcher.
2744 * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
2745 Adjust to use lookup_name_info.
2746 (dict_iter_match_first, dict_iter_match_next)
2747 (iter_match_first_hashed, iter_match_next_hashed)
2748 (iter_match_first_linear, iter_match_next_linear): Adjust to work
2749 with a lookup_name_info.
2750 * dictionary.h (dict_iter_match_first, dict_iter_match_next):
2751 Likewise.
2752 * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
2753 (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
2754 (gdb_index_symbol_name_matcher): New class.
2755 (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
2756 gdb_index_symbol_name_matcher. Accept a NULL symbol_matcher.
2757 * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
2758 with a symbol_name_match_type.
2759 (f_language_defn): Adjust comments to refer to
2760 la_get_symbol_name_matcher.
2761 * go-lang.c (go_language_defn): Adjust comments to refer to
2762 la_get_symbol_name_matcher.
2763 * language.c (default_symbol_name_matcher)
2764 (language_get_symbol_name_matcher): New functions.
2765 (unknown_language_defn, auto_language_defn): Adjust comments to
2766 refer to la_get_symbol_name_matcher.
2767 * language.h (symbol_name_cmp_ftype): Delete.
2768 (language_defn) <la_collect_symbol_completion_matches>: Add match
2769 type parameter.
2770 <la_get_symbol_name_cmp>: Delete field.
2771 <la_get_symbol_name_matcher>: New field.
2772 <la_iterate_over_symbols>: Adjust to use lookup_name_info.
2773 (default_symbol_name_matcher, language_get_symbol_name_matcher):
2774 Declare.
2775 * linespec.c (iterate_over_all_matching_symtabs)
2776 (iterate_over_file_blocks): Adjust to use lookup_name_info.
2777 (find_methods): Add language parameter, and use lookup_name_info
2778 and the language's symbol_name_matcher_ftype.
2779 (linespec_complete_function): Adjust.
2780 (lookup_prefix_sym): Use lookup_name_info.
2781 (add_all_symbol_names_from_pspace): Adjust.
2782 (find_superclass_methods): Add language parameter and pass it
2783 down.
2784 (find_method): Pass symbol language down.
2785 (find_linespec_symbols): Don't demangle or Ada encode here.
2786 (search_minsyms_for_name): Add lookup_name_info parameter.
2787 (add_matching_symbols_to_info): Add name_match_type parameter.
2788 Use lookup_name_info.
2789 * m2-lang.c (m2_language_defn): Adjust comments to refer to
2790 la_get_symbol_name_matcher.
2791 * minsyms.c: Include <algorithm>.
2792 (add_minsym_to_demangled_hash_table): Remove table parameter and
2793 add objfile parameter. Use search_name_hash, and add language to
2794 demangled languages vector.
2795 (struct found_minimal_symbols): New struct.
2796 (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
2797 New functions.
2798 (lookup_minimal_symbol): Adjust to use them. Don't canonicalize
2799 input names here. Use lookup_name_info instead. Lookup up
2800 demangled names once for each language in the demangled names
2801 vector.
2802 (iterate_over_minimal_symbols): Use lookup_name_info. Lookup up
2803 demangled names once for each language in the demangled names
2804 vector.
2805 (build_minimal_symbol_hash_tables): Adjust.
2806 * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
2807 lookup_name_info.
2808 * objc-lang.c (objc_language_defn): Adjust comment to refer to
2809 la_get_symbol_name_matcher.
2810 * objfiles.h: Include <vector>.
2811 (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
2812 * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
2813 la_get_symbol_name_matcher.
2814 * p-lang.c (pascal_language_defn): Adjust comment to refer to
2815 la_get_symbol_name_matcher.
2816 * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
2817 (match_partial_symbol): Use symbol_name_match_type,
2818 lookup_name_info and psymbol_name_matches.
2819 (lookup_partial_symbol): Use lookup_name_info.
2820 (map_block): Use symbol_name_match_type and lookup_name_info.
2821 (psym_map_matching_symbols): Use symbol_name_match_type.
2822 (psymbol_name_matches): New.
2823 (recursively_search_psymtabs): Use lookup_name_info and
2824 psymbol_name_matches. Rename 'kind' parameter to 'domain'.
2825 (psym_expand_symtabs_matching): Use lookup_name_info. Rename
2826 'kind' parameter to 'domain'.
2827 * rust-lang.c (rust_language_defn): Adjust comment to refer to
2828 la_get_symbol_name_matcher.
2829 * symfile-debug.c (debug_qf_map_matching_symbols)
2830 (debug_qf_map_matching_symbols): Use symbol_name_match_type.
2831 (debug_qf_expand_symtabs_matching): Use lookup_name_info.
2832 * symfile.c (expand_symtabs_matching): Use lookup_name_info.
2833 * symfile.h (quick_symbol_functions) <map_matching_symbols>:
2834 Adjust to use symbol_name_match_type.
2835 <expand_symtabs_matching>: Adjust to use lookup_name_info.
2836 (expand_symtabs_matching): Adjust to use lookup_name_info.
2837 * symmisc.c (maintenance_expand_symtabs): Use
2838 lookup_name_info::match_any ().
2839 * symtab.c (symbol_matches_search_name): New.
2840 (eq_symbol_entry): Adjust to use lookup_name_info and the
2841 language's matcher.
2842 (demangle_for_lookup_info::demangle_for_lookup_info): New.
2843 (lookup_name_info::match_any): New.
2844 (iterate_over_symbols, search_symbols): Use lookup_name_info.
2845 (compare_symbol_name): Add language, lookup_name_info and
2846 completion_match_result parameters, and use them.
2847 (completion_list_add_name): Make extern. Add language and
2848 lookup_name_info parameters. Use them.
2849 (completion_list_add_symbol, completion_list_add_msymbol)
2850 (completion_list_objc_symbol): Add lookup_name_info parameters and
2851 adjust. Pass down language.
2852 (completion_list_add_fields): Add lookup_name_info parameters and
2853 adjust. Pass down language.
2854 (add_symtab_completions): Add lookup_name_info parameters and
2855 adjust.
2856 (default_collect_symbol_completion_matches_break_on): Add
2857 name_match_type parameter, and use it. Use lookup_name_info.
2858 (default_collect_symbol_completion_matches)
2859 (collect_symbol_completion_matches): Add name_match_type
2860 parameter, and pass it down.
2861 (collect_symbol_completion_matches_type): Adjust.
2862 (collect_file_symbol_completion_matches): Add name_match_type
2863 parameter, and use lookup_name_info.
2864 * symtab.h: Include <string> and "common/gdb_optional.h".
2865 (enum class symbol_name_match_type): New.
2866 (class ada_lookup_name_info): New.
2867 (struct demangle_for_lookup_info): New.
2868 (class lookup_name_info): New.
2869 (symbol_name_matcher_ftype): New.
2870 (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
2871 (symbol_matches_search_name): Declare.
2872 (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
2873 (default_collect_symbol_completion_matches)
2874 (collect_symbol_completion_matches)
2875 (collect_file_symbol_completion_matches): Add name_match_type
2876 parameter.
2877 (iterate_over_symbols): Use lookup_name_info.
2878 (completion_list_add_name): Declare.
2879 * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
2880 (strncmp_iw_with_mode): Now extern.
2881 * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
2882 (strncmp_iw_with_mode): Declare.
2883
2884 2017-11-08 Keith Seitz <keiths@redhat.com>
2885 Pedro Alves <palves@redhat.com>
2886
2887 * ada-lang.c (ada_language_defn): Install
2888 default_search_name_hash.
2889 * buildsym.c (struct buildsym_compunit): <language>: New field.
2890 (finish_block_internal): Pass language when creating dictionaries.
2891 (start_buildsym_compunit, start_symtab): New language parameters.
2892 Use them.
2893 (restart_symtab): Pass down compilation unit's language.
2894 * buildsym.h (enum language): Forward declare.
2895 (start_symtab): New 'language' parameter.
2896 * c-lang.c (c_language_defn, cplus_language_defn)
2897 (asm_language_defn, minimal_language_defn): Install
2898 default_search_name_hash.
2899 * coffread.c (coff_start_symtab): Adjust.
2900 * d-lang.c (d_language_defn): Install default_search_name_hash.
2901 * dbxread.c (struct symloc): Add 'pst_language' field.
2902 (PST_LANGUAGE): Define.
2903 (start_psymtab, read_ofile_symtab): Use it.
2904 (process_one_symbol): New 'language' parameter. Pass it down.
2905 * dictionary.c (struct dictionary) <language>: New field.
2906 (DICT_LANGUAGE): Define.
2907 (dict_create_hashed, dict_create_hashed_expandable)
2908 (dict_create_linear, dict_create_linear_expandable): New parameter
2909 'language'. Set the dictionary's language.
2910 (iter_match_first_hashed): Adjust to rename.
2911 (insert_symbol_hashed): Assert we don't see mismatching
2912 languages. Adjust to rename.
2913 (dict_hash): Rename to ...
2914 (default_search_name_hash): ... this and make extern.
2915 * dictionary.h (struct language_defn): Forward declare.
2916 (dict_create_hashed): New parameter 'language'.
2917 * dwarf2read.c (dwarf2_start_symtab): Pass down language.
2918 * f-lang.c (f_language_defn): Install default_search_name_hash.
2919 * go-lang.c (go_language_defn): Install default_search_name_hash.
2920 * jit.c (finalize_symtab): Pass compunit's language to dictionary
2921 creation.
2922 * language.c (unknown_language_defn, auto_language_defn):
2923 * language.h (language_defn::la_search_name_hash): New field.
2924 (default_search_name_hash): Declare.
2925 * m2-lang.c (m2_language_defn): Install default_search_name_hash.
2926 * mdebugread.c (new_block): New parameter 'language'.
2927 * mdebugread.c (parse_symbol): Pass symbol language to block
2928 allocation.
2929 (psymtab_to_symtab_1): Pass down language.
2930 (new_symtab): Pass compunit's language to block allocation.
2931 * objc-lang.c (objc_language_defn): Install
2932 default_search_name_hash.
2933 * opencl-lang.c (opencl_language_defn):
2934 * p-lang.c (pascal_language_defn): Install
2935 default_search_name_hash.
2936 * rust-lang.c (rust_language_defn): Install
2937 default_search_name_hash.
2938 * stabsread.h (enum language): Forward declare.
2939 (process_one_symbol): Add 'language' parameter.
2940 * symtab.c (search_name_hash): New function.
2941 * symtab.h (search_name_hash): Declare.
2942 * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
2943
2944 2017-11-08 Pedro Alves <palves@redhat.com>
2945
2946 * cp-name-parser.y (main): Don't initialize extra_chars.
2947
2948 2017-11-07 Tom Tromey <tom@tromey.com>
2949
2950 * event-top.h (command_handler): Constify.
2951 * record-full.c (cmd_record_full_start): Update.
2952 * thread.c (thread_apply_all_command): Update.
2953 * printcmd.c (eval_command): Update.
2954 * mi/mi-main.c (mi_execute_cli_command): Update.
2955 (mi_execute_async_cli_command): Update.
2956 * tui/tui-stack.c (tui_update_command): Update.
2957 * cli/cli-interp.c (safe_execute_command): Constify.
2958 * record.c (record_start): Update.
2959 (record_start, record_stop, cmd_record_start): Update.
2960 * record-btrace.c (cmd_record_btrace_bts_start): Update.
2961 (cmd_record_btrace_pt_start): Update.
2962 (cmd_record_btrace_start): Update.
2963 (cmd_record_btrace_start): Update.
2964 * reverse.c (exec_reverse_once): Update.
2965 * python/python.c (execute_gdb_command): Don't copy the command.
2966 * event-top.c (command_line_handler): Update.
2967 (command_handler): Constify.
2968 * defs.h (deprecated_call_command_hook): Constify.
2969 * cli/cli-script.h (execute_user_command): Constify.
2970 * cli/cli-script.c (execute_user_command): Constify.
2971 (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
2972 (enum command_control_type): Update.
2973 * main.c (catch_command_errors): Remove non-const overload.
2974 (catch_command_errors_ftype): Remove.
2975 * python/py-cmd.c (cmdpy_function): Constify.
2976 * guile/scm-cmd.c (cmdscm_function): Constify.
2977 * cli/cli-dump.c (call_dump_func): Constify.
2978 * cli/cli-decode.c (do_const_cfunc): Constify.
2979 (do_sfunc): Constify.
2980 (cmd_func): Constify.
2981 * gdbcmd.h (execute_command, execute_command_to_string): Constify.
2982 * top.h (execute_command): Constify.
2983 * top.c (execute_command): Constify.
2984 (execute_command_to_string): Constify.
2985 (deprecated_call_command_hook): Constify.
2986 * command.h (cmd_func): Constify.
2987 * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
2988
2989 2017-11-07 Tom Tromey <tom@tromey.com>
2990
2991 * ada-lang.c (catch_ada_exception_command): Constify.
2992 (catch_assert_command): Constify.
2993 * break-catch-throw.c (catch_catch_command, catch_throw_command)
2994 (catch_rethrow_command): Constify.
2995 (catch_exception_command_1): Constify.
2996 * breakpoint.h (add_catch_command): Constify.
2997 * break-catch-syscall.c (catch_syscall_command_1): Constify.
2998 (catch_syscall_split_args): Constify.
2999 * break-catch-sig.c (catch_signal_command): Constify.
3000 (catch_signal_split_args): Constify.
3001 * cli/cli-decode.h (struct cmd_list_element) <function>: Use
3002 cmd_const_sfunc_ftype.
3003 * cli/cli-decode.c (add_setshow_cmd_full): Constify.
3004 (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
3005 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
3006 (add_setshow_string_cmd, struct cmd_list_element)
3007 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
3008 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
3009 (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
3010 Constify.
3011 (set_cmd_sfunc): Constify.
3012 (empty_sfunc): Constify.
3013 * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
3014 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
3015 (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
3016 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
3017 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
3018 (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
3019 Constify.
3020 (set_cmd_sfunc): Constify.
3021 (cmd_sfunc_ftype): Remove.
3022 * compile/compile.c (set_compile_args): Constify.
3023 * infrun.c (set_disable_randomization): Constify.
3024 * infcmd.c (set_args_command, set_cwd_command): Constify.
3025 * breakpoint.c (set_condition_evaluation_mode): Constify.
3026 (add_catch_command): Constify.
3027 (catch_fork_command_1, catch_exec_command_1)
3028 (catch_load_command_1, catch_unload_command_1): Constify.
3029 (catch_load_or_unload): Constify.
3030 * guile/scm-param.c (pascm_set_func): Constify.
3031 (add_setshow_generic): Constify.
3032 * python/py-param.c (get_set_value): Constify.
3033 * top.h (set_verbose): Constify.
3034 * tui/tui-win.c (tui_set_var_cmd): Constify.
3035 * mi/mi-main.c (set_mi_async_command): Constify.
3036 * cli/cli-logging.c (set_logging_overwrite)
3037 (set_logging_redirect): Constify.
3038 * value.c (set_max_value_size): Constify.
3039 * valprint.c (set_input_radix, set_output_radix): Constify.
3040 * utils.c (set_width_command, set_height_command): Constify.
3041 * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
3042 * tracepoint.c (set_disconnected_tracing)
3043 (set_circular_trace_buffer, set_trace_buffer_size)
3044 (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
3045 * top.c (set_history_size_command, set_verbose, set_editing)
3046 (set_gdb_datadir, set_history_filename): Constify.
3047 * target.c (set_targetdebug, maint_set_target_async_command)
3048 (maint_set_target_non_stop_command, set_target_permissions)
3049 (set_write_memory_permission): Constify.
3050 (open_target): Constify.
3051 * target-descriptions.c (set_tdesc_filename_cmd): Constify.
3052 * target-dcache.c (set_stack_cache, set_code_cache): Constify.
3053 * symtab.c (set_symbol_cache_size_handler): Constify.
3054 * symfile.c (set_ext_lang_command): Constify.
3055 * symfile-debug.c (set_debug_symfile): Constify.
3056 * source.c (set_directories_command): Constify.
3057 * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
3058 * serial.c (set_parity): Constify.
3059 * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
3060 * remote.c (set_remote_exec_file, set_remotebreak)
3061 (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
3062 * record.c (set_record_insn_history_size)
3063 (set_record_call_history_size): Constify.
3064 * record-full.c (set_record_full_insn_max_num): Constify.
3065 * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
3066 * osabi.c (set_osabi): Constify.
3067 * mips-tdep.c (set_mips64_transfers_32bit_regs)
3068 (reinit_frame_cache_sfunc, mips_abi_update): Constify.
3069 * maint.c (maintenance_set_profile_cmd): Constify.
3070 * linux-thread-db.c (set_libthread_db_search_path): Constify.
3071 * language.c (set_language_command, set_range_command)
3072 (set_case_command): Constify.
3073 * infrun.c (set_non_stop, set_observer_mode)
3074 (set_stop_on_solib_events, set_schedlock_func)
3075 (set_exec_direction_func): Constify.
3076 * infcmd.c (set_inferior_tty_command): Constify.
3077 * disasm.c (set_disassembler_options_sfunc): Constify.
3078 * demangle.c (set_demangling_command): Constify.
3079 * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
3080 * cris-tdep.c (set_cris_version, set_cris_mode)
3081 (set_cris_dwarf2_cfi): Constify.
3082 * corefile.c (set_gnutarget_command): Constify.
3083 * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
3084 (set_target_wide_charset_sfunc): Constify.
3085 * breakpoint.c (update_dprintf_commands): Constify.
3086 * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
3087 * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
3088 (set_disassembly_style_sfunc): Constify.
3089 * arch-utils.c (set_endian, set_architecture): Constify.
3090 * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
3091 * agent.c (set_can_use_agent): Constify.
3092
3093 2017-11-07 Tom Tromey <tom@tromey.com>
3094
3095 * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
3096 (go32_pde, go32_pte, go32_pte_for_address): Constify.
3097 * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
3098 (set_thread_default_pause_cmd, set_thread_default_run_cmd)
3099 (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
3100 (parse_int_arg, show_thread_default_detach_sc_cmd)
3101 (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
3102 (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
3103 (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
3104 (show_task_pause_cmd, set_task_detach_sc_cmd)
3105 (show_task_detach_sc_cmd, set_task_exc_port_cmd)
3106 (set_noninvasive_cmd, set_thread_pause_cmd)
3107 (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
3108 (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
3109 (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
3110 * windows-nat.c (display_selectors): Constify.
3111 * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
3112 non-const "cfunc".
3113 * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
3114 (cmd_cfunc_eq): Likewise.
3115 (struct cmd_list_element): Likewise.
3116 (do_cfunc): Remove.
3117 (cli_user_command_p): Update.
3118 * command.h (add_cmd): Remove non-const overload.
3119 (cmd_cfunc_ftype): Remove typedef.
3120 (cmd_cfunc_eq): Remove non-const overload.
3121 * value.c (show_values): Constify.
3122 * thread.c (thread_apply_all_command): Constify.
3123 * symfile.c (load_command): Constify.
3124 * source.c (directory_command): Constify.
3125 * maint.c (maintenance_internal_error)
3126 (maintenance_demangler_warning, maintenance_space_display)
3127 (maintenance_print_architecture, maintenance_translate_address)
3128 (maintenance_info_selftests, maintenance_internal_warning):
3129 Constify.
3130 * breakpoint.c (disable_trace_command, enable_trace_command):
3131 Constify.
3132 * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
3133 Constify.
3134 (add_auto_load_safe_path): Constify.
3135 * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
3136 * top.h (show_commands): Constify.
3137 * linux-thread-db.c (info_auto_load_libthread_db): Constify.
3138 * sparc64-tdep.c (adi_examine_command): Constify.
3139 (adi_assign_command): Constify.
3140
3141 2017-11-07 Tom Tromey <tom@tromey.com>
3142
3143 * frame.h (info_locals_command, info_args_command): Constify.
3144 * auto-load.h (auto_load_info_scripts): Constify.
3145 * inferior.h (registers_info): Constify.
3146 * copying.c: Rebuild.
3147 * copying.awk: Constify generated commands.
3148 * auto-load.c (auto_load_info_scripts)
3149 (info_auto_load_gdb_scripts): Constify.
3150 * cli/cli-decode.c (struct cmd_list_element): Take a
3151 cmd_const_cfunc_ftype.
3152 * command.h (add_info): Take a cmd_const_cfunc_ftype.
3153 * tui/tui-win.c (tui_all_windows_info): Constify.
3154 * python/py-auto-load.c (info_auto_load_python_scripts):
3155 Constify.
3156 * cli/cli-cmds.c (show_command): Remove non-const overload.
3157 * tracepoint.c (info_tvariables_command, info_scope_command):
3158 Constify.
3159 (info_static_tracepoint_markers_command): Constify.
3160 * thread.c (info_threads_command): Constify.
3161 (print_thread_info_1): Constify.
3162 * target.c (info_target_command): Constify.
3163 * symtab.c (info_sources_command, info_functions_command)
3164 (info_types_command): Constify.
3165 (info_variables_command): Remove non-const overload.
3166 * symfile.c (info_ext_lang_command): Constify.
3167 * stack.c (info_frame_command, info_locals_command)
3168 (info_args_command): Constify.
3169 (backtrace_command): Remove non-const overload.
3170 * source.c (info_source_command, info_line_command): Constify.
3171 * solib.c (info_sharedlibrary_command): Constify.
3172 * skip.c (info_skip_command): Constify.
3173 * ser-go32.c (info_serial_command): Constify.
3174 * reverse.c (info_bookmarks_command): Constify.
3175 * printcmd.c (info_symbol_command, info_address_command)
3176 (info_display_command): Constify.
3177 * osdata.c (info_osdata_command): Constify.
3178 * objc-lang.c (info_selectors_command, info_classes_command):
3179 Constify.
3180 * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
3181 * memattr.c (info_mem_command): Constify.
3182 * macrocmd.c (info_macro_command, info_macros_command): Constify.
3183 * linux-fork.c (info_checkpoints_command): Constify.
3184 * infrun.c (info_signals_command): Constify.
3185 * inflow.c (info_terminal_command): Constify.
3186 * inferior.c (info_inferiors_command): Constify.
3187 (print_inferior): Constify.
3188 * infcmd.c (info_program_command, info_all_registers_command)
3189 (info_registers_command, info_vector_command)
3190 (info_float_command): Constify.
3191 (registers_info): Constify.
3192 * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
3193 (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
3194 Constify.
3195 * f-valprint.c (info_common_command): Constify.
3196 * dcache.c (info_dcache_command): Constify.
3197 (dcache_info_1): Constify.
3198 * darwin-nat-info.c (info_mach_tasks_command)
3199 (info_mach_task_command, info_mach_ports_command)
3200 (info_mach_port_command, info_mach_threads_command)
3201 (info_mach_thread_command, info_mach_regions_command)
3202 (info_mach_regions_recurse_command, info_mach_region_command)
3203 (info_mach_exceptions_command): Constify.
3204 (get_task_from_args): Constify.
3205 * cp-support.c (info_vtbl_command): Constify.
3206 * breakpoint.c (info_watchpoints_command)
3207 (info_tracepoints_command): Constify.
3208 (info_breakpoints_command): Remove non-const overload.
3209 * avr-tdep.c (avr_io_reg_read_command): Constify.
3210 * auxv.c (info_auxv_command): Constify.
3211 * ada-tasks.c (info_tasks_command): Constify.
3212 (info_task): Constify.
3213 * ada-lang.c (info_exceptions_command): Constify.
3214
3215 2017-11-07 Tom Tromey <tom@tromey.com>
3216
3217 * solib.h (no_shared_libraries): Constify.
3218 * frame.h (return_command): Constify.
3219 * cli/cli-cmds.h (quit_command): Constify.
3220 * top.h (quit_command, execute_command): Constify.
3221 * target.h (flash_erase_command): Constify.
3222 * inferior.h (set_inferior_args, attach_command): Constify.
3223 * tracepoint.h (start_tracing, stop_tracing): Constify.
3224 * breakpoint.h (break_command, tbreak_command)
3225 (hbreak_command_wrapper, thbreak_command_wrapper)
3226 (rbreak_command_wrapper, watch_command_wrapper)
3227 (awatch_command_wrapper, rwatch_command_wrapper)
3228 (get_tracepoint_by_number): Constify.
3229 * symtab.c (info_variables_command, rbreak_command)
3230 (symtab_symbol_info): Constify.
3231 (info_variables_command): Add non-const overload.
3232 * top.c (dont_repeat_command): Constify.
3233 * breakpoint.c (ignore_command, commands_command)
3234 (condition_command, tbreak_command, hbreak_command)
3235 (thbreak_command, clear_command, break_command)
3236 (info_breakpoints_command, watch_command, rwatch_command)
3237 (awatch_command, trace_command, ftrace_command, strace_command)
3238 (trace_pass_command, break_range_command, dprintf_command)
3239 (agent_printf_command, get_tracepoint_by_number)
3240 (watch_maybe_just_location, trace_pass_command): Constify.
3241 (info_breakpoints_command): Add non-const overload.
3242 * tracefile.c (tsave_command): Constify.
3243 * infcmd.c (attach_command, disconnect_command, signal_command)
3244 (queue_signal_command, stepi_command, nexti_command)
3245 (finish_command, next_command, step_command, until_command)
3246 (advance_command, jump_command, continue_command, run_command)
3247 (start_command, starti_command, interrupt_command)
3248 (run_command_1, set_inferior_args, step_1): Constify.
3249 * inferior.c (add_inferior_command, remove_inferior_command)
3250 (clone_inferior_command): Constify.
3251 * linux-fork.c (checkpoint_command, restart_command): Constify.
3252 * windows-nat.c (signal_event_command): Constify.
3253 * guile/guile.c (guile_repl_command, guile_command): Constify.
3254 * printcmd.c (x_command, display_command, printf_command)
3255 (output_command, set_command, call_command, print_command)
3256 (eval_command): Constify.
3257 (non_const_set_command): Remove.
3258 (_initialize_printcmd): Update.
3259 * source.c (forward_search_command, reverse_search_command):
3260 Constify.
3261 * jit.c (jit_reader_load_command, jit_reader_unload_command):
3262 Constify.
3263 * infrun.c (handle_command): Constify.
3264 * memattr.c (mem_command): Constify.
3265 * stack.c (return_command, up_command, up_silently_command)
3266 (down_command, down_silently_command, frame_command)
3267 (backtrace_command, func_command, backtrace_command_1): Constify.
3268 (backtrace_command): Add non-const overload.
3269 * remote-sim.c (simulator_command): Constify.
3270 * exec.c (set_section_command): Constify.
3271 * tracepoint.c (tdump_command, trace_variable_command)
3272 (tstatus_command, tstop_command, tstart_command)
3273 (end_actions_pseudocommand, while_stepping_pseudocommand)
3274 (collect_pseudocommand, teval_pseudocommand, actions_command)
3275 (start_tracing, stop_tracing): Constify.
3276 * value.c (init_if_undefined_command): Constify.
3277 * tui/tui-stack.c (tui_update_command): Constify.
3278 * tui/tui-win.c (tui_refresh_all_command)
3279 (tui_set_tab_width_command, tui_set_win_height_command)
3280 (tui_set_focus_command, tui_scroll_forward_command)
3281 (tui_scroll_backward_command, tui_scroll_left_command)
3282 (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
3283 (tui_set_win_height): Constify.
3284 * tui/tui-layout.c (tui_layout_command): Constify.
3285 * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
3286 (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
3287 (proc_untrace_sysexit_cmd): Constify.
3288 * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
3289 (threadset_test_cmd, threadlist_update_test_cmd)
3290 (threadalive_test): Constify.
3291 * objc-lang.c (print_object_command): Constify.
3292 * command.h (add_com): Constify.
3293 * cli/cli-dump.c (restore_command): Constify.
3294 * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
3295 (help_command, complete_command, shell_command, edit_command)
3296 (list_command, disassemble_command, make_command)
3297 (apropos_command, alias_command): Constify.
3298 * cli/cli-script.c (document_command, define_command)
3299 (while_command, if_command, validate_comname): Constify.
3300 * cli/cli-decode.c (struct cmd_list_element): Change type of
3301 "fun".
3302 * target.c (do_monitor_command, flash_erase_command): Constify.
3303 * regcache.c (reg_flush_command): Constify.
3304 * reverse.c (reverse_step, reverse_next, reverse_stepi)
3305 (reverse_nexti, reverse_continue, reverse_finish)
3306 (save_bookmark_command, goto_bookmark_command)
3307 (exec_reverse_once): Constify.
3308 * python/python.c (python_interactive_command, python_command):
3309 Constify.
3310 * typeprint.c (ptype_command, whatis_command, whatis_exp):
3311 Constify.
3312 * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
3313 * gcore.c (gcore_command): Constify.
3314
3315 2017-11-07 Tom Tromey <tom@tromey.com>
3316
3317 * printcmd.c (x_command): Call set_repeat_arguments.
3318 * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
3319 * top.c (repeat_arguments): New global.
3320 (set_repeat_arguments): New function.
3321 (execute_command): Handle repeat_arguments.
3322 (show_commands): Calls set_repeat_arguments.
3323 * command.h (set_repeat_arguments): Declare.
3324
3325 2017-11-07 Tom Tromey <tom@tromey.com>
3326
3327 * stack.c (backtrace_command): Use std::string.
3328 (backtrace_command_1): Make "count_exp" const.
3329
3330 2017-11-07 Tom Tromey <tom@tromey.com>
3331
3332 * source.c (directory_switch, mod_path, add_path): Constify.
3333 * defs.h (add_path, mod_path, directory_switch): Constify.
3334 * mi/mi-cmd-env.c (env_mod_path): Constify.
3335
3336 2017-11-07 Tom Tromey <tom@tromey.com>
3337
3338 * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
3339 (run_command_1, continue_command, step_1, jump_command)
3340 (signal_command, until_command, advance_command, finish_command)
3341 (attach_command): Update.
3342
3343 2017-11-07 Tom Tromey <tom@tromey.com>
3344
3345 * command.h (set_cmd_cfunc): Don't declare.
3346 * cli/cli-decode.c (set_cmd_cfunc): Now static.
3347
3348 2017-11-07 Tom Tromey <tom@tromey.com>
3349
3350 * stack.c (select_frame_command): Constify.
3351 * cli/cli-decode.c (add_com_suppress_notification): Constify.
3352 * command.h (add_com_suppress_notification): Constify.
3353
3354 2017-11-07 Tom Tromey <tom@tromey.com>
3355
3356 * breakpoint.c (stop_command): Constify.
3357 * cli/cli-decode.c (struct cmd_list_element): Constify.
3358 * command.h (add_abbrev_prefix_cmd): Constify.
3359
3360 2017-11-07 Pedro Alves <palves@redhat.com>
3361
3362 * breakpoint.c (extract_bp_kind): New enum.
3363 (extract_bp_num, extract_bp_or_bp_range): New functions, partially
3364 factored out from ...
3365 (extract_bp_number_and_location): ... here.
3366 * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
3367
3368 2017-11-07 Pedro Alves <palves@redhat.com>
3369
3370 * breakpoint.c (extract_bp_number_and_location): Change return
3371 type to void. Throw error instead of warning.
3372 (enable_disable_command): Adjust.
3373
3374 2017-11-07 Xavier Roirand <roirand@adacore.com>
3375 Pedro Alves <palves@redhat.com>
3376
3377 * breakpoint.c (map_breakpoint_number_range): New, factored out
3378 from ...
3379 (map_breakpoint_numbers): ... here.
3380 (find_location_by_number): Change parameters from string to
3381 breakpoint number and location.
3382 (extract_bp_number_and_location): New function.
3383 (enable_disable_bp_num_loc)
3384 (enable_disable_breakpoint_location_range)
3385 (enable_disable_command): New functions, factored out ...
3386 (enable_command, disable_command): ... these functions, and
3387 adjusted to support ranges.
3388 * NEWS: Document enable/disable breakpoint location range feature.
3389
3390 2017-11-06 Luis Machado <luis.machado@linaro.org>
3391
3392 * MAINTAINERS (Write After Approval): Update my e-mail address.
3393
3394 2017-11-06 Pedro Alves <palves@redhat.com>
3395
3396 * gnu-nat.c (gnu_terminal_init): Delete.
3397 (gnu_target): Don't install gnu_terminal_init.
3398 * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
3399 (child_terminal_init): ... this function.
3400
3401 2017-11-06 Pedro Alves <palves@redhat.com>
3402
3403 * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
3404 sgtty.h.
3405 * config.in, configure: Regenerate.
3406
3407 2017-11-06 Pedro Alves <palves@redhat.com>
3408
3409 * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
3410 (async_init_signals): Adjust.
3411 (handle_stop_sig): Rename to ...
3412 (handle_sigtstp): ... this.
3413 (async_stop_sig): Rename to ...
3414 (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
3415 SIGTSTP path.
3416 * event-top.h: Move signal.h include to the top. Check SIGTSTP
3417 instead of STOP_SIGNAL thoughout.
3418 (handle_stop_sig): Rename to ...
3419 (handle_sigtstp): ... this.
3420 * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
3421
3422 2017-11-06 Pedro Alves <palves@redhat.com>
3423
3424 * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
3425 longer set flags twice in row.
3426
3427 2017-11-06 Pedro Alves <palves@redhat.com>
3428
3429 * Makefile.in (SER_HARDWIRE): Update comment.
3430 (HFILES_NO_SRCDIR): Remove gdb_termios.h.
3431 * common/gdb_termios.h: Delete file.
3432 * common/job-control.c: Include termios.h and unistd.h instead of
3433 gdb_termios.h.
3434 (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
3435 check.
3436 (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
3437 Remove sgtty code.
3438 * configure.ac: No longer check for termio.h and sgtty.h.
3439 * configure: Regenerate.
3440 * inflow.c: Include termios.h instead of gdb_termios.h. Replace
3441 PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
3442 Replace PROCESS_GROUP_TYPE references with pid_t references
3443 throughout.
3444 (gdb_getpgrp): Delete.
3445 (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
3446 (child_terminal_inferior): Remove comment. Remove sgtty code.
3447 (child_terminal_ours_1): Use tcgetpgrp directly instead of
3448 gdb_getpgrp. Use serial_set_tty_state instead aof
3449 serial_noflush_set_tty_state. Remove sgtty code.
3450 * inflow.h: Include unistd.h instead of gdb_termios.h. Replace
3451 PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
3452 (inferior_process_group): Now returns pid_t.
3453 * ser-base.c (ser_base_noflush_set_tty_state): Delete.
3454 * ser-base.h (ser_base_noflush_set_tty_state): Delete.
3455 * ser-event.c (serial_event_ops): Update.
3456 * ser-go32.c (dos_noflush_set_tty_state): Delete.
3457 (dos_ops): Update.
3458 * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
3459 * ser-pipe.c (pipe_ops): Update.
3460 * ser-tcp.c (tcp_ops): Update.
3461 * ser-unix.c: Include termios.h instead of gdb_termios.h. Remove
3462 HAVE_TERMIOS checks.
3463 [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
3464 [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
3465 (get_tty_state, set_tty_state): Drop termio and sgtty code, and
3466 assume termios.
3467 (hardwire_noflush_set_tty_state): Delete.
3468 (hardwire_print_tty_state, hardwire_drain_output)
3469 (hardwire_flush_output, hardwire_flush_input)
3470 (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
3471 (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
3472 code, and assume termios.
3473 (hardwire_ops): Update.
3474 (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
3475 * serial.c (serial_noflush_set_tty_state): Delete.
3476 * serial.h (serial_noflush_set_tty_state): Delete.
3477 (serial_ops::noflush_set_tty_state): Delete.
3478
3479 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3480
3481 * Makefile.in (SFILES): Remove doublest.c and dfp.c.
3482 (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
3483 (COMMON_OBS): Remove doublest.o and dfp.o.
3484 Do not build target-float.c (instead of doublest.c)
3485 with -Wformat-nonliteral.
3486
3487 * doublest.c: Remove file.
3488 * doublest.h: Remove file.
3489 * dfp.c: Remove file.
3490 * dfp.h: Remove file.
3491
3492 * target-float.c: Do not include "doublest.h" and "dfp.h".
3493 (DOUBLEST): Move here from doublest.h.
3494 (enum float_kind): Likewise.
3495 (FLOATFORMAT_CHAR_BIT): Likewise.
3496 (FLOATFORMAT_LARGEST_BYTES): Likewise.
3497 (floatformat_totalsize_bytes): Move here from doublest.c. Make static.
3498 (floatformat_precision): Likewise.
3499 (floatformat_normalize_byteorder, get_field, put_field): Likewise.
3500 (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
3501 Likewise.
3502 (host_float_format, host_double_format, host_long_double_format):
3503 Likewise.
3504 (floatformat_to_string, floatformat_from_string): Likewise.
3505 (floatformat_to_doublest): Likewise. Also, inline the original
3506 convert_floatformat_to_doublest.
3507 (floatformat_from_doublest): Likewise. Also, inline the original
3508 convert_floatformat_from_doublest.
3509
3510 Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
3511 (MAX_DECIMAL_STRING): Move here from dfp.c.
3512 (match_endianness): Likewise.
3513 (set_decnumber_context, decimal_check_errors): Likewise.
3514 (decimal_from_number, decimal_to_number): Likewise.
3515 (decimal_to_string, decimal_from_string): Likewise. Make static.
3516 (decimal_from_longest, decimal_from_ulongest): Likewise.
3517 (decimal_to_longest): Likewise.
3518 (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
3519 (decimal_convert): Likewise.
3520
3521 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3522
3523 * doublest.c: Do not include "gdbtypes.h".
3524 (extract_typed_floating): Remove.
3525 (store_typed_floating): Remove.
3526 (convert_typed_floating): Remove.
3527 * doublest.h (struct type): Remove.
3528 (DOUBLEST_PRINT_FORMAT): Remove.
3529 (DOUBLEST_SCAN_FORMAT): Remove.
3530 (extract_typed_floating): Remove.
3531 (store_typed_floating): Remove.
3532 (convert_typed_floating): Remove.
3533
3534 * dfp.c (decimal_from_doublest): Remove.
3535 (decimal_to_doublest): Remove.
3536 * dfp.h: Do not include "doublest.h".
3537 (decimal_from_doublest): Remove.
3538 (decimal_to_doublest): Remove.
3539
3540 * value.c: Do not include "doublest.h" and "dfp.h".
3541 (value_as_double): Remove.
3542 (unpack_double): Remove.
3543 (value_from_double): Remove.
3544 (value_from_decfloat): Remove.
3545 * value.h: Do not include "doublest.h".
3546 (value_as_double): Remove.
3547 (unpack_double): Remove.
3548 (value_from_double): Remove.
3549 (value_from_decfloat): Remove.
3550
3551 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3552
3553 * i386-tdep.c: Include "target-float.h". Do not include "doublest.h".
3554 (i386_extract_return_value): Use target_float_convert.
3555 (i386_store_return_value): Likewise.
3556 * i387-tdep.c (i387_register_to_value): Use target_float_convert.
3557 (i387_value_to_register): Likewise.
3558 * ia64-tdep.c: Include "target-float.h". Do not include "doublest.h".
3559 (ia64_register_to_value): Use target_float_convert.
3560 (ia64_value_to_register): Likewise.
3561 (ia64_extract_return_value): Likewise.
3562 (ia64_store_return_value): Likewise.
3563 (ia64_push_dummy_call): Likewise.
3564 * m68k-tdep.c: Include "target-float.h".
3565 (m68k_register_to_value): Use target_float_convert.
3566 (m68k_value_to_register): Likewise.
3567 (m68k_svr4_extract_return_value): Likewise.
3568 (m68k_svr4_store_return_value): Likewise.
3569 * ppc-sysv-tdep.c: Include "target-float.h".
3570 (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
3571 (do_ppc_sysv_return_value): Likewise.
3572 (ppc64_sysv_abi_push_freg): Likewise.
3573 (ppc64_sysv_abi_return_value_base): Likewise.
3574 * rs6000-aix-tdep.c: Include "target-float.h".
3575 (rs6000_push_dummy_call): Use target_float_convert.
3576 (rs6000_return_value): Likewise.
3577 * rs6000-lynx178-tdep.c: Include "target-float.h".
3578 (rs6000_lynx178_push_dummy_call): Use target_float_convert.
3579 (rs6000_lynx178_return_value): Likewise.
3580 * rs6000-tdep.c: Include "target-float.h". Do not include "doublest.h".
3581 (rs6000_register_to_value): Use target_float_convert.
3582 (rs6000_value_to_register): Likewise.
3583 * arm-tdep.c: Include "target-float.h". Do not include "doublest.h".
3584 (arm_extract_return_value): Use target_float_convert.
3585 (arm_store_return_value): Likewise.
3586 * sh-tdep.c: Include "target-float.h". Do not include "doublest.h".
3587 (sh_register_convert_to_virtual): Use target_float_convert.
3588 (sh_register_convert_to_raw): Likewise.
3589 * sh64-tdep.c: Include "target-float.h".
3590 (sh64_extract_return_value): Use target_float_convert.
3591 (sh64_register_convert_to_virtual): Likewise.
3592 (sh64_register_convert_to_raw): Likewise. Fix argument types.
3593
3594 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3595
3596 * target-float.c (floatformat_to_host_double): New function.
3597 (floatformat_from_host_double): Likewise.
3598 (target_float_to_host_double): Likewise.
3599 (target_float_from_host_double): Likewise.
3600 * target-float.h (target_float_to_host_double): Add prototype.
3601 (target_float_from_host_double): Likewise.
3602
3603 * guile/scm-value.c: Include "target-float.h".
3604 (gdbscm_value_to_real): Use target_float_to_host_double.
3605 Handle integer source values via value_as_long.
3606 * guile/scm-math.c: Include "target-float.h". Do not include
3607 "doublest.h", "dfp.h", and "expression.h".
3608 (vlscm_convert_typed_number): Use target_float_from_host_double.
3609 (vlscm_convert_number): Likewise.
3610
3611 * python/py-value.c (valpy_float): Use target_float_to_host_double.
3612 (convert_value_from_python): Use target_float_from_host_double.
3613
3614 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3615
3616 * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
3617 (cast_from_fixed): Likewise.
3618 (ada_scaling_type): New function.
3619 (ada_delta): Return value instead of DOUBLEST. Perform target
3620 arithmetic instead of host arithmetic.
3621 (scaling_factor): Rename to ...
3622 (ada_scaling_factor) ... this. Make non-static. Return value instead
3623 of DOUBLEST. Perform target arithmetic instead of host arithmetic.
3624 (ada_fixed_to_float): Remove.
3625 (ada_float_to_fixed): Remove.
3626 * ada-lang.h (ada_fixed_to_float): Remove.
3627 (ada_float_to_fixed): Remove.
3628 (ada_delta): Return value instead of DOUBLEST.
3629 (ada_scaling_factor): Add prototype.
3630
3631 * ada-typeprint.c: Include "target-float.h".
3632 (print_fixed_point_type): Perform target arithmetic instead of
3633 host arithmetic.
3634 * ada-valprint.c: Include "target-float.h".
3635 (ada_val_print_num): Perform target arithmetic instead of
3636 host arithmetic for fixed-point types.
3637
3638 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3639
3640 * target-float.c: Include <math.h>.
3641 (floatformat_binop): New function.
3642 (floatformat_compare): Likewise.
3643 (target_float_binop): Likewise.
3644 (target_float_compare): Likewise.
3645 * target-float.h: Include "expression.h".
3646 (target_float_binop): Add prototype.
3647 (target_float_compare): Likewise.
3648
3649 * valarith.c: Do not include "doublest.h" and "dfp.h".
3650 Include "common/byte-vector.h".
3651 (value_args_as_decimal): Remove, replace by ...
3652 (value_args_as_target_float): ... this function. Handle both
3653 binary and decimal target floating-point formats.
3654 (scalar_binop): Handle both binary and decimal FP using
3655 value_args_as_target_float and target_float_binop.
3656 (value_equal): Handle both binary and decimal FP using
3657 value_args_as_target_float and target_float_compare.
3658 (value_less): Likewise.
3659 (value_pos): Handle all scalar types as simple copy.
3660 (value_neg): Handle all scalar types via BINOP_SUB from 0.
3661 * dfp.c (decimal_binop): Throw error instead of internal_error
3662 when called with an unsupported operation code.
3663
3664 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3665
3666 * target-float.c (target_float_to_string): New function.
3667 (target_float_from_string): New function.
3668 * target-float.h (target_float_to_string): Add prototype.
3669 (target_float_from_string): Add prototype.
3670
3671 * valprint.c: Include "target-float.h". Do not include
3672 "doublest.h" and "dfp.h".
3673 (print_floating): Use target_float_to_string.
3674 * printcmd.c: Include "target-float.h". Do not include "dfp.h".
3675 (printf_floating): Use target_float_to_string.
3676 * i387-tdep.c: Include "target-float.h". Do not include "doublest.h".
3677 (print_i387_value): Use target_float_to_string.
3678 * mips-tdep.c: Include "target-float.h".
3679 (mips_print_fp_register): Use target_float_to_string.
3680 * sh64-tdep.c: Include "target-float.h".
3681 (sh64_do_fp_register): Use target_float_to_string.
3682
3683 * parse.c: Include "target-float.h". Do not include
3684 "doublest.h" and "dfp.h".
3685 (parse_float): Use target_float_from_string.
3686 * stabsread.c: Include "target-float.h". Do not include "doublest.h".
3687 (define_symbol): Use target_float_from_string.
3688 * gdbarch-selftests.c: Include "target-float.h".
3689 (register_to_value_test): Use target_float_from_string.
3690
3691 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3692
3693 * Makefile.c (SFILES): Add target-float.c.
3694 (HFILES_NO_SRCDIR): Add target-float.h.
3695 (COMMON_OBS): Add target-float.o.
3696 * target-float.h: New file.
3697 * target-float.c: New file.
3698
3699 * doublest.c (floatformat_classify): Fix detection of float_zero.
3700
3701 * gdbtypes.c (is_floating_type): New function.
3702 * gdbtypes.h (is_floating_type): Add prototype.
3703
3704 * value.c: Do not include "floatformat.h".
3705 (unpack_double): Use target_float_is_valid.
3706 (is_floating_value): New function.
3707 * value.h (is_floating_value): Add prototype-
3708
3709 * valarith.c: Include "target-float.h".
3710 (value_logical_not): Use target_float_is_zero.
3711
3712 * python/py-value.c: Include "target-float.h".
3713 (valpy_nonzero): Use target_float_is_zero.
3714
3715 2017-11-04 Tom Tromey <tom@tromey.com>
3716
3717 * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
3718
3719 2017-11-04 Tom Tromey <tom@tromey.com>
3720
3721 * breakpoint.c (set_momentary_breakpoint): Return
3722 breakpoint_up.
3723 (until_break_command): Update.
3724 (new_until_break_fsm): Change argument types to
3725 breakpoint_up.
3726 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
3727 (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
3728 Remove.
3729 * infcmd.c (finish_forward): Update.
3730 * breakpoint.h (set_momentary_breakpoint)
3731 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
3732 (make_cleanup_delete_breakpoint): Remove.
3733 (struct breakpoint_deleter): New.
3734 (breakpoint_up): New typedef.
3735 * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
3736 (insert_exception_resume_breakpoint): Update.
3737 (insert_exception_resume_from_probe): Update.
3738 (insert_longjmp_resume_breakpoint): Update.
3739 * arm-linux-tdep.c (arm_linux_copy_svc): Update.
3740 * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
3741 * infcall.c (call_function_by_hand_dummy): Update
3742
3743 2017-11-04 Tom Tromey <tom@tromey.com>
3744
3745 * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
3746
3747 2017-11-04 Tom Tromey <tom@tromey.com>
3748
3749 * linux-tdep.c (linux_core_info_proc_mappings): Use
3750 gdb::def_vector.
3751 (linux_get_siginfo_data): Return gdb::byte_vector. Remove
3752 "size" argument.
3753 (linux_corefile_thread): Update.
3754 (linux_make_corefile_notes): Remove unused variable.
3755
3756 2017-11-04 Tom Tromey <tom@tromey.com>
3757
3758 * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
3759 gdb::byte_vector.
3760
3761 2017-11-04 Tom Tromey <tom@tromey.com>
3762
3763 * objfiles.c (do_free_objfile_cleanup): Remove.
3764 * compile/compile-object-load.c (compile_object_load): Update.
3765 * objfiles.h (make_cleanup_free_objfile): Remove.
3766
3767 2017-11-04 Tom Tromey <tom@tromey.com>
3768
3769 * sparc64-tdep.c (do_examine): Use gdb::def_vector.
3770 (adi_read_versions): Change "tags" to "gdb_byte *".
3771 (adi_print_versions): Likewise.
3772
3773 2017-11-04 Tom Tromey <tom@tromey.com>
3774
3775 * breakpoint.c
3776 (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
3777 from start_rbreak_breakpoints.
3778 (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
3779 * breakpoint.h (class scoped_rbreak_breakpoints): New.
3780 (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
3781 * symtab.c (do_end_rbreak_breakpoints): Remove.
3782 (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
3783
3784 2017-11-04 Tom Tromey <tom@tromey.com>
3785
3786 * cp-namespace.c (reset_directive_searched): Remove.
3787 (cp_lookup_symbol_via_imports): Use scoped_restore.
3788 * cp-support.c (reset_directive_searched): Remove.
3789 (make_symbol_overload_list_using): Use scoped_restore.
3790 * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
3791 (reset_directive_searched): Remove.
3792
3793 2017-11-04 Tom Tromey <tom@tromey.com>
3794
3795 * symfile.c (find_separate_debug_file_by_debuglink): Use
3796 unique_xmalloc_ptr.
3797
3798 2017-11-04 Tom Tromey <tom@tromey.com>
3799
3800 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
3801 type of "info".
3802 (compute_stack_depth): Likewise.
3803 (do_compile_dwarf_expr_to_c): Use std::vector.
3804
3805 2017-11-04 Tom Tromey <tom@tromey.com>
3806
3807 * compile/compile-object-load.c (link_callbacks_einfo): Use
3808 std::string.
3809
3810 2017-11-04 Tom Tromey <tom@tromey.com>
3811
3812 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
3813 Use scoped_free_pendings.
3814 * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
3815 scoped_free_pendings.
3816 * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
3817 (xcoff_initial_scan): Likewise.
3818 * buildsym.c (reset_symtab_globals): Update comment.
3819 (scoped_free_pendings): Rename from really_free_pendings.
3820 (prepare_for_building): Update comment.
3821 (buildsym_init): Likewise.
3822 * buildsym.h (class scoped_free_pendings): New class.
3823 (really_free_pendings): Don't declare.
3824
3825 2017-11-03 Ulrich Weigand <uweigand@de.ibm.com>
3826
3827 * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
3828 output when converting a zero value to a special byteorder format.
3829
3830 2017-11-02 Yao Qi <yao.qi@linaro.org>
3831
3832 * frame.c (do_frame_register_read): Remove aspace.
3833 * jit.c (jit_frame_sniffer): Likwise.
3834 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
3835 * regcache.c (regcache::regcache): Pass nullptr.
3836 (regcache_print): Caller updated.
3837 * regcache.h (regcache::regcache): Remove one constructor
3838 parameter aspace.
3839
3840 2017-11-02 Yao Qi <yao.qi@linaro.org>
3841
3842 * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
3843
3844 2017-11-02 Yao Qi <yao.qi@linaro.org>
3845
3846 * breakpoint.c (insert_single_step_breakpoints): Update.
3847 * frame.c (struct frame_info) <aspace>: Add const.
3848 (frame_save_as_regcache): Add const.
3849 (get_frame_address_space): Return const address_space *.
3850 * frame.h (get_frame_address_space): Update declaration.
3851 * infrun.c (struct step_over_info) <aspace>: Add const.
3852 (set_step_over_info): Make aspace const.
3853 (displaced_step_prepare_throw): Change variable const.
3854 (resume): Likewise.
3855 (proceed): Likewise.
3856 (adjust_pc_after_break): Likewise.
3857 (save_waitstatus): Likewise.
3858 (handle_signal_stop): Likewise.
3859 (keep_going_pass_signal): Likewise.
3860 * jit.c (jit_frame_sniffer): Add const.
3861 * mips-tdep.c (mips_single_step_through_delay): Likewise.
3862 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
3863 * record-full.c (record_full_wait_1): Likewise.
3864 * regcache.c (regcache::regcache): Change parameter to const.
3865 * regcache.h (regcache::regcache): Likewise.
3866 (regcache::aspace): Return const address_space *.
3867 (regcache) <m_aspace>: Add const.
3868
3869 2017-11-02 Yao Qi <yao.qi@linaro.org>
3870
3871 * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
3872 * frame.c (create_sentinel_frame): Likewise.
3873 * infrun.c (displaced_step_prepare_throw): Likewise.
3874 (resume): Likewise.
3875 (thread_still_needs_step_over_bp): Likewise.
3876 (proceed): Likewise.
3877 (do_target_wait): Likewise.
3878 (adjust_pc_after_break): Likewise.
3879 (handle_syscall_event): Likewise.
3880 (save_waitstatus): Likewise.
3881 (handle_inferior_event_1): Likewise.
3882 (handle_signal_stop): Likewise.
3883 (keep_going_pass_signal): Likewise.
3884 * linux-nat.c (status_callback): Likewise.
3885 (save_stop_reason): Likewise.
3886 (resume_stopped_resumed_lwps): Likewise.
3887 * record-full.c (record_full_exec_insn): Likewise.
3888 (record_full_wait_1): Likewise.
3889 * regcache.c (get_regcache_aspace): Remove.
3890 * regcache.h (get_regcache_aspace): Remove.
3891
3892 2017-11-02 Yao Qi <yao.qi@linaro.org>
3893
3894 * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
3895 (init_regcache_descr): Use gdbarch_num_regs.
3896 (regcache::regcache): Likewise.
3897 (regcache::get_register_status): Likewise.
3898 (regcache::assert_raw_regnum): Likewise.
3899 (regcache::cooked_read): Likewise.
3900 (regcache::cooked_read_value): Likewise.
3901 (regcache::cooked_write): Likewise.
3902 (regcache::dump): Likewise.
3903 (regcache::num_raw_registers): New method.
3904 * regcache.h (class regcache) <num_raw_registers>: New.
3905
3906 2017-11-02 Yao Qi <yao.qi@linaro.org>
3907
3908 * regcache.c (regcache::assert_regnum): New method.
3909 (regcache::invalidate): Call assert_regnum.
3910 (regcache::raw_update): Likewise.
3911 (regcache::raw_write): Likewise.
3912 (regcache::raw_read_part): Likewise.
3913 (regcache::raw_write_part): Likewise.
3914 (regcache::raw_supply): Likewise.
3915 (regcache::raw_supply_integer): Likewise.
3916 (regcache::raw_supply_zeroed): Likewise.
3917 (regcache::raw_collect): Likewise.
3918 (regcache::raw_collect_integer): Likewise.
3919 * regcache.h (regcache::assert_regnum): Declare.
3920
3921 2017-11-02 Yao Qi <yao.qi@linaro.org>
3922
3923 * regcache.c (regcache::dump): Remove code.
3924
3925 2017-11-02 Yao Qi <yao.qi@linaro.org>
3926
3927 * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
3928 Remove.
3929 <sizeof_cooked_register_status>: Remove.
3930 (init_regcache_descr): Update.
3931 (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
3932 (regcache::save): Likewise.
3933 (regcache::dump): Likewise.
3934
3935 2017-11-01 James Bowman <james.bowman@ftdichip.com>
3936
3937 * ft32-tdep.c (ft32_fetch_instruction): New function.
3938 (ft32_analyze_prologue): Use ft32_fetch_instruction().
3939
3940 2017-10-31 Simon Marchi <simon.marchi@polymtl.ca>
3941
3942 * cli/cli-script.c (execute_control_command): Rename to ...
3943 (execute_control_command_1): ... this.
3944 (execute_control_command): New function.
3945
3946 2017-10-31 Simon Marchi <simon.marchi@ericsson.com>
3947
3948 * tracepoint.c (tfind_command): Remove const_cast.
3949
3950 2017-10-30 Mike Gulick <mgulick@mathworks.com>
3951
3952 * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
3953
3954 2017-10-30 Simon Marchi <simon.marchi@ericsson.com>
3955
3956 * common/common-utils.h (in_inclusive_range): New function.
3957 * arm-tdep.c (arm_record_extension_space): Use
3958 in_inclusive_range.
3959 (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
3960 * cris-tdep.c (cris_spec_reg_applicable): Use
3961 in_inclusive_range.
3962
3963 2017-10-30 Pedro Alves <palves@redhat.com>
3964 Simon Marchi <simon.marchi@ericsson.com>
3965
3966 * remote.c (remote_set_syscall_catchpoint): Build a std::string
3967 instead of a gdb::unique_xmalloc_ptr, using string_appendf.
3968
3969 2017-10-30 Pedro Alves <palves@redhat.com>
3970
3971 * common/common-utils.c (string_appendf, string_vappendf): New
3972 functions.
3973 * common/common-utils.h (string_appendf, string_vappendf): New
3974 declarations.
3975 * unittests/common-utils-selftests.c (string_appendf_func)
3976 (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
3977 (string_vappendf_tests): New functions.
3978 (_initialize_common_utils_selftests): Register "string_appendf" and
3979 "string_vappendf tests".
3980
3981 2017-10-30 Pedro Alves <palves@redhat.com>
3982
3983 * unittests/common-utils-selftests.c (format_func): New typedef.
3984 (string_printf_tests, string_vprintf_tests): Tests factored out
3985 and merged to ...
3986 (test_format_func): ... this new function.
3987 (string_printf_tests, string_vprintf_tests): Reimplement on top of
3988 test_format_func.
3989
3990 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
3991
3992 * darwin-nat.c: Remove include of gdb.h.
3993
3994 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
3995
3996 * xtensa-xtregs.c: Fix formatting issues.
3997
3998 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
3999
4000 * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
4001
4002 2017-10-28 Maksim Dzabraev <dzabraew@gmail.com>
4003
4004 PR python/21213
4005 * python/py-infthread.c (thpy_get_inferior): Increment reference
4006 of inferior before returning it.
4007
4008 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
4009
4010 * unittests/common-utils-selftests.c (format): Add
4011 ATTRIBUTE_PRINTF.
4012
4013 2017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
4014
4015 * xml-syscall.c (struct syscall_desc): Add constructor.
4016 <name>: Change type to std::string.
4017 (syscall_desc_up): New typedef.
4018 (syscall_desc_p): Remove typeder.
4019 (DEF_VEC_P(syscall_desc_p)): Remove.
4020 (struct syscall_group_desc): Add constructor.
4021 <name>: Change type to std::string.
4022 <syscalls>: Change type to std::vector.
4023 (syscall_group_desc_up): New typedef.
4024 (syscall_group_desc_p): Remove typedef.
4025 (DEF_VEC_P(syscall_group_desc_p)): Remove.
4026 (struct syscalls_info) <syscalls>: Change type to std::vector of
4027 unique_ptr.
4028 <groups>: Likewise.
4029 <my_gdb_datadir>: Change type to std::string.
4030 (syscalls_info_up): New typedef.
4031 (allocate_syscalls_info): Remove.
4032 (syscalls_info_free_syscalls_desc): Remove.
4033 (syscalls_info_free_syscall_group_desc): Remove.
4034 (free_syscalls_info): Remove.
4035 (make_cleanup_free_syscalls_info): Remove.
4036 (syscall_group_create_syscall_group_desc): Adjust.
4037 (syscall_group_add_syscall): Adjust.
4038 (syscall_create_syscall_desc): Adjust.
4039 (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
4040 (init_syscalls_info): Adjust.
4041 (syscall_group_get_group_by_name): Adjust.
4042 (xml_get_syscall_number): Adjust.
4043 (xml_get_syscall_name): Adjust.
4044 (xml_list_of_syscalls): Adjust.
4045 (xml_list_syscalls_by_group): Adjust.
4046 (xml_list_of_groups): Adjust.
4047
4048 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
4049
4050 * probe.h: Don't include gdb_vecs.h.
4051 (DEF_VEC_P (probe_p)): Remove.
4052 (find_probes_in_objfile): Return an std::vector.
4053 * probe.c (find_probes_in_objfile): Likewise.
4054 * breakpoint.c (breakpoint_objfile_data)
4055 <longjmp_probes>: Change type to std::vector.
4056 <exception_probes>: Likewise.
4057 (free_breakpoint_probes): Don't manually free vectors.
4058 (create_longjmp_master_breakpoint): Adjust.
4059 (create_exception_master_breakpoint): Adjust.
4060 * solib-svr4.c (svr4_create_probe_breakpoints): Change
4061 parameter type, adjust.
4062 (svr4_create_solib_event_breakpoints): Adjust.
4063
4064 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
4065
4066 * breakpoint.c (breakpoint_objfile_data): Initialize fields.
4067 (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
4068 with new.
4069 (free_breakpoint_probes): Rename to ...
4070 (free_breakpoint_objfile_data): ... this, and call delete on
4071 bp_objfile_data..
4072
4073 2017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
4074
4075 * auto-load.c: Don't include gdb_vecs.h, include algorithm.
4076 (loaded_script_ptr): Remove typedef.
4077 (DEF_VEC_P (loaded_script_ptr)): Remove.
4078 (struct collect_matching_scripts_data): Add constructor.
4079 <scripts_p>: Change type to (pointer to) std::vector.
4080 (collect_matching_scripts_data): Adjust.
4081 (sort_scripts_by_name): Make suitable for std::sort.
4082 (print_scripts): Don't sort vector, adjust to std::vector.
4083 (auto_load_info_scripts): Sort vectors, adjust to std::vector.
4084
4085 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
4086
4087 * symfile.c (filename_language): Make struct, not typedef. Add
4088 constructor.
4089 <ext>: Change type to std::string.
4090 (DEF_VEC_O (filename_language)): Remove.
4091 (filename_language_table): Change type to std::vector.
4092 (add_filename_language): Adjust.
4093 (set_ext_lang_command): Adjust.
4094 (info_ext_lang_command): Adjust.
4095 (deduce_language_from_filename): Adjust.
4096 (class scoped_restore_filename_language_table): Remove.
4097 (test_filename_language): Use scoped_restore.
4098 (test_set_ext_lang_command): Use scoped_restore, adjust to
4099 std::vector change.
4100
4101 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
4102
4103 * symfile.c: Include selftest.h.
4104 (class scoped_restore_filename_language_table): New.
4105 (test_filename_language): New test.
4106 (test_set_ext_lang_command): New test.
4107 (_initialize_symfile): Register tests.
4108
4109 2017-10-27 Keith Seitz <keiths@redhat.com>
4110
4111 * breakpoint.c (print_breakpoint_location): Use the symbol saved
4112 in the bp_location, falling back to find_pc_sect_function when
4113 needed.
4114 (add_location_to_breakpoint): Save sal->symbol.
4115 * breakpoint.h (struct bp_location) <symbol>: New field.
4116 * symtab.c (find_function_start_sal): Save the symbol into the SaL.
4117 * symtab.h (struct symtab_and_line) <symbol>: New field.
4118
4119 2017-10-26 Patrick Frants <osscontribute@gmail.com>
4120
4121 PR gdb/13669
4122 * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
4123 to rewind obstack.
4124
4125 2017-10-26 Pedro Alves <palves@redhat.com>
4126
4127 * remote.c (remote_async_terminal_ours_p): Delete.
4128 (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
4129 Remove references to 'remote_async_terminal_ours_p'.
4130
4131 2017-10-26 Yao Qi <yao.qi@linaro.org>
4132
4133 * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
4134
4135 2017-10-26 Yao Qi <yao.qi@linaro.org>
4136
4137 * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
4138 aspace const.
4139 * break-catch-syscall.c (breakpoint_hit_catch_syscall):
4140 Likewise.
4141 * breakpoint.c (bpstat_check_location): Remove cast.
4142 (breakpoint_hit_catch_fork): Make aspce const.
4143 (breakpoint_hit_catch_solib): Likewise.
4144 (breakpoint_hit_catch_exec): Likewise.
4145 (breakpoint_hit_ranged_breakpoint): Likewise.
4146 (breakpoint_hit_watchpoint): Likewise.
4147 (base_breakpoint_breakpoint_hit): Likewise.
4148 (bkpt_breakpoint_hit): Likewise.
4149 (dprintf_breakpoint_hit): Likewise.
4150 (tracepoint_breakpoint_hit): Likewise.
4151 * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
4152
4153 2017-10-26 Yao Qi <yao.qi@linaro.org>
4154
4155 * breakpoint.c (breakpoint_location_address_match): Change
4156 "struct address_space *" to "const address_space".
4157 (breakpoint_location_address_range_overlap): Likewise.
4158 (breakpoint_here_p): Likewise.
4159 (breakpoint_in_range_p): Likewise.
4160 (moribund_breakpoint_here_p): Likewise.
4161 (bp_location_inserted_here_p): Likewise.
4162 (software_breakpoint_inserted_here_p): Likewise.
4163 (hardware_breakpoint_inserted_here_p): Likewise.
4164 (hardware_watchpoint_inserted_in_range): Likewise.
4165 (bpstat_check_location): Likewise.
4166 (bpstat_stop_status): Likewise.
4167 (breakpoint_address_match): Likewise.
4168 (breakpoint_address_match_range): Likewise.
4169 (breakpoint_location_address_match): Likewise.
4170 (breakpoint_location_address_range_overlap): Likewise.
4171 (insert_single_step_breakpoint): Likewise.
4172 (breakpoint_has_location_inserted_here): Likewise.
4173 (single_step_breakpoint_inserted_here_p): Likewise.
4174 (pc_at_non_inline_function): Likewise.
4175 * breakpoint.h (bpstat_stop_status): Update declaration.
4176 (breakpoint_here_p): Likewise.
4177 (breakpoint_in_range_p): Likewise.
4178 (moribund_breakpoint_here_p): Likewise.
4179 (breakpoint_inserted_here_p): Likewise.
4180 (software_breakpoint_inserted_here_p): Likewise.
4181 (hardware_breakpoint_inserted_here_p): Likewise.
4182 (breakpoint_has_location_inserted_here): Likewise.
4183 (single_step_breakpoint_inserted_here_p): Likewise.
4184 (hardware_watchpoint_inserted_in_range): Likewise.
4185 (breakpoint_address_match): Likewise.
4186 (insert_single_step_breakpoint): Likewise.
4187 (pc_at_non_inline_function): Likewise.
4188 * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
4189 * record.c (record_check_stopped_by_breakpoint): Likewise.
4190 * record.h (record_check_stopped_by_breakpoint): Likewise.
4191 * thread.c (thread_has_single_step_breakpoint_here): Likewise.
4192
4193 2017-10-25 Yao Qi <yao.qi@linaro.org>
4194
4195 * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
4196 regcache->arch () instead get_regcache_arch.
4197 * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
4198 Likewise.
4199 (aarch64_fbsd_store_inferior_registers): Likewise.
4200 * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
4201 (store_gregs_to_thread): Likewise.
4202 (fetch_fpregs_from_thread): Likewise.
4203 (store_fpregs_to_thread): Likewise.
4204 * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
4205 (aarch64_store_return_value): Likewise.
4206 (aarch64_software_single_step): Likewise.
4207 * aix-thread.c (aix_thread_wait): Likewise.
4208 (supply_reg32): Likewise.
4209 (supply_sprs64): Likewise.
4210 (supply_sprs32): Likewise.
4211 (fill_gprs64): Likewise.
4212 (fill_gprs32): Likewise.
4213 (fill_sprs64): Likewise.
4214 (fill_sprs32): Likewise.
4215 (store_regs_user_thread): Likewise.
4216 (store_regs_kernel_thread): Likewise.
4217 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
4218 (alphabsd_store_inferior_registers): Likewise.
4219 * alpha-tdep.c (alpha_extract_return_value): Likewise.
4220 (alpha_store_return_value): Likewise.
4221 (alpha_deal_with_atomic_sequence): Likewise.
4222 (alpha_next_pc): Likewise.
4223 (alpha_software_single_step): Likewise.
4224 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
4225 (amd64bsd_store_inferior_registers): Likewise.
4226 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
4227 Likewise.
4228 (amd64_linux_store_inferior_registers): Likewise.
4229 * amd64-nat.c (amd64_supply_native_gregset): Likewise.
4230 (amd64_collect_native_gregset): Likewise.
4231 * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
4232 (amd64obsd_collect_uthread): Likewise.
4233 * amd64-tdep.c (amd64_supply_fpregset): Likewise.
4234 (amd64_collect_fpregset): Likewise.
4235 (amd64_supply_fxsave): Likewise.
4236 (amd64_supply_xsave): Likewise.
4237 (amd64_collect_fxsave): Likewise.
4238 (amd64_collect_xsave): Likewise.
4239 * arc-tdep.c (arc_write_pc): Likewise.
4240 * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
4241 * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
4242 (arm_fbsd_store_inferior_registers): Likewise.
4243 * arm-linux-nat.c (fetch_vfp_regs): Likewise.
4244 (store_vfp_regs): Likewise.
4245 (arm_linux_fetch_inferior_registers): Likewise.
4246 (arm_linux_store_inferior_registers): Likewise.
4247 * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
4248 (arm_linux_sigreturn_next_pc): Likewise.
4249 (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
4250 * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
4251 (fetch_register): Likewise.
4252 (store_register): Likewise.
4253 * arm-tdep.c (arm_is_thumb): Likewise.
4254 (displaced_in_arm_mode): Likewise.
4255 (bx_write_pc): Likewise.
4256 (arm_get_next_pcs_addr_bits_remove): Likewise.
4257 (arm_software_single_step): Likewise.
4258 (arm_extract_return_value): Likewise.
4259 (arm_store_return_value): Likewise.
4260 (arm_write_pc): Likewise.
4261 * bfin-tdep.c (bfin_extract_return_value): Likewise.
4262 * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
4263 (bsd_uthread_store_registers): Likewise.
4264 * core-regset.c (fetch_core_registers): Likewise.
4265 * corelow.c (get_core_registers): Likewise.
4266 * cris-tdep.c (cris_store_return_value): Likewise.
4267 (cris_extract_return_value): Likewise.
4268 (find_step_target): Likewise.
4269 (find_step_target): Likewise.
4270 (cris_software_single_step): Likewise.
4271 * ctf.c (ctf_fetch_registers): Likewise.
4272 * darwin-nat.c (cancel_breakpoint): Likewise.
4273 * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
4274 * frv-tdep.c (frv_extract_return_value): Likewise.
4275 * ft32-tdep.c (ft32_store_return_value): Likewise.
4276 (ft32_extract_return_value): Likewise.
4277 * go32-nat.c (fetch_register): Likewise.
4278 (go32_fetch_registers): Likewise.
4279 (go32_store_registers): Likewise.
4280 (store_register): Likewise.
4281 * h8300-tdep.c (h8300_extract_return_value): Likewise.
4282 (h8300_store_return_value): Likewise.
4283 * hppa-linux-nat.c (fetch_register): Likewise.
4284 (store_register): Likewise.
4285 (hppa_linux_fetch_inferior_registers): Likewise.
4286 (hppa_linux_store_inferior_registers): Likewise.
4287 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
4288 (i386_darwin_store_inferior_registers): Likewise.
4289 * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
4290 (gnu_store_registers): Likewise.
4291 * i386-linux-nat.c (fetch_register): Likewise.
4292 (store_register): Likewise.
4293 (supply_gregset): Likewise.
4294 (fill_gregset): Likewise.
4295 (i386_linux_fetch_inferior_registers): Likewise.
4296 (i386_linux_store_inferior_registers): Likewise.
4297 (i386_linux_resume): Likewise.
4298 * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
4299 Likewise.
4300 * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
4301 * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
4302 * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
4303 (i386obsd_collect_uthread): Likewise.
4304 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
4305 (i386_supply_gregset): Likewise.
4306 (i386_collect_gregset): Likewise.
4307 (i386_supply_fpregset): Likewise.
4308 (i386_collect_fpregset): Likewise.
4309 (i386_mpx_bd_base): Likewise.
4310 * i386-v4-nat.c (supply_fpregset): Likewise.
4311 (fill_fpregset): Likewise.
4312 * i387-tdep.c (i387_supply_fsave): Likewise.
4313 (i387_collect_fsave): Likewise.
4314 (i387_supply_fxsave): Likewise.
4315 (i387_collect_fxsave): Likewise.
4316 (i387_supply_xsave): Likewise.
4317 (i387_collect_xsave): Likewise.
4318 * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
4319 (ia64_linux_store_registers): Likewise.
4320 * ia64-tdep.c (ia64_access_rse_reg): Likewise.
4321 (ia64_extract_return_value): Likewise.
4322 (ia64_store_return_value): Likewise.
4323 (find_func_descr): Likewise.
4324 * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
4325 * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
4326 (inf_ptrace_store_registers): Likewise.
4327 * infrun.c (use_displaced_stepping): Likewise.
4328 (displaced_step_prepare_throw): Likewise.
4329 (resume): Likewise.
4330 (proceed): Likewise.
4331 (do_target_wait): Likewise.
4332 (adjust_pc_after_break): Likewise.
4333 (handle_inferior_event_1): Likewise.
4334 (handle_signal_stop): Likewise.
4335 (save_infcall_suspend_state): Likewise.
4336 (restore_infcall_suspend_state): Likewise.
4337 * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
4338 * jit.c (jit_frame_prev_register): Likewise.
4339 * linux-nat.c (save_stop_reason): Likewise.
4340 (linux_nat_wait_1): Likewise.
4341 (resume_stopped_resumed_lwps): Likewise.
4342 * linux-record.c (record_linux_sockaddr): Likewise.
4343 (record_linux_msghdr): Likewise.
4344 (record_linux_system_call): Likewise.
4345 * linux-tdep.c (linux_collect_thread_registers): Likewise.
4346 * lm32-tdep.c (lm32_extract_return_value): Likewise.
4347 (lm32_store_return_value): Likewise.
4348 * m32c-tdep.c (m32c_read_flg): Likewise.
4349 (m32c_pseudo_register_read): Likewise.
4350 (m32c_pseudo_register_write): Likewise.
4351 * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
4352 (m32r_linux_collect_gregset): Likewise.
4353 * m32r-tdep.c (m32r_store_return_value): Likewise.
4354 (m32r_extract_return_value): Likewise.
4355 * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
4356 (m68kbsd_collect_fpregset): Likewise.
4357 * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
4358 * m68k-linux-nat.c (fetch_register): Likewise.
4359 (old_fetch_inferior_registers): Likewise.
4360 (old_store_inferior_registers): Likewise.
4361 (store_regs): Likewise.
4362 * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
4363 (m68k_svr4_store_return_value): Likewise.
4364 * m88k-tdep.c (m88k_store_arguments): Likewise.
4365 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
4366 (mi_cmd_data_write_register_values): Likewise.
4367 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
4368 (mips_fbsd_store_inferior_registers): Likewise.
4369 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
4370 (mips_fbsd_supply_gregs): Likewise.
4371 (mips_fbsd_collect_fpregs): Likewise.
4372 (mips_fbsd_collect_gregs): Likewise.
4373 (mips_fbsd_supply_fpregset): Likewise.
4374 (mips_fbsd_collect_fpregset): Likewise.
4375 (mips_fbsd_supply_gregset): Likewise.
4376 (mips_fbsd_collect_gregset): Likewise.
4377 * mips-linux-nat.c (supply_gregset): Likewise.
4378 (fill_gregset): Likewise.
4379 (supply_fpregset): Likewise.
4380 (fill_fpregset): Likewise.
4381 * mips-linux-tdep.c (mips_supply_gregset): Likewise.
4382 (mips_fill_gregset): Likewise.
4383 (mips_supply_fpregset): Likewise.
4384 (mips_fill_fpregset): Likewise.
4385 (mips64_supply_gregset): Likewise.
4386 (micromips_linux_sigframe_validate): Likewise.
4387 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
4388 (mipsnbsd_fetch_inferior_registers): Likewise.
4389 (mipsnbsd_store_inferior_registers): Likewise.
4390 * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
4391 (mipsnbsd_supply_gregset): Likewise.
4392 (mipsnbsd_iterate_over_regset_sections): Likewise.
4393 (mipsnbsd_supply_reg): Likewise.
4394 (mipsnbsd_supply_fpreg): Likewise.
4395 * mips-tdep.c (mips_in_frame_stub): Likewise.
4396 (mips_dummy_id): Likewise.
4397 (is_octeon_bbit_op): Likewise.
4398 (micromips_bc1_pc): Likewise.
4399 (extended_mips16_next_pc): Likewise.
4400 (mips16_next_pc): Likewise.
4401 (deal_with_atomic_sequence): Likewise.
4402 * moxie-tdep.c (moxie_process_readu): Likewise.
4403 * nios2-tdep.c (nios2_get_next_pc): Likewise.
4404 * nto-procfs.c (procfs_store_registers): Likewise.
4405 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
4406 (ppcfbsd_store_inferior_registers): Likewise.
4407 * ppc-linux-nat.c (fetch_vsx_register): Likewise.
4408 (fetch_altivec_register): Likewise.
4409 (get_spe_registers): Likewise.
4410 (fetch_spe_register): Likewise.
4411 (fetch_altivec_registers): Likewise.
4412 (fetch_all_gp_regs): Likewise.
4413 (fetch_all_fp_regs): Likewise.
4414 (store_vsx_register): Likewise.
4415 (store_altivec_register): Likewise.
4416 (set_spe_registers): Likewise.
4417 (store_spe_register): Likewise.
4418 (store_altivec_registers): Likewise.
4419 (store_all_gp_regs): Likewise.
4420 (store_all_fp_regs): Likewise.
4421 * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
4422 (ppc_linux_collect_gregset): Likewise.
4423 (ppc_canonicalize_syscall): Likewise.
4424 (ppc_linux_record_signal): Likewise.
4425 (ppu2spu_prev_register): Likewise.
4426 * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
4427 * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
4428 (ppcobsd_store_registers): Likewise.
4429 * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
4430 Likewise.
4431 (ppc_ravenscar_generic_store_registers): Likewise.
4432 * procfs.c (procfs_fetch_registers): Likewise.
4433 (procfs_store_registers): Likewise.
4434 * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
4435 (ravenscar_store_registers): Likewise.
4436 (ravenscar_prepare_to_store): Likewise.
4437 * record-btrace.c (record_btrace_fetch_registers): Likewise.
4438 * record-full.c (record_full_wait_1): Likewise.
4439 (record_full_registers_change): Likewise.
4440 (record_full_store_registers): Likewise.
4441 (record_full_core_fetch_registers): Likewise.
4442 (record_full_save): Likewise.
4443 (record_full_goto_insn): Likewise.
4444 * regcache.c (regcache_register_size): Likewise.
4445 (get_regcache_arch): Remove.
4446 (regcache_read_pc): Likewise.
4447 * regcache.h (get_regcache_arch): Remove.
4448 * remote-sim.c (gdbsim_fetch_register): Likewise.
4449 (gdbsim_store_register): Likewise.
4450 * remote.c (fetch_register_using_p): Likewise.
4451 (send_g_packet): Likewise.
4452 (remote_prepare_to_store): Likewise.
4453 (store_registers_using_G): Likewise.
4454 * reverse.c (save_bookmark_command): Likewise.
4455 (goto_bookmark_command): Likewise.
4456 * rs6000-aix-tdep.c (branch_dest): Likewise.
4457 * rs6000-nat.c (rs6000_ptrace64): Likewise.
4458 (fetch_register): Likewise.
4459 * rs6000-tdep.c (ppc_supply_reg): Likewise.
4460 (ppc_collect_reg): Likewise.
4461 (ppc_collect_gregset): Likewise.
4462 (ppc_collect_fpregset): Likewise.
4463 (ppc_collect_vsxregset): Likewise.
4464 (ppc_collect_vrregset): Likewise.
4465 (ppc_displaced_step_hw_singlestep): Likewise.
4466 (rs6000_pseudo_register_read): Likewise.
4467 (rs6000_pseudo_register_write): Likewise.
4468 * s390-linux-nat.c (supply_gregset): Likewise.
4469 (fill_gregset): Likewise.
4470 (s390_linux_fetch_inferior_registers): Likewise.
4471 * s390-linux-tdep.c (s390_write_pc): Likewise.
4472 (s390_software_single_step): Likewise.
4473 (s390_all_but_pc_registers_record): Likewise.
4474 (s390_linux_syscall_record): Likewise.
4475 * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
4476 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
4477 (shnbsd_store_inferior_registers): Likewise.
4478 * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
4479 (sh_extract_return_value_fpu): Likewise.
4480 (sh_store_return_value_nofpu): Likewise.
4481 (sh_corefile_supply_regset): Likewise.
4482 (sh_corefile_collect_regset): Likewise.
4483 * sh64-tdep.c (sh64_extract_return_value): Likewise.
4484 (sh64_store_return_value): Likewise.
4485 * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
4486 * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
4487 (sparc_store_inferior_registers): Likewise.
4488 * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
4489 (sparc_ravenscar_prepare_to_store): Likewise.
4490 * sparc-tdep.c (sparc32_store_arguments): Likewise.
4491 (sparc_analyze_control_transfer): Likewise.
4492 (sparc_step_trap): Likewise.
4493 (sparc_software_single_step): Likewise.
4494 (sparc32_gdbarch_init): Likewise.
4495 (sparc_supply_rwindow): Likewise.
4496 (sparc_collect_rwindow): Likewise.
4497 * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
4498 * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
4499 (sparc64nbsd_collect_gregset): Likewise.
4500 (sparc64nbsd_supply_fpregset): Likewise.
4501 (sparc64nbsd_collect_fpregset): Likewise.
4502 * sparc64-tdep.c (sparc64_store_arguments): Likewise.
4503 (sparc64_supply_gregset): Likewise.
4504 (sparc64_collect_gregset): Likewise.
4505 (sparc64_supply_fpregset): Likewise.
4506 (sparc64_collect_fpregset): Likewise.
4507 * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
4508 * spu-tdep.c (spu_unwind_sp): Likewise.
4509 (spu2ppu_prev_register): Likewise.
4510 (spu_memory_remove_breakpoint): Likewise.
4511 * stack.c (return_command): Likewise.
4512 * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
4513 * tracefile-tfile.c (tfile_fetch_registers): Likewise.
4514 * tracefile.c (trace_save_ctf): Likewise.
4515 * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
4516 (do_windows_store_inferior_registers): Likewise.
4517 (windows_resume): Likewise.
4518 * xtensa-linux-nat.c (fill_gregset): Likewise.
4519 (supply_gregset_reg): Likewise.
4520 * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
4521 (xtensa_register_read_masked): Likewise.
4522 (xtensa_supply_gregset): Likewise.
4523 (xtensa_extract_return_value): Likewise.
4524 (xtensa_store_return_value): Likewise.
4525
4526 2017-10-25 Ulrich Weigand <uweigand@de.ibm.com>
4527
4528 * doublest.c (floatformat_from_string): New function.
4529 * doublest.h (floatformat_from_string): Add prototype.
4530
4531 * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
4532 (OP_FLOAT): ... this.
4533 * expression.h: Do not include "doublest.h".
4534 (union exp_element): Replace doubleconst and decfloatconst by
4535 new element floatconst.
4536 * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
4537 (ada_evaluate_subexp): Likewise.
4538 * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
4539 OP_DOUBLE and OP_DECFLOAT.
4540 * expprint.c (print_subexp_standard): Likewise.
4541 (dump_subexp_body_standard): Likewise.
4542 * breakpoint.c (watchpoint_exp_is_const): Likewise.
4543
4544 * parse.c: Include "dfp.h".
4545 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
4546 (write_exp_elt_floatcst): New function.
4547 (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
4548 and OP_DECFLOAT.
4549 (operator_check_standard): Likewise.
4550 (parse_float): Do not accept suffix. Take type as input. Return bool.
4551 Return target format buffer instead of host DOUBLEST.
4552 Use floatformat_from_string and decimal_from_string to parse
4553 either binary or decimal floating-point types.
4554 (parse_c_float): Remove.
4555 * parser-defs.h: Do not include "doublest.h".
4556 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
4557 (write_exp_elt_floatcst): Add prototype.
4558 (parse_float): Update prototype.
4559 (parse_c_float): Remove.
4560
4561 * c-exp.y: Do not include "dfp.h".
4562 (typed_val_float): Use byte buffer instead of DOUBLEST.
4563 (typed_val_decfloat): Remove.
4564 (DECFLOAT): Remove.
4565 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4566 (parse_number): Update to new parse_float interface.
4567 Parse suffixes and determine type before calling parse_float.
4568 Handle decimal and binary FP types the same way.
4569
4570 * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
4571 (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
4572 (parse_number): Update to new parse_float interface.
4573 Parse suffixes and determine type before calling parse_float.
4574
4575 * f-exp.y: Replace dval by typed_val_float.
4576 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4577 (parse_number): Use parse_float instead of atof.
4578
4579 * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
4580 (parse_go_float): Remove.
4581 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4582 (parse_number): Call parse_float instead of parse_go_float.
4583 Parse suffixes and determine type before calling parse_float.
4584
4585 * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
4586 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4587 (parse_number): Update to new parse_float interface.
4588 Parse suffixes and determine type before calling parse_float.
4589
4590 * m2-exp.y: Replace dval by byte buffer val.
4591 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4592 (parse_number): Call parse_float instead of atof.
4593
4594 * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
4595 (lex_number): Call parse_float instead of strtod.
4596 (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
4597 (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
4598 Use write_exp_elt_floatcst.
4599 (unit_testing): Remove static variable.
4600 (rust_type): Do not check unit_testing.
4601 (rust_lex_tests): Do not set uint_testing. Set up dummy rust_parser.
4602
4603 * ada-exp.y (type_float, type_double): Remove.
4604 (typed_val_float): Use byte buffer instead of DOUBLEST.
4605 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4606 * ada-lex.l (processReal): Use parse_float instead of sscanf.
4607
4608 2017-10-25 Alan Hayward <alan.hayward@arm.com>
4609
4610 * aarch64-tdep.h (enum aarch64_regnum): Remove.
4611 * arch/aarch64.h: New file.
4612
4613 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
4614
4615 * dfp.h (decimal_from_string): Use const reference for argument.
4616 * dfp.c (decimal_from_string): Likewise.
4617
4618 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
4619
4620 * i387-tdep.c (print_i387_value): Use floatformat_to_string.
4621 * sh64-tdep.c (sh64_do_fp_register): Likewise.
4622 * mips-tdep.c (mips_print_fp_register): Likewise.
4623
4624 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
4625
4626 * common/format.h (enum argclass): Replace decfloat_arg by
4627 dec32float_arg, dec64float_arg, and dec128float_arg.
4628 * common/format.c (parse_format_string): Update to return
4629 new decimal float argument classes.
4630
4631 * printcmd.c (printf_decfloat): Rename to ...
4632 (printf_floating): ... this. Add argclass argument, and use it
4633 instead of parsing the format string again. Add support for
4634 binary floating-point values, using floatformat_to_string.
4635 Convert value to the target format if it doesn't already match.
4636 (ui_printf): Call printf_floating instead of printf_decfloat,
4637 also for double_arg / long_double_arg. Pass argclass.
4638
4639 * dfp.c (decimal_to_string): Add format string argument.
4640 * dfp.h (decimal_to_string): Likewise.
4641
4642 * doublest.c (floatformat_to_string): Add format string argument.
4643 * doublest.h (floatformat_to_string): Likewise.
4644
4645 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
4646
4647 * doublest.c (floatformat_precision): New routine.
4648 (floatformat_to_string): Likewise.
4649 * doublest.c (floatformat_to_string): Add prototype.
4650
4651 * printcmd.c (print_scalar_formatted): Only call print_floating
4652 on floating-point types.
4653 * valprint.c: Do not include "floatformat.h".
4654 (generic_val_print_decfloat): Remove.
4655 (generic_val_print): Call generic_val_print_float for both
4656 TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
4657 (print_floating): Use floatformat_to_string. Handle decimal float.
4658 (print_decimal_floating): Remove, merge into floatformat_to_string.
4659 * value.h (print_decimal_floating): Remove.
4660
4661 * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
4662
4663 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
4664
4665 * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
4666
4667 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
4668
4669 * memattr.h: Don't include vec.h.
4670 (struct mem_attrib): Initialize fields.
4671 <unknown>: New static method.
4672 (struct mem_region): Add constructors, operator<, initialize
4673 fields.
4674 * memattr.c: Include algorithm.
4675 (default_mem_attrib, unknown_mem_attrib): Remove.
4676 (user_mem_region_list): New global.
4677 (target_mem_region_list, mem_region_list): Change type to
4678 std::vector<mem_region>.
4679 (mem_use_target): Now a function.
4680 (target_mem_regions_valid): Change type to bool.
4681 (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
4682 (require_user_regions): Adjust.
4683 (require_target_regions): Adjust.
4684 (create_mem_region): Adjust.
4685 (lookup_mem_region): Adjust.
4686 (invalidate_target_mem_regions): Adjust.
4687 (mem_clear): Rename to...
4688 (user_mem_clear): ... this, and adjust.
4689 (mem_command): Adjust.
4690 (info_mem_command): Adjust.
4691 (mem_enable, enable_mem_command, mem_disable,
4692 disable_mem_command): Adjust.
4693 (mem_delete): Adjust.
4694 (delete_mem_command): Adjust.
4695 * memory-map.h (parse_memory_map): Return an std::vector.
4696 * memory-map.c (parse_memory_map): Likewise.
4697 (struct memory_map_parsing_data): Add constructor.
4698 <memory_map>: Point to std::vector.
4699 (memory_map_start_memory): Adjust.
4700 (memory_map_end_memory): Adjust.
4701 (memory_map_end_property): Adjust.
4702 (clear_result): Remove.
4703 * remote.c (remote_memory_map): Return an std::vector.
4704 * target-debug.h (target_debug_print_VEC_mem_region_s__p):
4705 Remove.
4706 (target_debug_print_mem_region_vector): New.
4707 * target-delegates.c: Regenerate.
4708 * target.h (mem_region_vector): New typedef.
4709 (to_memory_map): Return mem_region_vector.
4710 (target_memory_map): Return an std::vector.
4711 * target.c (target_memory_map): Return an std::vector.
4712 (flash_erase_command): Adjust.
4713
4714 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
4715
4716 * memory-map.c (struct memory_map_parsing_data) <property_name>:
4717 Change type to std::string.
4718 (memory_map_start_property): Adjust.
4719 (memory_map_end_property): Adjust.
4720
4721 2017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
4722
4723 * infrun.h: Include common/byte-vector.h.
4724 (struct displaced_step_closure): New struct.
4725 (struct buf_displaced_step_closure): New struct.
4726 * infrun.c (displaced_step_closure::~displaced_step_closure):
4727 Provide default implementation.
4728 (displaced_step_clear): Deallocate step closure with delete.
4729 * aarch64-tdep.c (displaced_step_closure): Rename to ...
4730 (aarch64_displaced_step_closure): ... this, extend
4731 displaced_step_closure.
4732 (aarch64_displaced_step_data) <dsc>: Change type to
4733 aarch64_displaced_step_closure.
4734 (aarch64_displaced_step_copy_insn): Adjust to type change, use
4735 unique_ptr.
4736 (aarch64_displaced_step_fixup): Add cast for displaced step
4737 closure.
4738 * amd64-tdep.c (displaced_step_closure): Rename to ...
4739 (amd64_displaced_step_closure): ... this, extend
4740 displaced_step_closure.
4741 <insn_buf>: Change type to std::vector<gdb_byte>.
4742 <max_len>: Remove.
4743 (fixup_riprel): Change type of DSC parameter, adjust to type
4744 change of insn_buf.
4745 (fixup_displaced_copy): Change type of DSC parameter.
4746 (amd64_displaced_step_copy_insn): Instantiate
4747 amd64_displaced_step_closure.
4748 (amd64_displaced_step_fixup): Add cast for closure type, adjust
4749 to type change of insn_buf.
4750 * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
4751 parameter DSC.
4752 (arm_linux_copy_svc): Likewise.
4753 (cleanup_kernel_helper_return): Likewise.
4754 (arm_catch_kernel_helper_return): Likewise.
4755 (arm_linux_displaced_step_copy_insn): Instantiate
4756 arm_displaced_step_closure.
4757 * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
4758 (displaced_read_reg): Change type of parameter DSC.
4759 (branch_write_pc): Likewise.
4760 (load_write_pc): Likewise.
4761 (alu_write_pc): Likewise.
4762 (displaced_write_reg): Likewise.
4763 (arm_copy_unmodified): Likewise.
4764 (thumb_copy_unmodified_32bit): Likewise.
4765 (thumb_copy_unmodified_16bit): Likewise.
4766 (cleanup_preload): Likewise.
4767 (install_preload): Likewise.
4768 (arm_copy_preload): Likewise.
4769 (thumb2_copy_preload): Likewise.
4770 (install_preload_reg): Likewise.
4771 (arm_copy_preload_reg): Likewise.
4772 (cleanup_copro_load_store): Likewise.
4773 (install_copro_load_store): Likewise.
4774 (arm_copy_copro_load_store) Likewise.
4775 (thumb2_copy_copro_load_store): Likewise.
4776 (cleanup_branch): Likewise.
4777 (install_b_bl_blx): Likewise.
4778 (arm_copy_b_bl_blx): Likewise.
4779 (thumb2_copy_b_bl_blx): Likewise.
4780 (thumb_copy_b): Likewise.
4781 (install_bx_blx_reg): Likewise.
4782 (arm_copy_bx_blx_reg): Likewise.
4783 (thumb_copy_bx_blx_reg): Likewise.
4784 (cleanup_alu_imm): Likewise.
4785 (arm_copy_alu_imm): Likewise.
4786 (thumb2_copy_alu_imm): Likewise.
4787 (cleanup_alu_reg): Likewise.
4788 (install_alu_reg): Likewise.
4789 (arm_copy_alu_reg): Likewise.
4790 (thumb_copy_alu_reg): Likewise.
4791 (cleanup_alu_shifted_reg): Likewise.
4792 (install_alu_shifted_reg): Likewise.
4793 (arm_copy_alu_shifted_reg): Likewise.
4794 (cleanup_load): Likewise.
4795 (cleanup_store): Likewise.
4796 (arm_copy_extra_ld_st): Likewise.
4797 (install_load_store): Likewise.
4798 (thumb2_copy_load_literal): Likewise.
4799 (thumb2_copy_load_reg_imm): Likewise.
4800 (arm_copy_ldr_str_ldrb_strb): Likewise.
4801 (cleanup_block_load_all): Likewise.
4802 (cleanup_block_store_pc): Likewise.
4803 (cleanup_block_load_pc): Likewise.
4804 (arm_copy_block_xfer): Likewise.
4805 (thumb2_copy_block_xfer): Likewise.
4806 (cleanup_svc): Likewise.
4807 (install_svc): Likewise.
4808 (arm_copy_svc): Likewise.
4809 (thumb_copy_svc): Likewise.
4810 (arm_copy_undef): Likewise.
4811 (thumb_32bit_copy_undef): Likewise.
4812 (arm_copy_unpred): Likewise.
4813 (arm_decode_misc_memhint_neon): Likewise.
4814 (arm_decode_unconditional): Likewise.
4815 (arm_decode_miscellaneous): Likewise.
4816 (arm_decode_dp_misc): Likewise.
4817 (arm_decode_ld_st_word_ubyte): Likewise.
4818 (arm_decode_media): Likewise.
4819 (arm_decode_b_bl_ldmstm): Likewise.
4820 (arm_decode_ext_reg_ld_st): Likewise.
4821 (thumb2_decode_dp_shift_reg): Likewise.
4822 (thumb2_decode_ext_reg_ld_st): Likewise.
4823 (arm_decode_svc_copro): Likewise.
4824 (thumb2_decode_svc_copro): Likewise.
4825 (install_pc_relative): Likewise.
4826 (thumb_copy_pc_relative_16bit): Likewise.
4827 (thumb_decode_pc_relative_16bit): Likewise.
4828 (thumb_copy_pc_relative_32bit): Likewise.
4829 (thumb_copy_16bit_ldr_literal): Likewise.
4830 (thumb_copy_cbnz_cbz): Likewise.
4831 (thumb2_copy_table_branch): Likewise.
4832 (cleanup_pop_pc_16bit_all): Likewise.
4833 (thumb_copy_pop_pc_16bit): Likewise.
4834 (thumb_process_displaced_16bit_insn): Likewise.
4835 (decode_thumb_32bit_ld_mem_hints): Likewise.
4836 (thumb_process_displaced_32bit_insn): Likewise.
4837 (thumb_process_displaced_insn): Likewise.
4838 (arm_process_displaced_insn): Likewise.
4839 (arm_displaced_init_closure): Likewise.
4840 (arm_displaced_step_fixup): Add cast for closure.
4841 * arm-tdep.h: Include infrun.h.
4842 (displaced_step_closure): Rename to ...
4843 (arm_displaced_step_closure): ... this, extend
4844 displaced_step_closure.
4845 <u::svc::copy_svc_os>: Change type of parameter DSC.
4846 <cleanup>: Likewise.
4847 (arm_process_displaced_insn): Likewise.
4848 (arm_displaced_init_closure): Likewise.
4849 (displaced_read_reg): Likewise.
4850 (displaced_write_reg): Likewise.
4851 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
4852 Adjust.
4853 * i386-tdep.h: Include infrun.h.
4854 (i386_displaced_step_closure): New typedef.
4855 * i386-tdep.c (i386_displaced_step_copy_insn): Use
4856 i386_displaced_step_closure.
4857 (i386_displaced_step_fixup): Adjust.
4858 * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
4859 (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
4860 and unique_ptr.
4861 (ppc_displaced_step_fixup): Adjust.
4862 * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
4863 (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
4864 and unique_ptr.
4865 (s390_displaced_step_fixup): Adjust.
4866
4867 2017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
4868
4869 * interps.h (interp_resume, interp_suspend, interp_set_temp):
4870 Remove declarations.
4871
4872 2017-10-20 Tom Tromey <tom@tromey.com>
4873
4874 * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
4875 std::vector.
4876 (gdb_bfd_record_inclusion): Update.
4877 (bfdp): Remove typedef.
4878
4879 2017-10-20 Tom Tromey <tom@tromey.com>
4880
4881 * gdb_bfd.c (gdb_bfd_ref): Use new.
4882 (struct gdb_bfd_data): Add constructor, destructor, and member
4883 initializers.
4884 (gdb_bfd_unref): Use delete.
4885
4886 2017-10-20 Tom Tromey <tom@tromey.com>
4887
4888 * exec.c (exec_file_attach): Use new_bfd_ref.
4889 * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
4890 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
4891 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
4892 new_bfd_ref.
4893 * gdb_bfd.h (new_bfd_ref): New function.
4894
4895 2017-10-20 Pedro Alves <palves@redhat.com>
4896
4897 * main.c (captured_command_loop): Add attribute noinline.
4898
4899 2017-10-19 Simon Marchi <simon.marchi@ericsson.com>
4900
4901 * interps.c (struct interp_factory): Add constructor.
4902 (interp_factory_p): Remove typedef.
4903 (DEF_VEC_P(interp_factory_p)): Remove.
4904 (interpreter_factories): Change type to std::vector.
4905 (interp_factory_register): Adjust.
4906 (interp_lookup): Adjust.
4907 (interpreter_completer): Adjust.
4908
4909 2017-10-19 Tom Tromey <tom@tromey.com>
4910
4911 * break-catch-syscall.c (catch_syscall_completer): Use
4912 std::string, gdb::unique_xmalloc_ptr.
4913
4914 2017-10-19 Tom Tromey <tom@tromey.com>
4915
4916 * infcall.c (call_function_by_hand_dummy): Use std::string.
4917
4918 2017-10-19 Tom Tromey <tom@tromey.com>
4919
4920 * mi/mi-main.c (mi_cmd_execute): Update.
4921 * top.h (prepare_execute_command): Return scoped_value_mark.
4922 * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
4923 Add move constructor.
4924 * top.c (prepare_execute_command): Return scoped_value_mark.
4925 (execute_command): Update.
4926
4927 2017-10-19 Pedro Alves <palves@redhat.com>
4928
4929 * xml-support.c (xml_fetch_content_from_file): Check fread's
4930 return.
4931
4932 2017-10-19 Pedro Alves <palves@redhat.com>
4933
4934 * ser-base.c (ser_base_read_error_fd): Delete the file handler if
4935 async.
4936 (handle_error_fd): New function.
4937 (ser_base_async): Add/delete an event loop file handler for
4938 error_fd.
4939
4940 2017-10-19 Pedro Alves <palves@redhat.com>
4941
4942 * xml-support.c (xml_fetch_content_from_file): Don't read in
4943 chunks. Instead use fseek to determine the file's size, and read
4944 it in one go.
4945
4946 2017-11-18 Keith Seitz <keiths@redhat.com>
4947
4948 * c-exp.y (oper): Canonicalize conversion operators of user-defined
4949 types.
4950 Add whitespace to front of type name.
4951
4952 2017-10-18 Keith Seitz <keiths@redhat.com>
4953
4954 * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
4955 DW_AT_accessibility.
4956
4957 2017-10-18 Yao Qi <yao.qi@linaro.org>
4958
4959 * features/tic6x-c62x-linux.c: Remove.
4960
4961 2017-10-17 Tom Tromey <tom@tromey.com>
4962
4963 * disasm.c (do_mixed_source_and_assembly_deprecated): Use
4964 gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
4965 (do_mixed_source_and_assembly): Likewise.
4966
4967 2017-10-17 Tom Tromey <tom@tromey.com>
4968
4969 * regcache.c (regcache::xfer_part): Remove assertion.
4970
4971 2017-10-17 Pedro Alves <palves@redhat.com>
4972
4973 * xml-support.c (xml_fetch_content_from_file): Call
4974 unique_ptr::release() instead unique_ptr::get() when passing
4975 through xrealloc.
4976
4977 2017-10-17 Yao Qi <yao.qi@linaro.org>
4978
4979 * regcache.c (regcache::xfer_part): Remove parameters read and
4980 write, add parameter is_raw. All callers are updated.
4981
4982 2017-10-16 Keith Seitz <keiths@redhat.com>
4983
4984 * c-typeprint.c (enum access_specifier): Moved here from
4985 c_type_print_base.
4986 (output_access_specifier): New function.
4987 (c_type_print_base): Consider typedefs when assessing
4988 whether access labels are needed.
4989 Use output_access_specifier as needed.
4990 Output access specifier for typedefs, if needed.
4991 * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
4992 * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
4993 fields.
4994 (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
4995 accessor macros.
4996
4997 2017-10-16 Tom Tromey <tom@tromey.com>
4998
4999 * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
5000 (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
5001 * target.c (target_fileio_read_stralloc): Update.
5002 * sparc64-tdep.c (adi_is_addr_mapped): Update.
5003 * target.h (target_fileio_read_stralloc): Return
5004 unique_xmalloc_ptr.
5005
5006 2017-10-16 Tom Tromey <tom@tromey.com>
5007
5008 * xml-syscall.c (xml_init_syscalls_info): Update.
5009 * xml-support.c (xinclude_start_include): Update.
5010 (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
5011 * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
5012 (xml_fetch_content_from_file): Likewise.
5013 * osdata.c (get_osdata): Update.
5014 * target.h (target_read_stralloc, target_get_osdata): Return
5015 unique_xmalloc_ptr.
5016 * solib-aix.c (solib_aix_get_library_list): Update.
5017 * solib-target.c (solib_target_current_sos): Update.
5018 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
5019 * xml-tdesc.c (fetch_available_features_from_target): Update.
5020 (target_fetch_description_xml): Update.
5021 (file_read_description_xml): Update.
5022 * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
5023 (remote_traceframe_info, btrace_read_config, remote_read_btrace)
5024 (remote_pid_to_exec_file): Update.
5025 * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
5026 (target_get_osdata): Likewise.
5027
5028 2017-10-16 Tom Tromey <tom@tromey.com>
5029
5030 * remote.c (remote_register_number_and_offset): Use std::vector.
5031 (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
5032 (putpkt_binary): Use gdb::def_vector.
5033 (compare_sections_command): Use gdb::byte_vector.
5034
5035 2017-10-16 Tom Tromey <tom@tromey.com>
5036
5037 * ppc-linux-nat.c (hwdebug_insert_point): Use
5038 gdb::unique_xmalloc_ptr, XDUP.
5039
5040 2017-10-16 Tom Tromey <tom@tromey.com>
5041
5042 * probe.c (parse_probes): Use std::string.
5043 (info_probes_for_ops, enable_probes_command)
5044 (disable_probes_command): Remove cleanups.
5045
5046 2017-10-16 Tom Tromey <tom@tromey.com>
5047
5048 * buildsym.c (block_compar): Remove.
5049 (end_symtab_get_static_block): Use std::vector.
5050
5051 2017-10-16 Simon Marchi <simon.marchi@ericsson.com>
5052
5053 * memrange.h (struct mem_range): Define operator< and operator==.
5054 (mem_range_s): Remove.
5055 (DEF_VEC_O (mem_range_s)): Remove.
5056 (normalize_mem_ranges): Change parameter type to std::vector.
5057 * memrange.c (compare_mem_ranges): Remove.
5058 (normalize_mem_ranges): Change parameter type to std::vector,
5059 adjust to vector change.
5060 * exec.c (section_table_available_memory): Return vector, remove
5061 parameter.
5062 (section_table_read_available_memory): Adjust to std::vector
5063 change.
5064 * remote.c (remote_read_bytes): Adjust to std::vector
5065 change.
5066 * tracepoint.h (traceframe_available_memory): Change parameter
5067 type to std::vector.
5068 * tracepoint.c (traceframe_available_memory): Change parameter
5069 type to std::vector, adjust.
5070 * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
5071 std::vector change.
5072 * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5073 unittests/memrange-selftests.c.
5074 (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
5075 * gdb/unittests/memrange-selftests.c: New file.
5076
5077 2017-10-16 Pedro Alves <palves@redhat.com>
5078
5079 * elfread.c (probe_key_free): Rename range-for variable.
5080 * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
5081 (find_probe_by_pc, collect_probes): Rename range-for variable.
5082
5083 2017-10-16 Yao Qi <yao.qi@linaro.org>
5084
5085 * features/Makefile (XMLTOC): Remove tic6x-*.xml.
5086 * features/tic6x-c62x.c: Remove.
5087 * features/tic6x-c64x-linux.c: Remove.
5088 * features/tic6x-c64x.c: Remove.
5089 * features/tic6x-c64xp-linux.c: Remove.
5090 * features/tic6x-c64xp.c: Remove.
5091 * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
5092 initialize_tdesc_tic6x_*_linux functions.
5093 * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
5094 initialize_tdesc_tic6x_* functions.
5095
5096 2017-10-16 Yao Qi <yao.qi@linaro.org>
5097
5098 * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
5099 tic6x-c62x.
5100 * regformats/tic6x-c62x.dat: Remove.
5101 * regformats/tic6x-c64x.dat: Remove.
5102 * regformats/tic6x-c64xp.dat: Remove.
5103
5104 2017-10-15 Simon Marchi <simon.marchi@ericsson.com>
5105
5106 * tracepoint.c (parse_traceframe_info): Return a unique_ptr
5107 (the !HAVE_LIBEXPAT version).
5108
5109 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
5110
5111 * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
5112 const.
5113
5114 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
5115
5116 * target.h: Include tracepoint.h.
5117 (enum trace_find_type): Move to tracepoint.h.
5118 (struct target_ops) <to_traceframe_info>: Return a unique ptr.
5119 * tracepoint.h: Don't include target.h
5120 (enum trace_find_type): Move from target.h.
5121 (parse_traceframe_info): Return a unique ptr.
5122 * tracepoint.c (current_traceframe_info): Change type to unique
5123 ptr.
5124 (free_traceframe_info): Remove.
5125 (clear_traceframe_info): Don't manually free
5126 current_traceframe_info.
5127 (free_result): Remove.
5128 (parse_traceframe_info): Return a unique ptr.
5129 (get_traceframe_info): Adjust to unique ptr.
5130 * ctf.c (ctf_traceframe_info): Return a unique ptr.
5131 * remote.c (remote_traceframe_info): Return a unique ptr.
5132 * tracefile-tfile.c (tfile_traceframe_info): Return a unique
5133 ptr.
5134 * target-debug.h (target_debug_print_traceframe_info_up): New
5135 macro.
5136 * target-delegates.c: Regenerate.
5137
5138 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
5139
5140 * memrange.h (struct mem_range): Add constructors.
5141 * tracepoint.h (struct traceframe_info) <memory>: Change type to
5142 std::vector<mem_range>.
5143 * tracepoint.c (free_traceframe_info): Don't manually free
5144 vector.
5145 (traceframe_info_start_memory): Adjust to vector change.
5146 (traceframe_available_memory): Likewise.
5147 * tracefile-tfile.c (build_traceframe_info): Likewise.
5148 * ctf.c (ctf_traceframe_info): Likewise.
5149
5150 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
5151
5152 * tracepoint.h (struct traceframe_info) <tvars>: Change type to
5153 std::vector<int>.
5154 * tracepoint.c (free_traceframe_info): Deallocate with delete.
5155 (traceframe_info_start_tvar): Adjust to vector change.
5156 (parse_traceframe_info): Allocate with new.
5157 * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
5158 vector change.
5159 * tracefile-tfile.c (build_traceframe_info): Adjust to vector
5160 change.
5161 tfile_traceframe_info): Allocate with new.
5162 * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
5163 change.
5164
5165 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
5166
5167 * tracepoint.c (traceframe_info): Rename to...
5168 (current_traceframe_info): ...this.
5169 (clear_traceframe_info): Adjust.
5170 (get_traceframe_info): Adjust.
5171
5172 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
5173
5174 * nat/linux-osdata.c: Include algorithm.
5175 (compare_processes): Remove.
5176 (struct pid_pgid_entry): New struct.
5177 (linux_xfer_osdata_processgroups): Use std::vector instead of
5178 XNEWVEC.
5179
5180 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
5181
5182 * objfiles.h: Don't include symfile.h.
5183 (struct partial_symbol): Remove forward-declaration.
5184 (struct objfile) <global_psymbols, static_psymbols>: Change type
5185 to std::vector<partial_symbol *>.
5186 * objfiles.c (objfile::objfile): Don't memset those fields.
5187 (objfile::~objfile): Don't free those fields.
5188 * psympriv.h (struct psymbol_allocation_list): Remove
5189 forward-declaration.
5190 (add_psymbol_to_list): Change psymbol_allocation_list parameter
5191 to std::vector.
5192 (start_psymtab_common): Change parameters to std::vector.
5193 * psymtab.c: Include algorithm.
5194 (require_partial_symbols): Call shrink_to_fit.
5195 (find_pc_sect_psymbol): Adjust to vector change.
5196 (match_partial_symbol): Likewise.
5197 (lookup_partial_symbol): Likewise.
5198 (psym_relocate): Likewise.
5199 (dump_psymtab): Likewise.
5200 (recursively_search_psymtabs): Likewise.
5201 (compare_psymbols): Remove.
5202 (sort_pst_symbols): Adjust to vector change.
5203 (start_psymtab_common): Likewise.
5204 (end_psymtab_common): Likewise.
5205 (psymbol_bcache_full): De-constify return value.
5206 (add_psymbol_to_bcache): Likewise.
5207 (extend_psymbol_list): Remove.
5208 (append_psymbol_to_list): Adjust to vector change.
5209 (add_psymbol_to_list): Likewise.
5210 (init_psymbol_list): Likewise.
5211 (maintenance_info_psymtabs): Likewise.
5212 (maintenance_check_psymtabs): Likewise.
5213 * symfile.h (struct psymbol_allocation_list): Remove.
5214 * symfile.c (reread_symbols): Adjust to vector change.
5215 * dbxread.c (start_psymtab): Change type of parameters.
5216 (dbx_symfile_read): Adjust to vector change.
5217 (read_dbx_symtab): Likewise.
5218 (start_psymtab): Change type of parameters.
5219 * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
5220 (create_partial_symtab): Likewise.
5221 (add_partial_symbol): Likewise.
5222 (write_one_signatured_type): Likewise.
5223 (recursively_write_psymbols): Likewise.
5224 * mdebugread.c (parse_partial_symbols): Likewise.
5225 * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
5226 (scan_xcoff_symtab): Adjust to vector change.
5227 (xcoff_initial_scan): Likewise.
5228
5229 2017-10-13 Simon Marchi <simon.marchi@ericsson.com>
5230
5231 * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
5232
5233 2017-10-13 Yao Qi <yao.qi@linaro.org>
5234
5235 * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
5236 Remove s390x-*-expedite, add s390x-expedite.
5237
5238 2017-10-13 Yao Qi <yao.qi@linaro.org>
5239
5240 * features/s390-gs-linux64.c: Regenerated.
5241 * features/s390x-gs-linux64.c: Regenerated.
5242
5243 2017-10-13 Tom Tromey <tom@tromey.com>
5244
5245 * compile/compile-object-run.c (do_module_cleanup): Use delete.
5246 * solib.c (update_solib_list, reload_shared_libraries_1): Use
5247 delete.
5248 * symfile.c (symbol_file_add_with_addrs): Use new.
5249 (symbol_file_add_separate): Update comment.
5250 (syms_from_objfile_1, remove_symbol_file_command): Use delete.
5251 * jit.c (jit_object_close_impl): Use new.
5252 (jit_unregister_code): Use delete.
5253 * objfiles.c (objfile::objfile): Rename from allocate_objfile.
5254 (~objfile): Rename from free_objfile.
5255 (free_objfile_separate_debug, do_free_objfile_cleanup)
5256 (free_all_objfiles, objfile_purge_solibs): Use delete.
5257 * objfiles.h (struct objfile): Add constructor and destructor.
5258 Use DISABLE_COPY_AND_ASSIGN. Add initializers to data members.
5259 (allocate_objfile, free_objfile): Don't declare.
5260 (struct objstats): Add initializers.
5261
5262 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
5263
5264 * arch-utils.h (simple_displaced_step_copy_insn): Remove.
5265 * arch-utils.c (simple_displaced_step_copy_insn): Remove.
5266 * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
5267 * gdbarch.h: Regenerate.
5268 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
5269 Adjust comment.
5270 * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
5271 (i386_displaced_step_fixup): Adjust comment.
5272 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
5273
5274 2017-10-12 Tom Tromey <tom@tromey.com>
5275
5276 * prologue-value.h (pv_area::store_would_trash): Return bool.
5277 (pv_area::find_reg): Likewise.
5278 * prologue-value.c (pv_area::store_would_trash): Return bool.
5279 (pv_area::find_reg): Likewise.
5280
5281 2017-10-12 Tom Tromey <tom@tromey.com>
5282
5283 * s390-linux-tdep.c (s390_store, s390_load)
5284 (s390_check_for_saved, s390_analyze_prologue): Update.
5285 * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
5286 * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
5287 * prologue-value.h (class pv_area): Move from prologue-value.c.
5288 Change names of members. Add constructor, destructor, member
5289 functions.
5290 (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
5291 (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
5292 (pv_area_fetch, pv_area_scan): Don't declare.
5293 * prologue-value.c (struct pv_area::area_entry): Now member of
5294 pv_area.
5295 (struct pv_area): Move to prologue-value.h.
5296 (pv_area::pv_area): Rename from make_pv_area.
5297 (pv_area::~pv_area): Rename from free_pv_area.
5298 (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
5299 (clear_entries, find_entry, overlaps, store_would_trash, store)
5300 (fetch, find_reg, scan): Now member of pv_area.
5301 Remove "area" argument. Update.
5302 * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
5303 Update.
5304 * mn10300-tdep.c (push_reg, check_for_saved)
5305 (mn10300_analyze_prologue): Update.
5306 * mep-tdep.c (is_arg_spill, check_for_saved)
5307 (mep_analyze_prologue): Update.
5308 * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
5309 (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
5310 (m32c_is_struct_return, m32c_analyze_prologue): Update.
5311 * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
5312 Update.
5313 * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
5314 * aarch64-tdep.c (aarch64_analyze_prologue): Update.
5315
5316 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
5317
5318 * linux-nat.h (linux_nat_set_delete_thread): New declaration.
5319 * linux-nat.c (linux_nat_delete_thread): New variable.
5320 (lwp_free): Invoke linux_nat_delete_thread if set.
5321 (linux_nat_set_delete_thread): New function.
5322 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
5323 thread delete callback.
5324 * arm-linux-nat.c (arm_linux_delete_thread): New function.
5325 (_initialize_arm_linux_nat): Assign thread delete callback.
5326 * s390-linux-nat.c (s390_delete_thread): New function.
5327 (_initialize_s390_nat): Assign thread delete callback.
5328 * x86-linux-nat.c (x86_linux_add_target): Likewise.
5329 * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
5330 function.
5331 * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
5332 declaration.
5333 * nat/x86-linux.c (x86_linux_delete_thread): New function.
5334 * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
5335
5336 2017-10-09 Tom Tromey <tom@tromey.com>
5337
5338 * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
5339 std::string.
5340 * tui/tui-layout.c (enum tui_status): Use std::string.
5341
5342 2017-10-11 Tom Tromey <tom@tromey.com>
5343
5344 * gdbthread.h (thread_command): Constify.
5345 * inferior.h (detach_command): Constify.
5346 * top.h (set_history, show_history): Constify.
5347 * arm-tdep.c (set_arm_command, show_arm_command): Constify.
5348 * serial.c (serial_set_cmd, serial_show_cmd): Constify.
5349 * bsd-kvm.c (bsd_kvm_cmd): Constify.
5350 * printcmd.c (set_command): Constify.
5351 (non_const_set_command): New function.
5352 * dcache.c (set_dcache_command, show_dcache_command): Constify.
5353 * breakpoint.c (enable_command, disable_command, delete_command)
5354 (catch_command, tcatch_command, set_breakpoint_cmd)
5355 (show_breakpoint_cmd): Constify.
5356 * macrocmd.c (macro_command): Constify.
5357 * infcmd.c (unset_command, kill_command, detach_command)
5358 (info_proc_cmd): Constify.
5359 * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
5360 * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
5361 (info_auto_load_cmd): Constify.
5362 * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
5363 (unset_tdesc_cmd): Constify.
5364 * ada-lang.c (set_ada_command, show_ada_command)
5365 (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
5366 * guile/guile.c (set_guile_command, show_guile_command)
5367 (info_guile_command): Constify.
5368 * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
5369 Constify.
5370 * skip.c (skip_command): Constify.
5371 * compile/compile.c (_initialize_compile): Constify.
5372 * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
5373 * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
5374 (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
5375 (maint_btrace_pt_show_cmd): Constify.
5376 * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
5377 Constify.
5378 * python/python.c (user_show_python, user_set_python): Constify.
5379 * mips-tdep.c (set_mips_command, show_mips_command)
5380 (set_mipsfpu_command): Constify.
5381 * record-btrace.c (cmd_record_btrace_start)
5382 (cmd_set_record_btrace, cmd_show_record_btrace)
5383 (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
5384 (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
5385 * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
5386 Constify.
5387 * symfile.c (overlay_command): Constify.
5388 * spu-tdep.c (set_spu_command, show_spu_command): Constify.
5389 * cli/cli-logging.c (set_logging_command, show_logging_command):
5390 Constify.
5391 * cli/cli-dump.c (dump_command, append_command)
5392 (srec_dump_command, ihex_dump_command, verilog_dump_command)
5393 (tekhex_dump_command, binary_dump_command)
5394 (binary_append_command): Constify.
5395 * cli/cli-decode.c (struct cmd_list_element): Change type of
5396 "fun".
5397 * cli/cli-cmds.c (info_command, show_command, set_debug)
5398 (show_debug): Constify.
5399 (show_command): Add non-const overload.
5400 * top.c (set_history, show_history): Constify.
5401 * sh-tdep.c (set_sh_command, show_sh_command): Constify.
5402 * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
5403 * target.c (target_command): Constify.
5404 * sparc64-tdep.c (info_adi_command): Constify.
5405 * record-full.c (cmd_record_full_start): Constify.
5406 (set_record_full_command): Constify. Fix typo.
5407 (show_record_full_command): Constify.
5408 * thread.c (thread_command, thread_apply_command): Constify.
5409 * memattr.c (dummy_cmd): Constify.
5410 * value.c (function_command): Constify.
5411 * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
5412 * probe.c (info_probes_command): Constify.
5413 * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
5414 * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
5415 (show_thread_cmd, set_thread_default_cmd)
5416 (show_thread_default_cmd): Constify.
5417 (check_empty): Constify.
5418 * tracepoint.c (tfind_command): Constify.
5419 * cp-support.c (maint_cplus_command): Constify.
5420 * windows-tdep.c (info_w32_command): Constify.
5421 * record.c (cmd_record_start, set_record_command)
5422 (show_record_command, info_record_command, cmd_record_goto):
5423 Constify.
5424 * ravenscar-thread.c (set_ravenscar_command)
5425 (show_ravenscar_command): Constify.
5426 * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
5427 Constify.
5428 (add_internal_problem_command): Remove casts.
5429 * arc-tdep.c (maintenance_print_arc_command): Constify.
5430 * valprint.c (set_print, show_print, set_print_raw)
5431 (show_print_raw): Constify.
5432 * maint.c (maintenance_command, maintenance_info_command)
5433 (maintenance_print_command, maintenance_set_cmd)
5434 (maintenance_show_cmd, set_per_command_cmd)
5435 (show_per_command_cmd, maintenance_check_command): Constify.
5436 * language.c (set_check, show_check): Constify.
5437 * typeprint.c (show_print_type, set_print_type): Constify.
5438 * go32-nat.c (go32_info_dos_command): Constify.
5439
5440 2017-10-11 Tom Tromey <tom@tromey.com>
5441
5442 * breakpoint.c (prepare_re_set_context): Remove.
5443 (breakpoint_re_set_one): Update. Don't use cleanups.
5444 (breakpoint_re_set): Use scoped_restore, std::string, and
5445 scoped_restore_current_language.
5446
5447 2017-10-11 Tom Tromey <tom@tromey.com>
5448
5449 * breakpoint.c (commands_command_1): Use std::string.
5450 (cleanup_executing_breakpoints): Remove.
5451 (bpstat_do_actions_1): Use scoped_restore.
5452 (bpstat_check_watchpoint): Use std::string.
5453 (decode_static_tracepoint_spec): Likewise.
5454 (break_range_command): Likewise.
5455 (watch_command_1): Likewise.
5456 (compare_breakpoints): Change argument types.
5457 (clear_command): Use std::vector.
5458 (cleanup_executing_breakpoints): Remove.
5459 (update_global_location_list): Use unique_xmalloc_ptr.
5460 (strace_command): Remove unused declaration.
5461
5462 2017-10-11 John Baldwin <jhb@FreeBSD.org>
5463
5464 * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
5465 * NEWS: Mention new FreeBSD/arm native configuration.
5466 * configure.host: Add arm*-*-freebsd*.
5467 * configure.nat: Likewise.
5468 * arm-fbsd-nat.c: New file.
5469
5470 2017-10-11 John Baldwin <jhb@FreeBSD.org>
5471
5472 * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
5473 (ALLDEPFILES): Add arm-fbsd-tdep.c.
5474 * NEWS: Mention new FreeBSD/arm target.
5475 * configure.tgt: Add arm*-*-freebsd*.
5476 * arm-fbsd-tdep.c: New file.
5477 * arm-fbsd-tdep.h: New file.
5478
5479 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
5480
5481 * linux-tdep.c (linux_make_corefile_notes): Remove call to
5482 `gdbarch_elfcore_write_linux_prpsinfo'.
5483 * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
5484 method.
5485 (elf_internal_linux_prpsinfo): Remove declaration.
5486 * gdbarch.h: Regenerate.
5487 * gdbarch.c: Regenerate.
5488
5489 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
5490
5491 * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
5492 `set_gdbarch_elfcore_write_linux_prpsinfo'.
5493
5494 2017-10-11 Pedro Alves <palves@redhat.com>
5495
5496 * breakpoint.c (reattach_breakpoints): Delete.
5497 * breakpoint.h (reattach_breakpoints): Delete.
5498
5499 2017-10-11 Simon Marchi <simon.marchi@ericsson.com>
5500
5501 * symfile.c (registered_sym_fns): Make struct, not typedef.
5502 (DEF_VEC_O (registered_sym_fns)): Remove.
5503 (symtab_fns): Change type to std::vector.
5504 (add_symtab_fns): Adjust.
5505 (find_sym_fns): Adjust.
5506
5507 2017-10-11 Anton Kolesov <Anton.Kolesov@synopsys.com>
5508
5509 * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
5510 * arc-tdep.h (arc_arch_is_em): New function.
5511 (arc_arch_is_hs): Likewise.
5512
5513 2017-10-11 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
5514
5515 * macrotab.h (macro_lookup_inclusion): Remove unnecessary
5516 parentheses in the declaration.
5517 (macro_lookup_inclusion): Likewise.
5518 (macro_lookup_definition): Likewise.
5519 * p-lang.h (pascal_builtin_types): Likewise.
5520 * tui/tui-data.c (tui_win_list): Likewise.
5521 * tui/tui-data.h (tui_win_list): Likewise.
5522 * utils.h (make_cleanup_free_section_addr_info): Likewise.
5523
5524 2017-10-11 Mark Rages <markrages@gmail.com>
5525
5526 * target-memory.c (block_boundaries): Fix for block address not
5527 aligned on block size.
5528
5529 2017-10-10 Pedro Alves <palves@redhat.com>
5530 Tom Tromey <tom@tromey.com>
5531
5532 * breakpoint.c (struct captured_breakpoint_query_args)
5533 (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
5534 (print_breakpoint): New.
5535 * breakpoint.h (print_breakpoint): Declare.
5536 * common/common-exceptions.h (enum return_reason): Remove
5537 references to catch_exceptions.
5538 * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
5539 Delete.
5540 * exceptions.h (catch_exceptions_ftype, catch_exceptions)
5541 (catch_exception_ftype, catch_exceptions_with_msg): Delete.
5542 * gdb.h: Delete.
5543 * gdbthread.h (thread_select): Declare.
5544 * mi/mi-cmd-break.c: Don't include gdb.h.
5545 (breakpoint_notify): Use print_breakpoint.
5546 * mi/mi-cmd-catch.c: Don't include gdb.h.
5547 * mi/mi-interp.c: Don't include gdb.h.
5548 (mi_print_breakpoint_for_event): New.
5549 (mi_breakpoint_created, mi_breakpoint_modified): Use
5550 mi_print_breakpoint_for_event.
5551 * mi/mi-main.c: Don't include gdb.h.
5552 (mi_cmd_thread_select): Parse the global thread ID here. Use
5553 thread_select instead of gdb_thread_select.
5554 (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
5555 of using gdb_list_thread_ids.
5556 * remote-fileio.c (do_remote_fileio_request): Change type. Reply
5557 FILEIO_ENOSYS here.
5558 (remote_fileio_request): Use TRY/CATCH instead of
5559 catch_exceptions.
5560 * symfile-mem.c (struct symbol_file_add_from_memory_args)
5561 (symbol_file_add_from_memory_wrapper): Delete.
5562 (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
5563 * thread.c: Don't include gdb.h.
5564 (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
5565 (thread_alive): Use thread_select.
5566 (do_captured_thread_select): Delete, parts salvaged as ...
5567 (thread_select): ... this new function.
5568 (gdb_thread_select): Delete.
5569
5570 2017-10-10 Pedro Alves <palves@redhat.com>
5571 Tom Tromey <tom@tromey.com>
5572
5573 * breakpoint.c (breakpoint_cond_eval): Change return type to bool
5574 and reverse logic.
5575 (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
5576 No longer macros. Instead ...
5577 (enum wp_check_result): They're now values of this new
5578 enumeration.
5579 (watchpoint_check): Change return type to wp_check_result and
5580 parameter type to bpstat.
5581 (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
5582 (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
5583 catch_errors. Reverse logic of watchpoint_check call.
5584 (breakpoint_re_set_one): Now returns void and takes a breakpoint
5585 pointer as parameter.
5586 (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
5587 * common/common-exceptions.c (throw_exception_sjlj): Update
5588 comments to avoid mentioning catch_errors.
5589 * exceptions.c (catch_errors): Delete.
5590 * exceptions.h: Update comments to avoid mentioning catch_errors.
5591 (catch_errors_ftype, catch_errors): Delete.
5592 * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
5593 (hook_stop_stub): Delete.
5594 (restore_selected_frame): Change return type to void, and
5595 parameter type to const frame_id &.
5596 (restore_infcall_control_state): Use TRY/CATCH instead of
5597 catch_errors.
5598 * main.c (captured_command_loop): Return void and remove
5599 parameter. Remove references to catch_errors.
5600 (captured_main): Use TRY/CATCH instead of catch_errors.
5601 * objc-lang.c (objc_submethod_helper_data)
5602 (find_objc_msgcall_submethod_helper): Delete.
5603 (find_objc_msgcall_submethod): Use TRY/CATCH instead of
5604 catch_errors.
5605 * record-full.c (record_full_message): Return void.
5606 (record_full_message_args, record_full_message_wrapper): Delete.
5607 (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
5608 instead of catch_errors.
5609 * solib-aix.c (solib_aix_open_symbol_file_object): Change
5610 parameter type to int.
5611 * solib-darwin.c (open_symbol_file_object): Ditto.
5612 * solib-dsbt.c (open_symbol_file_object): Ditto.
5613 * solib-frv.c (open_symbol_file_object): Ditto.
5614 * solib-svr4.c (open_symbol_file_object): Ditto.
5615 * solib-target.c (solib_target_open_symbol_file_object): Ditto.
5616 * solib.c (update_solib_list): Use TRY/CATCH instead of
5617 catch_errors.
5618 * solist.h (struct target_so_ops) <open_symbol_file_object>:
5619 Change type.
5620 * symmisc.c (struct print_symbol_args): Remove.
5621 (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
5622 (print_symbol): Change type.
5623 * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
5624 and remove parameters.
5625 (catch_errors): New.
5626 (get_windows_debug_event): Adjust.
5627
5628 2017-10-09 Tom Tromey <tom@tromey.com>
5629
5630 * mi/mi-main.c (free_splay_tree): Remove.
5631 (list_available_thread_groups): Use splay_tree_up.
5632 * common/gdb_splay_tree.h: New file.
5633
5634 2017-10-09 Tom Tromey <tom@tromey.com>
5635
5636 * mi/mi-main.c (do_nothing): Remove.
5637 (list_available_thread_groups): Update.
5638
5639 2017-10-09 Pedro Alves <palves@redhat.com>
5640
5641 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
5642 reading registers when switching context.
5643
5644 2017-10-09 John Baldwin <jhb@FreeBSD.org>
5645
5646 * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
5647 (fbsd_convert_siginfo): Likewise.
5648 * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
5649
5650 2017-10-09 Simon Marchi <simon.marchi@polymtl.ca>
5651
5652 * configure.ac (try_guile_versions): Remove guile-2.2.
5653 * configure: Regenerate.
5654
5655 2017-10-09 Tom Tromey <tom@tromey.com>
5656
5657 * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
5658 (COMPILE.pre): Use $(CXX).
5659
5660 2017-10-09 Pedro Alves <palves@redhat.com>
5661
5662 * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
5663 Use bool.
5664 (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
5665 * cp-support.h (cp_remove_params): Now returns a
5666 gdb::unique_xmalloc_ptr.
5667 * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
5668 Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
5669 * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
5670 returning a gdb::unique_xmalloc_ptr.
5671 (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
5672 * stack.c (find_frame_funname): Adjust to cp_remove_params
5673 returning a gdb::unique_xmalloc_ptr.
5674
5675 2017-10-08 Tom Tromey <tom@tromey.com>
5676
5677 * dwarf2read.c (dwarf2_get_dwz_file): Use
5678 gdb::unique_xmalloc_ptr.
5679 (find_slot_in_mapped_hash): Likewise.
5680 (dwarf2_physname): Likewise.
5681 (create_dwo_unit_in_dwp_v1): Use std::string.
5682 (create_dwo_unit_in_dwp_v2): Likewise.
5683 (lookup_dwo_cutu): Likewise.
5684 (inherit_abstract_dies): Use std::vector.
5685 (read_array_type): Likewise.
5686 (dwarf_decode_macros): Remove unused declaration.
5687 (unsigned_int_compar): Remove.
5688 (dwarf2_build_psymtabs_hard): Use scoped_restore.
5689 (psymtabs_addrmap_cleanup): Remove.
5690
5691 2017-10-08 Tom Tromey <tom@tromey.com>
5692
5693 * frame-unwind.c (frame_unwind_try_unwinder): Update.
5694 * frame.h (frame_cleanup_after_sniffer): Declare.
5695 (frame_prepare_for_sniffer): Return void.
5696 * frame.c (frame_cleanup_after_sniffer): No longer static. Change
5697 type of argument.
5698 (frame_prepare_for_sniffer): Return void.
5699
5700 2017-10-08 Tom Tromey <tom@tromey.com>
5701
5702 * utils.h (make_cleanup_value_free): Remove.
5703 * utils.c (do_value_free, struct cleanup): Remove.
5704 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
5705 Use gdb_value_up.
5706 * value.h (struct value_deleter): New.
5707 (gdb_value_up): New typedef.
5708
5709 2017-10-08 Tom Tromey <tom@tromey.com>
5710
5711 * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
5712 (make_cleanup_free_search_symbols): Remove.
5713 (search_symbols): Return std::vector.
5714 (symbol_search::compare_search_syms): Now member of
5715 symbol_search. Change arguments.
5716 (sort_search_symbols_remove_dups): Change arguments. Rewrite.
5717 (symtab_symbol_info, rbreak_command): Update.
5718 * symtab.h (struct symbol_search) <next>: Remove.
5719 Add constructors.
5720 (symbol_search::operator<): New function.
5721 (symbol_search::operator==): New function.
5722 (search_symbols): Remove std::vector.
5723 (free_search_symbols, make_cleanup_free_search_symbols): Remove.
5724 (symbol_search::compare_search_syms): Declare.
5725
5726 2017-10-06 Yao Qi <yao.qi@linaro.org>
5727
5728 * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
5729 arch/aarch64-insn.o.
5730 Remove one rule.
5731 * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
5732
5733 2017-10-06 Yao Qi <yao.qi@linaro.org>
5734
5735 * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
5736 and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
5737 arch/arm-linux.o respectively.
5738 * configure.tgt: Likewise.
5739
5740 2017-10-06 Yao Qi <yao.qi@linaro.org>
5741
5742 * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
5743 * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
5744
5745 2017-10-06 Pedro Alves <palves@redhat.com>
5746
5747 * windows-nat.c: Include <algorithm>.
5748
5749 2017-10-06 Yao Qi <yao.qi@linaro.org>
5750
5751 * configure.tgt (i386_tobjs): New variable.
5752 (amd64_tobjs): New variable.
5753 Set $cpu_obs and $os_obs.
5754
5755 2017-10-06 Yao Qi <yao.qi@linaro.org>
5756
5757 * Makefile.in (CONFIG_SRC_SUBDIR): New.
5758 (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
5759 (clean): Remove object files and dependency files.
5760 (distclean): Remove the directory.
5761 * configure.ac: Invoke AC_CONFIG_COMMANDS.
5762 * configure: Re-generated.
5763 * configure.tgt: Replace amd64.o with arch/amd64.o.
5764
5765 2017-10-05 Jose E. Marchesi <jose.marchesi@oracle.com>
5766
5767 PR build/22188
5768 * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
5769 and SETEND.
5770
5771 2017-10-05 Pedro Alves <palves@redhat.com>
5772
5773 * linux-nat.c (linux_child_follow_fork): When following the parent
5774 and detaching the child, consult the parent thread's architecture
5775 instead of the child's.
5776
5777 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
5778
5779 * ax.h: Do not include "doublest.h".
5780 (union agent_val): Remove.
5781
5782 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
5783
5784 * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
5785 (decimal_to_string): Return std::string object.
5786 (decimal_from_string): Accept std::string object. Return bool.
5787 (decimal_from_integral, decimal_from_doublest): Remove.
5788 (decimal_from_longest): Add prototype.
5789 (decimal_from_ulongest): Likewise.
5790 (decimal_to_longest): Likewise.
5791 (decimal_from_doublest): Likewise.
5792 * dfp.c: Do not include "gdbtypes.h" or "value.h".
5793 (MAX_DECIMAL_STRING): Move here.
5794 (decimal_to_string): Return std::string object.
5795 (decimal_from_string): Accept std::string object. Return bool.
5796 (decimal_from_integral): Remove, replace by ...
5797 (decimal_from_longest, decimal_from_ulongest): ... these new functions.
5798 (decimal_to_longest): New function.
5799 (decimal_from_floating): Remove, replace by ...
5800 (decimal_from_doublest): ... this new function.
5801 (decimal_to_doublest): Update to new decimal_to_string interface.
5802
5803 * value.c (unpack_long): Use decimal_to_longest.
5804 * valops.c (value_cast): Use decimal_from_doublest instead of
5805 decimal_from_floating. Use decimal_from_[u]longest isntead of
5806 decimal_from_integral.
5807 * valarith.c (value_args_as_decimal): Likewise.
5808 * valprint.c (print_decimal_floating): Update to new
5809 decimal_to_string interface.
5810 * printcmd.c (printf_decfloat): Likewise.
5811 * c-exp.y (parse_number): Update to new decimal_from_string interface.
5812
5813 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
5814
5815 * doublest.h: Do not include "floatformat.h". Remove stale comments.
5816 * gdbtypes.c: Include "floatformat.h".
5817 * value.c: Likewise.
5818 * m68k-tdep.c: Likewise.
5819
5820 * findvar.c: Do not include "floatformat.h".
5821 * amd64-darwin-tdep.c: Likewise.
5822 * arm-linux-tdep.c: Likewise.
5823 * i386-darwin-tdep.c: Likewise.
5824 * i387-tdep.c: Likewise.
5825 * m68k-linux-tdep.c: Likewise.
5826 * mep-tdep.c: Likewise.
5827 * mips-tdep.c: Likewise.
5828 * nios2-tdep.c: Likewise.
5829 * s390-linux-tdep.c: Likewise.
5830 * sparc-obsd-tdep.c: Likewise.
5831 * sparc-tdep.c: Likewise.
5832 * sparc64-tdep.c: Likewise.
5833 * spu-tdep.c: Likewise.
5834 * tic6x-tdep.c: Likewise.
5835 * tilegx-tdep.c: Likewise.
5836 * vax-tdep.c: Likewise.
5837 * xstormy16-tdep.c: Likewise.
5838 * xtensa-tdep.c: Likewise.
5839
5840 * top.c: Do not include "doublest.h".
5841 * aarch64-tdep.c: Likewise.
5842 * alpha-tdep.c: Likewise.
5843 * arm-linux-tdep.c: Likewise.
5844 * m68k-linux-tdep.c: Likewise.
5845 * tilegx-tdep.c: Likewise.
5846 * xstormy16-tdep.c: Likewise.
5847
5848 2017-10-05 John Baldwin <jhb@FreeBSD.org>
5849
5850 * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
5851 (mipsn32_fbsd_sigframe): Define.
5852 (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
5853 for FreeBSD/mipsn32.
5854
5855 2017-10-05 John Baldwin <jhb@FreeBSD.org>
5856
5857 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
5858 AT_HWCAP.
5859
5860 2017-10-05 Tristan Gingold <tgingold@free.fr>
5861
5862 * MAINTAINERS (Misc): Update my email address.
5863
5864 2017-10-04 Pedro Alves <palves@redhat.com>
5865
5866 * remote.c (get_remote_arch_state): New 'gdbarch' parameter. Use
5867 it instead of target_gdbarch.
5868 (get_remote_state, get_remote_packet_size): Adjust
5869 get_remote_arch_state calls, passing down target_gdbarch
5870 explicitly.
5871 (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
5872 'gdbarch' and use it instead of target_gdbarch.
5873 (get_memory_packet_size): Adjust get_remote_arch_state calls,
5874 passing down target_gdbarch explicitly.
5875 (struct stop_reply) <arch>: New field.
5876 (remote_parse_stop_reply): Use the stopped thread's architecture,
5877 not the current inferior's. Save the architecture in the
5878 stop_reply.
5879 (process_stop_reply): Use the stop reply's architecture.
5880 (process_g_packet, remote_fetch_registers)
5881 (remote_prepare_to_store, store_registers_using_G)
5882 (remote_store_registers): Adjust get_remote_arch_state calls,
5883 using the regcache's architecture.
5884 (remote_get_trace_status): Adjust get_remote_arch_state calls,
5885 passing down target_gdbarch explicitly.
5886 * spu-multiarch.c (spu_thread_architecture): Defer to the target
5887 beneath instead of calling target_gdbarch.
5888 * target.c (default_thread_architecture): Use the specified
5889 inferior's architecture, instead of the current inferior's
5890 architecture (via target_gdbarch).
5891
5892 2017-10-04 Pedro Alves <palves@redhat.com>
5893
5894 * regcache.c (get_thread_arch_regcache): Remove null_ptid special
5895 case.
5896 (regcache_print): Handle !target_has_registers here instead.
5897
5898 2017-10-04 Pedro Alves <palves@redhat.com>
5899
5900 * frame.c (create_test_frame): Delete.
5901 * frame.h (create_test_frame): Delete.
5902 * gdbarch-selftests.c: Include gdbthread.h and target.h.
5903 (class regcache_test): Delete.
5904 (test_target_has_registers, test_target_has_stack)
5905 (test_target_has_memory, test_target_prepare_to_store)
5906 (test_target_store_registers): New functions.
5907 (test_target_ops): New class.
5908 (register_to_value_test): Error out if there's already a
5909 process_stratum (or higher) target pushed. Create a fuller mock
5910 environment, with mock target_ops, inferior, address space, thread
5911 and inferior_ptid.
5912 * progspace.c (struct address_space): Move to ...
5913 * progspace.h (struct address_space): ... here.
5914 * regcache.h (regcache::~regcache, regcache::raw_write)
5915 [GDB_SELF_TEST]: No longer virtual.
5916
5917 2017-10-04 Simon Marchi <simon.marchi@ericsson.com>
5918
5919 * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
5920
5921 2017-10-04 Pedro Alves <palves@redhat.com>
5922
5923 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
5924 out of 'between TRY and CATCH'.
5925
5926 2017-10-04 Pedro Alves <palves@redhat.com>
5927
5928 * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
5929 * common/common-exceptions.h (TRY): Open an outermost scope.
5930 Expand intro comment.
5931 (CATCH): Reindent.
5932 (END_CATCH): Close the outermost scope.
5933 * completer.c (complete_line_internal): Add missing END_CATCH.
5934
5935 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
5936
5937 * NEWS (Changes since GDB 8.0): Add entry about new
5938 'set-cwd-on-gdbserver' feature.
5939 (New remote packets): Add entry for QSetWorkingDir.
5940 * common/common-inferior.h (set_inferior_cwd): New prototype.
5941 * infcmd.c (set_inferior_cwd): Remove "static".
5942 (show_cwd_command): Expand text to include remote debugging.
5943 * remote.c: Add PACKET_QSetWorkingDir.
5944 (remote_protocol_features) <QSetWorkingDir>: New entry for
5945 PACKET_QSetWorkingDir.
5946 (extended_remote_set_inferior_cwd): New function.
5947 (extended_remote_create_inferior): Call
5948 "extended_remote_set_inferior_cwd".
5949 (_initialize_remote): Call "add_packet_config_cmd" for
5950 QSetWorkingDir.
5951
5952 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
5953
5954 * NEWS (New commands): Mention "set/show cwd".
5955 * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
5956 "cd" command's help text.
5957 * common/common-inferior.h (get_inferior_cwd): New prototype.
5958 * infcmd.c (inferior_cwd_scratch): New global variable.
5959 (set_inferior_cwd): New function.
5960 (get_inferior_cwd): Likewise.
5961 (set_cwd_command): Likewise.
5962 (show_cwd_command): Likewise.
5963 (_initialize_infcmd): Add "set/show cwd" commands.
5964 * inferior.h (class inferior) <cwd>: New field.
5965 * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
5966 (fork_inferior): Change inferior's cwd before its execution.
5967 * windows-nat.c (windows_create_inferior): Pass inferior's cwd
5968 to CreateProcess.
5969
5970 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
5971
5972 * Makefile.in (SFILES): Add gdb_tilde_expand.c.
5973 (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
5974 (COMMON_OBS): Add gdb_tilde_expand.o.
5975 * common/gdb_tilde_expand.c: New file.
5976 * common/gdb_tilde_expand.h: Likewise.
5977
5978 2017-10-03 Maciej W. Rozycki <macro@imgtec.com>
5979
5980 * gdbarch.sh (objfile): Remove duplicate declaration.
5981 * gdbarch.h: Regenerate.
5982
5983 2017-10-03 Tom Tromey <tom@tromey.com>
5984
5985 * utils.c (internal_vproblem): Use string_vprintf.
5986
5987 2017-10-03 Tom Tromey <tom@tromey.com>
5988
5989 * printcmd.c (info_symbol_command): Use std::string.
5990
5991 2017-10-03 Tom Tromey <tom@tromey.com>
5992
5993 * top.c (gdb_safe_append_history): Use std::string.
5994
5995 2017-10-03 Tom Tromey <tom@tromey.com>
5996
5997 * event-top.c (stdin_event_handler): Update.
5998 * main.c (captured_main_1): Update.
5999 * top.h (make_delete_ui_cleanup): Remove.
6000 (struct ui): Add constructor and destructor.
6001 (new_ui, delete_ui): Remove.
6002 * top.c (make_delete_ui_cleanup): Remove.
6003 (new_ui_command): Use std::unique_ptr.
6004 (delete_ui_cleanup): Remove.
6005 (ui::ui): Rename from new_ui. Update.
6006 (free_ui): Remove.
6007 (ui::~ui): Rename from delete_ui. Update.
6008
6009 2017-10-03 Tom Tromey <tom@tromey.com>
6010
6011 * symfile.c (load_progress): Use gdb::byte_vector.
6012
6013 2017-10-03 Tom Tromey <tom@tromey.com>
6014
6015 * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
6016 declaration.
6017 * printcmd.c (x_command): Remove unused declaration.
6018 * symfile.c (symbol_file_command): Remove unused declaration.
6019
6020 2017-10-03 Tom Tromey <tom@tromey.com>
6021
6022 * utils.c (internal_vproblem): Use std::string.
6023 (defaulted_query): Likewise.
6024
6025 2017-10-03 Tom Tromey <tom@tromey.com>
6026
6027 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
6028 * top.c (execute_command_to_string): Update.
6029 * utils.c (make_cleanup_restore_page_info): Remove.
6030 (do_restore_page_info_cleanup): Remove.
6031 (set_batch_flag_and_restore_page_info):
6032 New.
6033 (make_cleanup_restore_page_info): Remove.
6034 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
6035 (~set_batch_flag_and_restore_page_info): New
6036 (make_cleanup_restore_uinteger): Remove.
6037 (make_cleanup_restore_integer): Remove.
6038 (struct restore_integer_closure): Remove.
6039 (restore_integer): Remove.
6040 * utils.h (struct set_batch_flag_and_restore_page_info): New
6041 class.
6042 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
6043 (make_cleanup_restore_page_info): Remove.
6044 (make_cleanup_restore_uinteger) Remove.
6045 (make_cleanup_restore_integer) Remove.
6046
6047 2017-10-03 Tom Tromey <tom@tromey.com>
6048
6049 * record-full.h (record_full_gdb_operation_disable_set): Return
6050 scoped_restore_tmpl<int>.
6051 * infrun.c (adjust_pc_after_break): Update.
6052 (handle_signal_stop): Update.
6053 * record-full.c (record_full_gdb_operation_disable_set): Return
6054 scoped_restore_tmpl<int>.
6055 (record_full_wait_1, record_full_insert_breakpoint)
6056 (record_full_remove_breakpoint, record_full_save)
6057 (record_full_goto_insn): Update.
6058
6059 2017-10-02 Tom Tromey <tom@tromey.com>
6060
6061 PR rust/22236:
6062 * rust-lang.c (rust_val_print_str): New function.
6063 (val_print_struct): Call it.
6064 (rust_subscript): Preserve name of slice type.
6065
6066 2017-10-02 Tom Tromey <tom@tromey.com>
6067
6068 * rust-lang.c (rust_subscript): Handle slices in
6069 EVAL_AVOID_SIDE_EFFECTS case.
6070
6071 2017-10-02 Tom Tromey <tom@tromey.com>
6072
6073 * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
6074
6075 2017-10-02 Tom Tromey <tom@tromey.com>
6076
6077 * rust-lang.h (rust_slice_type): Add "extern".
6078
6079 2017-10-02 Tom Tromey <tom@tromey.com>
6080 Pedro Alves <palves@redhat.com>
6081
6082 * ada-lang.h (ada_exc_info::operator<): Make const.
6083 (ada_exc_info::operator==): Make const.
6084 * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
6085 Make const.
6086
6087 2017-09-29 Tom Tromey <tom@tromey.com>
6088
6089 * target.c (read_whatever_is_readable): Change type of "result".
6090 Update.
6091 (free_memory_read_result_vector): Remove.
6092 (read_memory_robust): Change return type. Update.
6093 * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update. Use
6094 bin2hex, std::string.
6095 * target.h (memory_read_result_s): Remove typedef.
6096 (free_memory_read_result_vector): Remove.
6097 (read_memory_robust): Return std::vector.
6098
6099 2017-09-29 Tom Tromey <tom@tromey.com>
6100
6101 * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
6102
6103 2017-09-29 Tom Tromey <tom@tromey.com>
6104
6105 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
6106 * ada-lang.h (struct ada_exc_info): Remove typedef. Declare
6107 operator< and operator==.
6108 (ada_exceptions_list): Return a std::vector.
6109 * ada-lang.c (ada_exc_info::operator<): Rename from
6110 compare_ada_exception_info.
6111 (ada_exc_info::operator==): New.
6112 (sort_remove_dups_ada_exceptions_list): Change type of
6113 "exceptions".
6114 (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
6115 (ada_add_global_exceptions): Likewise.
6116 (ada_exceptions_list_1): Return a std::vector.
6117 (ada_exceptions_list): Likewise.
6118
6119 2017-09-29 Tom Tromey <tom@tromey.com>
6120
6121 * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
6122 'std::set *'.
6123 (print_one_inferior): Update.
6124 (free_vector_of_ints): Remove.
6125 (list_available_thread_groups): Change "ids" to std::set.
6126 (mi_cmd_list_thread_groups): Update.
6127 (struct collect_cores_data) <core>: Now a std::set.
6128 (collect_cores): Update.
6129 (unique): Remove.
6130 (print_one_inferior): Update.
6131
6132 2017-09-29 Tom Tromey <tom@tromey.com>
6133
6134 * mi/mi-main.c (mi_execute_cli_command): Use std::string.
6135 (mi_execute_async_cli_command): Likewise.
6136 (mi_cmd_trace_frame_collected): Use field_fmt.
6137
6138 2017-09-29 Tom Tromey <tom@tromey.com>
6139
6140 * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
6141 gdb::byte_vector.
6142
6143 2017-09-29 Tom Tromey <tom@tromey.com>
6144
6145 * mi/mi-parse.c (mi_parse): Remove unused declaration.
6146
6147 2017-09-29 Tom Tromey <tom@tromey.com>
6148
6149 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
6150
6151 2017-09-29 Tom Tromey <tom@tromey.com>
6152
6153 * varobj.h (varobj_gen_name): Return std::string.
6154 * varobj.c (varobj_gen_name): Return std::string.
6155 * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
6156 (mi_cmd_var_delete): Don't copy "name".
6157
6158 2017-09-29 Tom Tromey <tom@tromey.com>
6159
6160 * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
6161 (mi_cmd_break_insert_1): Update.
6162
6163 2017-09-29 Tom Tromey <tom@tromey.com>
6164
6165 * target.h (make_scoped_defer_target_commit_resume): Update.
6166 * target.c (make_scoped_defer_target_commit_resume): Rename from
6167 make_cleanup_defer_target_commit_resume. Return a
6168 scoped_restore.
6169 * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
6170
6171 2017-09-29 Tom Tromey <tom@tromey.com>
6172
6173 * main.c (captured_main_1): Remove unused declaration.
6174 * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
6175
6176 2017-09-29 Tom Tromey <tom@tromey.com>
6177
6178 * symtab.c (search_symbols): Remove unused outer cleanup.
6179 (make_source_files_completion_list): Remove unused declaration.
6180
6181 2017-09-29 Tom Tromey <tom@tromey.com>
6182
6183 * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
6184
6185 2017-09-29 Tom Tromey <tom@tromey.com>
6186
6187 * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
6188 gdb::byte_vector.
6189
6190 2017-09-29 Tom Tromey <tom@tromey.com>
6191
6192 * complaints.c (vcomplaint): Use std::string.
6193
6194 2017-09-29 Tom Tromey <tom@tromey.com>
6195
6196 * tracepoint.c (trace_variable_command): Use std::string.
6197 (encode_actions_1): Remove unused declarations.
6198 (create_tsv_from_upload): Use std::string.
6199
6200 2017-09-29 Tom Tromey <tom@tromey.com>
6201
6202 * cp-support.c (gdb_demangle): Use std::string.
6203
6204 2017-09-29 Tom Tromey <tom@tromey.com>
6205
6206 * stack.c (parse_frame_specification): Use std::string
6207 (info_frame_command): Use gdb::unique_xmalloc_ptr.
6208
6209 2017-09-29 Tom Tromey <tom@tromey.com>
6210
6211 * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
6212
6213 2017-09-29 Tom Tromey <tom@tromey.com>
6214
6215 * utils.c (vfprintf_maybe_filtered): Use std::string.
6216 (vfprintf_unfiltered): Likewise.
6217
6218 2017-09-29 Tom Tromey <tom@tromey.com>
6219
6220 * event-top.c (top_level_prompt): Return std::string.
6221 (display_gdb_prompt): Update.
6222
6223 2017-09-29 Tom Tromey <tom@tromey.com>
6224
6225 * unittests/common-utils-selftests.c (format): New function.
6226 (string_vprintf_tests): New function.
6227 (_initialize_common_utils_selftests): Register new tests.
6228 * common/common-utils.c (string_vprintf): New function.
6229 * common/common-utils.h (string_vprintf): Declare.
6230
6231 2017-09-29 Pedro Alves <palves@redhat.com>
6232
6233 * common/rsp-low.c (unpack_varlen_hex): Constify.
6234 * common/rsp-low.h (unpack_varlen_hex): Constify.
6235 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
6236 Constify.
6237 * remote.c (remote_set_permissions, read_ptid)
6238 (remote_current_thread, remote_get_threads_with_qthreadinfo)
6239 (remote_static_tracepoint_marker_at)
6240 (remote_static_tracepoint_markers_by_strid)
6241 (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
6242 * tracepoint.c (parse_trace_status, parse_tracepoint_status)
6243 (parse_tracepoint_definition, parse_tsv_definition)
6244 (parse_static_tracepoint_marker_definition): Constify.
6245 * tracepoint.h (parse_static_tracepoint_marker_definition)
6246 (parse_trace_status, parse_tracepoint_status)
6247 (parse_tracepoint_definition, parse_tsv_definition): Constify.
6248
6249 2017-09-29 Pedro Alves <palves@redhat.com>
6250
6251 * remote.c (target_buf, target_buf_size): Delete.
6252 (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
6253 Use the connection's packet buffer instead.
6254 All callers adjusted.
6255 (_initialize_remote): Remove references to target_buf and
6256 target_buf_size.
6257
6258 2017-09-28 Pedro Alves <palves@redhat.com>
6259
6260 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6261 unittests/common-utils-selftests.c.
6262 (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
6263 (COMMON_OBS): Remove utils-selftests.o.
6264 * utils-selftests.c: Move to ...
6265 * unittests/common-utils-selftests.c: ... here and rename self
6266 test to "string_printf".
6267
6268 2017-09-28 Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
6269
6270 * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
6271 having NULL cus or tus.
6272
6273 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
6274
6275 * arm-tdep.c: (convert_from_extended): Remove.
6276 (convert_to_extended): Likewise.
6277 (arm_extract_return_value): Use convert_typed_floating.
6278 (arm_store_return_value): Likewise.
6279
6280 * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
6281 * sh-tdep.c: Do not include "floatformat.h".
6282 (sh_littlebyte_bigword_type): New function.
6283 (sh_register_convert_to_virtual): Use convert_typed_floating.
6284 (sh_register_convert_to_raw): Likewise.
6285 * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
6286 (sh64_littlebyte_bigword_type): New function.
6287 (sh64_extract_return_value): Use convert_typed_floating.
6288 (sh64_register_convert_to_virtual): Likewise.
6289 (sh64_register_convert_to_raw): Likewise.
6290
6291 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
6292
6293 * doublest.h (floatformat_from_type): Move to gdbtypes.h.
6294 * doublest.c (floatformat_from_type): Move to gdbtypes.c.
6295
6296 * gdbtypes.h (union type_specific): Make field floatformat hold
6297 just a single struct floatformat, not an array.
6298 (floatformat_from_type): Move here.
6299 * gdbtypes.c (floatformat_from_type): Move here. Update to
6300 changed TYPE_FLOATFORMAT definition.
6301 (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
6302 (recursive_dump_type): Likewise.
6303 (init_float_type): Install correct floatformat for byte order.
6304 (arch_float_type): Likewise.
6305
6306 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
6307
6308 * gdbtypes.c (init_type): Change incoming argument from
6309 length-in-bytes to length-in-bits. Assert length is a
6310 multiple of TARGET_CHAR_BITS.
6311 (arch_type, arch_flags_type): Likewise.
6312 (init_integer_type): Update call to init_type.
6313 (init_character_type): Likewise.
6314 (init_boolean_type): Likewise.
6315 (init_float_type): Likewise.
6316 (init_decfloat_type): Likewise.
6317 (init_complex_type): Likewise.
6318 (init_pointer_type): Likewise.
6319 (objfile_type): Likewise.
6320 (arch_integer_type): Update call to arch_type.
6321 (arch_character_type): Likewise.
6322 (arch_boolean_type): Likewise.
6323 (arch_float_type): Likewise.
6324 (arch_decfloat_type): Likewise.
6325 (arch_complex_type): Likewise.
6326 (arch_pointer_type): Likewise.
6327 (gdbtypes_post_init): Likewise.
6328
6329 * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
6330 (read_base_type): Likewise.
6331 * mdebugread.c (basic_type): Likewise.
6332 * stabsread.c (dbx_init_float_type): Likewise.
6333 (rs6000_builtin_type): Likewise.
6334 (read_range_type): Likewise. Also, fix call to init_integer_type
6335 with erroneous length argument.
6336
6337 * ada-lang.c (ada_language_arch_info): Update call to arch_type.
6338 * d-lang.c (build_d_types): Likewise.
6339 * f-lang.c (build_fortran_types): Likewise.
6340 * go-lang.c (build_go_types): Likewise.
6341 * opencl-lang.c (build_opencl_types): Likewise.
6342 * jit.c (finalize_symtab): Likewise.
6343 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
6344 (build_std_type_info_type): Likewise.
6345 * target-descriptions.c (tdesc_gdb_type): Likewise. Also,
6346 update call to arch_flags_type.
6347
6348 * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
6349 arch_type.
6350 * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
6351 * windows-tdep.c (windows_get_tlb_type): Likewise.
6352
6353 * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
6354 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
6355 * m32c-tdep.c (make_types): Likewise.
6356 * rl78-tdep.c (rl78_gdbarch_init): Likewise.
6357 (rl78_psw_type): Update call to arch_flags_type.
6358 * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
6359 * rx-tdep.c (rx_psw_type): Likewise.
6360 (rx_fpsw_type): Likewise.
6361 * sparc-tdep.c (sparc_psr_type): Likewise.
6362 (sparc_fsr_type): Likewise.
6363 * sparc64-tdep.c (sparc64_pstate_type): Likewise.
6364 (sparc64_ccr_type): Likewise.
6365 (sparc64_fsr_type): Likewise.
6366 (sparc64_fprs_type): Likewise.
6367
6368 2017-09-27 Tom Tromey <tom@tromey.com>
6369
6370 * findcmd.c (find_command): Constify.
6371
6372 2017-09-27 Tom Tromey <tom@tromey.com>
6373
6374 * ada-tasks.c (task_command_1, task_command): Constify.
6375
6376 2017-09-27 Tom Tromey <tom@tromey.com>
6377
6378 * symtab.c (maintenance_print_symbol_cache)
6379 (maintenance_flush_symbol_cache)
6380 (maintenance_print_symbol_cache_statistics): Constify.
6381
6382 2017-09-27 Tom Tromey <tom@tromey.com>
6383
6384 * inferior.c (detach_inferior_command, kill_inferior_command)
6385 (inferior_command): Constify.
6386
6387 2017-09-27 Tom Tromey <tom@tromey.com>
6388
6389 * regcache.c (regcache_print, maintenance_print_registers)
6390 (maintenance_print_raw_registers)
6391 (maintenance_print_cooked_registers)
6392 (maintenance_print_register_groups)
6393 (maintenance_print_remote_registers): Constify.
6394
6395 2017-09-27 Tom Tromey <tom@tromey.com>
6396
6397 * printcmd.c (map_display_numbers, undisplay_command)
6398 (enable_disable_display_command, enable_display_command)
6399 (disable_display_command): Constify.
6400
6401 2017-09-27 Tom Tromey <tom@tromey.com>
6402
6403 * breakpoint.h (delete_command): Don't declare.
6404 * breakpoint.c (delete_command, enable_once_command)
6405 (enable_count_command, enable_delete_command, breakpoint_1)
6406 (maintenance_info_breakpoints, stopin_command, stopat_command)
6407 (delete_command, delete_trace_command, save_breakpoints)
6408 (save_breakpoints_command, save_tracepoints_command): Constify.
6409
6410 2017-09-27 Tom Tromey <tom@tromey.com>
6411
6412 * macrocmd.c (macro_expand_command, macro_expand_once_command)
6413 (skip_ws, extract_identifier, macro_define_command)
6414 (macro_undef_command, macro_list_command): Constify.
6415
6416 2017-09-27 Tom Tromey <tom@tromey.com>
6417
6418 * infcmd.c (environment_info, set_environment_command)
6419 (unset_environment_command, path_info, info_proc_cmd_1)
6420 (info_proc_cmd_mappings, info_proc_cmd_stat)
6421 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
6422 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
6423
6424 2017-09-27 Tom Tromey <tom@tromey.com>
6425
6426 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
6427 Constify.
6428
6429 2017-09-27 Tom Tromey <tom@tromey.com>
6430
6431 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
6432
6433 2017-09-27 Tom Tromey <tom@tromey.com>
6434
6435 * demangle.c (demangle_command): Constify.
6436
6437 2017-09-27 Tom Tromey <tom@tromey.com>
6438
6439 * progspace.c (maintenance_info_program_spaces_command):
6440 Constify.
6441
6442 2017-09-27 Tom Tromey <tom@tromey.com>
6443
6444 * compile/compile.c (check_raw_argument, compile_file_command)
6445 (compile_code_command, compile_print_command): Constify.
6446
6447 2017-09-27 Tom Tromey <tom@tromey.com>
6448
6449 * reggroups.c (maintenance_print_reggroups): Constify.
6450
6451 2017-09-27 Tom Tromey <tom@tromey.com>
6452
6453 * dwarf2read.c (save_gdb_index_command): Constify.
6454
6455 2017-09-27 Tom Tromey <tom@tromey.com>
6456
6457 * stap-probe.c (info_probes_stap_command): Constify.
6458
6459 2017-09-27 Tom Tromey <tom@tromey.com>
6460
6461 * fork-child.c (unset_exec_wrapper_command): Constify.
6462
6463 2017-09-27 Tom Tromey <tom@tromey.com>
6464
6465 * btrace.c (get_uint, get_context_size, no_chunk)
6466 (maint_btrace_packet_history_cmd)
6467 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
6468 (maint_info_btrace_cmd): Constify.
6469
6470 2017-09-27 Tom Tromey <tom@tromey.com>
6471
6472 * reverse.c (delete_bookmark_command): Constify.
6473
6474 2017-09-27 Tom Tromey <tom@tromey.com>
6475
6476 * remote.c (set_memory_packet_size)
6477 (set_memory_write_packet_size, show_memory_write_packet_size)
6478 (set_memory_read_packet_size, show_memory_read_packet_size)
6479 (compare_sections_command, packet_command, remote_put_command)
6480 (remote_get_command, remote_delete_command): Constify.
6481
6482 2017-09-27 Tom Tromey <tom@tromey.com>
6483
6484 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
6485 (set_mipsfpu_double_command, set_mipsfpu_none_command)
6486 (set_mipsfpu_auto_command): Constify.
6487
6488 2017-09-27 Tom Tromey <tom@tromey.com>
6489
6490 * cli/cli-cmds.h (cd_command): Constify.
6491 * cli/cli-cmds.c (cd_command): Constify.
6492
6493 2017-09-27 Tom Tromey <tom@tromey.com>
6494
6495 * thread.c (thread_name_command, thread_find_command): Constify.
6496
6497 2017-09-27 Tom Tromey <tom@tromey.com>
6498
6499 * probe.c (enable_probes_command, disable_probes_command):
6500 Constify.
6501
6502 2017-09-27 Tom Tromey <tom@tromey.com>
6503
6504 * symfile.c (symbol_file_command): Constify.
6505 * gdbcore.h (deprecated_file_changed_hook): Constify.
6506 * exec.c (deprecated_file_changed_hook, exec_file_command)
6507 (file_command): Constify.
6508 * defs.h (symbol_file_command): Constify.
6509
6510 2017-09-27 Tom Tromey <tom@tromey.com>
6511
6512 * remote-fileio.c (set_system_call_allowed)
6513 (show_system_call_allowed): Constify.
6514
6515 2017-09-27 Tom Tromey <tom@tromey.com>
6516
6517 * tracepoint.c (delete_trace_variable_command)
6518 (tfind_end_command, tfind_start_command, tfind_pc_command)
6519 (tfind_tracepoint_command, tfind_line_command)
6520 (tfind_range_command, tfind_outside_command): Constify.
6521
6522 2017-09-27 Tom Tromey <tom@tromey.com>
6523
6524 * ax-gdb.c (maint_agent_printf_command, agent_command)
6525 (agent_eval_command): Constify.
6526
6527 2017-09-27 Tom Tromey <tom@tromey.com>
6528
6529 * tracepoint.c (info_scope_command): Constify.
6530 * python/python.c (gdbpy_decode_line): Constify.
6531 * python/py-breakpoint.c (bppy_init): Constify.
6532 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
6533 * location.h: (new_linespec_location)
6534 (string_to_event_location_basic, string_to_event_location):
6535 Constify.
6536 * location.c (new_linespec_location)
6537 (string_to_event_location_basic, string_to_event_location):
6538 Constify.
6539 * linespec.h (decode_line_with_current_source)
6540 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
6541 * linespec.c (linespec_lex_to_end)
6542 (decode_line_with_current_source)
6543 (decode_line_with_last_displayed): Constify.
6544 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
6545 Constify.
6546 * cli/cli-cmds.c (edit_command, list_command): Constify.
6547 * breakpoint.h (until_break_command, watch_command_wrapper)
6548 (awatch_command_wrapper, rwatch_command_wrapper)
6549 (init_ada_exception_breakpoint): Constify.
6550 * breakpoint.c (break_command_1, dprintf_command)
6551 (break_range_command, watch_command_wrapper)
6552 (rwatch_command_wrapper, awatch_command_wrapper)
6553 (until_break_command, init_ada_exception_breakpoint)
6554 (strace_marker_create_sals_from_location, trace_command)
6555 (ftrace_command, strace_command, struct tracepoint): Constify.
6556 * ax-gdb.c (agent_command_1): Constify.
6557 * ada-lang.c (ada_exception_sal): Constify.
6558
6559 2017-09-27 Tom Tromey <tom@tromey.com>
6560
6561 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
6562 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
6563 (get_context_size, no_chunk, get_insn_history_modifiers)
6564 (cmd_record_insn_history, get_call_history_modifiers)
6565 (cmd_record_call_history): Constify.
6566
6567 2017-09-27 Tom Tromey <tom@tromey.com>
6568
6569 * source.c (show_substitute_path_command)
6570 (unset_substitute_path_command, set_substitute_path_command):
6571 Constify.
6572
6573 2017-09-27 Tom Tromey <tom@tromey.com>
6574
6575 * typeprint.c (maintenance_print_type): Constify.
6576 * maint.c (maintenance_dump_me, maintenance_demangle)
6577 (maintenance_time_display, maintenance_info_sections)
6578 (maintenance_print_statistics, maintenance_deprecate)
6579 (maintenance_undeprecate): Constify.
6580 (maintenance_do_deprecate): Constify. Use std::string.
6581 (maintenance_selftest): Constify.
6582 * gdbtypes.h (maintenance_print_type): Constify.
6583
6584 2017-09-27 Tom Tromey <tom@tromey.com>
6585
6586 * hppa-tdep.c (unwind_command): Constify.
6587
6588 2017-09-27 Tom Tromey <tom@tromey.com>
6589
6590 * target-descriptions.c (unset_tdesc_filename_cmd)
6591 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
6592 Constify.
6593
6594 2017-09-27 Tom Tromey <tom@tromey.com>
6595
6596 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
6597
6598 2017-09-27 Tom Tromey <tom@tromey.com>
6599
6600 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
6601
6602 2017-09-27 Tom Tromey <tom@tromey.com>
6603
6604 * tui/tui-regs.c (tui_reg_command): Constify.
6605
6606 2017-09-27 Tom Tromey <tom@tromey.com>
6607
6608 * skip.c (skip_file_command, skip_function_command)
6609 (skip_enable_command, skip_disable_command, skip_delete_command):
6610 Constify.
6611
6612 2017-09-27 Tom Tromey <tom@tromey.com>
6613
6614 * record-btrace.c (cmd_record_btrace_bts_start)
6615 (cmd_record_btrace_pt_start): Constify.
6616
6617 2017-09-27 Tom Tromey <tom@tromey.com>
6618
6619 * symmisc.c (maintenance_print_symbols)
6620 (maintenance_print_msymbols, maintenance_print_objfiles)
6621 (maintenance_info_symtabs, maintenance_check_symtabs)
6622 (maintenance_expand_symtabs, maintenance_info_line_tables):
6623 Constify.
6624
6625 2017-09-27 Tom Tromey <tom@tromey.com>
6626
6627 * top.c (new_ui_command): Constify.
6628
6629 2017-09-27 Tom Tromey <tom@tromey.com>
6630
6631 * symfile.c (add_symbol_file_command)
6632 (remove_symbol_file_command, list_overlays_command)
6633 (map_overlay_command, unmap_overlay_command)
6634 (overlay_auto_command, overlay_manual_command)
6635 (overlay_off_command, overlay_load_command): Constify.
6636
6637 2017-09-27 Tom Tromey <tom@tromey.com>
6638
6639 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
6640 (info_spu_mailbox_command, info_spu_dma_command)
6641 (info_spu_proxydma_command): Constify.
6642
6643 2017-09-27 Tom Tromey <tom@tromey.com>
6644
6645 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
6646
6647 2017-09-27 Tom Tromey <tom@tromey.com>
6648
6649 * cli/cli-script.c (user_defined_command): Constify.
6650
6651 2017-09-27 Tom Tromey <tom@tromey.com>
6652
6653 * cli/cli-dump.c (dump_memory_command, dump_value_command)
6654 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
6655 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
6656 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
6657 (dump_binary_value, append_binary_memory, append_binary_value):
6658 Constify.
6659 (struct dump_context) <func>: Constify.
6660 (add_dump_command): Update.
6661
6662 2017-09-27 Tom Tromey <tom@tromey.com>
6663
6664 * cli/cli-cmds.c (show_version, show_configuration)
6665 (source_command, show_user): Constify.
6666
6667 2017-09-27 Tom Tromey <tom@tromey.com>
6668
6669 * target.c (maintenance_print_target_stack): Constify.
6670
6671 2017-09-27 Tom Tromey <tom@tromey.com>
6672
6673 * interps.c (interpreter_exec_cmd): Constify.
6674
6675 2017-09-27 Tom Tromey <tom@tromey.com>
6676
6677 * record-full.c (cmd_record_full_restore): Constify.
6678
6679 2017-09-27 Tom Tromey <tom@tromey.com>
6680
6681 * memattr.c (enable_mem_command, disable_mem_command)
6682 (delete_mem_command): Constify.
6683
6684 2017-09-27 Tom Tromey <tom@tromey.com>
6685
6686 * value.c (show_convenience): Constify.
6687
6688 2017-09-27 Tom Tromey <tom@tromey.com>
6689
6690 * gdbcore.h (core_file_command): Update.
6691 * corefile.c (core_file_command): Constify.
6692
6693 2017-09-27 Tom Tromey <tom@tromey.com>
6694
6695 * user-regs.c (maintenance_print_user_registers): Constify.
6696
6697 2017-09-27 Tom Tromey <tom@tromey.com>
6698
6699 * cp-namespace.c (maintenance_cplus_namespace): Constify.
6700
6701 2017-09-27 Tom Tromey <tom@tromey.com>
6702
6703 * cp-support.c (first_component_command): Constify.
6704
6705 2017-09-27 Tom Tromey <tom@tromey.com>
6706
6707 * psymtab.c (maintenance_print_psymbols)
6708 (maintenance_info_psymtabs, maintenance_check_psymtabs):
6709 Constify.
6710
6711 2017-09-27 Tom Tromey <tom@tromey.com>
6712
6713 * windows-tdep.c (display_tib): Constify.
6714
6715 2017-09-27 Tom Tromey <tom@tromey.com>
6716
6717 * linux-fork.c (delete_checkpoint_command)
6718 (detach_checkpoint_command): Constify.
6719
6720 2017-09-27 Tom Tromey <tom@tromey.com>
6721
6722 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
6723
6724 2017-09-27 Tom Tromey <tom@tromey.com>
6725
6726 * arc-tdep.c (dump_arc_instruction_command): Constify.
6727
6728 2017-09-27 Tom Tromey <tom@tromey.com>
6729
6730 * valprint.c (set_radix, show_radix): Constify.
6731
6732 2017-09-27 Tom Tromey <tom@tromey.com>
6733
6734 * dtrace-probe.c (info_probes_dtrace_command): Constify.
6735
6736 2017-09-27 Tom Tromey <tom@tromey.com>
6737
6738 * command.h (not_just_help_class_command): Update.
6739 * cli/cli-decode.h (not_just_help_class_command): Update.
6740 * cli/cli-decode.c (not_just_help_class_command): Constify.
6741
6742 2017-09-27 Tom Tromey <tom@tromey.com>
6743
6744 * gdb_bfd.c (maintenance_info_bfds): Constify.
6745
6746 2017-09-27 Tom Tromey <tom@tromey.com>
6747
6748 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
6749 overloads.
6750 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
6751 (do_const_cfunc): New function.
6752 (cmd_cfunc_eq): New overload.
6753 (cli_user_command_p): Check do_const_cfunc.
6754 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
6755 const_cfunc.
6756 * command.h (add_cmd): Add const overload and no-function
6757 overload.
6758 (set_cmd_cfunc): Add const overload.
6759 (cmd_const_cfunc_ftype): Declare.
6760 (cmd_cfunc_eq): Add const overload.
6761 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
6762 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
6763 overload.
6764
6765 2017-09-27 Tom Tromey <tom@tromey.com>
6766
6767 * macroexp.c (get_next_token_for_substitution): New function.
6768 (substitute_args): Call it. Check for __VA_OPT__.
6769
6770 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
6771 Pedro Alves <palves@redhat.com>
6772
6773 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
6774 producer_is_icc_lt_14.
6775 (producer_is_icc_lt_14): New function.
6776 (check_producer): Add code for checking version of ICC.
6777 (producer_is_icc): Move to producer.c.
6778 (read_structure_type): Restrict ICC workaround to ICC<14.
6779 * producer.c: Include selftest.h.
6780 (producer_is_icc, producer_parsing_tests, _initialize_producer):
6781 New functions.
6782 * producer.h (producer_is_icc): New declaration.
6783
6784 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
6785
6786 * Makefile.in (SFILES): Add producer.c.
6787 (COMMON_OBS): Add producer.o
6788 * amd64-tdep.c (producer.h): Add new include.
6789 * dwarf2read.c (producer.h): Add new include.
6790 * producer.c: New file.
6791 * producer.h: New file.
6792 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
6793 producer.c.
6794 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
6795 producer.h.
6796
6797 2017-09-26 Matthias Klose <doko@ubuntu.com>
6798
6799 * configure.ac: Search ncursesw before ncurses.
6800 Check ncursesw/ncurses.h before ncurses/ncurses.h.
6801 * gdb_curses.h: Include <ncursesw/ncurses.h>
6802 * config.in, configure: Regenerate.
6803
6804 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6805
6806 PR gdb/22185
6807 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
6808 obsolete.
6809 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
6810 Remove i386sol2 support.
6811 * configure.nat <i386sol2>: Remove.
6812 <sol2-64>: Fold into ...
6813 <sol2>: ... this.
6814 Move common settings to default section.
6815 Add sol-thread.o.
6816 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
6817 x86_64-*-solaris2.1[0-9]*>: Rename to ...
6818 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
6819 <i[34567]86-*-solaris*>: Remove.
6820 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
6821
6822 * configure.ac: Remove wctype in libw check.
6823 (_MSE_INT_H): Don't define on Solaris 7-9.
6824 <solaris*>: Remove libthread_db.so.1 check.
6825 * configure: Regenerate.
6826 * config.in: Regenerate.
6827
6828 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
6829 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
6830 (gdb_ps_size_t): Remove.
6831 Use base types in users.
6832 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
6833
6834 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
6835
6836 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6837
6838 PR build/22206
6839 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
6840 (adi_is_addr_mapped): Likewise.
6841 (PSR_ICC): Don't redefine.
6842 (PSR_IMPL): Likewise.
6843
6844 2017-09-25 Tom Tromey <tom@tromey.com>
6845
6846 * regcache.c (regcache::dump): Use string_printf.
6847
6848 2017-09-25 Tom Tromey <tom@tromey.com>
6849
6850 * regcache.c (class regcache_invalidator): New.
6851 (struct register_to_invalidate): Remove.
6852 (make_cleanup_regcache_invalidate): Remove.
6853 (regcache::raw_write): Use regcache_invalidator.
6854
6855 2017-09-25 Tom Tromey <tom@tromey.com>
6856
6857 * spu-tdep.c (spu2ppu_sniffer): Update.
6858 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
6859 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
6860 Remove.
6861 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
6862 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
6863 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
6864 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
6865 (frame_pop): Update.
6866
6867 2017-09-25 Tom Tromey <tom@tromey.com>
6868
6869 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
6870 * regcache.h (regcache_xfree): Don't declare.
6871 * regcache.c (regcache_xfree): Remove.
6872 (do_regcache_xfree): Use delete.
6873 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
6874 * linux-fork.c (free_fork): Use delete.
6875 (fork_save_infrun_state): Likewise.
6876 * jit.c (jit_dealloc_cache): Use delete.
6877 * infrun.c (discard_infcall_suspend_state): Use delete.
6878
6879 2017-09-25 Tom Tromey <tom@tromey.com>
6880
6881 * regcache.h (regcache_xmalloc): Don't declare.
6882 (regcache_raw_set_cached_value): Update comment.
6883 * regcache.c (regcache_xmalloc): Remove.
6884 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
6885 * jit.c (jit_frame_sniffer): Use new.
6886 * frame.c (frame_save_as_regcache): Use new.
6887
6888 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
6889
6890 * NEWS: Advertise support for guarded-storage registers on IBM z.
6891
6892 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
6893
6894 * s390-linux-nat.c (have_regset_gs): New static variable.
6895 (s390_linux_fetch_inferior_registers): Handle guarded-storage
6896 control block and guarded-storage broadcast control regsets.
6897 (s390_read_description): Detect whether the target has
6898 guarded-storage support, return appropriate tdesc.
6899 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
6900 (features/s390x-gs-linux64.c): Likewise.
6901 (struct gdbarch_tdep) <have_gs>: New field.
6902 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
6903 (s390_gsbc_regset): New variables.
6904 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
6905 and s390_gsbc_regset, if applicable.
6906 (s390_core_read_description): Check whether core file was from a
6907 target with guarded-storage support; include appropriate regsets.
6908 (s390_gdbarch_init): Add registers for guarded-storage support.
6909 (_initialize_s390_tdep): Initialize new target descriptions that
6910 include registers for guarded-storage support.
6911 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
6912 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
6913 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
6914 (S390_NUM_REGS): Adjust macro definition.
6915 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
6916 (tdesc_s390x_gs_linux64): New declarations.
6917
6918 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
6919
6920 * features/s390-gs-linux64.xml: New file.
6921 * features/s390-gs.xml: New file.
6922 * features/s390-gsbc.xml: New file.
6923 * features/s390x-gs-linux64.xml: New file.
6924 * features/Makefile (WHICH): Add s390-gs-linux64 and
6925 s390x-gs-linux64.
6926 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
6927 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
6928 * features/s390-gs-linux64.c: New generated file.
6929 * features/s390x-gs-linux64.c: New file.
6930 * regformats/s390-gs-linux64.dat: New file.
6931 * regformats/s390x-gs-linux64.dat: New file.
6932
6933 2017-09-23 Tom Tromey <tom@tromey.com>
6934
6935 * defs.h (make_cleanup_override_quit_handler): Don't declare.
6936
6937 2017-09-22 Tom Tromey <tom@tromey.com>
6938
6939 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
6940 type to scoped_restore_tmpl.
6941 <scoped_input_handler>: Initialize m_quit_handler directly.
6942
6943 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
6944
6945 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
6946 (cd_command): Likewise. Free "current_directory" before
6947 assigning to it.
6948 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
6949 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
6950 * top.c (gdb_dirbuf): Remove global declaration.
6951 * top.h (gdb_dirbuf): Likewise.
6952
6953 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
6954
6955 * gnulib/aclocal.m4: Regenerate.
6956 * gnulib/config.in: Regenerate.
6957 * gnulib/configure: Regenerate.
6958 * gnulib/import/Makefile.am: Regenerate.
6959 * gnulib/import/Makefile.in: Regenerate.
6960 * gnulib/import/assure.h: New file.
6961 * gnulib/import/at-func.c: Likewise
6962 * gnulib/import/chdir-long.c: New file.
6963 * gnulib/import/chdir-long.h: New file.
6964 * gnulib/import/cloexec.c: New file.
6965 * gnulib/import/cloexec.h: New file.
6966 * gnulib/import/close.c: New file.
6967 * gnulib/import/closedir.c: New file.
6968 * gnulib/import/dirent-private.h: New file.
6969 * gnulib/import/dup-safer.c: New file.
6970 * gnulib/import/dup.c: New file.
6971 * gnulib/import/dup2.c: New file.
6972 * gnulib/import/error.c: New file.
6973 * gnulib/import/error.h: New file.
6974 * gnulib/import/exitfail.c: New file.
6975 * gnulib/import/exitfail.h: New file.
6976 * gnulib/import/fchdir.c: New file.
6977 * gnulib/import/fcntl.c: New file.
6978 * gnulib/import/fcntl.in.h: New file.
6979 * gnulib/import/fd-hook.c: New file.
6980 * gnulib/import/fd-hook.h: New file.
6981 * gnulib/import/fd-safer.c: New file.
6982 * gnulib/import/fdopendir.c: New file.
6983 * gnulib/import/filename.h: New file.
6984 * gnulib/import/filenamecat-lgpl.c: New file.
6985 * gnulib/import/filenamecat.h: New file.
6986 * gnulib/import/fstat.c: New file.
6987 * gnulib/import/fstatat.c: New file.
6988 * gnulib/import/getcwd-lgpl.c: New file.
6989 * gnulib/import/getcwd.c: New file.
6990 * gnulib/import/getdtablesize.c: New file.
6991 * gnulib/import/getlogin_r.c: New file.
6992 * gnulib/import/getprogname.c: New file.
6993 * gnulib/import/getprogname.h: New file.
6994 * gnulib/import/gettext.h: New file.
6995 * gnulib/import/glob-libc.h: New file.
6996 * gnulib/import/glob.c: New file.
6997 * gnulib/import/glob.in.h: New file.
6998 * gnulib/import/intprops.h: New file.
6999 * gnulib/import/m4/chdir-long.m4: New file.
7000 * gnulib/import/m4/close.m4: New file.
7001 * gnulib/import/m4/closedir.m4: New file.
7002 * gnulib/import/m4/d-ino.m4: New file.
7003 * gnulib/import/m4/d-type.m4: New file.
7004 * gnulib/import/m4/dup.m4: New file.
7005 * gnulib/import/m4/dup2.m4: New file.
7006 * gnulib/import/m4/error.m4: New file.
7007 * gnulib/import/m4/fchdir.m4: New file.
7008 * gnulib/import/m4/fcntl.m4: New file.
7009 * gnulib/import/m4/fcntl_h.m4: New file.
7010 * gnulib/import/m4/fdopendir.m4: New file.
7011 * gnulib/import/m4/filenamecat.m4: New file.
7012 * gnulib/import/m4/fstat.m4: New file.
7013 * gnulib/import/m4/fstatat.m4: New file.
7014 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
7015 * gnulib/import/m4/getcwd-path-max.m4: New file.
7016 * gnulib/import/m4/getcwd.m4: New file.
7017 * gnulib/import/m4/getdtablesize.m4: New file.
7018 * gnulib/import/m4/getlogin_r.m4: New file.
7019 * gnulib/import/m4/getprogname.m4: New file.
7020 * gnulib/import/m4/glob.m4: New file.
7021 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
7022 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
7023 * gnulib/import/m4/mempcpy.m4: New file.
7024 * gnulib/import/m4/memrchr.m4: New file.
7025 * gnulib/import/m4/mode_t.m4: New file.
7026 * gnulib/import/m4/msvc-inval.m4: New file.
7027 * gnulib/import/m4/msvc-nothrow.m4: New file.
7028 * gnulib/import/m4/open.m4: New file.
7029 * gnulib/import/m4/openat.m4: New file.
7030 * gnulib/import/m4/opendir.m4: New file.
7031 * gnulib/import/m4/readdir.m4: New file.
7032 * gnulib/import/m4/realloc.m4: New file.
7033 * gnulib/import/m4/rewinddir.m4: New file.
7034 * gnulib/import/m4/save-cwd.m4: New file.
7035 * gnulib/import/m4/strdup.m4: New file.
7036 * gnulib/import/m4/strerror.m4: New file.
7037 * gnulib/import/m4/unistd-safer.m4: New file.
7038 * gnulib/import/mempcpy.c: New file.
7039 * gnulib/import/memrchr.c: New file.
7040 * gnulib/import/msvc-inval.c: New file.
7041 * gnulib/import/msvc-inval.h: New file.
7042 * gnulib/import/msvc-nothrow.c: New file.
7043 * gnulib/import/msvc-nothrow.h: New file.
7044 * gnulib/import/open.c: New file.
7045 * gnulib/import/openat-die.c: New file.
7046 * gnulib/import/openat-priv.h: New file.
7047 * gnulib/import/openat-proc.c: New file.
7048 * gnulib/import/openat.c: New file.
7049 * gnulib/import/openat.h: New file.
7050 * gnulib/import/opendir.c: New file.
7051 * gnulib/import/pipe-safer.c: New file.
7052 * gnulib/import/readdir.c: New file.
7053 * gnulib/import/realloc.c: New file.
7054 * gnulib/import/rewinddir.c: New file.
7055 * gnulib/import/save-cwd.c: New file.
7056 * gnulib/import/save-cwd.h: New file.
7057 * gnulib/import/strdup.c: New file.
7058 * gnulib/import/strerror-override.c: New file.
7059 * gnulib/import/strerror-override.h: New file.
7060 * gnulib/import/strerror.c: New file.
7061 * gnulib/import/unistd--.h: New file.
7062 * gnulib/import/unistd-safer.h: New file.
7063 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
7064 "getcwd" and "glob".
7065 * ser-tcp.c: Undefine "close" before redefining it.
7066
7067 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
7068
7069 * guile/scm-value.c (gdbscm_value_address): Initialize address,
7070 get rid of res_val.
7071
7072 2017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7073
7074 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
7075 <sol2,sparc>: Likewise.
7076 <sol2-64,i386>: Likewise.
7077
7078 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
7079 -Wdeprecated-declarations on *-*-solaris*.
7080 * configure: Regenerate.
7081
7082 * procfs.c: Include "nat/inferior.h".
7083 (procfs_info_proc): Fix typo.
7084
7085 2017-09-21 Kevin Buettner <kevinb@redhat.com>
7086
7087 * remote.c (vector): Include.
7088 (struct private_thread_info): Add field, thread_handle.
7089 (free_private_thread_info): Deallocate storage associated with
7090 thread handle.
7091 (get_private_info_thread): Initialize `thread_handle' field.
7092 (struct thread_item): Add field, thread_handle.
7093 (clear_threads_listing_context): Deallocate storage associated
7094 with thread handle.
7095 (start_thread): Add support for "handle" attribute.
7096 (thread_attributes): Add "handle".
7097 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
7098 field.
7099 (remote_update_thread_list): Update thread_handle.
7100 (remote_thread_handle_to_thread_info): New function.
7101 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
7102
7103 2017-09-21 Kevin Buettner <kevinb@redhat.com>
7104
7105 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
7106 function.
7107 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
7108 * python/python-internal.h (thread_object_type): Declare.
7109
7110 2017-09-21 Kevin Buettner <kevinb@redhat.com>
7111
7112 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
7113 (target_thread_handle_to_thread_info): Declare.
7114 * target.c (target_thread_handle_to_thread_info): New function.
7115 * target-delegates.c: Regenerate.
7116 * gdbthread.h (find_thread_by_handle): Declare.
7117 * thread.c (find_thread_by_handle): New function.
7118 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
7119 function.
7120 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
7121
7122 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
7123
7124 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
7125
7126 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
7127
7128 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
7129
7130 2017-09-21 Yao Qi <yao.qi@linaro.org>
7131
7132 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
7133 to gdb_target_obs.
7134
7135 2017-09-20 Tom Tromey <tom@tromey.com>
7136
7137 * breakpoint.c (struct counted_command_line): Remove.
7138 (breakpoint_commands): Update.
7139 (alloc_counted_command_line, incref_counted_command_line)
7140 (decref_counted_command_line, do_cleanup_counted_command_line)
7141 (make_cleanup_decref_counted_command_line): Remove.
7142 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
7143 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
7144 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
7145 (save_breakpoints): Update.
7146 * breakpoint.h (counted_command_line): Now a typedef to
7147 shared_ptr.
7148 (struct breakpoint) <commands>: Now a counted_command_line.
7149 (struct bpstats) <command>: Likewise.
7150
7151 2017-09-20 Tom Tromey <tom@tromey.com>
7152
7153 * breakpoint.c (struct commands_info, do_map_commands_command):
7154 Remove.
7155 (commands_command_1): Update.
7156 (iterate_over_related_breakpoints): Take a function_view.
7157 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
7158 (delete_command): Update.
7159 (map_breakpoint_numbers): Take a function_view.
7160 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
7161 (disable_command): Update.
7162 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
7163 (enable_command): Update.
7164 (struct disp_data, do_enable_breakpoint_disp)
7165 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
7166 (do_map_enable_delete_breakpoint): Remove.
7167 (enable_once_command, enable_count_command, enable_delete_command)
7168 (delete_trace_variable_command): Update.
7169
7170 2017-09-20 Tom Tromey <tom@tromey.com>
7171
7172 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
7173 (bpstat_clear): Use delete.
7174 (bpstats): New constructors.
7175 (bpstat_copy, bpstat_stop_status): Use new.
7176 (dprintf_after_condition_true): Update.
7177 * breakpoint.h (bpstats::bpstats): Add constructors.
7178 (bpstats::~bpstats): Add destructor.
7179
7180 2017-09-20 Pedro Alves <palves@redhat.com>
7181
7182 * eval.c (make_params): Delete, refactored as ...
7183 (class fake_method): ... this new type's ctor.
7184 (fake_method::~fake_method): New.
7185 (evaluate_subexp_standard): Use 'fake_method'.
7186
7187 2017-09-20 Tom Tromey <tom@tromey.com>
7188
7189 * windows-nat.c (get_windows_debug_event, windows_wait)
7190 (do_initial_windows_stuff, windows_attach): Update.
7191 * utils.c (vwarning, internal_vproblem): Update.
7192 (ui_unregister_input_event_handler_cleanup)
7193 (prepare_to_handle_input): Remove.
7194 (class scoped_input_handler): New.
7195 (defaulted_query, prompt_for_continue): Update.
7196 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
7197 Update.
7198 * top.c (undo_terminal_modifications_before_exit): Update.
7199 * target/target.h (target_terminal_init, target_terminal_inferior)
7200 (target_terminal_ours): Don't declare.
7201 (class target_terminal): New.
7202 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
7203 (target_terminal_ours_for_output)
7204 (make_cleanup_restore_target_terminal): Don't declare.
7205 (target_terminal_info): Remove.
7206 * target.c (enum terminal_state, terminal_state): Remove.
7207 (target_terminal::terminal_state): Define.
7208 (target_terminal::init): Rename from target_terminal_init.
7209 (target_terminal::inferior): Rename from
7210 target_terminal_inferior.
7211 (target_terminal::ours): Rename from target_terminal_ours.
7212 (target_terminal::ours_for_output): Rename from
7213 target_terminal_ours_for_output.
7214 (target_terminal::info): New method.
7215 (cleanup_restore_target_terminal)
7216 (make_cleanup_restore_target_terminal): Remove.
7217 * solib.c (handle_solib_event): Update.
7218 * remote.c (remote_serial_quit_handler): Update.
7219 (remote_terminal_inferior, remote_wait_as): Update.
7220 * record-full.c (record_full_wait_1): Update.
7221 * nto-procfs.c (procfs_create_inferior): Update.
7222 * nat/fork-inferior.c (startup_inferior): Update.
7223 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
7224 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
7225 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
7226 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
7227 (mi_breakpoint_created, mi_breakpoint_deleted)
7228 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
7229 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
7230 (mi_user_selected_context_changed, report_initial_inferior):
7231 Update.
7232 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
7233 (linux_nat_terminal_inferior): Update.
7234 * infrun.c (follow_fork_inferior)
7235 (handle_vfork_child_exec_or_exit, do_target_resume)
7236 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
7237 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
7238 Update.
7239 * inflow.c (child_terminal_init, info_terminal_command): Update.
7240 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
7241 (attach_command): Update.
7242 * infcall.c (call_thread_fsm_should_stop): Update.
7243 * gnu-nat.c (gnu_attach): Update.
7244 * extension.c (struct active_ext_lang_state)
7245 (restore_active_ext_lang): Update.
7246 * exceptions.c (print_flush): Update.
7247 * event-top.c (async_enable_stdin, default_quit_handler): Update.
7248 (struct quit_handler_cleanup_data, restore_quit_handler)
7249 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
7250 Remove.
7251 * cp-support.c (gdb_demangle): Update.
7252 * breakpoint.c (update_inserted_breakpoint_locations)
7253 (insert_breakpoint_locations, handle_jit_event)
7254 (disable_breakpoints_in_unloaded_shlib): Update.
7255 * annotate.c (annotate_breakpoints_invalid)
7256 (annotate_frames_invalid): Update.
7257
7258 2017-09-20 Tom Tromey <tom@tromey.com>
7259
7260 * main.c (catch_command_errors): Rename from
7261 catch_command_errors_const.
7262 (captured_main_1): Update.
7263
7264 2017-09-20 Pedro Alves <palves@redhat.com>
7265
7266 * cli/cli-cmds.c (list_command): Use print_sal_location.
7267 (print_sal_location): New function.
7268 (ambiguous_line_spec): Use print_sal_location.
7269 * linespec.c (symbol_to_sal): Record the symbol in the sal.
7270 * symtab.c (find_function_start_sal): Likewise.
7271 * symtab.h (symtab_and_line::symbol): New field.
7272
7273 2017-09-20 Pedro Alves <palves@redhat.com>
7274
7275 * linespec.c (minsym_found): Handle non-text minsyms.
7276 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
7277
7278 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7279
7280 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
7281 backslash.
7282
7283 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7284
7285 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
7286 vmovups instead vmovaps.
7287 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
7288
7289 2017-09-19 John Baldwin <jhb@FreeBSD.org>
7290
7291 * NEWS (Changes since GDB 8.0): Add starti.
7292 * infcmd.c (enum run_break): New.
7293 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
7294 case.
7295 (run_command): Use enum run_how.
7296 (start_command): Likewise.
7297 (starti_command): New function.
7298 (RUN_ARGS_HELP): New macro.
7299 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
7300 commands. Add starti command.
7301
7302 2017-09-19 Yao Qi <yao.qi@linaro.org>
7303
7304 * Makefile.in (monitor.o): Remove the rule.
7305
7306 2017-09-19 Yao Qi <yao.qi@linaro.org>
7307
7308 * annotate.h (struct annotate_arg_emitter): Use
7309 DISABLE_COPY_AND_ASSIGN.
7310 * common/refcounted-object.h (refcounted_object): Likewise.
7311 * completer.h (struct completion_result): Likewise.
7312 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
7313 * filename-seen-cache.h (filename_seen_cache): Likewise.
7314 * gdbcore.h (thread_section_name): Likewise.
7315 * gdb_regex.h (compiled_regex): Likewise.
7316 * gdbthread.h (scoped_restore_current_thread): Likewise.
7317 * inferior.h (scoped_restore_current_inferior): Likewise.
7318 * jit.c (jit_reader): Likewise.
7319 * linespec.h (struct linespec_result): Likewise.
7320 * mi/mi-parse.h (struct mi_parse): Likewise.
7321 * nat/fork-inferior.c (execv_argv): Likewise.
7322 * progspace.h (scoped_restore_current_program_space): Likewise.
7323 * python/python-internal.h (class gdbpy_enter): Likewise.
7324 * regcache.h (regcache): Likewise.
7325 * target-descriptions.c (struct tdesc_reg): Likewise.
7326 (struct tdesc_type): Likewise.
7327 (struct tdesc_feature): Likewise.
7328 * ui-out.h (ui_out_emit_type): Likewise.
7329
7330 2017-09-18 Simon Marchi <simon.marchi@ericsson.com>
7331
7332 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
7333 label abort_expression.
7334
7335 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
7336
7337 * common/buffer.c (buffer_xml_printf): Adjust.
7338 * common/xml-utils.c (xml_escape_text): Change return type to
7339 std::string, update code accordingly.
7340 * common/xml-utils.h (xml_escape_text): Change return type to
7341 std::string.
7342 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
7343 * windows-tdep.c (windows_xfer_shared_library): Adjust.
7344 * unittests/xml-utils-selftests.c (test_xml_escape_text):
7345 Adjust.
7346
7347 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
7348
7349 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
7350 (SUBDIR_UNITTESTS_OBS): Add new object file.
7351 * unittests/xml-utils-selftests.c: New file.
7352
7353 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
7354
7355 * common/selftest.h (selftest): New struct/interface.
7356 (register_test): Add name parameter, add new overload.
7357 (run_tests): Add filter parameter.
7358 (for_each_selftest_ftype): New typedef.
7359 (for_each_selftest): New declaration.
7360 * common/selftest.c (tests): Change type to
7361 map<string, unique_ptr<selftest>>.
7362 (simple_selftest): New struct.
7363 (register_test): New function.
7364 (register_test): Add name parameter and use it.
7365 (run_tests): Add filter parameter and use it. Add prints.
7366 Adjust to vector -> map change.
7367 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
7368 registering selftests.
7369 * arm-tdep.c (_initialize_arm_tdep): Likewise.
7370 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
7371 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
7372 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
7373 * findvar.c (_initialize_findvar): Likewise.
7374 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
7375 * maint.c (maintenance_selftest): Update call to run_tests.
7376 (maintenance_info_selftests): New function.
7377 (_initialize_maint_cmds): Register "maintenance info selftests"
7378 command. Update "maintenance selftest" doc.
7379 * regcache.c (_initialize_regcache): Add names when registering
7380 selftests.
7381 * rust-exp.y (_initialize_rust_exp): Likewise.
7382 * selftest-arch.c (gdbarch_selftest): New struct.
7383 (gdbarch_tests): Remove.
7384 (register_test_foreach_arch): Add name parameter. Call
7385 register_test.
7386 (tests_with_arch): Remove, move most content to
7387 gdbarch_selftest::operator().
7388 (_initialize_selftests_foreach_arch): Remove.
7389 * selftest-arch.h (register_test_foreach_arch): Add name
7390 parameter.
7391 (run_tests_with_arch): New declaration.
7392 * utils-selftests.c (_initialize_utils_selftests): Add names
7393 when registering selftests.
7394 * utils.c (_initialize_utils): Likewise.
7395 * unittests/array-view-selftests.c
7396 (_initialize_array_view_selftests): Likewise.
7397 * unittests/environ-selftests.c (_initialize_environ_selftests):
7398 Likewise.
7399 * unittests/function-view-selftests.c
7400 (_initialize_function_view_selftests): Likewise.
7401 * unittests/offset-type-selftests.c
7402 (_initialize_offset_type_selftests): Likewise.
7403 * unittests/optional-selftests.c
7404 (_initialize_optional_selftests): Likewise.
7405 * unittests/scoped_restore-selftests.c
7406 (_initialize_scoped_restore_selftests): Likewise.
7407 * NEWS: Document "maintenance selftest" and "maint info
7408 selftests".
7409
7410 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
7411
7412 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
7413 scoped_restore.
7414
7415 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
7416
7417 * mi/mi-main.c (mi_load_progress): Make uiout variable
7418 a unique_ptr.
7419
7420 2017-09-15 Pedro Alves <palves@redhat.com>
7421
7422 * compile/compile-c-types.c (convert_enum, convert_int)
7423 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
7424
7425 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
7426
7427 * dwarf2read.c (copy_string): Remove.
7428 (parse_macro_definition): Replace copy_string with savestring.
7429
7430 2017-09-15 Yao Qi <yao.qi@linaro.org>
7431
7432 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
7433 gdb_target_obs.
7434 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
7435 Likewise.
7436 (i[34567]86-*-linux*): Likewise.
7437
7438 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
7439
7440 * dwarf2expr.h (dwarf_stack_value): Add constructor.
7441 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
7442 <stack>: Change type to std::vector.
7443 <stack_len, stack_allocated>: Remove.
7444 <grow_stack>: Remove.
7445 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
7446 (dwarf_expr_context::~dwarf_expr_context): Remove.
7447 (dwarf_expr_context::grow_stack): Remove.
7448 (dwarf_expr_context::push): Adjust.
7449 (dwarf_expr_context::pop): Adjust.
7450 (dwarf_expr_context::fetch): Adjust.
7451 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
7452 (dwarf_expr_context::stack_empty_p): Adjust.
7453 (dwarf_expr_context::execute_stack_op): Adjust.
7454
7455 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
7456
7457 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
7458 return type to bool.
7459 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
7460
7461 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
7462
7463 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
7464 Change type to bool.
7465 (dwarf_stack_value) <in_stack_memory>: Likewise.
7466 (dwarf_expr_context) <push_address>: Change parameter type to
7467 bool.
7468 <fetch_in_stack_memory>: Change return type to bool.
7469 <push>: Change parameter type to bool.
7470 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
7471 to bool.
7472 (dwarf_expr_context::push_address): Likewise.
7473 (dwarf_expr_context::fetch_in_stack_memory): Change return type
7474 to bool.
7475 (dwarf_expr_context::execute_stack_op): Adjust.
7476 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
7477
7478 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
7479
7480 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
7481 (struct dwarf_expr_context) <n_pieces>: Remove.
7482 <pieces>: Change type to std::vector.
7483 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
7484 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
7485 pieces.
7486 (dwarf_expr_context::add_piece): Adjust.
7487 * dwarf2loc.c (struct piece_closure): Initialize fields.
7488 <n_pieces>: Remove.
7489 <pieces>: Change type to std::vector.
7490 (allocate_piece_closure): Adjust, change parameter to
7491 std::vector rvalue and std::move it to piece_closure.
7492 (rw_pieced_value): Adjust.
7493 (check_pieced_synthetic_pointer): Adjust.
7494 (indirect_synthetic_pointer): Adjust.
7495 (coerce_pieced_ref): Adjust.
7496 (free_pieced_value_closure): Adjust. Use delete to free
7497 piece_closure.
7498 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
7499 to allocate_piece_closure.
7500 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
7501
7502 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
7503
7504 * probe.h (probe_ops_cp): Remove typedef.
7505 (DEF_VEC_P (probe_ops_cp)): Remove.
7506 (all_probe_ops): Change type to std::vector.
7507 * probe.c (info_probes_for_ops): Adjust to vector change.
7508 (probe_linespec_to_ops): Likewise.
7509 (all_probe_ops): Change type to std::vector.
7510 (_initialize_probe): Adjust to vector change.
7511 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
7512 * elfread.c (elf_get_probes): Likewise.
7513 * stap-probe.c (_initialize_stap_probe): Likewise.
7514
7515 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
7516
7517 * probe.h (struct bound_probe): Define constructors.
7518 * probe.c (bound_probe_s): Remove typedef.
7519 (DEF_VEC_O (bound_probe_s)): Remove VEC.
7520 (collect_probes): Change return type to std::vector, remove
7521 cleanup.
7522 (compare_probes): Return bool, change parameter type. Change
7523 semantic to "less than".
7524 (gen_ui_out_table_header_info): Change parameter to std::vector
7525 and update.
7526 (exists_probe_with_pops): Likewise.
7527 (info_probes_for_ops): Update to std::vector change.
7528 (enable_probes_command): Likewise.
7529 (disable_probes_command): Likewise.
7530
7531 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
7532
7533 * probe.h (struct probe_ops) <get_probes>: Change parameter from
7534 vec to std::vector.
7535 * probe.c (parse_probes_in_pspace): Update.
7536 (find_probes_in_objfile): Update.
7537 (find_probe_by_pc): Update.
7538 (collect_probes): Update.
7539 (probe_any_get_probes): Update.
7540 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
7541 return type to reference to std::vector.
7542 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
7543 std::vector and update.
7544 (dtrace_process_dof): Likewise.
7545 (dtrace_get_probes): Likewise.
7546 * elfread.c (elf_get_probes): Change return type to std::vector,
7547 store an std::vector in bfd_data.
7548 (probe_key_free): Update to std::vector.
7549 * stap-probe.c (handle_stap_probe): Change parameter to
7550 std::vector and update.
7551 (stap_get_probes): Likewise.
7552 * symfile-debug.c (debug_sym_get_probes): Change return type to
7553 std::vector and update.
7554
7555 2017-09-11 Tom Tromey <tom@tromey.com>
7556
7557 * breakpoint.c (program_breakpoint_here_p): Update.
7558 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
7559 from make_show_memory_breakpoints_cleanup. Return a
7560 scoped_restore_tmpl<int>.
7561 (restore_show_memory_breakpoints): Remove.
7562 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
7563 * mem-break.c (memory_validate_breakpoint): Update.
7564 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
7565 (ia64_memory_remove_breakpoint): Update.
7566 (ia64_breakpoint_from_pc): Update.
7567 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
7568 from make_show_memory_breakpoints_cleanup.
7569
7570 2017-09-11 Tom Tromey <tom@tromey.com>
7571
7572 * d-namespace.c (d_lookup_symbol): Use std::string.
7573 (find_symbol_in_baseclass): Likewise.
7574
7575 2017-09-11 Tom Tromey <tom@tromey.com>
7576
7577 * ctf.c (ctf_start): Use std::string.
7578
7579 2017-09-11 Tom Tromey <tom@tromey.com>
7580
7581 * ada-lang.c (is_known_support_routine): Update.
7582 (ada_unhandled_exception_name_addr_from_raise): Update.
7583 * guile/scm-frame.c (gdbscm_frame_name): Update.
7584 * python/py-frame.c (frapy_name): Update.
7585 (frapy_function): Update.
7586 * stack.h (find_frame_funname): Update.
7587 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
7588 (print_frame): Update.
7589
7590 2017-09-11 Tom Tromey <tom@tromey.com>
7591
7592 * findcmd.c (put_bits): Take a gdb::byte_vector.
7593 (parse_find_args): Return gdb::byte_vector. "args" now const.
7594 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
7595 cleanups.
7596 (find_command): Update.
7597
7598 2017-09-11 Tom Tromey <tom@tromey.com>
7599
7600 * cli/cli-script.c (class scoped_restore_hook_in): New.
7601 (clear_hook_in_cleanup): Remove.
7602 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
7603 scoped_restore_hook_in.
7604
7605 2017-09-11 Tom Tromey <tom@tromey.com>
7606
7607 * cli/cli-script.c (restore_interp): Remove.
7608 (read_command_lines): Use scoped_restore_interp.
7609 * interps.c (scoped_restore_interp::set_temp): Rename from
7610 interp_set_temp.
7611 * interps.h (class scoped_restore_interp): New.
7612 (interp_set_temp): Remove.
7613
7614 2017-09-11 Tom Tromey <tom@tromey.com>
7615
7616 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
7617 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
7618 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
7619 scoped_restore.
7620 (mi_cmd_break_insert_1): Update.
7621 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
7622 scoped_restore.
7623
7624 2017-09-11 Tom Tromey <tom@tromey.com>
7625
7626 * demangle.c (demangle_command): Update.
7627 * breakpoint.c (disable_command): Update.
7628 (enable_command): Update.
7629 (find_location_by_number): Make "number" const. Use
7630 get_number_trailer.
7631 * cli/cli-utils.c (extract_arg): Return std::string.
7632 * probe.c (parse_probe_linespec): Update. Change types.
7633 (collect_probes): Take string arguments.
7634 (parse_probe_linespec): Likewise.
7635 (info_probes_for_ops): Update.
7636 (enable_probes_command): Update.
7637 (disable_probes_command): Update.
7638 * break-catch-sig.c (catch_signal_split_args): Update.
7639 * mi/mi-parse.c (mi_parse): Update.
7640
7641 2017-09-11 Tom Tromey <tom@tromey.com>
7642
7643 * language.h (language_enum): Make argument const.
7644 * language.c (language_enum): Make argument const.
7645
7646 2017-09-11 Tom Tromey <tom@tromey.com>
7647
7648 * common/common-utils.h (skip_to_space): Remove macro, redeclare
7649 as function.
7650 (skip_to_space): Rename from skip_to_space_const.
7651 * common/common-utils.c (skip_to_space): New function.
7652 (skip_to_space): Rename from skip_to_space_const.
7653 * cli/cli-utils.h (get_number): Rename from get_number_const.
7654 (extract_arg): Rename from extract_arg_const.
7655 * cli/cli-utils.c (get_number): Rename from get_number_const.
7656 (extract_arg): Rename from extract_arg_const.
7657 (number_or_range_parser::get_number): Use ::get_number.
7658 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
7659 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
7660 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
7661 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
7662 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
7663 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
7664 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
7665 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
7666
7667 2017-09-11 Tom Tromey <tom@tromey.com>
7668
7669 * python/python.c (do_start_initialization): Use
7670 py-event-types.def to initialize types.
7671 Define all object type structures.
7672 * python/python-internal.h: Don't declare event initialization
7673 functions.
7674 * python/py-threadevent.c (thread_event_object_type): Don't
7675 define.
7676 * python/py-stopevent.c (stop_event_object_type): Don't define.
7677 * python/py-signalevent.c (signal_event_object_type): Don't
7678 declare or define.
7679 * python/py-newobjfileevent.c (new_objfile_event_object_type)
7680 (clear_objfiles_event_object_type): Don't declare or define.
7681 * python/py-infevents.c (inferior_call_pre_event_object_type)
7682 (inferior_call_post_event_object_type)
7683 (register_changed_event_object_type)
7684 (memory_changed_event_object_type): Don't declare or define.
7685 * python/py-inferior.c (new_thread_event_object_type)
7686 (new_inferior_event_object_type)
7687 (inferior_deleted_event_object_type): Don't declare or define.
7688 * python/py-exitedevent.c (exited_event_object_type): Don't
7689 declare or define.
7690 * python/py-evts.c (gdbpy_initialize_py_events): Use
7691 py-all-events.def.
7692 * python/py-events.h (thread_event_object_type): Don't declare.
7693 (events_object): Use py-all-events.def.
7694 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
7695 py-event-types.def.
7696 * python/py-event-types.def: New file.
7697 * python/py-continueevent.c (create_continue_event_object): Don't
7698 declare or define.
7699 * python/py-bpevent.c (breakpoint_event_object_type): Don't
7700 declare or define.
7701 * python/py-all-events.def: New file.
7702
7703 2017-09-11 Tom Tromey <tom@tromey.com>
7704
7705 * python/py-threadevent.c (create_thread_event_object): Return
7706 gdbpy_ref.
7707 * python/py-stopevent.h (create_stop_event_object)
7708 (create_breakpoint_event_object, create_signal_event_object):
7709 Update.
7710 * python/py-stopevent.c (create_stop_event_object): Return
7711 gdbpy_ref.
7712 (emit_stop_event): Update.
7713 * python/py-signalevent.c (create_signal_event_object): Return
7714 gdbpy_ref.
7715 * python/py-infevents.c (create_inferior_call_event_object):
7716 Update.
7717 * python/py-event.h (create_event_object)
7718 (create_thread_event_object): Update.
7719 * python/py-event.c (create_event_object): Return gdbpy_ref.
7720 * python/py-continueevent.c: Return gdbpy_ref.
7721 * python/py-bpevent.c (create_breakpoint_event_object): Return
7722 gdbpy_ref.
7723
7724 2017-09-11 Tom Tromey <tom@tromey.com>
7725
7726 PR python/15622:
7727 * NEWS: Add entry.
7728 * python/python.c (do_start_initialization): Initialize new event
7729 types.
7730 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
7731 (gdbpy_initialize_inferior_deleted_event)
7732 (gdbpy_initialize_new_thread_event): Declare.
7733 * python/py-threadevent.c (create_thread_event_object): Add option
7734 "thread" parameter.
7735 * python/py-inferior.c (new_thread_event_object_type)
7736 (new_inferior_event_object_type)
7737 (inferior_deleted_event_object_type): Declare.
7738 (python_new_inferior, python_inferior_deleted): New functions.
7739 (add_thread_object): Emit new_thread event.
7740 (gdbpy_initialize_inferior): Attach new functions to corresponding
7741 observers.
7742 (new_thread, new_inferior, inferior_deleted): Define new event
7743 types.
7744 * python/py-evts.c (gdbpy_initialize_py_events): Add new
7745 registries.
7746 * python/py-events.h (events_object) <new_inferior,
7747 inferior_deleted, new_thread>: New fields.
7748 * python/py-event.h (create_thread_event_breakpoint): Add optional
7749 "thread" parameter.
7750
7751 2017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
7752
7753 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
7754 check current_ui instead.
7755 (internal_vproblem): Likewise.
7756
7757 2017-09-09 Simon Marchi <simon.marchi@ericsson.com>
7758
7759 * thread.c (print_thread_info_1): Remove unnecessary calls to
7760 uiout->is_mi_like_p.
7761
7762 2017-09-09 Tom Tromey <tom@tromey.com>
7763
7764 * namespace.h (add_using_directive): Update.
7765 * namespace.c (add_using_directive): Change type of excludes to
7766 std::vector.
7767 * dwarf2read.c (read_import_statement): Use std::vector.
7768 (read_namespace): Update.
7769 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
7770
7771 2017-09-09 Tom Tromey <tom@tromey.com>
7772
7773 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
7774
7775 2017-09-09 Tom Tromey <tom@tromey.com>
7776
7777 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
7778
7779 2017-09-09 Tom Tromey <tom@tromey.com>
7780
7781 * stack.c (func_command): Use gdb::def_vector.
7782
7783 2017-09-09 Tom Tromey <tom@tromey.com>
7784
7785 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
7786 ui_out_emit_list, ui_out_emit_tuple.
7787 (mi_cmd_var_update): Likewise.
7788
7789 2017-09-09 Tom Tromey <tom@tromey.com>
7790
7791 * mi/mi-interp.c (mi_user_selected_context_changed): Use
7792 ui_out_redirect_pop.
7793 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
7794 ui_out_redirect_pop.
7795 * utils.c (do_ui_out_redirect_pop)
7796 (make_cleanup_ui_out_redirect_pop): Remove.
7797 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
7798 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
7799 * ui-out.h (ui_out_redirect_pop): New class.
7800
7801 2017-09-09 Tom Tromey <tom@tromey.com>
7802
7803 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
7804 (list_available_thread_groups, mi_cmd_list_thread_groups)
7805 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
7806 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
7807 Likewise.
7808
7809 2017-09-09 Tom Tromey <tom@tromey.com>
7810
7811 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
7812 ui_out_emit_tuple.
7813
7814 2017-09-09 Tom Tromey <tom@tromey.com>
7815
7816 * target.c (flash_erase_command): Use ui_out_emit_tuple.
7817 * stack.c (print_frame): Use ui_out_emit_tuple.
7818 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
7819 (info_spu_mailbox_command, info_spu_dma_command)
7820 (info_spu_proxydma_command): Likewise.
7821 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
7822 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
7823 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
7824 ui_out_emit_tuple.
7825 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
7826
7827 2017-09-09 Tom Tromey <tom@tromey.com>
7828
7829 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
7830 (class ui_out_emit_table): Update comment.
7831 * ui-out.c (do_cleanup_table_end)
7832 (make_cleanup_ui_out_table_begin_end): Remove.
7833 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
7834 (info_spu_dma_cmdlist): Likewise.
7835 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
7836 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
7837 ui_out_emit_table.
7838
7839 2017-09-09 Tom Tromey <tom@tromey.com>
7840
7841 * thread.c (print_thread_info_1): Use ui_out_emit_table,
7842 ui_out_emit_list, gdb::optional.
7843
7844 2017-09-09 John Baldwin <jhb@FreeBSD.org>
7845
7846 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
7847 prototype.
7848 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
7849 prototype.
7850 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
7851 prototype.
7852 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
7853 * ada-exp.y: Remove _initialize_ada_exp prototype.
7854 * ada-lang.c: Remove _initialize_ada_language prototype.
7855 * ada-tasks.c: Remove _initialize_tasks prototype.
7856 * addrmap.c: Remove _initialize_addrmap prototype.
7857 * agent.c: Remove _initialize_agent prototype.
7858 * aix-thread.c: Remove _initialize_aix_thread prototype.
7859 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
7860 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
7861 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
7862 prototype.
7863 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
7864 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
7865 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
7866 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
7867 prototype.
7868 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
7869 prototype.
7870 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
7871 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
7872 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
7873 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
7874 prototype.
7875 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
7876 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
7877 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
7878 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
7879 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
7880 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
7881 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
7882 prototype.
7883 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
7884 prototype.
7885 * annotate.c: Remove _initialize_annotate prototype.
7886 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
7887 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
7888 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
7889 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
7890 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
7891 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
7892 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
7893 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
7894 prototype.
7895 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
7896 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
7897 * auto-load.c: Remove _initialize_auto_load prototype.
7898 * auxv.c: Remove _initialize_auxv prototype.
7899 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
7900 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
7901 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
7902 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
7903 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
7904 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
7905 prototype.
7906 * break-catch-throw.c: Remove _initialize_break_catch_throw
7907 prototype.
7908 * breakpoint.c: Remove _initialize_breakpoint prototype.
7909 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
7910 * btrace.c: Remove _initialize_btrace prototype.
7911 * charset.c: Remove _initialize_charset prototype.
7912 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
7913 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
7914 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
7915 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
7916 * cli/cli-script.c: Remove _initialize_cli_script prototype.
7917 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
7918 * coffread.c: Remove _initialize_coffread prototype.
7919 * compile/compile.c: Remove _initialize_compile prototype.
7920 * complaints.c: Remove _initialize_complaints prototype.
7921 * completer.c: Remove _initialize_completer prototype.
7922 * copying.awk: Remove _initialize_copying prototype.
7923 * copying.c: Regenerate.
7924 * core-regset.c: Remove _initialize_core_regset prototype.
7925 * corefile.c: Remove _initialize_core prototype.
7926 * corelow.c: Remove _initialize_corelow prototype.
7927 * cp-abi.c: Remove _initialize_cp_abi prototype.
7928 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
7929 * cp-support.c: Remove _initialize_cp_support prototype.
7930 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
7931 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
7932 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
7933 * ctf.c: Remove _initialize_ctf prototype.
7934 * d-lang.c: Remove _initialize_d_language prototype.
7935 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
7936 prototype.
7937 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
7938 * dbxread.c: Remove _initialize_dbxread prototype.
7939 * dcache.c: Remove _initialize_dcache prototype.
7940 * demangle.c: Remove _initialize_demangler prototype.
7941 * disasm-selftests.c: Remove _initialize_disasm_selftests
7942 prototype.
7943 * disasm.c: Remove _initialize_disasm prototype.
7944 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
7945 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
7946 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
7947 prototype.
7948 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
7949 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
7950 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
7951 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
7952 * elfread.c: Remove _initialize_elfread prototype.
7953 * exec.c: Remove _initialize_exec prototype.
7954 * extension.c: Remove _initialize_extension prototype.
7955 * f-lang.c: Remove _initialize_f_language prototype.
7956 * f-valprint.c: Remove _initialize_f_valprint prototype.
7957 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
7958 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
7959 * filesystem.c: Remove _initialize_filesystem prototype.
7960 * findcmd.c: Remove _initialize_mem_search prototype.
7961 * fork-child.c: Remove _initialize_fork_child prototype.
7962 * frame-base.c: Remove _initialize_frame_base prototype.
7963 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
7964 * frame.c: Remove _initialize_frame prototype.
7965 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
7966 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
7967 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
7968 * gcore.c: Remove _initialize_gcore prototype.
7969 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
7970 * gdbarch.c: Regenerate.
7971 * gdbarch.sh: Remove _initialize_gdbarch prototype.
7972 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
7973 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
7974 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
7975 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
7976 * go-lang.c: Remove _initialize_go_language prototype.
7977 * go32-nat.c: Remove _initialize_go32_nat prototype.
7978 * guile/guile.c: Remove _initialize_guile prototype.
7979 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
7980 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
7981 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
7982 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
7983 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
7984 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
7985 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
7986 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
7987 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
7988 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
7989 prototype.
7990 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
7991 prototype.
7992 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
7993 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
7994 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
7995 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
7996 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
7997 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
7998 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
7999 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
8000 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
8001 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
8002 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
8003 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
8004 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
8005 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
8006 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
8007 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
8008 prototype.
8009 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
8010 prototype.
8011 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
8012 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
8013 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
8014 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
8015 * infcall.c: Remove _initialize_infcall prototype.
8016 * infcmd.c: Remove _initialize_infcmd prototype.
8017 * inferior.c: Remove _initialize_inferiors prototype.
8018 * inflow.c: Remove _initialize_inflow prototype.
8019 * infrun.c: Remove _initialize_infrun prototype.
8020 * interps.c: Remove _initialize_interpreter prototype.
8021 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
8022 * jit.c: Remove _initialize_jit prototype.
8023 * language.c: Remove _initialize_language prototype.
8024 * linux-fork.c: Remove _initialize_linux_fork prototype.
8025 * linux-nat.c: Remove _initialize_linux_nat prototype.
8026 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
8027 * linux-thread-db.c: Remove _initialize_thread_db prototype.
8028 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
8029 * m2-lang.c: Remove _initialize_m2_language prototype.
8030 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
8031 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
8032 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
8033 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
8034 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
8035 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
8036 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
8037 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
8038 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
8039 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
8040 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
8041 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
8042 * machoread.c: Remove _initialize_machoread prototype.
8043 * macrocmd.c: Remove _initialize_macrocmd prototype.
8044 * macroscope.c: Remove _initialize_macroscope prototype.
8045 * maint.c: Remove _initialize_maint_cmds prototype.
8046 * mdebugread.c: Remove _initialize_mdebugread prototype.
8047 * memattr.c: Remove _initialize_mem prototype.
8048 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
8049 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
8050 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
8051 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
8052 * mi/mi-main.c: Remove _initialize_mi_main prototype.
8053 * microblaze-linux-tdep.c: Remove
8054 _initialize_microblaze_linux_tdep prototype.
8055 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
8056 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
8057 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
8058 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
8059 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
8060 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
8061 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
8062 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
8063 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
8064 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
8065 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
8066 prototype.
8067 * mipsread.c: Remove _initialize_mipsread prototype.
8068 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
8069 prototype.
8070 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
8071 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
8072 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
8073 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
8074 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
8075 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
8076 prototype.
8077 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
8078 * nto-procfs.c: Remove _initialize_procfs prototype.
8079 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
8080 * objc-lang.c: Remove _initialize_objc_language prototype.
8081 * objfiles.c: Remove _initialize_objfiles prototype.
8082 * observer.c: Remove observer_test_first_notification_function,
8083 observer_test_second_notification_function,
8084 observer_test_third_notification_function, and
8085 _initialize_observer prototypes.
8086 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
8087 * osabi.c: Remove _initialize_gdb_osabi prototype.
8088 * osdata.c: Remove _initialize_osdata prototype.
8089 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
8090 * parse.c: Remove _initialize_parse prototype.
8091 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
8092 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
8093 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
8094 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
8095 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
8096 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
8097 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
8098 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
8099 * printcmd.c: Remove _initialize_printcmd prototype.
8100 * probe.c: Remove _initialize_probe prototype.
8101 * proc-api.c: Remove _initialize_proc_api prototype.
8102 * proc-events.c: Remove _initialize_proc_events prototype.
8103 * proc-service.c: Remove _initialize_proc_service prototype.
8104 * procfs.c: Remove _initialize_procfs prototype.
8105 * psymtab.c: Remove _initialize_psymtab prototype.
8106 * python/python.c: Remove _initialize_python prototype.
8107 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
8108 * record-btrace.c: Remove _initialize_record_btrace prototype.
8109 * record-full.c: Remove _initialize_record_full prototype.
8110 * record.c: Remove _initialize_record prototype.
8111 * regcache.c: Remove _initialize_regcache prototype.
8112 * reggroups.c: Remove _initialize_reggroup prototype.
8113 * remote-notif.c: Remove _initialize_notif prototype.
8114 * remote-sim.c: Remove _initialize_remote_sim prototype.
8115 * remote.c: Remove _initialize_remote prototype.
8116 * reverse.c: Remove _initialize_reverse prototype.
8117 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
8118 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
8119 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
8120 prototype.
8121 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
8122 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
8123 * rust-exp.y: Remove _initialize_rust_exp prototype.
8124 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
8125 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
8126 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
8127 * score-tdep.c: Remove _initialize_score_tdep prototype.
8128 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
8129 prototype.
8130 * ser-go32.c: Remove _initialize_ser_dos prototype.
8131 * ser-mingw.c: Remove _initialize_ser_windows prototype.
8132 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
8133 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
8134 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
8135 * serial.c: Remove _initialize_serial prototype.
8136 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
8137 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
8138 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
8139 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
8140 * skip.c: Remove _initialize_step_skip prototype.
8141 * sol-thread.c: Remove _initialize_sol_thread prototype.
8142 * solib-aix.c: Remove _initialize_solib_aix prototype.
8143 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
8144 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
8145 * solib-frv.c: Remove _initialize_frv_solib prototype.
8146 * solib-spu.c: Remove _initialize_spu_solib prototype.
8147 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
8148 * solib-target.c: Remove _initialize_solib_target prototype.
8149 * solib.c: Remove _initialize_solib prototype.
8150 * source.c: Remove _initialize_source prototype.
8151 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
8152 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
8153 prototype.
8154 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
8155 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
8156 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
8157 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
8158 prototype.
8159 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
8160 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
8161 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
8162 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
8163 prototype.
8164 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
8165 prototype.
8166 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
8167 prototype.
8168 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
8169 prototype.
8170 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
8171 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
8172 prototype.
8173 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
8174 prototype.
8175 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
8176 prototype.
8177 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
8178 prototype.
8179 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
8180 prototype.
8181 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
8182 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
8183 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
8184 * stabsread.c: Remove _initialize_stabsread prototype.
8185 * stack.c: Remove _initialize_stack prototype.
8186 * stap-probe.c: Remove _initialize_stap_probe prototype.
8187 * std-regs.c: Remove _initialize_frame_reg prototype.
8188 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
8189 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
8190 * symfile.c: Remove _initialize_symfile prototype.
8191 * symmisc.c: Remove _initialize_symmisc prototype.
8192 * symtab.c: Remove _initialize_symtab prototype.
8193 * target-dcache.c: Remove _initialize_target_dcache prototype.
8194 * target-descriptions.c: Remove _initialize_target_descriptions
8195 prototype.
8196 * thread.c: Remove _initialize_thread prototype.
8197 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
8198 prototype.
8199 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
8200 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
8201 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
8202 prototype.
8203 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
8204 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
8205 * tracefile.c: Remove _initialize_tracefile prototype.
8206 * tracepoint.c: Remove _initialize_tracepoint prototype.
8207 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
8208 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
8209 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
8210 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
8211 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
8212 * tui/tui-win.c: Remove _initialize_tui_win prototype.
8213 * tui/tui.c: Remove _initialize_tui prototype.
8214 * typeprint.c: Remove _initialize_typeprint prototype.
8215 * user-regs.c: Remove _initialize_user_regs prototype.
8216 * utils.c: Remove _initialize_utils prototype.
8217 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
8218 * valarith.c: Remove _initialize_valarith prototype.
8219 * valops.c: Remove _initialize_valops prototype.
8220 * valprint.c: Remove _initialize_valprint prototype.
8221 * value.c: Remove _initialize_values prototype.
8222 * varobj.c: Remove _initialize_varobj prototype.
8223 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
8224 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
8225 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
8226 * windows-nat.c: Remove _initialize_windows_nat,
8227 _initialize_check_for_gdb_ini, and _initialize_loadable
8228 prototypes.
8229 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
8230 * xcoffread.c: Remove _initialize_xcoffread prototype.
8231 * xml-support.c: Remove _initialize_xml_support prototype.
8232 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
8233 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
8234 prototype.
8235 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
8236 prototype.
8237 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
8238
8239 2017-09-08 Keith Seitz <keiths@redhat.com>
8240
8241 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
8242 field.
8243
8244 2017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
8245
8246 * f-valprint.c (f_val_print): Remove check for one byte
8247 sized integers. Remove printing of character type.
8248
8249 2017-09-08 Frank Penczek <frank.penczek@intel.com>
8250 Christoph Weinmann <christoph.t.weinmann@intel.com>
8251 Bernhard Heckel <bernhard.heckel@intel.com>
8252
8253 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
8254 to maintain proper indentation when printing pointers/refs.
8255
8256 2017-09-07 Joel Brobecker <brobecker@adacore.com>
8257
8258 GDB 8.0.1 released.
8259
8260 2017-09-07 Joel Brobecker <brobecker@adacore.com>
8261
8262 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
8263
8264 2017-09-05 Tom Tromey <tom@tromey.com>
8265
8266 * parse.c (funcall_chain): Now a std::vector.
8267 (start_arglist, end_arglist): Simplify.
8268 (free_funcalls): Remove.
8269 (parse_exp_in_context_1): Remove cleanup.
8270
8271 2017-09-05 Tom Tromey <tom@tromey.com>
8272
8273 * go-exp.y (go_parse): Don't create a cleanup.
8274
8275 2017-09-05 Tom Tromey <tom@tromey.com>
8276
8277 * d-exp.y (PrimaryExpression): Use std::string.
8278 (d_parse): Don't create a cleanup.
8279
8280 2017-09-05 Tom Tromey <tom@tromey.com>
8281
8282 * utils.c (do_clear_parser_state): Remove.
8283 (make_cleanup_clear_parser_state): Remove.
8284 * p-exp.y (pascal_parse): Use scoped_restore.
8285 * m2-exp.y (m2_parse): Use scoped_restore.
8286 * f-exp.y (f_parse): Use scoped_restore.
8287 * d-exp.y (d_parse): Use scoped_restore.
8288 * c-exp.y (c_parse): Use scoped_restore.
8289 * ada-exp.y (ada_parse): Use scoped_restore.
8290 * utils.h (make_cleanup_clear_parser_state): Remove.
8291
8292 2017-09-06 Keith Seitz <keiths@redhat.com>
8293
8294 * dwarf2read.c (dw2_linkage_name_attr): New function.
8295 (dw2_linkage_name): New function.
8296 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
8297 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
8298 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
8299
8300 2017-09-06 Kamil Rytarowski <n54@gmx.com>
8301
8302 * config/djgpp/djconfig.sh: Correct shell portability issue.
8303
8304 2017-09-06 Kamil Rytarowski <n54@gmx.com>
8305
8306 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
8307
8308 2017-09-06 John Baldwin <jhb@FreeBSD.org>
8309
8310 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
8311 * NEWS: Mention new FreeBSD/mips native configuration.
8312 * configure.host: Add aarch64*-*-freebsd*.
8313 * configure.nat: Likewise.
8314 * aarch64-fbsd-nat.c: New file.
8315
8316 2017-09-06 John Baldwin <jhb@FreeBSD.org>
8317
8318 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
8319 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
8320 * NEWS: Mention new FreeBSD/aarch64 target.
8321 * configure.tgt: Add aarch64*-*-freebsd*.
8322 * aarch64-fbsd-tdep.c: New file.
8323 * aarch64-fbsd-tdep.h: New file.
8324
8325 2017-09-06 Kamil Rytarowski <n54@gmx.com>
8326
8327 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
8328
8329 2017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8330
8331 * parse.c (find_minsym_type_and_address): Don't relocate addresses
8332 of TLS symbols.
8333
8334 2017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
8335
8336 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
8337 call.
8338
8339 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
8340
8341 * infrun.c (follow_exec): Call add_thread after
8342 target_find_description.
8343
8344 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
8345
8346 * infrun.c (handle_inferior_event_1): When exec'ing, read
8347 stop_pc after follow_exec.
8348
8349 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
8350
8351 * remote.c (process_g_packet): Update error message.
8352
8353 2017-09-05 Yao Qi <yao.qi@linaro.org>
8354
8355 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
8356 targets.
8357
8358 2017-09-05 Pedro Alves <palves@redhat.com>
8359
8360 * eval.c (eval_call, evaluate_funcall): New functions, factored
8361 out from ...
8362 (evaluate_subexp_standard): ... this.
8363
8364 2017-09-05 Yao Qi <yao.qi@linaro.org>
8365
8366 * amd64-tdep.c (amd64_target_description): Create target
8367 descriptions.
8368 (_initialize_amd64_tdep): Don't call functions
8369 initialize_tdesc_amd64_*. Add self tests.
8370 * arch/amd64.c (amd64_create_target_description): Add parameter
8371 is_linux. Call set_tdesc_osabi if is_linux is true.
8372 * arch/amd64.h (amd64_create_target_description): Update the
8373 declaration.
8374 * arch/i386.c (i386_create_target_description): Add parameter
8375 is_linux. Call set_tdesc_osabi if is_linux is true.
8376 * arch/i386.h (i386_create_target_description): Update
8377 declaration.
8378 * configure.tgt: Add i386.o to gdb_target_obs.
8379 * features/Makefile (XMLTOC): Remove i386/*.xml.
8380 * features/i386/amd64-avx-avx512.c: Remove.
8381 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
8382 * features/i386/amd64-avx-mpx.c: Remove.
8383 * features/i386/amd64-avx.c: Remove.
8384 * features/i386/amd64-mpx.c: Remove.
8385 * features/i386/amd64.c: Remove.
8386 * features/i386/i386-avx-avx512.c: Remove.
8387 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
8388 * features/i386/i386-avx-mpx.c: Remove.
8389 * features/i386/i386-avx.c: Remove.
8390 * features/i386/i386-mmx.c: Remove.
8391 * features/i386/i386-mpx.c: Remove.
8392 * features/i386/i386.c: Remove.
8393 * i386-tdep.c: Don't include features/i386/i386*.c., include
8394 target-descriptions.h and arch/i386.h.
8395 (i386_target_description): Create target descriptions.
8396 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
8397 functions. Do self tests.
8398
8399 2017-09-05 Yao Qi <yao.qi@linaro.org>
8400
8401 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
8402 * features/i386/amd64-avx-avx512-linux.c: Removed.
8403 * features/i386/amd64-avx-linux.c: Removed.
8404 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
8405 * features/i386/amd64-avx-mpx-linux.c: Removed.
8406 * features/i386/amd64-linux.c: Removed.
8407 * features/i386/amd64-mpx-linux.c: Removed.
8408 * features/i386/x32-avx-avx512-linux.c: Removed.
8409 * features/i386/x32-avx-linux.c: Removed.
8410 * features/i386/x32-linux.c: Removed.
8411
8412 2017-09-05 Yao Qi <yao.qi@linaro.org>
8413
8414 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
8415 features/i386/*.c.
8416 (amd64_linux_read_description): Call
8417 amd64_create_target_description.
8418 * arch/amd64.c: New file.
8419 * arch/amd64.h: New file.
8420 * configure.tgt (x86_64-*-linux*): Append amd64.o.
8421 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
8422
8423 2017-09-05 Yao Qi <yao.qi@linaro.org>
8424
8425 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
8426 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
8427 (amd64_linux_read_description): Create target descriptions.
8428 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
8429 functions. Add unit tests.
8430 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
8431 x32-core.xml.
8432 * features/i386/64bit-avx.c: Generated.
8433 * features/i386/64bit-avx512.c: Generated.
8434 * features/i386/64bit-core.c: Generated.
8435 * features/i386/64bit-linux.c: Generated.
8436 * features/i386/64bit-mpx.c: Generated.
8437 * features/i386/64bit-pkeys.c: Generated.
8438 * features/i386/64bit-segments.c: Generated.
8439 * features/i386/64bit-sse.c: Generated.
8440 * features/i386/x32-core.c: Generated.
8441 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
8442 c files for amd64-linux and x32-linux.
8443
8444 2017-09-05 Yao Qi <yao.qi@linaro.org>
8445
8446 * amd64-linux-tdep.c (amd64_linux_read_description): New
8447 function.
8448 (amd64_linux_core_read_description): Call
8449 amd64_linux_read_description.
8450 (amd64_linux_init_abi): Likewise.
8451 (amd64_x32_linux_init_abi): Likewise.
8452 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
8453 * x86-linux-nat.c (x86_linux_read_description): Call
8454 amd64_linux_read_description.
8455
8456 2017-09-05 Yao Qi <yao.qi@linaro.org>
8457
8458 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
8459 comments.
8460
8461 2017-09-05 Yao Qi <yao.qi@linaro.org>
8462
8463 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
8464 * features/i386/i386-avx-avx512-linux.c: Remove.
8465 * features/i386/i386-avx-linux.c: Remove.
8466 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
8467 * features/i386/i386-avx-mpx-linux.c: Remove.
8468 * features/i386/i386-linux.c: Remove.
8469 * features/i386/i386-mmx-linux.c: Remove.
8470 * features/i386/i386-mpx-linux.c: Remove.
8471
8472 2017-09-05 Yao Qi <yao.qi@linaro.org>
8473
8474 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
8475 (SFILES): Add arch/i386.c.
8476 (HFILES_NO_SRCDIR): Add arch/i386.h.
8477 * arch/i386.c: New file.
8478 * arch/i386.h: New file.
8479 * arch/tdesc.h (allocate_target_description): Declare.
8480 (set_tdesc_architecture): Declare.
8481 (set_tdesc_osabi): Declare.
8482 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
8483 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
8484 include arch/i386.h.
8485 (i386_linux_read_description): Remove code and call
8486 i386_create_target_description.
8487 (set_tdesc_architecture): New function.
8488 (set_tdesc_osabi): New function.
8489 * target-descriptions.h (allocate_target_description): Remove.
8490
8491 2017-09-05 Yao Qi <yao.qi@linaro.org>
8492
8493 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
8494 * target-descriptions.c (tdesc_create_feature): Likewise, and
8495 adjust code.
8496 * features/i386/32bit-avx.c: Re-generated.
8497 * features/i386/32bit-avx512.c: Re-generated.
8498 * features/i386/32bit-core.c: Re-generated.
8499 * features/i386/32bit-linux.c: Re-generated.
8500 * features/i386/32bit-mpx.c: Re-generated.
8501 * features/i386/32bit-pkeys.c: Re-generated.
8502 * features/i386/32bit-sse.c: Re-generated.
8503
8504 2017-09-05 Yao Qi <yao.qi@linaro.org>
8505
8506 * regformats/regdef.h (struct reg): Override operator == and !=.
8507
8508 2017-09-05 Yao Qi <yao.qi@linaro.org>
8509
8510 * arch/tdesc.h: New file.
8511 * regformats/regdat.sh: Generate code using tdesc_create_reg.
8512 * target-descriptions.c: Update comments.
8513 * target-descriptions.h: Include "arch/tdesc.h". Remove the
8514 declarations.
8515 * features/i386/32bit-avx.c: Re-generated.
8516 * features/i386/32bit-avx512.c: Re-generated.
8517 * features/i386/32bit-core.c: Re-generated.
8518 * features/i386/32bit-linux.c: Re-generated.
8519 * features/i386/32bit-mpx.c: Re-generated.
8520 * features/i386/32bit-pkeys.c: Re-generated.
8521 * features/i386/32bit-sse.c: Re-generated.
8522
8523 2017-09-05 Yao Qi <yao.qi@linaro.org>
8524
8525 * regformats/regdat.sh: Update generated code.
8526
8527 2017-09-05 Yao Qi <yao.qi@linaro.org>
8528
8529 * regformats/regdat.sh: Adjust code order.
8530
8531 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
8532
8533 * expprint.c (dump_subexp_body_standard): Use constant format
8534 string in fprintf_filtered call.
8535
8536 2017-09-04 John Baldwin <jhb@FreeBSD.org>
8537
8538 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
8539 NetBSD/i386.
8540 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
8541
8542 2017-09-04 John Baldwin <jhb@FreeBSD.org>
8543
8544 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
8545
8546 2017-09-04 John Baldwin <jhb@FreeBSD.org>
8547
8548 * bsd-kvm.o: Define _KMEMUSER.
8549 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
8550 * configure: Regenerate.
8551
8552 2017-09-04 John Baldwin <jhb@FreeBSD.org>
8553
8554 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
8555 * i386-fbsd-nat.c: Likewise.
8556
8557 2017-09-04 John Baldwin <jhb@FreeBSD.org>
8558
8559 * unittests/array-view-selftests.c: Add include of <array>.
8560
8561 2017-09-04 John Baldwin <jhb@FreeBSD.org>
8562
8563 * spu-tdep.c (flush_ea_cache): Add missing argument to
8564 call_function_by_hand.
8565
8566 2017-09-04 Pedro Alves <palves@redhat.com>
8567
8568 * NEWS (Safer support for debugging with no debug info): New.
8569
8570 2017-09-04 Pedro Alves <palves@redhat.com>
8571
8572 * c-exp.y (function_method, function_method_void): Add current
8573 instance flags to TYPE_INSTANCE.
8574 * dwarf2read.c (check_modifier): New.
8575 (compute_delayed_physnames): Assert that only C++ adds delayed
8576 physnames. Mark fn_fields as const/volatile depending on
8577 physname.
8578 * eval.c (make_params): New type_instance_flags parameter. Use
8579 it as the new type's instance flags.
8580 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
8581 flags element and pass it to make_params.
8582 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
8583 instance flags element.
8584 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
8585 * gdbtypes.h: Include "enum-flags.h".
8586 (type_instance_flags): New enum-flags type.
8587 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
8588 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
8589 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
8590 (follow_type_instance_flags): New function.
8591 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
8592 * parser-defs.h (follow_type_instance_flags): Declare.
8593 * valops.c (value_struct_elt_for_reference): const/volatile must
8594 match too.
8595
8596 2017-09-04 Pedro Alves <palves@redhat.com>
8597
8598 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
8599 function/method scopes; lookup the nested name as a function local
8600 static variable.
8601
8602 2017-09-04 Pedro Alves <palves@redhat.com>
8603
8604 (%type <voidval>): Add function_method.
8605 * c-exp.y (exp): New production for calls with no arguments.
8606 (function_method, function_method_void_or_typelist): New
8607 productions.
8608 (exp): New production for "method()::static_var".
8609 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
8610 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
8611 Handle OP_FUNC_STATIC_VAR.
8612 * parse.c (operator_length_standard):
8613 Handle OP_FUNC_STATIC_VAR.
8614
8615 2017-09-04 Pedro Alves <palves@redhat.com>
8616
8617 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
8618 handling.
8619 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
8620 Ditto.
8621 * parse.c (operator_length_standard, operator_check_standard):
8622 Ditto.
8623 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
8624
8625 2017-09-04 Pedro Alves <palves@redhat.com>
8626
8627 * ax-gdb.c: Include "typeprint.h".
8628 (gen_expr_for_cast): New function.
8629 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
8630 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
8631 type is unknown.
8632 * dwarf2read.c (new_symbol_full): Fallback to int instead of
8633 nodebug_data_symbol.
8634 * eval.c: Include "typeprint.h".
8635 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
8636 Error out if symbol has unknown type.
8637 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
8638 evaluate_subexp_for_cast.
8639 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
8640 OP_VAR_MSYM_VALUE.
8641 (evaluate_subexp_for_cast): New function.
8642 * gdbtypes.c (init_nodebug_var_type): New function.
8643 (objfile_type): Use it to initialize types of variables with no
8644 debug info.
8645 * typeprint.c (error_unknown_type): New.
8646 * typeprint.h (error_unknown_type): New declaration.
8647 * compile/compile-c-types.c (convert_type_basic): Handle
8648 TYPE_CODE_ERROR; warn and fallback to int for variables with
8649 unknown type.
8650
8651 2017-09-04 Pedro Alves <palves@redhat.com>
8652
8653 * eval.c (evaluate_var_value): New function, factored out from ...
8654 (evaluate_subexp_standard): ... here.
8655
8656 2017-09-04 Pedro Alves <palves@redhat.com>
8657
8658 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
8659 Remove useless assignments to 'op'.
8660
8661 2017-09-04 Pedro Alves <palves@redhat.com>
8662
8663 * eval.c (eval_skip_value): New function.
8664 (evaluate_subexp_standard): Use it.
8665
8666 2017-09-04 Pedro Alves <palves@redhat.com>
8667
8668 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
8669 function name from symbol/minsym and pass it to
8670 error_call_unknown_return_type.
8671
8672 2017-09-04 Pedro Alves <palves@redhat.com>
8673
8674 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
8675 * ax-gdb.c (gen_msym_var_ref): New function.
8676 (gen_expr): Handle OP_VAR_MSYM_VALUE.
8677 * eval.c (evaluate_var_msym_value): New function.
8678 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
8679 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
8680 to call_function_by_hand.
8681 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
8682 Handle OP_VAR_MSYM_VALUE.
8683 (union exp_element) <msymbol>: New field.
8684 * minsyms.h (struct type): Forward declare.
8685 (find_minsym_type_and_address): Declare.
8686 * parse.c (write_exp_elt_msym): New function.
8687 (write_exp_msymbol): Delete, refactored as ...
8688 (find_minsym_type_and_address): ... this new function.
8689 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
8690 (operator_length_standard, operator_check_standard): Handle
8691 OP_VAR_MSYM_VALUE.
8692 * std-operator.def (OP_VAR_MSYM_VALUE): New.
8693
8694 2017-09-04 Pedro Alves <palves@redhat.com>
8695
8696 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
8697 TYPE_GNU_IFUNC specially here. Throw error if return type is
8698 unknown.
8699 * ada-typeprint.c (print_func_type): Handle functions with unknown
8700 return type.
8701 * c-typeprint.c (c_type_print_base): Handle functions and methods
8702 with unknown return type.
8703 * compile/compile-c-symbols.c (convert_symbol_bmsym)
8704 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
8705 * compile/compile-c-types.c: Include "objfiles.h".
8706 (convert_func): For functions with unknown return type, warn and
8707 default to int.
8708 * compile/compile-object-run.c (compile_object_run): Adjust call
8709 to call_function_by_hand_dummy.
8710 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
8711 call_function_by_hand.
8712 * eval.c (evaluate_subexp_standard): Adjust calls to
8713 call_function_by_hand. Handle functions and methods with unknown
8714 return type. Pass expect_type to call_function_by_hand.
8715 * f-typeprint.c (f_type_print_base): Handle functions with unknown
8716 return type.
8717 * gcore.c (call_target_sbrk): Adjust call to
8718 call_function_by_hand.
8719 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
8720 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
8721 an integer address type instead of nodebug.
8722 * guile/scm-value.c (gdbscm_value_call): Adjust call to
8723 call_function_by_hand.
8724 * infcall.c (error_call_unknown_return_type): New function.
8725 (call_function_by_hand): New "default_return_type" parameter.
8726 Pass it down.
8727 (call_function_by_hand_dummy): New "default_return_type"
8728 parameter. Use it instead of defaulting to int. If there's no
8729 default and the return type is unknown, throw an error. If
8730 there's a default return type, and the called function has no
8731 debug info, then assume the function is prototyped.
8732 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
8733 New "default_return_type" parameter.
8734 (error_call_unknown_return_type): New declaration.
8735 * linux-fork.c (call_lseek): Cast return type of lseek.
8736 (inferior_call_waitpid, checkpoint_command): Adjust calls to
8737 call_function_by_hand.
8738 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
8739 calls to call_function_by_hand.
8740 * m2-typeprint.c (m2_procedure): Handle functions with unknown
8741 return type.
8742 * objc-lang.c (lookup_objc_class, lookup_child_selector)
8743 (value_nsstring, print_object_command): Adjust calls to
8744 call_function_by_hand.
8745 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
8746 functions with unknown return type.
8747 (pascal_type_print_func_varspec_suffix): New function.
8748 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
8749 TYPE_CODE_METHOD>: Use it.
8750 * python/py-value.c (valpy_call): Adjust call to
8751 call_function_by_hand.
8752 * rust-lang.c (rust_evaluate_funcall): Adjust call to
8753 call_function_by_hand.
8754 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
8755 call_function_by_hand.
8756 * valops.c (value_allocate_space_in_inferior): Adjust call to
8757 call_function_by_hand.
8758 * typeprint.c (type_print_unknown_return_type): New function.
8759 * typeprint.h (type_print_unknown_return_type): New declaration.
8760
8761 2017-09-04 Pedro Alves <palves@redhat.com>
8762
8763 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
8764 types with more than one parameter as prototyped.
8765
8766 2017-09-04 Pedro Alves <palves@redhat.com>
8767
8768 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
8769 (disassemble_command): Use gdb_disassembly_flags instead of bare
8770 int.
8771 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
8772 (dump_insns, do_mixed_source_and_assembly_deprecated)
8773 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
8774 Use gdb_disassembly_flags instead of bare int.
8775 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
8776 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
8777 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
8778 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
8779 (enum gdb_disassembly_flag): ... values of this new enumeration.
8780 (gdb_disassembly_flags): Define.
8781 (gdb_disassembly)
8782 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
8783 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
8784 gdb_disassembly_flags instead of bare int.
8785 * record-btrace.c (btrace_insn_history)
8786 (record_btrace_insn_history, record_btrace_insn_history_range)
8787 (record_btrace_insn_history_from): Use gdb_disassembly_flags
8788 instead of bare int.
8789 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
8790 Use gdb_disassembly_flags instead of bare int.
8791 * target-debug.h (target_debug_print_gdb_disassembly_flags):
8792 Define.
8793 * target-delegates.c: Regenerate.
8794 * target.c (target_insn_history, target_insn_history_from)
8795 (target_insn_history_range): Use gdb_disassembly_flags instead of
8796 bare int.
8797 * target.h: Include "disasm.h".
8798 (struct target_ops) <to_insn_history, to_insn_history_from,
8799 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
8800 int.
8801 (target_insn_history, target_insn_history_from)
8802 (target_insn_history_range): Use gdb_disassembly_flags instead of
8803 bare int.
8804
8805 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
8806
8807 * cli/cli-script.c (build_command_line): For if/while commands,
8808 check whether args is empty.
8809
8810 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
8811
8812 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
8813 (enum command_control_type): Likewise.
8814 (struct command_line): Likewise.
8815 (free_command_lines): Likewise.
8816 (struct command_lines_deleter): Likewise.
8817 (command_line_up): Likewise.
8818 (read_command_lines): Likewise.
8819 (read_command_lines_1): Likewise.
8820 * defs.h (enum misc_command_type): Move to cli/cli-script.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 * breakpoint.h: Include cli/cli-script.h.
8829 * extension-priv.h: Likewise.
8830 * gdbcmd.h: Likewise.
8831
8832 2017-09-04 Pedro Alves <palves@redhat.com>
8833
8834 * ada-lang.c (is_known_support_routine): Move sal declaration to
8835 where it is initialized.
8836 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
8837 (parse_breakpoint_sals, decode_static_tracepoint_spec)
8838 (clear_command, update_static_tracepoint): Remove init_sal
8839 references. Move declarations closer to initializations.
8840 * cli/cli-cmds.c (list_command): Move sal declarations closer to
8841 initializations.
8842 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
8843 references. Move sal declarations closer to initializations.
8844 * frame.c (find_frame_sal): Return a symtab_and_line via function
8845 return instead of output parameter. Remove init_sal references.
8846 * frame.h (find_frame_sal): Return a symtab_and_line via function
8847 return instead of output parameter.
8848 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
8849 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
8850 instead of memset.
8851 (gdbscm_find_pc_line): Remove init_sal reference.
8852 * infcall.c (call_function_by_hand_dummy): Remove init_sal
8853 references. Move declarations closer to initializations.
8854 * infcmd.c (set_step_frame): Update. Move declarations closer to
8855 initializations.
8856 (finish_backward): Remove init_sal references. Move declarations
8857 closer to initializations.
8858 * infrun.c (process_event_stop_test, handle_step_into_function)
8859 (insert_hp_step_resume_breakpoint_at_frame)
8860 (insert_step_resume_breakpoint_at_caller): Likewise.
8861 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
8862 (symbol_to_sal): Likewise.
8863 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
8864 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
8865 to its initialization.
8866 * reverse.c (save_bookmark_command): Use new/delete. Remove
8867 init_sal references. Move declarations closer to initializations.
8868 * source.c (get_current_source_symtab_and_line): Remove brace
8869 initialization.
8870 (set_current_source_symtab_and_line): Now takes the sal by const
8871 reference. Remove brace initialization.
8872 (line_info): Remove init_sal reference.
8873 * source.h (set_current_source_symtab_and_line): Now takes a
8874 symtab_and_line via const reference.
8875 * stack.c (set_current_sal_from_frame): Adjust.
8876 (print_frame_info): Adjust.
8877 (get_last_displayed_sal): Return the sal via function return
8878 instead of via output parameter. Simplify.
8879 (frame_info): Adjust.
8880 * stack.h (get_last_displayed_sal): Return the sal via function
8881 return instead of via output parameter.
8882 * symtab.c (init_sal): Delete.
8883 (find_pc_sect_line): Remove init_sal references. Move
8884 declarations closer to initializations.
8885 (find_function_start_sal): Remove init_sal references. Move
8886 declarations closer to initializations.
8887 * symtab.h (struct symtab_and_line): In-class initialize all
8888 fields.
8889 * tracepoint.c (set_traceframe_context)
8890 (print_one_static_tracepoint_marker): Remove init_sal references.
8891 Move declarations closer to initializations.
8892 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
8893 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
8894 declarations closer to initializations.
8895 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
8896 init_sal references. Adjust.
8897
8898 2017-09-04 Pedro Alves <palves@redhat.com>
8899
8900 * ax-gdb.c (agent_command_1): Use range-for.
8901 * break-catch-throw.c (re_set_exception_catchpoint): Update.
8902 * breakpoint.c: Include "common/array-view.h".
8903 (init_breakpoint_sal, create_breakpoint_sal): Change sals
8904 parameter from struct symtabs_and_lines to
8905 array_view<symtab_and_line>. Adjust. Use range-for. Update.
8906 (breakpoint_sals_to_pc): Change sals parameter from struct
8907 symtabs_and_lines to std::vector reference.
8908 (check_fast_tracepoint_sals): Change sals parameter from struct
8909 symtabs_and_lines to std::array_view. Use range-for.
8910 (decode_static_tracepoint_spec): Return a std::vector instead of
8911 symtabs_and_lines. Update.
8912 (create_breakpoint): Update.
8913 (break_range_command, until_break_command, clear_command): Update.
8914 (base_breakpoint_decode_location, bkpt_decode_location)
8915 (bkpt_probe_create_sals_from_location)
8916 (bkpt_probe_decode_location, tracepoint_decode_location)
8917 (tracepoint_probe_decode_location)
8918 (strace_marker_create_sals_from_location): Return a std::vector
8919 instead of symtabs_and_lines.
8920 (strace_marker_create_breakpoints_sal): Update.
8921 (strace_marker_decode_location): Return a std::vector instead of
8922 symtabs_and_lines. Update.
8923 (update_breakpoint_locations): Change struct symtabs_and_lines
8924 parameters to gdb::array_view. Adjust.
8925 (location_to_sals): Return a std::vector instead of
8926 symtabs_and_lines. Update.
8927 (breakpoint_re_set_default): Use std::vector instead of struct
8928 symtabs_and_lines.
8929 (decode_location_default): Return a std::vector instead of
8930 symtabs_and_lines. Update.
8931 * breakpoint.h: Include "common/array-view.h".
8932 (struct breakpoint_ops) <decode_location>: Now returns a
8933 std::vector instead of returning a symtabs_and_lines via output
8934 parameter.
8935 (update_breakpoint_locations): Change sals parameters to use
8936 gdb::array_view.
8937 * cli/cli-cmds.c (edit_command, list_command): Update to use
8938 std::vector and gdb::array_view.
8939 (ambiguous_line_spec): Adjust to use gdb::array_view and
8940 range-for.
8941 (compare_symtabs): Rename to ...
8942 (cmp_symtabs): ... this. Change parameters to symtab_and_line
8943 const reference and adjust.
8944 (filter_sals): Rewrite using std::vector and standard algorithms.
8945 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
8946 (jump_command): Update to use std::vector.
8947 * linespec.c (struct linespec_state) <canonical_names>: Update
8948 comment.
8949 (add_sal_to_sals_basic): Delete.
8950 (add_sal_to_sals, filter_results, convert_results_to_lsals)
8951 (decode_line_2, create_sals_line_offset)
8952 (convert_address_location_to_sals, convert_linespec_to_sals)
8953 (convert_explicit_location_to_sals, parse_linespec)
8954 (event_location_to_sals, decode_line_full, decode_line_1)
8955 (decode_line_with_current_source)
8956 (decode_line_with_last_displayed, decode_objc)
8957 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
8958 (linespec_result::~linespec_result): Adjust to use std::vector
8959 instead of symtabs_and_lines.
8960 * linespec.h (linespec_sals::sals): Now a std::vector.
8961 (struct linespec_result): Use std::vector, bool, and in-class
8962 initialization.
8963 (decode_line_1, decode_line_with_current_source)
8964 (decode_line_with_last_displayed): Return std::vector.
8965 * macrocmd.c (info_macros_command): Use std::vector.
8966 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
8967 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
8968 std::vector.
8969 * probe.h (parse_probes): Return a std::vector.
8970 * python/python.c (gdbpy_decode_line): Use std::vector and
8971 gdb::array_view.
8972 * source.c (select_source_symtab, line_info): Use std::vector.
8973 * stack.c (func_command): Use std::vector.
8974 * symtab.h (struct symtabs_and_lines): Delete.
8975 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
8976
8977 2017-09-04 Pedro Alves <palves@redhat.com>
8978
8979 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
8980 unittests/array-view-selftests.c.
8981 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
8982 * common/array-view.h: New file.
8983 * unittests/array-view-selftests.c: New file.
8984
8985 2017-09-04 Pedro Alves <palves@redhat.com>
8986
8987 * cli/cli-cmds.c (edit_command): Pass message to
8988 ambiguous_line_spec.
8989 (list_command): Pass message to ambiguous_line_spec. Say
8990 "first"/"last" instead of "start" and "end" to be consistent with
8991 the manual.
8992 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
8993 them to print formatted message.
8994
8995 2017-09-04 Pedro Alves <palves@redhat.com>
8996
8997 * btrace.c (ftrace_add_pt): Pass btrace_insn to
8998 ftrace_update_insns by reference instead of pointer.
8999
9000 2017-09-04 Yao Qi <yao.qi@linaro.org>
9001
9002 * i386-go32-tdep.c: Include x86-xstate.h.
9003 (i386_go32_init_abi): Call i386_target_description.
9004 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
9005 if xcr0 is X86_XSTATE_X87_MASK.
9006 * i386-tdep.h (tdesc_i386): Remove the declaration.
9007 (tdesc_i386_mmx): Likewise.
9008
9009 2017-09-04 Yao Qi <yao.qi@linaro.org>
9010
9011 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
9012 X86_XSTATE_SSE_MASK instead of 0.
9013
9014 2017-09-04 Yao Qi <yao.qi@linaro.org>
9015
9016 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
9017 i386_target_description.
9018 * i386-fbsd-nat.c (i386fbsd_read_description): Call
9019 i386_target_description.
9020 * i386-tdep.c (i386_gdbarch_init): Likewise.
9021
9022 2017-09-04 Yao Qi <yao.qi@linaro.org>
9023
9024 * amd64-darwin-tdep.c: Include "x86-xstate.h".
9025 (x86_darwin_init_abi_64): Call amd64_target_description.
9026 * amd64-dicos-tdep.c: Likewise.
9027 * amd64-fbsd-nat.c: Likewise.
9028 * amd64-fbsd-tdep.c: Likewise.
9029 * amd64-nbsd-tdep.c: Likewise.
9030 * amd64-obsd-tdep.c: Likewise.
9031 * amd64-sol2-tdep.c: Likewise.
9032 * amd64-windows-tdep.c: Likewise.
9033 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
9034
9035 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
9036
9037 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
9038 (btrace_function) <insn>: Change type to use std::vector.
9039 * btrace.c (ftrace_debug, ftrace_call_num_insn,
9040 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
9041 ftrace_update_insns, ftrace_compute_global_level_offset,
9042 btrace_stitch_bts, btrace_clear, btrace_insn_get,
9043 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
9044 change to std::vector.
9045 (ftrace_update_insns): Adjust to change to std::vector, change
9046 type of INSN parameter.
9047 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
9048 * record-btrace.c (btrace_call_history_insn_range,
9049 btrace_compute_src_line_range,
9050 record_btrace_frame_prev_register): Adjust to change to
9051 std::vector.
9052 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
9053 to change to std::vector.
9054
9055 2017-09-03 Tom Tromey <tom@tromey.com>
9056
9057 * corefile.c (reopen_exec_file): Use std::string.
9058
9059 2017-09-03 Tom Tromey <tom@tromey.com>
9060
9061 * compile/compile.c (compile_register_name_mangled): Return
9062 std::string.
9063 * compile/compile-loc2c.c (pushf_register_address): Update.
9064 (pushf_register): Update.
9065 * compile/compile-c-types.c (convert_array): Update.
9066 * compile/compile-c-symbols.c (generate_vla_size): Update.
9067 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
9068 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
9069 (convert_one_symbol): Update.
9070 (generate_c_for_for_one_variable): Update.
9071 * compile/compile-c-support.c (c_get_range_decl_name): Return a
9072 std::string.
9073 (generate_register_struct): Update.
9074 * compile/compile-internal.h (c_get_range_decl_name): Return a
9075 std::string.
9076 (compile_register_name_mangled): Return std::string.
9077
9078 2017-09-03 Tom Tromey <tom@tromey.com>
9079
9080 * utils.c (perror_string): Return a std::string.
9081 (throw_perror_with_name, perror_warning_with_name): Update.
9082
9083 2017-09-03 Tom Tromey <tom@tromey.com>
9084
9085 * demangle.c (demangle_command): Use std::string,
9086 unique_xmalloc_ptr.
9087
9088 2017-09-03 Tom Tromey <tom@tromey.com>
9089
9090 * cli/cli-setshow.c (do_set_command): Use std::string.
9091
9092 2017-09-03 Tom Tromey <tom@tromey.com>
9093
9094 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
9095
9096 2017-09-03 Tom Tromey <tom@tromey.com>
9097
9098 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
9099
9100 2017-09-03 Tom Tromey <tom@tromey.com>
9101
9102 * mi/mi-cmd-env.c (env_execute_cli_command): Use
9103 gdb::unique_xmalloc_ptr.
9104
9105 2017-09-03 Tom Tromey <tom@tromey.com>
9106
9107 * thread.c (print_thread_info_1): Use string_printf.
9108 (thread_apply_command, thread_apply_all_command): Use
9109 std::string.
9110
9111 2017-09-03 Tom Tromey <tom@tromey.com>
9112
9113 * valprint.c (val_print_string): Update.
9114 * gdbcore.h (memory_error_message): Return std::string.
9115 * corefile.c (memory_error_message): Return std::string.
9116 (memory_error): Update.
9117 * breakpoint.c (insert_bp_location): Update.
9118
9119 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
9120
9121 * target/waitstatus.h (target_waitstatus_to_string): Change
9122 return type to std::string.
9123 * target/waitstatus.c (target_waitstatus_to_string): Return
9124 std::string.
9125 * target.h (target_waitstatus_to_string): Remove declaration.
9126 * infrun.c (resume, clear_proceed_status_thread,
9127 print_target_wait_results, do_target_wait, save_waitstatus,
9128 stop_all_threads): Adjust.
9129 * record-btrace.c (record_btrace_wait): Adjust.
9130 * target-debug.h
9131 (target_debug_print_struct_target_waitstatus_p): Adjust.
9132
9133 2017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
9134
9135 PR gdb/22046
9136 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
9137 detection.
9138
9139 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
9140
9141 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
9142 for setting/unsetting environment variables on the remote target.
9143 (New remote packets): Add entries for QEnvironmentHexEncoded,
9144 QEnvironmentUnset and QEnvironmentReset.
9145 * common/environ.c (gdb_environ::operator=): Extend method to
9146 handle m_user_set_env_list and m_user_unset_env_list.
9147 (gdb_environ::clear): Likewise.
9148 (match_var_in_string): Change type of first parameter from 'char
9149 *' to 'const char *'.
9150 (gdb_environ::set): Extend method to handle
9151 m_user_set_env_list and m_user_unset_env_list.
9152 (gdb_environ::unset): Likewise.
9153 (gdb_environ::clear_user_set_env): New method.
9154 (gdb_environ::user_set_envp): Likewise.
9155 (gdb_environ::user_unset_envp): Likewise.
9156 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
9157 m_user_unset_env_list on move constructor/assignment.
9158 (unset): Add new default parameter 'update_unset_list = true'.
9159 (clear_user_set_env): New method.
9160 (user_set_envp): Likewise.
9161 (user_unset_envp): Likewise.
9162 (m_user_set_env_list): New std::set.
9163 (m_user_unset_env_list): Likewise.
9164 * common/rsp-low.c (hex2str): New function.
9165 (bin2hex): New overload for bin2hex function.
9166 * common/rsp-low.c (hex2str): New prototype.
9167 (str2hex): New overload prototype.
9168 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
9169 QEnvironmentUnset and QEnvironmentReset.
9170 (remote_protocol_features): Add QEnvironmentHexEncoded,
9171 QEnvironmentUnset and QEnvironmentReset packets.
9172 (send_environment_packet): New function.
9173 (extended_remote_environment_support): Likewise.
9174 (extended_remote_create_inferior): Call
9175 extended_remote_environment_support.
9176 (_initialize_remote): Add QEnvironmentHexEncoded,
9177 QEnvironmentUnset and QEnvironmentReset packet configs.
9178 * unittests/environ-selftests.c (gdb_selftest_env_var):
9179 New variable.
9180 (test_vector_initialization): New function.
9181 (test_init_from_host_environ): Likewise.
9182 (test_reinit_from_host_environ): Likewise.
9183 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
9184 Likewise.
9185 (test_unset_set_empty_vector): Likewise.
9186 (test_vector_clear): Likewise.
9187 (test_std_move): Likewise.
9188 (test_move_constructor):
9189 (test_self_move): Likewise.
9190 (test_set_unset_reset): Likewise.
9191 (run_tests): Rewrite in terms of the functions above.
9192
9193 2017-08-31 Weimin Pan <weimin.pan@oracle.com>
9194
9195 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
9196 (adi_available): Use a temp variable of type CORE_ADDR as argument
9197 3 when calling target_auxv_search.
9198 (adi_normalize_address): Use masks and xor operators to calculate
9199 normalized address.
9200 (adi_read_versions, adi_write_versions, adi_print_versions)
9201 (do_examine, do_assign): Use paddress.
9202
9203 2017-08-29 John Baldwin <jhb@FreeBSD.org>
9204
9205 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
9206 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
9207 out of loop and add supply of FIR.
9208 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
9209 add collect of FIR.
9210
9211 2017-08-28 Simon Marchi <simon.marchi@ericsson.com>
9212
9213 PR gdb/21827
9214 * cli/cli-script.c (define_command): Don't convert command name
9215 to lower case.
9216
9217 2017-08-25 Joel Brobecker <brobecker@adacore.com>
9218
9219 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
9220 Update all callers accordingly. Remove all code blocks handling
9221 the case where DISPP is not NULL.
9222
9223 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9224
9225 PR symtab/22003
9226 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
9227 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
9228 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
9229
9230 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9231
9232 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
9233 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
9234 (read_comp_units_from_section): New parameter abbrev_section, use
9235 read_and_check_comp_unit_head, allocate signatured_type if needed.
9236 (create_all_comp_units): Update read_comp_units_from_section caller.
9237
9238 2017-08-23 Pedro Alves <palves@redhat.com>
9239
9240 PR remote/21852
9241 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
9242 to null_ptid and switch to thread without reading the registers
9243 after adding the inferior.
9244
9245 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
9246
9247 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
9248 compile-gcc.
9249 * compile/compile.c (compile_gcc, show_compile_gcc): New.
9250 (compile_to_object): Implement compile_gcc.
9251 (_initialize_compile): Install "set compile-gcc". Initialize
9252 compile_gcc.
9253
9254 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
9255
9256 * compile/compile.c (compile_to_object): Conditionally call
9257 set_verbose. Conditionally call compile or compile_v0.
9258
9259 2017-08-07 Weimin Pan <weimin.pan@oracle.com>
9260
9261 * sparc64-tdep.h: (adi_normalize_address): New export.
9262 * sparc-nat.h: (open_adi_tag_fd): New export.
9263 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
9264 * sparc64-linux-tdep.c:
9265 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
9266 (sparc64_linux_handle_segmentation_fault): New function.
9267 (sparc64_linux_init_abi): Register
9268 sparc64_linux_handle_segmentation_fault
9269 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
9270 (sparc64_addr_bits_remove): New function.
9271 (sparc64_init_abi): Register sparc64_addr_bits_remove.
9272 (MAX_PROC_NAME_SIZE): New macro.
9273 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
9274 (sparc64adilist): New variable.
9275 (adi_proc_list): New variable.
9276 (find_adi_info): New function.
9277 (add_adi_info): New function.
9278 (get_adi_info_proc): New function.
9279 (get_adi_info): New function.
9280 (info_adi_command): New function.
9281 (read_maps_entry): New function.
9282 (adi_available): New function.
9283 (adi_normalize_address): New function.
9284 (adi_align_address): New function.
9285 (adi_convert_byte_count): New function.
9286 (adi_tag_fd): New function.
9287 (adi_is_addr_mapped): New function.
9288 (adi_read_versions): New function.
9289 (adi_write_versions): New function.
9290 (adi_print_versions): New function.
9291 (do_examine): New function.
9292 (do_assign): New function.
9293 (adi_examine_command): New function.
9294 (adi_assign_command): New function.
9295 (_initialize_sparc64_adi_tdep): New function.
9296
9297 2017-08-22 Simon Marchi <simon.marchi@ericsson.com>
9298
9299 * breakpoint.c (breakpoints_info): Rename to ...
9300 (info_breakpoints_command): ... this.
9301 (watchpoints_info): Rename to ...
9302 (info_watchpoints_command): ... this.
9303 (tracepoints_info): Rename to ...
9304 (info_tracepoints_command): ... this.
9305 (_initialize_breakpoint): Adjust.
9306 * dcache.c (dcache_info): Rename to ...
9307 (info_display_command): ... this.
9308 (_initialize_dcache): Adjust.
9309 * frame.h (args_info): Rename to ...
9310 (info_args_command): ... this.
9311 (locals_info): Rename to ...
9312 (info_locals_command): ... this.
9313 * infcmd.c (nofp_registers_info): Rename to ...
9314 (info_registers_command): ... this.
9315 (float_info): Rename to ...
9316 (info_float_command): ... this.
9317 (program_info): Rename to ...
9318 (info_program_command): ... this.
9319 (all_registers_info): Rename to ...
9320 (info_all_registers_command): ... this.
9321 (vector_info): Rename to ...
9322 (info_vector_command): ... this.
9323 (float_info): Rename to ...
9324 (info_float_command): ... this.
9325 (_initialize_infcmd): Adjust.
9326 * inferior.h (term_info): Rename to ...
9327 (info_terminal_command): ... this.
9328 * inflow.c (term_info): Rename to ...
9329 (info_terminal_command): ... this.
9330 (_initialize_inflow): Adjust.
9331 * infrun.c (signals_info): Rename to ...
9332 (info_signals_command): ... this.
9333 (_initialize_infrun): Adjust.
9334 * objc-lang.c (classes_info): Rename to ...
9335 (info_classes_command): ... this.
9336 (selectors_info): Rename to ...
9337 (info_selectors_command): ... this.
9338 (_initialize_objc_language): Adjust.
9339 * printcmd.c (sym_info): Rename to ...
9340 (info_symbol_command): ... this.
9341 (address_info): Rename to ...
9342 (info_address_command): ... this.
9343 (display_info): Rename to ...
9344 (info_display_command): ... this.
9345 (_initialize_printcmd): Adjust.
9346 * reverse.c (bookmarks_info): Rename to ...
9347 (info_breakpoints_command): ... this.
9348 (_initialize_reverse): Adjust.
9349 * ser-go32.c (dos_info): Rename to ...
9350 (info_serial_command): ... this.
9351 (_initialize_ser_dos): Adjust.
9352 * skip.c (skip_info): Rename to ...
9353 (info_skip_command): ... this.
9354 (_initialize_step_skip): Adjust.
9355 * source.c (line_info): Rename to ...
9356 (info_line_command): ... this.
9357 (source_info): Rename to ...
9358 (info_source_command)
9359 * stack.c (frame_info): Rename to ...
9360 (info_frame_command): ... this.
9361 (locals_info): Rename to ...
9362 (info_locals_command): ... this.
9363 (args_info): Rename to ...
9364 (info_args_command): ... this.
9365 (_initialize_stack): Adjust.
9366 * symtab.c (sources_info): Rename to ...
9367 (info_sources_command): ... this.
9368 (variables_info): Rename to ...
9369 (info_variables_command): ... this.
9370 (functions_info): Rename to ...
9371 (info_functions_command): ... this.
9372 (types_info): Rename to ...
9373 (info_types_command): ... this.
9374 (_initialize_symtab): Adjust.
9375 * target.c (target_info): Rename to ...
9376 (info_target_command): ... this.
9377 (initialize_targets): Adjust.
9378 * tracepoint.c (tvariables_info): Rename to ...
9379 (info_tvariables_command): ... this.
9380 (scope_info): Rename to ...
9381 (info_scope_command): ... this.
9382 (trace_dump_actions): Adjust.
9383 (_initialize_tracepoint): Adjust.
9384
9385 2017-08-22 Tom Tromey <tom@tromey.com>
9386
9387 * breakpoint.h (install_breakpoint): Update.
9388 * breakpoint.c (add_solib_catchpoint): Update.
9389 (install_breakpoint): Change argument to a std::unique_ptr.
9390 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
9391 (create_breakpoint_sal, create_breakpoint): Update.
9392 (watch_command_1, catch_exec_command_1)
9393 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
9394 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
9395 Return the breakpoint.
9396 (set_raw_breakpoint_without_location, set_raw_breakpoint)
9397 (new_single_step_breakpoint): Update.
9398 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
9399 std::unique_ptr.
9400 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
9401 std::unique_ptr.
9402 * break-catch-sig.c (create_signal_catchpoint): Use
9403 std::unique_ptr.
9404 * ada-lang.c (create_ada_exception_catchpoint): Use
9405 std::unique_ptr.
9406
9407 2017-08-22 Tom Tromey <tom@tromey.com>
9408
9409 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
9410
9411 2017-08-22 Tom Tromey <tom@tromey.com>
9412
9413 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
9414 (lookup_partial_symbol): Update.
9415
9416 2017-08-22 Tom Tromey <tom@tromey.com>
9417
9418 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
9419 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
9420 (find_and_open_source, symtab_to_fullname): Update.
9421 * psymtab.c (psymtab_to_fullname): Update.
9422
9423 2017-08-22 Tom Tromey <tom@tromey.com>
9424
9425 * exec.c (exec_file_attach): Update.
9426 * linux-thread-db.c (try_thread_db_load): Update.
9427 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
9428 * utils.c (gdb_realpath): Change return type.
9429 (gdb_realpath_keepfile): Update.
9430 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
9431 (_initialize_utils): Register the new self test.
9432 * source.c (openp): Update.
9433 (find_and_open_source): Update.
9434 * nto-tdep.c (nto_find_and_open_solib): Update.
9435 * main.c (set_gdb_data_directory): Update.
9436 (captured_main_1): Update.
9437 * dwarf2read.c (dwarf2_get_dwz_file): Update
9438 (dw2_map_symbol_filenames): Update.
9439 * auto-load.c (auto_load_safe_path_vec_update): Update.
9440 (filename_is_in_auto_load_safe_path_vec): Change type of
9441 "filename_realp".
9442 (auto_load_objfile_script): Update.
9443 (file_is_auto_load_safe): Update. Use std::string.
9444 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
9445
9446 2017-08-22 Tom Tromey <tom@tromey.com>
9447
9448 * utils.c (gdb_realpath_keepfile): Return a
9449 gdb::unique_xmalloc_ptr.
9450 * exec.c (exec_file_attach): Update.
9451 * utils.h (gdb_realpath_keepfile): Return a
9452 gdb::unique_xmalloc_ptr.
9453
9454 2017-08-22 Tom Tromey <tom@tromey.com>
9455
9456 * compile/compile.c (compile_file_command): Use
9457 gdb::unique_xmalloc_ptr, std::string.
9458 * utils.c (gdb_abspath): Change return type.
9459 * source.c (openp): Update.
9460 * objfiles.c (allocate_objfile): Update.
9461 * main.c (set_gdb_data_directory): Update.
9462 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
9463
9464 2017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
9465
9466 * cli-cmds.c (list_commands): List actual code around more than
9467 one location.
9468
9469 2017-08-21 John Baldwin <jhb@FreeBSD.org>
9470
9471 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
9472
9473 2017-08-21 Pedro Alves <palves@redhat.com>
9474
9475 PR gdb/19487
9476 * c-exp.y (variable production): Handle function aliases.
9477 * minsyms.c (msymbol_is_text): New function.
9478 * minsyms.h (msymbol_is_text): Declare.
9479 * symtab.c (find_function_alias_target): New function.
9480 * symtab.h (find_function_alias_target): Declare.
9481
9482 2017-08-21 Pedro Alves <palves@redhat.com>
9483
9484 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
9485 typedefs.
9486 * typeprint.c (whatis_exp): If handling "whatis", and expression
9487 is OP_TYPE, strip one typedef level. Otherwise don't strip
9488 typedefs here.
9489 * valops.c (value_cast): Save "to" type before resolving
9490 stubs/typedefs. Use that type as resulting value's type.
9491
9492 2017-08-18 Tom Tromey <tom@tromey.com>
9493 Pedro Alves <palves@redhat.com>
9494
9495 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
9496 * sol-thread.c (sol_thread_resume, sol_thread_wait)
9497 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
9498 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
9499 * proc-service.c (ps_xfer_memory): Use scoped_restore.
9500 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
9501 (linux_get_siginfo_data): Add "thread" argument. Use
9502 scoped_restore.
9503 * linux-nat.c (linux_child_follow_fork)
9504 (check_stopped_by_watchpoint): Use scoped_restore.
9505 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
9506 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
9507 (restore_inferior_ptid, save_inferior_ptid): Remove.
9508 * btrace.c (btrace_fetch): Use scoped_restore.
9509 * bsd-uthread.c (bsd_uthread_fetch_registers)
9510 (bsd_uthread_store_registers): Use scoped_restore.
9511 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
9512 scoped_restore.
9513 * aix-thread.c (aix_thread_resume, aix_thread_wait)
9514 (aix_thread_xfer_partial): Use scoped_restore.
9515 * inferior.h (save_inferior_ptid): Remove.
9516
9517 2017-08-18 Yao Qi <yao.qi@linaro.org>
9518
9519 PR tdep/21818
9520 * arm-tdep.c (gdb_print_insn_arm): Mark
9521 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
9522
9523 2017-08-18 Yao Qi <yao.qi@linaro.org>
9524
9525 * NEWS: Mention GDBserver's new option "--selftest".
9526 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
9527 * selftest.c: Move it to common/selftest.c.
9528 * selftest.h: Move it to common/selftest.h.
9529 * selftest-arch.c (reset): New function.
9530 (tests_with_arch): Call reset.
9531
9532 2017-08-18 Yao Qi <yao.qi@linaro.org>
9533
9534 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
9535 instead of exception_fprintf and printf_filtered.
9536
9537 2017-08-18 Yao Qi <yao.qi@linaro.org>
9538
9539 * selftest.c (register_self_test): Rename it to
9540 selftests::register_test.
9541 (run_self_tests): selftest::run_tests.
9542 * selftest.h: Update declarations.
9543 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
9544 selftests::register_test_foreach_arch.
9545 * selftest-arch.h: Update declaration.
9546 * aarch64-tdep.c: Update.
9547 * arm-tdep.c: Likewise.
9548 * disasm-selftests.c: Likewise.
9549 * dwarf2loc.c: Likewise.
9550 * dwarf2-frame.c: Likewise.
9551 * findvar.c: Likewise.
9552 * gdbarch-selftests.c: Likewise.
9553 * maint.c (maintenance_selftest): Likewise.
9554 * regcache.c: Likewise.
9555 * rust-exp.y: Likewise.
9556 * selftest-arch.c: Likewise.
9557 * unittests/environ-selftests.c: Likewise.
9558 * unittests/function-view-selftests.c: Likewise.
9559 * unittests/offset-type-selftests.c: Likewise.
9560 * unittests/optional-selftests.c: Likewise.
9561 * unittests/scoped_restore-selftests.c: Likewise.
9562 * utils-selftests.c: Likewise.
9563
9564 2017-08-17 Pedro Alves <palves@redhat.com>
9565
9566 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
9567 local.
9568
9569 2017-08-17 Pedro Alves <palves@redhat.com>
9570
9571 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
9572 field.
9573 (reset_die_in_process): Delete, replaced by ...
9574 (process_die_scope): ... this new class. Make it responsible for
9575 freeing cu->line_header too.
9576 (process_die): Use process_die_scope.
9577 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
9578 cu->line_header_die_owner. Don't release the line header if it's
9579 owned by the CU.
9580 (setup_type_unit_groups): Make the CU/DIE own the line header.
9581 Don't release the line header here.
9582
9583 2017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
9584
9585 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
9586
9587 2017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
9588
9589 * NEWS: Mention new shortcuts for nexti and stepi in TUI
9590 Single-Key mode
9591
9592 2017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
9593
9594 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
9595 mode command list.
9596
9597 2017-08-15 Stafford Horne <shorne@gmail.com>
9598
9599 * MAINTAINERS (Write After Approval): Add Stafford Horne.
9600
9601 2017-08-15 Stafford Horne <shorne@gmail.com>
9602
9603 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
9604
9605 2017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
9606
9607 PR gdb/21954
9608 * infcmd.c (unset_environment_command): Use the 'clear' method on
9609 the environment instead of resetting it.
9610
9611 2017-08-15 John Baldwin <jhb@FreeBSD.org>
9612
9613 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
9614 platforms.
9615
9616 2017-08-14 Tom Tromey <tom@tromey.com>
9617
9618 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
9619 (print_binary_chars): Likewise.
9620 (BITS_IN_BYTES): Remove.
9621
9622 2017-08-14 Tom Tromey <tom@tromey.com>
9623
9624 PR gdb/21675
9625 * valprint.c (LOW_ZERO): Change value to 034.
9626 (print_octal_chars): Add static_asserts for octal constants.
9627 * printcmd.c (print_scalar_formatted): Add 'd' case.
9628
9629 2017-08-11 Tom Tromey <tom@tromey.com>
9630
9631 * symfile.c (add_symbol_file_command): Use std::vector.
9632
9633 2017-08-14 Tom Tromey <tom@tromey.com>
9634
9635 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
9636 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
9637 std::move.
9638 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
9639
9640 2017-08-11 Pedro Alves <palves@redhat.com>
9641
9642 * infrun.c (process_event_stop_test): Adjust
9643 function_name_is_marked_for_skip call.
9644 * skip.c: Include <list>.
9645 (skiplist_entry): Make it a class with private fields, and
9646 getters/setters.
9647 (skiplist_entry_chain): Delete.
9648 (skiplist_entries): New.
9649 (skiplist_entry_count): Delete.
9650 (highest_skiplist_entry_num): New.
9651 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
9652 (add_skiplist_entry): Delete.
9653 (skiplist_entry::skiplist_entry): New.
9654 (skiplist_entry::add_entry): New.
9655 (skip_file_command, skip_function): Adjust.
9656 (compile_skip_regexp): Delete.
9657 (skip_command): Don't compile regexp here. Adjust to use
9658 skiplist_entry::add_entry.
9659 (skip_info): Adjust to use range-for and getters.
9660 (skip_enable_command, skip_disable_command): Adjust to use
9661 range-for and setters.
9662 (skip_delete_command): Adjust to use std::list.
9663 (add_skiplist_entry): Delete.
9664 (skip_file_p): Delete, refactored as ...
9665 (skiplist_entry::do_skip_file_p): ... this new method.
9666 (skip_gfile_p): Delete, refactored as ...
9667 (skiplist_entry::do_gskip_file_p): ... this new method.
9668 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
9669 (skiplist_entry::skip_function_p): ... this new method.
9670 (function_name_is_marked_for_skip): Now returns bool, and takes
9671 the function sal by const reference. Adjust to use range-for and
9672 skiplist_entry methods.
9673 (_initialize_step_skip): Remove references to
9674 skiplist_entry_chain, skiplist_entry_count.
9675 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
9676 takes the function sal by const reference.
9677
9678 2017-08-11 Yao Qi <yao.qi@linaro.org>
9679
9680 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
9681 (dwarf2_frame_cache): Remove reset_cache_cleanup.
9682 (dwarf2_frame_cache):
9683 * frame-unwind.c (frame_unwind_try_unwinder): Catch
9684 RETURN_MASK_ALL and set *this_case to NULL.
9685 * frame-unwind.h: Update comments.
9686
9687 2017-08-11 Yao Qi <yao.qi@linaro.org>
9688
9689 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
9690 (dwarf2_frame_state_copy_regs): Remove.
9691 (dwarf2_frame_state_free_regs): Remove.
9692 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
9693 (dwarf2_restore_rule): Call method .alloc_regs instead of
9694 dwarf2_frame_state_alloc_regs.
9695 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
9696 constructor. Call std::move.
9697 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
9698 (dwarf2_frame_cache): Likewise.
9699
9700 [GDB_SELF_TEST]: Include selftest.h and
9701 selftest-arch.h.
9702 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
9703 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
9704 execute_cfa_program_test.
9705
9706 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
9707 copy ctor, assignment operator, move assignment.
9708 <alloc_regs>: New method.
9709 <swap>: New method.
9710 (struct dwarf2_frame_state): Delete dtor.
9711 (dwarf2_frame_state_alloc_regs): Remove declaration.
9712 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
9713 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
9714
9715 2017-08-11 Yao Qi <yao.qi@linaro.org>
9716
9717 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
9718 (dwarf2_frame_state::dwarf2_frame_state): New.
9719 (dwarf2_frame_state::~dwarf2_frame_state): New.
9720 (dwarf2_fetch_cfa_info): Update.
9721 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
9722 rather than a pointer. Update code.
9723 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
9724 dtor.
9725 <data_align, code_align, retaddr_column>: Change them to const.
9726 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
9727 to bool.
9728
9729 2017-08-11 Yao Qi <yao.qi@linaro.org>
9730
9731 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
9732 <loc.exp>: New field.
9733 * dwarf2-frame.c (execute_cfa_program): Update.
9734 (dwarf2_frame_prev_register): Update.
9735
9736 2017-08-10 Pedro Alves <palves@redhat.com>
9737
9738 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
9739
9740 2017-08-09 John Baldwin <jhb@FreeBSD.org>
9741
9742 * fbsd-nat.c (struct fbsd_fork_info): Remove.
9743 (fbsd_pending_children): Use std::list.
9744 (fbsd_remember_child): Likewise.
9745 (fbsd_is_child_pending): Likewise.
9746 (fbsd_pending_vfork_done): Use std::forward_list.
9747 (fbsd_add_vfork_done): Likewise.
9748 (fbsd_is_vfork_done_pending): Likewise.
9749 (fbsd_next_vfork_done): Likewise.
9750
9751 2017-08-09 John Baldwin <jhb@FreeBSD.org>
9752
9753 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
9754 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
9755 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
9756 for `mapfilename'.
9757 (fbsd_xfer_partial): Use gdb::byte_vector.
9758 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
9759
9760 2017-08-09 John Baldwin <jhb@FreeBSD.org>
9761
9762 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
9763 "filestuff.h".
9764 (fbsd_find_memory_regions): Fix `mapfile' initialization.
9765
9766 2017-08-09 Tom Tromey <tom@tromey.com>
9767
9768 * skip.c (skiplist_entry): New constructor.
9769 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
9770 (skiplist_entry::file_is_glob): Now bool.
9771 (skiplist_entry::file, skiplist_entry::function): Now
9772 std::string.
9773 (make_skip_entry): Return a unique_ptr. Use new.
9774 (free_skiplist_entry, free_skiplist_entry_cleanup)
9775 (make_free_skiplist_entry_cleanup): Remove.
9776 (skip_command, skip_disable_command, add_skiplist_entry)
9777 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
9778 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
9779 (function_name_is_marked_for_skip): Update.
9780 (skip_delete_command): Update. Use delete.
9781
9782 2017-08-09 Jiong Wang <jiong.wang@arm.com>
9783
9784 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
9785 (aarch64_linux_core_read_description): New function.
9786 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
9787
9788 2017-08-09 Pedro Alves <palves@redhat.com>
9789
9790 * cp-name-parser.y (cp_comp_to_string): Return a
9791 gdb::unique_xmalloc_ptr<char>.
9792 * cp-support.c (replace_typedefs_qualified_name)
9793 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
9794 (cp_canonicalize_string_full): Use op= instead of explicit
9795 convertion.
9796 (cp_class_name_from_physname, method_name_from_physname)
9797 (cp_func_name, cp_remove_params): Adjust to use
9798 gdb::unique_xmalloc_ptr<char>.
9799 * cp-support.h (cp_comp_to_string): Return a
9800 gdb::unique_xmalloc_ptr<char>.
9801 * python/py-type.c (typy_lookup_type): Adjust to use
9802 gdb::unique_xmalloc_ptr<char>.
9803
9804 2017-08-09 H.J. Lu <hongjiu.lu@intel.com>
9805
9806 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
9807
9808 2017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
9809 Yao Qi <yao.qi@linaro.org>
9810
9811 * cp-support.c (cp_canonicalize_string_full): Use
9812 gdb::unique_xmalloc_ptr<char>.
9813 (cp_canonicalize_string): Likewise.
9814
9815 2017-08-09 Yao Qi <yao.qi@linaro.org>
9816
9817 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
9818 * regformats/i386/amd64-avx-avx512.dat: Remove.
9819 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
9820 * regformats/i386/amd64-avx-mpx.dat:Remove.
9821 * regformats/i386/amd64-avx.dat: Remove.
9822 * regformats/i386/amd64-mpx.dat: Remove.
9823 * regformats/i386/i386-avx-avx512.dat: Remove.
9824 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
9825 * regformats/i386/i386-avx-mpx.dat: Remove.
9826 * regformats/i386/i386-mmx.dat: Remove.
9827 * regformats/i386/i386-mpx.dat: Remove.
9828
9829 2017-08-09 Yao Qi <yao.qi@linaro.org>
9830
9831 * amd64-tdep.h (tdesc_x32): Remove the declaration.
9832 * amd64-tdep.c: Don't include features/i386/x32*.c.
9833 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
9834 functions.
9835 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
9836 and i386/x32-avx-avx512.
9837 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
9838 and i386/x32.xml.
9839 * features/i386/x32-avx-avx512.c: Removed.
9840 * features/i386/x32-avx-avx512.xml: Removed.
9841 * features/i386/x32-avx.c: Removed.
9842 * features/i386/x32-avx.xml: Removed.
9843 * features/i386/x32.c: Removed.
9844 * features/i386/x32.xml: Removed.
9845 * regformats/i386/x32-avx-avx512.dat: Removed.
9846 * regformats/i386/x32-avx.dat: Removed.
9847 * regformats/i386/x32.dat: Removed.
9848
9849 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
9850
9851 PR breakpoints/21886
9852 * mem-break.c (default_memory_insert_breakpoint): Use
9853 `->placed_address' rather than `->reqstd_address' for the
9854 breakpoint location.
9855
9856 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
9857
9858 * arch-utils.c (default_print_insn): Remove arch/mach/endian
9859 assertions.
9860
9861 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
9862
9863 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
9864 a union of `tdep_info', `tdesc_data' and `id'.
9865 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
9866 rather than `info.tdep_info'.
9867 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
9868 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
9869 * i386-tdep.c (i386_gdbarch_init): Likewise.
9870 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
9871 * mips-tdep.c (mips_gdbarch_init): Likewise.
9872 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
9873 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
9874 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
9875 `info.tdep_info'.
9876 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
9877 `info.tdep_info'.
9878 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
9879 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
9880 `info.tdep_info'.
9881 * spu-tdep.c (spu_gdbarch_init): Likewise.
9882 * gdbarch.h: Regenerate.
9883
9884 2017-08-07 Leszek Swirski <leszeks@google.com>
9885
9886 PR symtab/20899
9887 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
9888
9889 2017-08-07 Simon Marchi <simon.marchi@ericsson.com>
9890
9891 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
9892 (gdbsim_open): Rename gdb_argv args object to argv.
9893
9894 2017-08-05 Tom Tromey <tom@tromey.com>
9895
9896 * compile/compile-object-load.c (compile_object_load): Use
9897 gdb::unique_xmalloc_ptr.
9898 * cli/cli-dump.c (scan_filename): Rename from
9899 scan_filename_with_cleanup. Change return type.
9900 (scan_expression): Rename from scan_expression_with_cleanup.
9901 Change return type.
9902 (dump_memory_to_file, dump_value_to_file, restore_command):
9903 Use gdb::unique_xmalloc_ptr. Update.
9904 * cli/cli-cmds.c (find_and_open_script): Use
9905 gdb::unique_xmalloc_ptr.
9906 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
9907 * symmisc.c (maintenance_print_symbols)
9908 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
9909 * symfile.c (symfile_bfd_open, generic_load)
9910 (add_symbol_file_command, remove_symbol_file_command): Use
9911 gdb::unique_xmalloc_ptr.
9912 * source.c (openp): Use gdb::unique_xmalloc_ptr.
9913 * psymtab.c (maintenance_print_psymbols): Use
9914 gdb::unique_xmalloc_ptr.
9915 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
9916 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
9917 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
9918 (reload_shared_libraries_1): Likewise.
9919
9920 2017-08-05 Tom Tromey <tom@tromey.com>
9921
9922 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
9923 (rust_op_vector, rust_set_vector): New typedefs.
9924 (current_parser): New global.
9925 (work_obstack): Change to pointer type. Update all users.
9926 (rust_ast, pstate): Remove globals.
9927 (struct rust_parser): New.
9928 (%union) <params, field_inits>: Change type.
9929 (start, tuple_expr, unit_expr, struct_expr_list, literal)
9930 (field_expr, expr_list, maybe_expr_list, type_list): Update.
9931 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
9932 (convert_params_to_types, convert_params_to_expression): Change
9933 type of "params".
9934 (ast_string): Change type of "fields".
9935 (rust_parse): Make a rust_parser. Remove cleanups.
9936 (rust_lex_tests): Make and install an auto_obstack.
9937
9938 2017-08-04 Yao Qi <yao.qi@linaro.org>
9939
9940 * configure.srv (ipa_x32_linux_regobj): New.
9941 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
9942 instead of X86_TDESC_AVX512.
9943 (initialize_low_tracepoint): Call
9944 init_registers_x32_avx_avx512_linux.
9945
9946 2017-08-04 Yao Qi <yao.qi@linaro.org>
9947
9948 * utils.h (gdb_argv): Add namespace std for nullptr_t.
9949
9950 2017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
9951
9952 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
9953
9954 2017-08-03 Tom Tromey <tom@tromey.com>
9955
9956 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
9957 Remove.
9958 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
9959
9960 2017-08-03 Tom Tromey <tom@tromey.com>
9961
9962 * python/py-param.c (compute_enum_values): Use gdb_argv.
9963
9964 2017-08-03 Tom Tromey <tom@tromey.com>
9965
9966 * utils.h (struct gdb_argv_deleter): New.
9967 (gdb_argv): New class.
9968 * utils.c (gdb_argv::reset): New method.
9969 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
9970 * tracefile.c (tsave_command): Use gdb_argv.
9971 * top.c (new_ui_command): Use gdb_argv.
9972 * symmisc.c (maintenance_print_symbols)
9973 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
9974 * symfile.c (symbol_file_command, generic_load)
9975 (remove_symbol_file_command): Use gdb_argv.
9976 * stack.c (backtrace_command): Use gdb_argv.
9977 * source.c (add_path, show_substitute_path_command)
9978 (unset_substitute_path_command, set_substitute_path_command):
9979 Use gdb_argv.
9980 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
9981 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
9982 * remote.c (extended_remote_run, remote_put_command)
9983 (remote_get_command, remote_delete_command): Use gdb_argv.
9984 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
9985 (gdbsim_open): Use gdb_argv.
9986 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
9987 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
9988 * procfs.c (procfs_info_proc): Use gdb_argv.
9989 * interps.c (interpreter_exec_cmd): Use gdb_argv.
9990 * infrun.c (handle_command): Use gdb_argv.
9991 * inferior.c (add_inferior_command, clone_inferior_command):
9992 Use gdb_argv.
9993 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
9994 * exec.c (exec_file_command): Use gdb_argv.
9995 * cli/cli-cmds.c (alias_command): Use gdb_argv.
9996 * compile/compile.c (build_argc_argv): Use gdb_argv.
9997
9998 2017-08-03 Tom Tromey <tom@tromey.com>
9999
10000 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
10001
10002 2017-08-03 Tom Tromey <tom@tromey.com>
10003
10004 * python/python.c (compute_python_string): Return std::string.
10005 (gdbpy_eval_from_control_command): Update.
10006 (do_start_initialization): Use std::string.
10007 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
10008 xstrprintf.
10009 * python/py-breakpoint.c (local_setattro): Use string_printf, not
10010 xstrprintf.
10011
10012 2017-08-03 Tom Tromey <tom@tromey.com>
10013
10014 * top.h (do_restore_instream_cleanup): Remove.
10015 * top.c (do_restore_instream_cleanup): Remove.
10016 (read_command_file): Use scoped_restore.
10017 * cli/cli-script.c (execute_user_command): Use scoped_restore.
10018
10019 2017-08-03 Tom Tromey <tom@tromey.com>
10020
10021 * cli/cli-script.c (execute_user_command)
10022 (execute_control_command): Use scoped_restore.
10023
10024 2017-08-03 Tom Tromey <tom@tromey.com>
10025
10026 * cli/cli-script.c (do_restore_user_call_depth): Remove.
10027 (execute_user_command): Remove user_call_depth; use
10028 user_args_stack's size instead.
10029
10030 2017-08-03 Tom Tromey <tom@tromey.com>
10031
10032 * top.h (in_user_command): Remove.
10033 * top.c (in_user_command): Remove.
10034 * cli/cli-script.c (do_restore_user_call_depth)
10035 (execute_user_command): Update.
10036
10037 2017-08-03 Tom Tromey <tom@tromey.com>
10038
10039 * valops.c (search_struct_method): Use gdb::byte_vector.
10040 * valarith.c (value_concat): Use std::vector.
10041 * target.c (memory_xfer_partial): Use gdb::byte_vector.
10042 (simple_search_memory): Likewise.
10043 * printcmd.c (find_string_backward): Use gdb::byte_vector.
10044 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
10045 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
10046 * elfread.c (elf_rel_plt_read): Use std::string.
10047 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
10048 * cli/cli-dump.c (restore_section_callback): Use
10049 gdb::byte_vector.
10050
10051 2017-08-03 Tom Tromey <tom@tromey.com>
10052
10053 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
10054
10055 2017-08-03 Tom Tromey <tom@tromey.com>
10056
10057 * tui/tui-regs.c (tui_restore_gdbout): Remove.
10058 (tui_register_format): Use scoped_restore.
10059
10060 2017-08-03 Tom Tromey <tom@tromey.com>
10061
10062 * reverse.c (exec_direction_default): Remove.
10063 (exec_reverse_once): Use scoped_restore.
10064 * remote.c (restore_remote_timeout): Remove.
10065 (remote_flash_erase, remote_flash_write, remote_flash_done)
10066 (readchar, remote_serial_write): Use scoped_restore.
10067 * cli/cli-script.c (struct source_cleanup_lines_args)
10068 (source_cleanup_lines): Remove.
10069 (script_from_file): Use scoped_restore.
10070 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
10071 (source_command): Use scoped_restore.
10072
10073 2017-08-03 Tom Tromey <tom@tromey.com>
10074
10075 * utils.h (make_cleanup_free_so): Remove.
10076 * utils.c (do_free_so, make_cleanup_free_so): Remove.
10077 * solist.h (struct so_deleter): New.
10078 (so_list_up): New typedef.
10079 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
10080
10081 2017-08-03 Tom Tromey <tom@tromey.com>
10082
10083 * utils.h (make_cleanup_restore_current_language): Remove.
10084 * utils.c (do_restore_current_language)
10085 (make_cleanup_restore_current_language): Remove.
10086 * parse.c (parse_exp_in_context_1)
10087 (parse_expression_with_language): Use
10088 scoped_restore_current_language.
10089 * mi/mi-main.c (mi_cmd_execute): Use
10090 scoped_restore_current_language.
10091 * language.h (scoped_restore_current_language): New class.
10092
10093 2017-08-03 Tom Tromey <tom@tromey.com>
10094
10095 * compile/compile.c (cleanup_unlink_file): Remove.
10096 (compile_to_object): Use gdb::unlinker.
10097 (eval_compile_command): Likewise.
10098
10099 2017-08-03 Tom Tromey <tom@tromey.com>
10100
10101 * utils.h (make_cleanup_fclose): Remove.
10102 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
10103
10104 2017-08-03 Tom Tromey <tom@tromey.com>
10105
10106 * top.c (open_terminal_stream): Return gdb_file_up.
10107 (new_ui_command): Update.
10108
10109 2017-08-03 Tom Tromey <tom@tromey.com>
10110
10111 * source.c (print_source_lines_base, forward_search_command)
10112 (reverse_search_command): Use gdb_file_up.
10113
10114 2017-08-03 Tom Tromey <tom@tromey.com>
10115
10116 * fbsd-nat.c (fbsd_find_memory_regions): Update.
10117
10118 2017-08-03 Tom Tromey <tom@tromey.com>
10119
10120 * cli/cli-cmds.c (find_and_open_script): Change return type.
10121 Remove "streamp" and "full_path" parameters.
10122 (source_script_with_search): Update.
10123 * auto-load.c (source_script_file): Update.
10124 * cli/cli-cmds.h (find_and_open_script): Change type.
10125 (open_script): New struct.
10126
10127 2017-08-03 Tom Tromey <tom@tromey.com>
10128
10129 * xml-support.c (xml_fetch_content_from_file): Update.
10130 * ui-file.c (stdio_file::open): Update.
10131 * tracefile-tfile.c (tfile_start): Update.
10132 * remote.c (remote_file_put, remote_file_get): Update.
10133 * nat/linux-procfs.c (linux_proc_get_int)
10134 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
10135 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
10136 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
10137 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
10138 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
10139 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
10140 * linux-nat.c (linux_proc_pending_signals): Update.
10141 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
10142 (file_closer): Remove.
10143 * compile/compile.c (compile_to_object): Update.
10144 * common/filestuff.h (struct gdb_file_deleter): New.
10145 (gdb_file_up): New typedef.
10146 (gdb_fopen_cloexec): Change return type.
10147 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
10148 * cli/cli-dump.c (fopen_with_cleanup): Remove.
10149 (dump_binary_file, restore_binary_file): Update.
10150 * auto-load.c (auto_load_objfile_script_1): Update.
10151
10152 2017-08-03 Tom Tromey <tom@tromey.com>
10153
10154 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
10155 (info_static_tracepoint_markers_command): Likewise.
10156 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
10157 * skip.c (skip_info): Use ui_out_emit_table.
10158 * progspace.c (print_program_space): Use ui_out_emit_table.
10159 * osdata.c (info_osdata): Use ui_out_emit_table.
10160 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
10161 ui_out_emit_table.
10162 * linux-thread-db.c (info_auto_load_libthread_db): Use
10163 ui_out_emit_table.
10164 * inferior.c (print_inferior): Use ui_out_emit_table.
10165 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
10166 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
10167 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
10168 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
10169 * ui-out.h (class ui_out_emit_table): New.
10170
10171 2017-08-02 Maciej W. Rozycki <macro@imgtec.com>
10172
10173 * mips-tdep.c (mips_fpu_type_str): New function.
10174 (mips_dump_tdep): Call it.
10175
10176 2017-08-01 Maciej W. Rozycki <macro@imgtec.com>
10177
10178 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
10179 `->mips_fpu_type'.
10180
10181 2017-07-31 Xavier Roirand <roirand@adacore.com>
10182
10183 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
10184
10185 2017-07-27 Xavier Roirand <roirand@adacore.com>
10186
10187 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
10188
10189 2017-07-26 Yao Qi <yao.qi@linaro.org>
10190
10191 * cli/cli-cmds.c (maintenancechecklist): New variable.
10192 * gdbcmd.h (maintenancechecklist): Declare it.
10193 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
10194 Call i386_linux_read_description with different masks.
10195 * maint.c (maintenance_check_command): New function.
10196 (_initialize_maint_cmds): Call add_prefix_cmd.
10197 * target-descriptions.c (tdesc_reg): override operator != and ==.
10198 (tdesc_type): Likewise.
10199 (tdesc_feature): Likewise.
10200 (target_desc): Likewise.
10201 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
10202 (maintenance_check_xml_descriptions): New function.
10203 (_initialize_target_descriptions) Add command "xml-descriptions".
10204 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
10205
10206 2017-07-26 Yao Qi <yao.qi@linaro.org>
10207
10208 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
10209 Include features/i386/32bit-*.c.
10210 (i386_linux_read_description): Generate target description if it
10211 doesn't exist.
10212 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
10213 functions.
10214 * features/i386/32bit-linux.c: Re-generated.
10215 * features/i386/32bit-sse.c: Likewise.
10216 * target-descriptions.c (print_c_feature::visit): Print code to
10217 set register number if needed.
10218 (print_c_feature) <m_next_regnum>: New field.
10219
10220 2017-07-26 Yao Qi <yao.qi@linaro.org>
10221
10222 * features/Makefile (CFILES): Rename with TDESC_CFILES.
10223 (FEATURE_XMLFILES): New.
10224 (FEATURE_CFILES): New.
10225 New rules.
10226 (clean-cfiles): Remove generated c files.
10227 * features/i386/32bit-avx.c: Generated.
10228 * features/i386/32bit-avx512.c: Generated.
10229 * features/i386/32bit-core.c: Generated.
10230 * features/i386/32bit-linux.c: Generated.
10231 * features/i386/32bit-mpx.c: Generated.
10232 * features/i386/32bit-pkeys.c: Generated.
10233 * features/i386/32bit-sse.c: Generated.
10234 * target-descriptions.c: Include algorithm.
10235 (tdesc_element_visitor): Add method visit_end.
10236 (print_c_tdesc): Implement visit_end.
10237 (print_c_tdesc:: m_filename_after_features): Move it to
10238 protected.
10239 (print_c_feature): New class.
10240 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
10241 name starts with "i386/32bit-".
10242
10243 2017-07-26 Yao Qi <yao.qi@linaro.org>
10244
10245 * target-descriptions.c (tdesc_element_visitor): New class.
10246 (tdesc_element): New class.
10247 (tdesc_reg): Inherit from tdesc_element.
10248 (tdesc_reg::accept): New function.
10249 (tdesc_type): Inherit from tdesc_element.
10250 (tdesc_type::accept): New function.
10251 (tdesc_feature): Inherit from tdesc_element.
10252 (tdesc_feature::accept): New function.
10253 (target_desc): Inherit from tdesc_element.
10254 (target_desc::target_desc): New.
10255 (target_desc::~target_desc): New.
10256 (target_desc::accept): New.
10257 (allocate_target_description): Use new.
10258 (free_target_description): Use delete.
10259 (print_c_tdesc): New class.
10260 (maint_print_c_tdesc_cmd): Adjust.
10261
10262 * features/aarch64.c: Re-generated.
10263 * features/arc-arcompact.c: Re-generated.
10264 * features/arc-v2.c: Re-generated.
10265 * features/arm/arm-with-iwmmxt.c: Re-generated.
10266 * features/arm/arm-with-m.c: Re-generated.
10267 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
10268 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
10269 * features/arm/arm-with-neon.c: Re-generated.
10270 * features/arm/arm-with-vfpv2.c: Re-generated.
10271 * features/arm/arm-with-vfpv3.c: Re-generated.
10272 * features/i386/amd64-avx-avx512.c: Re-generated.
10273 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
10274 * features/i386/amd64-avx.c: Re-generated.
10275 * features/i386/amd64-avx-linux.c: Re-generated.
10276 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
10277 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
10278 * features/i386/amd64-avx-mpx.c: Re-generated.
10279 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
10280 * features/i386/amd64.c: Re-generated.
10281 * features/i386/amd64-linux.c: Re-generated.
10282 * features/i386/amd64-mpx.c: Re-generated.
10283 * features/i386/amd64-mpx-linux.c: Re-generated.
10284 * features/i386/i386-avx-avx512.c: Re-generated.
10285 * features/i386/i386-avx-avx512-linux.c: Re-generated.
10286 * features/i386/i386-avx.c: Re-generated.
10287 * features/i386/i386-avx-linux.c: Re-generated.
10288 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
10289 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
10290 * features/i386/i386-avx-mpx.c: Re-generated.
10291 * features/i386/i386-avx-mpx-linux.c: Re-generated.
10292 * features/i386/i386.c: Re-generated.
10293 * features/i386/i386-linux.c: Re-generated.
10294 * features/i386/i386-mmx.c: Re-generated.
10295 * features/i386/i386-mmx-linux.c: Re-generated.
10296 * features/i386/i386-mpx.c: Re-generated.
10297 * features/i386/i386-mpx-linux.c: Re-generated.
10298 * features/i386/x32-avx-avx512.c: Re-generated.
10299 * features/i386/x32-avx-avx512-linux.c: Re-generated.
10300 * features/i386/x32-avx.c: Re-generated.
10301 * features/i386/x32-avx-linux.c: Re-generated.
10302 * features/i386/x32.c: Re-generated.
10303 * features/i386/x32-linux.c: Re-generated.
10304 * features/microblaze.c: Re-generated.
10305 * features/microblaze-with-stack-protect.c: Re-generated.
10306 * features/mips64-dsp-linux.c: Re-generated.
10307 * features/mips64-linux.c: Re-generated.
10308 * features/mips-dsp-linux.c: Re-generated.
10309 * features/mips-linux.c: Re-generated.
10310 * features/nds32.c: Re-generated.
10311 * features/nios2.c: Re-generated.
10312 * features/nios2-linux.c: Re-generated.
10313 * features/rs6000/powerpc-32.c: Re-generated.
10314 * features/rs6000/powerpc-32l.c: Re-generated.
10315 * features/rs6000/powerpc-403.c: Re-generated.
10316 * features/rs6000/powerpc-403gc.c : Re-generated.
10317 * features/rs6000/powerpc-405.c: Re-generated.
10318 * features/rs6000/powerpc-505.c: Re-generated.
10319 * features/rs6000/powerpc-601.c: Re-generated.
10320 * features/rs6000/powerpc-602.c: Re-generated.
10321 * features/rs6000/powerpc-603.c: Re-generated.
10322 * features/rs6000/powerpc-604.c: Re-generated.
10323 * features/rs6000/powerpc-64.c: Re-generated.
10324 * features/rs6000/powerpc-64l.c: Re-generated.
10325 * features/rs6000/powerpc-7400.c: Re-generated.
10326 * features/rs6000/powerpc-750.c: Re-generated.
10327 * features/rs6000/powerpc-860.c: Re-generated.
10328 * features/rs6000/powerpc-altivec32.c: Re-generated.
10329 * features/rs6000/powerpc-altivec32l.c: Re-generated.
10330 * features/rs6000/powerpc-altivec64.c: Re-generated.
10331 * features/rs6000/powerpc-altivec64l.c: Re-generated.
10332 * features/rs6000/powerpc-cell32l.c: Re-generated.
10333 * features/rs6000/powerpc-cell64l.c: Re-generated.
10334 * features/rs6000/powerpc-e500.c: Re-generated.
10335 * features/rs6000/powerpc-e500l.c: Re-generated.
10336 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
10337 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
10338 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
10339 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
10340 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
10341 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
10342 * features/rs6000/powerpc-vsx32.c: Re-generated.
10343 * features/rs6000/powerpc-vsx32l.c: Re-generated.
10344 * features/rs6000/powerpc-vsx64.c: Re-generated.
10345 * features/rs6000/powerpc-vsx64l.c: Re-generated.
10346 * features/rs6000/rs6000.c: Re-generated.
10347 * features/s390-linux32.c: Re-generated.
10348 * features/s390-linux32v1.c: Re-generated.
10349 * features/s390-linux32v2.c: Re-generated.
10350 * features/s390-linux64.c: Re-generated.
10351 * features/s390-linux64v1.c: Re-generated.
10352 * features/s390-linux64v2.c: Re-generated.
10353 * features/s390-te-linux64.c: Re-generated.
10354 * features/s390-tevx-linux64.c: Re-generated.
10355 * features/s390-vx-linux64.c: Re-generated.
10356 * features/s390x-linux64.c: Re-generated.
10357 * features/s390x-linux64v1.c: Re-generated.
10358 * features/s390x-linux64v2.c: Re-generated.
10359 * features/s390x-te-linux64.c: Re-generated.
10360 * features/s390x-tevx-linux64.c: Re-generated.
10361 * features/s390x-vx-linux64.c: Re-generated.
10362 * features/sparc/sparc32-solaris.c: Re-generated.
10363 * features/sparc/sparc64-solaris.c: Re-generated.
10364 * features/tic6x-c62x.c: Re-generated.
10365 * features/tic6x-c62x-linux.c: Re-generated.
10366 * features/tic6x-c64x.c: Re-generated.
10367 * features/tic6x-c64x-linux.c: Re-generated.
10368 * features/tic6x-c64xp.c: Re-generated.
10369 * features/tic6x-c64xp-linux.c: Re-generated.
10370
10371 2017-07-26 Yao Qi <yao.qi@linaro.org>
10372
10373 * i386-linux-tdep.c (i386_linux_read_description): New function.
10374 (i386_linux_core_read_description): Call
10375 i386_linux_read_description.
10376 * i386-linux-tdep.h (i386_linux_read_description): Declare.
10377 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
10378 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
10379 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
10380 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
10381 * x86-linux-nat.c (x86_linux_read_description): Call
10382 i386_linux_read_description.
10383
10384 2017-07-26 Yao Qi <yao.qi@linaro.org>
10385
10386 * NEWS: Mention it.
10387 * features/Makefile (%.c: %.xml): Pass the xml file name to
10388 command "maint print c-tdesc".
10389 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
10390 name from 'arg'.
10391
10392 2017-07-26 Yao Qi <yao.qi@linaro.org>
10393
10394 * target-descriptions.c (target_desc): Add ctor and dtor. Do
10395 in-class initialization.
10396 (tdesc_create_feature): Call new instead of XCNEW.
10397 (free_target_description): Ue delete.
10398
10399 2017-07-25 John Baldwin <jhb@FreeBSD.org>
10400
10401 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
10402
10403 2017-07-25 Yao Qi <yao.qi@linaro.org>
10404
10405 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
10406 constant.
10407 (amd64_x32_init_abi): Likewise.
10408 * amd64-tdep.h (amd64_init_abi): Update declaration.
10409 (amd64_x32_init_abi): Likewise.
10410
10411 2017-07-25 Yao Qi <yao.qi@linaro.org>
10412
10413 PR tdep/21717
10414 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
10415 condition for FPSCR.
10416 (arm_linux_store_inferior_registers): Likewise.
10417
10418 2017-07-22 Tom Tromey <tom@tromey.com>
10419
10420 * break-catch-syscall.c (struct catch_syscall_inferior_data)
10421 <syscalls_counts>: Now a std::vector.
10422 (get_catch_syscall_inferior_data): Use "new".
10423 (catch_syscall_inferior_data_cleanup): Use "delete".
10424 (insert_catch_syscall, remove_catch_syscall)
10425 (clear_syscall_counts): Update.
10426
10427 2017-07-22 Tom Tromey <tom@tromey.com>
10428
10429 * break-catch-syscall.c (syscall_catchpoint)
10430 <syscalls_to_be_caught>: Now a std::vector<int>
10431 (~syscall_catchpoint): Remove.
10432 (insert_catch_syscall, remove_catch_syscall)
10433 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
10434 (print_mention_catch_syscall, print_recreate_catch_syscall):
10435 Update.
10436 (create_syscall_event_catchpoint): Change type of "filter"
10437 parameter.
10438 (catch_syscall_split_args): Return a std::vector.
10439 (catch_syscall_command_1, catching_syscall_number_1): Update.
10440
10441 2017-07-22 Tom Tromey <tom@tromey.com>
10442
10443 * break-catch-throw.c (struct exception_catchpoint)
10444 <exception_rx>: Now a std::string.
10445 (~exception_catchpoint): Remove.
10446 (print_one_detail_exception_catchpoint): Update.
10447 (handle_gnu_v3_exceptions): Change type of except_rx.
10448 (extract_exception_regexp): Return a std::string.
10449 (catch_exception_command_1): Update.
10450
10451 2017-07-22 Tom Tromey <tom@tromey.com>
10452
10453 * break-catch-sig.c (gdb_signal_type): Remove typedef.
10454 (struct signal_catchpoint) <signals_to_be_caught>: Now a
10455 std::vector.
10456 <catch_all>: Now a bool.
10457 (~signal_catchpoint): Remove.
10458 (signal_catchpoint_insert_location)
10459 (signal_catchpoint_remove_location)
10460 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
10461 (signal_catchpoint_print_mention)
10462 (signal_catchpoint_print_recreate)
10463 (signal_catchpoint_explains_signal): Update.
10464 (create_signal_catchpoint): Change type of "filter" and
10465 "catch_all".
10466 (catch_signal_split_args): Return a std::vector. Change type of
10467 "catch_all".
10468 (catch_signal_command): Update.
10469
10470 2017-07-20 Pedro Alves <palves@redhat.com>
10471
10472 * ada-lang.c (ada_language_defn): Make extern.
10473 (_initialize_ada_language): Remove add_language call.
10474 * c-lang.c (c_language_defn, cplus_language_defn)
10475 (asm_language_defn, minimal_language_defn): Make extern.
10476 (_initialize_c_language): Delete.
10477 * completer.c (compare_cstrings): Delete, moved to utils.h.
10478 * d-lang.c (d_language_defn): Make extern.
10479 (_initialize_d_language): Remove add_language calls.
10480 * defs.h (enum language): Add comment.
10481 * f-lang.c (f_language_defn): Make extern.
10482 (_initialize_f_language): Remove add_language call.
10483 * go-lang.c (go_language_defn): Make extern.
10484 (_initialize_go_language): Remove add_language call.
10485 * language.c: Include <algorithm>.
10486 (languages): Redefine as const array.
10487 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
10488 (set_language_command): Handle "local". Use for-range loop.
10489 (set_language): Remove loop.
10490 (language_enum): Rewrite.
10491 (language_def, language_str): Remove loops.
10492 (add_language): Delete.
10493 (add_set_language_command): New, based on add_languages.
10494 (skip_language_trampoline): Adjust.
10495 (local_language_defn): Delete.
10496 (language_gdbarch_post_init): Adjust.
10497 (_initialize_language): Remove add_language calls. Call
10498 add_set_language_command.
10499 * language.h (add_language): Delete.
10500 (auto_language_defn)
10501 (unknown_language_defn, minimal_language_defn, ada_language_defn)
10502 (asm_language_defn, c_language_defn, cplus_language_defn)
10503 (d_language_defn, f_language_defn, go_language_defn)
10504 (m2_language_defn, objc_language_defn, opencl_language_defn)
10505 (pascal_language_defn, rust_language_defn): Declare.
10506 * m2-lang.c (m2_language_defn): Make extern.
10507 (_initialize_m2_language): Remove add_language call.
10508 * objc-lang.c (objc_language_defn): Make extern.
10509 (_initialize_objc_language): Remove add_language call.
10510 * opencl-lang.c (opencl_language_defn): Make extern.
10511 (_initialize_opencl_language): Remove add_language call.
10512 * p-lang.c (pascal_language_defn): Make extern.
10513 (_initialize_pascal_language): Delete.
10514 * rust-lang.c (rust_language_defn): Make extern.
10515 (_initialize_rust_language): Delete.
10516 * utils.h (compare_cstrings): New static inline function.
10517
10518 2017-07-20 Pedro Alves <palves@redhat.com>
10519
10520 * ada-lang.c (ada_to_fixed_type_1): Adjust.
10521 (get_var_value): Constify parameters.
10522 (get_int_var_value): Change prototype.
10523 (to_fixed_range_type): Adjust.
10524 * ada-lang.h (get_int_var_value): Change prototype.
10525
10526 2017-07-20 Pedro Alves <palves@redhat.com>
10527
10528 * dwarf2read.c (dw2_lookup_symbol): Use
10529 SYMBOL_MATCHES_SEARCH_NAME.
10530 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
10531
10532 2017-07-20 Pedro Alves <palves@redhat.com>
10533
10534 * block.c (block_iter_name_step, block_iter_name_first)
10535 (block_iter_name_next): Delete.
10536 (block_lookup_symbol_primary): Adjust to use
10537 dict_iter_match_first/dict_iter_match_next.
10538 * block.h (block_iter_name_first, block_iter_name_next): Delete
10539 declarations.
10540 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
10541 dict_iter_match_first/dict_iter_match_next.
10542
10543 2017-07-20 Pedro Alves <palves@redhat.com>
10544
10545 * cp-support.c (cp_find_first_component_aux): Add missing case for
10546 end of string.
10547
10548 2017-07-18 David Blaikie <dblaikie@gmail.com>
10549
10550 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
10551 of dwo_cu's dwo_file.
10552
10553 2017-07-18 Yao Qi <yao.qi@linaro.org>
10554
10555 * remote.c (store_registers_using_G): Remove one line comment.
10556
10557 2017-07-18 Yao Qi <yao.qi@linaro.org>
10558
10559 * regcache.c (regcache_cpy): Simplify it.
10560 (regcache::cpy_no_passthrough): Remove it.
10561 * regcache.h (cpy_no_passthrough): Remove it.
10562 (regcache_dup, regcache_cpy): Update comments.
10563
10564 2017-07-18 Pedro Alves <palves@redhat.com>
10565
10566 * remote-sim.c (sim_command_completer): Adjust to work with a
10567 completion_tracker instead of a VEC.
10568
10569 2017-07-17 Pedro Alves <palves@redhat.com>
10570
10571 * completer.c (complete_source_filenames): New function.
10572 (complete_address_and_linespec_locations): New function.
10573 (location_completer): Use complete_address_and_linespec_locations.
10574 (completion_tracker::build_completion_result): Honor the tracker's
10575 request to suppress append.
10576 * completer.h (completion_tracker::suppress_append_ws)
10577 (completion_tracker::set_suppress_append_ws): New methods.
10578 (completion_tracker::m_suppress_append_ws): New field.
10579 (complete_source_filenames): New declaration.
10580 * linespec.c (linespec_complete_what): New.
10581 (struct ls_parser) <complete_what, completion_word,
10582 completion_quote_char, completion_quote_end, completion_tracker>:
10583 New fields.
10584 (string_find_incomplete_keyword_at_end): New.
10585 (linespec_lexer_lex_string): Record quote char. If in completion
10586 mode, don't throw.
10587 (linespec_lexer_consume_token): Advance the completion word point.
10588 (linespec_lexer_peek_token): Save/restore completion info.
10589 (save_stream_and_consume_token): New.
10590 (set_completion_after_number): New.
10591 (linespec_parse_basic): Set what to complete next depending on
10592 token. Handle function and label completions specially.
10593 (parse_linespec): Disable objc shortcut in completion mode. Set
10594 what to complete next depending on token type. Skip keyword if in
10595 completion mode.
10596 (complete_linespec_component, linespec_complete): New.
10597 * linespec.h (linespec_complete): Declare.
10598
10599 2017-07-17 Pedro Alves <palves@redhat.com>
10600
10601 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
10602 Handle 'operator<' / 'operator<<'.
10603
10604 2017-07-17 Pedro Alves <palves@redhat.com>
10605
10606 * completer.c (collect_explicit_location_matches): Handle
10607 MATCH_LABEL.
10608 (convert_explicit_location_to_linespec): New, factored out from
10609 ...
10610 (convert_explicit_location_to_sals): ... this.
10611 (complete_label): New.
10612 (linespec_complete_label, find_label_symbols_in_block): New.
10613 (find_label_symbols): Add completion_mode parameter and adjust to
10614 call find_label_symbols_in_block.
10615 * linespec.h (linespec_complete_label): Declare.
10616
10617 2017-07-17 Pedro Alves <palves@redhat.com>
10618
10619 * ada-lang.c (ada_collect_symbol_completion_matches): Add
10620 complete_symbol_mode parameter.
10621 * cli/cli-cmds.c (complete_command): Get the completion result out
10622 of the handle_brkchars tracker if used a custom word point.
10623 * completer.c: Include "linespec.h".
10624 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
10625 (advance_to_expression_complete_word_point): New.
10626 (completion_tracker::completes_to_completion_word): New.
10627 (complete_files_symbols): Pass down
10628 complete_symbol_mode::EXPRESSION.
10629 (explicit_options, probe_options): New.
10630 (collect_explicit_location_matches): Complete on the
10631 explictit_loc->foo instead of word. Use
10632 linespec_complete_function. Handle MATCH_LINE. Handle offering
10633 keyword and options completions.
10634 (backup_text_ptr): Delete.
10635 (skip_keyword): New.
10636 (complete_explicit_location): Remove 'word' parameter. Add
10637 language, quoted_arg_start and quoted_arg_end parameters.
10638 Rewrite, parsing left to right.
10639 (location_completer): Rewrite.
10640 (location_completer_handle_brkchars): New function.
10641 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
10642 (enum complete_line_internal_reason): Adjust comments.
10643 (completion_tracker::discard_completions): New.
10644 (completer_handle_brkchars_func_for_completer): Handle
10645 location_completer.
10646 (gdb_custom_word_point_brkchars)
10647 (gdb_org_rl_basic_quote_characters): New.
10648 (gdb_completion_word_break_characters_throw)
10649 (completion_find_completion_word): Handle trackers that use a
10650 custom word point.
10651 (completion_tracker::advance_custom_word_point_by): New.
10652 (completion_tracker::build_completion_result): Don't rely on
10653 readline appending the quote char.
10654 (gdb_rl_attempted_completion_function_throw): Handle trackers that
10655 use a custom word point.
10656 (gdb_rl_attempted_completion_function): Restore
10657 rl_basic_quote_characters.
10658 * completer.h (class completion_tracker): Extend intro comment.
10659 (completion_tracker::set_quote_char)
10660 (completion_tracker::quote_char)
10661 (completion_tracker::set_use_custom_word_point)
10662 (completion_tracker::use_custom_word_point)
10663 (completion_tracker::custom_word_point)
10664 (completion_tracker::set_custom_word_point)
10665 (completion_tracker::advance_custom_word_point_by)
10666 (completion_tracker::completes_to_completion_word)
10667 (completion_tracker::discard_completions): New methods.
10668 (completion_tracker::m_quote_char)
10669 (completion_tracker::m_use_custom_word_point)
10670 (completion_tracker::m_custom_word_point): New fields.
10671 (advance_to_expression_complete_word_point): Declare.
10672 * f-lang.c (f_collect_symbol_completion_matches): Add
10673 complete_symbol_mode parameter.
10674 * language.h (struct language_defn)
10675 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
10676 parameter.
10677 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
10678 (linespec_complete_function): New function.
10679 (linespec_lexer_lex_keyword): Adjust.
10680 * linespec.h (linespec_keywords, linespec_complete_function): New
10681 declarations.
10682 * location.c (find_end_quote): New function.
10683 (explicit_location_lex_one): Add explicit_completion_info
10684 parameter. Save quoting info. Don't throw if being called for
10685 completion. Don't handle Ada operators here.
10686 (is_cp_operator, skip_op_false_positives, first_of)
10687 (explicit_location_lex_one_function): New function.
10688 (string_to_explicit_location): Replace 'dont_throw' parameter with
10689 an explicit_completion_info pointer parameter. Handle it. Don't
10690 use explicit_location_lex_one to lex function names. Use
10691 explicit_location_lex_one_function instead.
10692 * location.h (struct explicit_completion_info): New.
10693 (string_to_explicit_location): Replace 'dont_throw' parameter with
10694 an explicit_completion_info pointer parameter.
10695 * symtab.c (default_collect_symbol_completion_matches_break_on):
10696 Add complete_symbol_mode parameter. Handle LINESPEC mode.
10697 (default_collect_symbol_completion_matches)
10698 (collect_symbol_completion_matches): Add complete_symbol_mode
10699 parameter.
10700 (collect_symbol_completion_matches_type): Pass down
10701 complete_symbol_mode::EXPRESSION.
10702 (collect_file_symbol_completion_matches): Add complete_symbol_mode
10703 parameter. Handle LINESPEC mode.
10704 * symtab.h (complete_symbol_mode): New.
10705 (default_collect_symbol_completion_matches_break_on)
10706 (default_collect_symbol_completion_matches)
10707 (collect_symbol_completion_matches)
10708 (collect_file_symbol_completion_matches): Add complete_symbol_mode
10709 parameter.
10710
10711 2017-07-17 Pedro Alves <palves@redhat.com>
10712
10713 * utils.c (enum class strncmp_iw_mode): New.
10714 (strcmp_iw): Rename to ...
10715 (strncmp_iw_with_mode): ... this. Add string2_len and mode
10716 parameters. Handle them.
10717 (strncmp_iw): New.
10718 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
10719 * utils.h (strncmp_iw): Declare.
10720 (strcmp_iw): Move describing comments here.
10721
10722 2017-07-17 Pedro Alves <palves@redhat.com>
10723
10724 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
10725 CP_OPERATOR_STR.
10726 * c-typeprint.c (is_type_conversion_operator): Use
10727 CP_OPERATOR_STR.
10728 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
10729 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
10730 CP_OPERATOR_LEN.
10731 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
10732 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
10733 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
10734 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
10735 CP_OPERATOR_STR.
10736 * location.c: Include "cp-support.h".
10737 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
10738 CP_OPERATOR_STR.
10739 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
10740 CP_OPERATOR_LEN.
10741
10742 2017-07-17 Pedro Alves <palves@redhat.com>
10743
10744 * cli/cli-cmds.c (complete_command): Use a completion tracker
10745 along with completion_find_completion_word for handle_brkchars
10746 phase.
10747 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
10748 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
10749 (struct gdb_rl_completion_word_info): New.
10750 (gdb_rl_find_completion_word): New.
10751 (completion_find_completion_word): New.
10752 * completer.h (completion_find_completion_word): Declare.
10753
10754 2017-07-17 Pedro Alves <palves@redhat.com>
10755
10756 * ada-lang.c (symbol_completion_match): Adjust comments.
10757 (symbol_completion_add): Replace vector parameter with
10758 completion_tracker parameter. Use it.
10759 (ada_make_symbol_completion_list): Rename to...
10760 (ada_collect_symbol_completion_matches): ... this. Add
10761 completion_tracker parameter and use it.
10762 (ada_language_defn): Adjust.
10763 * break-catch-syscall.c (catch_syscall_completer): Adjust
10764 prototype and work with completion_tracker instead of VEC.
10765 * breakpoint.c (condition_completer): Adjust prototype and work
10766 with completion_tracker instead of VEC.
10767 * c-lang.c (c_language_defn, cplus_language_defn)
10768 (asm_language_defn, minimal_language_defn): Adjust to renames.
10769 * cli/cli-cmds.c (complete_command): Rework using
10770 completion_tracker. Catch exceptions when completing.
10771 * cli/cli-decode.c (integer_unlimited_completer)
10772 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
10773 with completion_tracker instead of VEC.
10774 * command.h (struct completion_tracker): Forward declare.
10775 (completer_ftype, completer_handle_brkchars_ftype): Change
10776 types.
10777 (complete_on_cmdlist, complete_on_enum): Adjust.
10778 * completer.c: Include <algorithm>.
10779 (struct gdb_completer_state): New.
10780 (current_completion): New global.
10781 (readline_line_completion_function): Delete.
10782 (noop_completer, filename_completer)
10783 (filename_completer_handle_brkchars, complete_files_symbols)
10784 (linespec_location_completer): Adjust to work with a
10785 completion_tracker instead of a VEC.
10786 (string_or_empty): New.
10787 (collect_explicit_location_matches): Adjust to work with a
10788 completion_tracker instead of a VEC.
10789 (explicit_location_completer): Rename to ...
10790 (complete_explicit_location): ... this and adjust to work with a
10791 completion_tracker instead of a VEC.
10792 (location_completer): Adjust to work with a completion_tracker
10793 instead of a VEC.
10794 (add_struct_fields): Adjust to work with a completion_list instead
10795 of VEC.
10796 (expression_completer): Rename to ...
10797 (complete_expression): ... this and adjust to work with a
10798 completion_tracker instead of a VEC. Use complete_files_symbols.
10799 (expression_completer): Reimplement on top of complete_expression.
10800 (symbol_completer): Adjust to work with a completion_tracker
10801 instead of a VEC.
10802 (enum complete_line_internal_reason): Add describing comments.
10803 (complete_line_internal_normal_command): Adjust to work with a
10804 completion_tracker instead of a VEC.
10805 (complete_line_internal): Rename to ...
10806 (complete_line_internal_1): ... this and adjust to work with a
10807 completion_tracker instead of a VEC. Assert TEXT is NULL in the
10808 handle_brkchars phase.
10809 (new_completion_tracker): Delete.
10810 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
10811 complete_line_internal_1.
10812 (free_completion_tracker): Delete.
10813 (INITIAL_COMPLETION_HTAB_SIZE): New.
10814 (completion_tracker::completion_tracker)
10815 (completion_tracker::~completion_tracker): New.
10816 (maybe_add_completion): Delete.
10817 (completion_tracker::maybe_add_completion)
10818 (completion_tracker::add_completion)
10819 (completion_tracker::add_completions): New.
10820 (throw_max_completions_reached_error): Delete.
10821 (complete_line): Adjust to work with a completion_tracker instead
10822 of a VEC. Don't create a completion_tracker_t or check for max
10823 completions here.
10824 (command_completer, command_completer_handle_brkchars)
10825 (signal_completer, reg_or_group_completer_1)
10826 (reg_or_group_completer, default_completer_handle_brkchars):
10827 Adjust to work with a completion_tracker.
10828 (gdb_completion_word_break_characters_throw): New.
10829 (gdb_completion_word_break_characters): Reimplement.
10830 (line_completion_function): Delete.
10831 (completion_tracker::recompute_lowest_common_denominator)
10832 (expand_preserving_ws)
10833 (completion_tracker::build_completion_result)
10834 (completion_result::completion_result)
10835 (completion_result::completion_result)
10836 (completion_result::~completion_result)
10837 (completion_result::completion_result)
10838 (completion_result::release_match_list, compare_cstrings)
10839 (completion_result::sort_match_list)
10840 (completion_result::reset_match_list)
10841 (gdb_rl_attempted_completion_function_throw)
10842 (gdb_rl_attempted_completion_function): New.
10843 * completer.h (completion_list, struct completion_result)
10844 (class completion_tracker): New.
10845 (complete_line): Add completion_tracker parameter.
10846 (readline_line_completion_function): Delete.
10847 (gdb_rl_attempted_completion_function): New.
10848 (noop_completer, filename_completer, expression_completer)
10849 (location_completer, symbol_completer, command_completer)
10850 (signal_completer, reg_or_group_completer): Update prototypes.
10851 (completion_tracker_t, new_completion_tracker)
10852 (make_cleanup_free_completion_tracker): Delete.
10853 (enum maybe_add_completion_enum): Delete.
10854 (maybe_add_completion): Delete.
10855 (throw_max_completions_reached_error): Delete.
10856 * corefile.c (complete_set_gnutarget): Adjust to work with a
10857 completion_tracker instead of a VEC.
10858 * cp-abi.c (cp_abi_completer): Adjust to work with a
10859 completion_tracker instead of a VEC.
10860 * d-lang.c (d_language_defn): Adjust.
10861 * disasm.c (disassembler_options_completer): Adjust to work with a
10862 completion_tracker instead of a VEC.
10863 * f-lang.c (f_make_symbol_completion_list): Rename to ...
10864 (f_collect_symbol_completion_matches): ... this. Adjust to work
10865 with a completion_tracker instead of a VEC.
10866 (f_language_defn): Adjust.
10867 * go-lang.c (go_language_defn): Adjust.
10868 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
10869 Adjust to work with a completion_tracker instead of a VEC.
10870 * infrun.c (handle_completer): Likewise.
10871 * interps.c (interpreter_completer): Likewise.
10872 * interps.h (interpreter_completer): Likewise.
10873 * language.c (unknown_language_defn, auto_language_defn)
10874 (local_language_defn): Adjust.
10875 * language.h (language_defn::la_make_symbol_completion_list):
10876 Rename to ...
10877 (language_defn::la_collect_symbol_completion_matches): ... this
10878 and adjust to work with a completion_tracker instead of a VEC.
10879 * m2-lang.c (m2_language_defn): Adjust.
10880 * objc-lang.c (objc_language_defn): Adjust.
10881 * opencl-lang.c (opencl_language_defn): Adjust.
10882 * p-lang.c (pascal_language_defn): Adjust.
10883 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
10884 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
10885 with a completion_tracker.
10886 * rust-lang.c (rust_language_defn): Adjust.
10887 * symtab.c (free_completion_list, do_free_completion_list)
10888 (return_val, completion_tracker): Delete.
10889 (completion_list_add_name, completion_list_add_symbol)
10890 (completion_list_add_msymbol, completion_list_objc_symbol)
10891 (completion_list_add_fields, add_symtab_completions): Add
10892 completion_tracker parameter and use it.
10893 (default_make_symbol_completion_list_break_on_1): Rename to...
10894 (default_collect_symbol_completion_matches_break_on): ... this.
10895 Add completion_tracker parameter and use it instead of allocating
10896 a completion tracker here.
10897 (default_make_symbol_completion_list_break_on): Delete old
10898 implementation.
10899 (default_make_symbol_completion_list): Delete.
10900 (default_collect_symbol_completion_matches): New.
10901 (make_symbol_completion_list): Delete.
10902 (collect_symbol_completion_matches): New.
10903 (make_symbol_completion_type): Rename to ...
10904 (collect_symbol_completion_matches_type): ... this. Add
10905 completion_tracker parameter and use it instead of VEC.
10906 (make_file_symbol_completion_list_1): Rename to...
10907 (collect_file_symbol_completion_matches): ... this. Add
10908 completion_tracker parameter and use it instead of VEC.
10909 (make_file_symbol_completion_list): Delete.
10910 (add_filename_to_list): Use completion_list instead of a VEC.
10911 (add_partial_filename_data::list): Now a completion_list.
10912 (make_source_files_completion_list): Work with a completion_list
10913 instead of a VEC.
10914 * symtab.h: Include "completer.h".
10915 (default_make_symbol_completion_list_break_on)
10916 (default_make_symbol_completion_list, make_symbol_completion_list)
10917 (make_symbol_completion_type, make_file_symbol_completion_list)
10918 (make_source_files_completion_list): Delete.
10919 (default_collect_symbol_completion_matches_break_on)
10920 (default_collect_symbol_completion_matches)
10921 (collect_symbol_completion_matches)
10922 (collect_symbol_completion_matches_type)
10923 (collect_file_symbol_completion_matches)
10924 (make_source_files_completion_list): New.
10925 * top.c (init_main): Don't install a rl_completion_entry_function
10926 hook. Install a rl_attempted_completion_function hook instead.
10927 * tui/tui-layout.c (layout_completer): Adjust to work with a
10928 completion_tracker.
10929 * tui/tui-regs.c (tui_reggroup_completer):
10930 * tui/tui-win.c (window_name_completer, focus_completer)
10931 (winheight_completer): Adjust to work with a completion_tracker.
10932 * value.c: Include "completer.h".
10933 (complete_internalvar): Adjust to work with a completion_tracker.
10934 * value.h (complete_internalvar): Likewise.
10935
10936 2017-07-17 Pedro Alves <palves@redhat.com>
10937
10938 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
10939 renames.
10940 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
10941 comments to completer_ftype's declaration.
10942 <completer_handle_brkchars>: Change type to
10943 completer_handle_brkchars_ftype.
10944 * command.h (completer_ftype): Add describing comment and give
10945 names to parameters.
10946 (completer_ftype_void): Rename to ...
10947 (completer_handle_brkchars_ftype) ... this. Add describing comment.
10948 (set_cmd_completer_handle_brkchars): Adjust.
10949 * completer.c (filename_completer_handle_brkchars): New function.
10950 (complete_line_internal_normal_command): New function, factored
10951 out from ...
10952 (complete_line_internal): ... here.
10953 (command_completer_handle_brkchars)
10954 (default_completer_handle_brkchars)
10955 (completer_handle_brkchars_func_for_completer): New functions.
10956 * completer.h (set_gdb_completion_word_break_characters): Delete
10957 declaration.
10958 (completer_handle_brkchars_func_for_completer): New declaration.
10959 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
10960 completer_handle_brkchars_func_for_completer.
10961
10962 2017-07-17 Pedro Alves <palves@redhat.com>
10963
10964 * completer.c (symbol_completer): New function, based on
10965 make_symbol_completion_list_fn.
10966 * completer.h (symbol_completer): New declaration.
10967 * guile/scm-cmd.c (cmdscm_completers): Adjust.
10968 * python/py-cmd.c (completers): Adjust.
10969 * symtab.c (make_symbol_completion_list_fn): Delete.
10970 * symtab.h (make_symbol_completion_list_fn): Delete.
10971 * cli/cli-decode.c (add_cmd): Adjust.
10972
10973 2017-07-17 Pedro Alves <palves@redhat.com>
10974
10975 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
10976 * dwarf2read.c: Include "filename-seen-cache.h".
10977 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
10978 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
10979 * filename-seen-cache.c: New file.
10980 * filename-seen-cache.h: New file.
10981 * symtab.c: Include "filename-seen-cache.h".
10982 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
10983 (create_filename_seen_cache, clear_filename_seen_cache)
10984 (delete_filename_seen_cache, filename_seen): Delete, parts moved
10985 to filename-seen-cache.h/filename-seen-cache.c.
10986 (output_source_filename, sources_info)
10987 (maybe_add_partial_symtab_filename)
10988 (make_source_files_completion_list): Adjust to use
10989 filename_seen_cache.
10990
10991 2017-07-17 Pedro Alves <palves@redhat.com>
10992
10993 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
10994 fields.
10995 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
10996 dwarf2_debug_sections*)): New.
10997 (dwarf2_per_objfile::dwarf2_per_objfile(const
10998 dwarf2_per_objfile&)): Declare as deleted.
10999 (dwarf2_per_objfile::operator=): Declare as deleted.
11000 (dwarf2_per_objfile::dwarf2_per_objfile)
11001 (dwarf2_per_objfile::~dwarf2_per_objfile)
11002 (dwarf2_per_objfile::free_cached_comp_units): New.
11003 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
11004 ctor. Call dwarf2_per_objfile's ctor manually.
11005 (dwarf2_locate_sections): Deleted/refactored as ...
11006 (dwarf2_per_objfile::locate_sections): ... this new method.
11007 (free_cached_comp_units): Defer to
11008 dwarf2_per_objfile::free_cached_comp_units.
11009 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
11010
11011 2017-07-14 Tom Tromey <tom@tromey.com>
11012
11013 PR rust/21764:
11014 * rust-exp.y (convert_ast_to_expression): Add "want_type"
11015 parameter.
11016 <UNOP_SIZEOF>: Split into separate case.
11017 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
11018
11019 2017-07-14 Tom Tromey <tom@tromey.com>
11020
11021 PR rust/21763:
11022 * symtab.c (symbol_matches_domain): Add language_rust to special
11023 case.
11024 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
11025 treat LOC_TYPEDEF symbols as variables.
11026
11027 2017-07-14 Pedro Alves <palves@redhat.com>
11028
11029 * symtab.c (make_file_symbol_completion_list_1): Iterate over
11030 symtabs matching all symtabs with SRCFILE as file name instead of
11031 only considering the first hit, with lookup_symtab.
11032
11033 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
11034
11035 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
11036 operator_name parameters.
11037 (gen_expr): Update function call.
11038
11039 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
11040
11041 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
11042 parameter.
11043 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
11044 Likewise.
11045 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
11046 parameter, use agent_expr::gdbarch instead, update function
11047 calls.
11048 (locexpr_tracepoint_var_ref): Likewise.
11049 (loclist_tracepoint_var_ref): Likewise.
11050 * ax-gdb.c (gen_trace_static_fields): Likewise.
11051 (gen_traced_pop): Likewise.
11052 (gen_frame_args_address): Likewise.
11053 (gen_frame_locals_address): Likewise.
11054 (gen_var_ref): Likewise.
11055 (gen_struct_ref_recursive): Likewise.
11056 (gen_static_field): Likewise.
11057 (gen_maybe_namespace_elt): Likewise.
11058 (gen_expr): Likewise.
11059 (gen_trace_for_var): Likewise.
11060 (gen_trace_for_expr): Likewise.
11061 (gen_trace_for_return_address): Likewise.
11062
11063 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
11064
11065 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
11066 parameter.
11067 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
11068
11069 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
11070
11071 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
11072 from ax, update calls.
11073 (gen_usual_arithmetic): Likewise.
11074 (gen_integral_promotions): Likewise.
11075 (gen_bitfield_ref): Likewise.
11076 (gen_primitive_field): Likewise.
11077 (gen_struct_ref_recursive): Likewise.
11078 (gen_struct_ref): Likewise.
11079 (gen_maybe_namespace_elt): Likewise.
11080 (gen_struct_elt_for_reference): Likewise.
11081 (gen_namespace_elt): Likewise.
11082 (gen_aggregate_elt_ref): Likewise.
11083 (gen_expr): Get gdbarch from ax, update calls.
11084 (gen_expr_binop_rest): Likewise.
11085
11086 2017-07-13 Pedro Alves <palves@redhat.com>
11087
11088 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
11089 as default tdesc.
11090 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
11091 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
11092 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
11093 tdesc_amd64_linux as default tdesc. Get final tdesc from the
11094 tdep.
11095 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
11096 Get final tdesc from the tdep.
11097 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
11098 default tdesc.
11099 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
11100 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
11101 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
11102 Use it as default tdesc.
11103 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
11104 down to amd_init_abi. No longer handle fallback tdesc here.
11105 * amd64-tdep.h (tdesc_x32): Declare.
11106 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
11107 parameter.
11108 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
11109 as default tdesc.
11110
11111 2017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11112
11113 * s390-linux-tdep.c (s390_process_record): Add support for
11114 instructions new in arch12.
11115
11116 2017-07-11 John Baldwin <jhb@FreeBSD.org>
11117
11118 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
11119 PT_GETFSBASE and PT_GETGSBASE.
11120 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
11121 PT_SETGSBASE.
11122
11123 2017-07-11 John Baldwin <jhb@FreeBSD.org>
11124
11125 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
11126 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
11127 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
11128 those rules.
11129 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
11130 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
11131 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
11132 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
11133 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
11134 * features/i386/amd64.xml: Add 64bit-segments.xml.
11135 * features/i386/amd64-avx-avx512.c: Regenerated.
11136 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
11137 * features/i386/amd64-avx-mpx.c: Regenerated.
11138 * features/i386/amd64-avx.c: Regenerated.
11139 * features/i386/amd64-mpx.c: Regenerated.
11140 * features/i386/amd64.c: Regenerated.
11141 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
11142 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
11143 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
11144 * regformats/i386/amd64-avx.dat: Regenerated.
11145 * regformats/i386/amd64-mpx.dat: Regenerated.
11146 * regformats/i386/amd64.dat: Regenerated.
11147
11148 2017-07-10 Yao Qi <yao.qi@linaro.org>
11149
11150 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
11151 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
11152
11153 2017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
11154
11155 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
11156 unsetenv.
11157 * gnulib/aclocal.m4: Regenerate.
11158 * gnulib/config.in: Regenerate.
11159 * gnulib/configure: Regenerate.
11160 * gnulib/import/Makefile.am: Regenerate.
11161 * gnulib/import/Makefile.in: Regenerate.
11162 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
11163 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
11164 * gnulib/import/m4/environ.m4: New file.
11165 * gnulib/import/m4/setenv.m4: New file.
11166 * gnulib/import/setenv.c: New file.
11167 * gnulib/import/unsetenv.c: New file.
11168
11169 2017-07-09 Simon Marchi <simon.marchi@ericsson.com>
11170
11171 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
11172 address when op is DW_OP_addr.
11173
11174 2017-07-09 Tom Tromey <tom@tromey.com>
11175
11176 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
11177 check and apply to outer type.
11178
11179 2017-07-07 John Baldwin <jhb@FreeBSD.org>
11180
11181 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
11182 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
11183 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
11184 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
11185
11186 2017-07-07 John Baldwin <jhb@FreeBSD.org>
11187
11188 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
11189
11190 2017-07-07 John Baldwin <jhb@FreeBSD.org>
11191
11192 * corelow.c (get_core_siginfo): Remove.
11193 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
11194 instead of get_core_siginfo.
11195 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
11196 * gdbarch.h: Re-generate.
11197 * gdbarch.c: Re-generate.
11198 * linux-tdep.c (linux_core_xfer_siginfo): New.
11199 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
11200
11201 2017-07-07 John Baldwin <jhb@FreeBSD.org>
11202
11203 * corelow.c (thread_section_name): Move to ...
11204 * gdbcore.h (thread_section_name): ... here.
11205
11206 2017-07-07 John Baldwin <jhb@FreeBSD.org>
11207
11208 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
11209 (struct siginfo32): New.
11210 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
11211 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
11212 via ptrace(PT_LWPINFO).
11213
11214 2017-07-07 John Baldwin <jhb@FreeBSD.org>
11215
11216 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
11217 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
11218 (fbsd_get_siginfo_type): New.
11219 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
11220 (_initialize_fbsd_tdep): New.
11221
11222 2017-07-06 David Blaikie <dblaikie@gmail.com>
11223
11224 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
11225 a singular dwo_unit*) to support multiple CUs in the same way that
11226 multiple TUs are supported.
11227 (create_cus_hash_table): Replace create_dwo_cu with a function for
11228 parsing multiple CUs from a DWO file.
11229 (open_and_init_dwo_file): Use create_cus_hash_table rather than
11230 create_dwo_cu.
11231 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
11232 htab_find, rather than comparing the signature to a singleton CU in
11233 the dwo_file.
11234
11235 2017-07-06 Pedro Alves <palves@redhat.com>
11236
11237 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
11238
11239 2017-07-04 Pedro Alves <palves@redhat.com>
11240
11241 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
11242 * gdbtypes.h (TYPE_STATIC): Delete.
11243 (struct fn_field) <is_public, is_abstract, is_static, is_final,
11244 is_synchronized, is_native>: Delete.
11245 <dummy>: Bump.
11246 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
11247 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
11248 (TYPE_FN_FIELD_ABSTRACT): Delete.
11249
11250 2017-07-03 Simon Marchi <simon.marchi@ericsson.com>
11251
11252 * buffer.h (buffer_finish): Fix spelling mistakes.
11253
11254 2017-07-01 Eli Zaretskii <eliz@gnu.org>
11255
11256 * .dir-locals.el: Automatically switch to C-style comments in
11257 versions of Emacs that support the feature.
11258
11259 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
11260 Pedro Alves <palves@redhat.com>
11261
11262 PR cli/21688
11263 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
11264 (process_next_line): New variable 'inline_cmd'.
11265 Adjust 'if' clauses for "python", "compile" and "guile" to use
11266 'command_name_equals' and check for '!inline_cmd'.
11267
11268 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
11269
11270 PR cli/21688
11271 * cli/cli-script.c (command_name_equals_not_inline): New function.
11272 (process_next_line): Adjust 'if' clauses for "python", "compile"
11273 and "guile" to use command_name_equals_not_inline.
11274
11275 2017-06-29 Pedro Alves <palves@redhat.com>
11276
11277 * completer.c (expression_completer): Call
11278 linespec_location_completer instead of location_completer.
11279
11280 2017-06-29 Pedro Alves <palves@redhat.com>
11281
11282 * completer.c (expression_completer): Remove code that recomputes
11283 'text' from 'word'.
11284
11285 2017-06-29 Yao Qi <yao.qi@linaro.org>
11286
11287 * regformats/regdat.sh: Generate code with
11288 "ifndef IN_PROCESS_AGENT".
11289
11290 2017-06-28 Pedro Alves <palves@redhat.com>
11291
11292 * command.h: Include "common/scoped_restore.h".
11293
11294 2017-06-28 Yao Qi <yao.qi@linaro.org>
11295
11296 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
11297 instead of obstack_grow.
11298
11299 2017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
11300
11301 PR gdb/21337
11302 * symfile.c (reread_symbols): Call objfiles_changed just before
11303 read_symbols.
11304
11305 2017-06-27 Pedro Alves <palves@redhat.com>
11306
11307 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
11308 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
11309 (completion_list_add_symbol, completion_list_add_msymbol):
11310 ... these new functions.
11311 (add_symtab_completions)
11312 (default_make_symbol_completion_list_break_on_1): Adjust.
11313
11314 2017-06-27 Pedro Alves <palves@redhat.com>
11315
11316 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
11317 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
11318 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
11319 dtor.
11320 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
11321 'storage_obstack' field an auto_obstack. In-class initialize all
11322 non-bitfield fields. Make minsyms_read bool.
11323 * symfile.c (read_symbols): Adjust.
11324
11325 2017-06-27 Alan Hayward <alan.hayward@arm.com>
11326
11327 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
11328 (gdbsim_store_register): Likewise.
11329
11330 2017-06-27 Pedro Alves <palves@redhat.com>
11331
11332 * c-exp.y (name_obstack): Now an auto_obstack.
11333 (yylex): Use auto_obstack::clear.
11334 (c_parse): Use auto_obstack::clear instead of reinitializing and
11335 freeing the obstack.
11336 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
11337 * d-exp.y (name_obstack): Now an auto_obstack.
11338 (yylex): Use auto_obstack::clear.
11339 (d_parse): Use auto_obstack::clear instead of reinitializing and
11340 freeing the obstack.
11341 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
11342 auto_obstack.
11343 * dwarf2read.c (create_addrmap_from_index)
11344 (dwarf2_build_psymtabs_hard)
11345 (update_enumeration_type_from_children): Likewise.
11346 * gdb_obstack.h (auto_obstack): New type.
11347 * go-exp.y (name_obstack): Now an auto_obstack.
11348 (build_packaged_name): Use auto_obstack::clear.
11349 (go_parse): Use auto_obstack::clear instead of reinitializing and
11350 freeing the obstack.
11351 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
11352 auto_obstack.
11353 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
11354 * rust-exp.y (work_obstack): Now an auto_obstack.
11355 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
11356 reinitializing and freeing the obstack.
11357 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
11358 (host_char_to_target): Use auto_obstack.
11359 * utils.h (make_cleanup_obstack_free): Delete declaration.
11360 * valprint.c (generic_emit_char, generic_printstr): Use
11361 auto_obstack.
11362
11363 2017-06-27 Simon Marchi <simon.marchi@ericsson.com>
11364
11365 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
11366 thread.
11367 (darwin_init_thread_list): Don't update dummy thread.
11368 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
11369
11370 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
11371
11372 * record-full.c (netorder16): Remove.
11373
11374 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
11375
11376 * common/diagnostics.h: Define macros for GCC.
11377 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
11378 * common/vec.h: Include diagnostics.h.
11379 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
11380 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
11381 warning.
11382
11383 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
11384
11385 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
11386 New macro.
11387 * ada-lex.l: Ignore deprecated register warnings.
11388
11389 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
11390
11391 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
11392 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
11393
11394 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
11395
11396 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
11397 its own line.
11398
11399 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
11400
11401 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
11402
11403 2017-06-23 Alan Hayward <alan.hayward@arm.com>
11404
11405 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
11406 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
11407 (xtensa_register_read_masked): Likewise.
11408
11409 2017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
11410
11411 * common/environ.c (gdb_environ::unset): Update comment.
11412
11413 2017-06-22 Alan Hayward <alan.hayward@arm.com>
11414
11415 * python/py-unwind.c (pyuw_sniffer): Allocate space for
11416 registers.
11417
11418 2017-06-22 Alan Hayward <alan.hayward@arm.com>
11419
11420 * record-full.c (record_full_exec_insn): Use byte_vector.
11421
11422 2017-06-22 Yao Qi <yao.qi@linaro.org>
11423
11424 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
11425 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
11426
11427 2017-06-22 Alan Hayward <alan.hayward@arm.com>
11428
11429 * remote.c (cached_reg): Move from here...
11430 * regcache.h (cached_reg): ...to here.
11431 * python/py-unwind.c (struct reg_info): Remove.
11432 (cached_frame_info): Use cached_reg_t.
11433 (pyuw_prev_register): Likewise.
11434 (pyuw_sniffer): Use cached_reg_t and allocate registers.
11435 (pyuw_dealloc_cache): Free all registers.
11436
11437 2017-06-22 Pedro Alves <palves@redhat.com>
11438 Simon Marchi <simon.marchi@ericsson.com>
11439
11440 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
11441 warning.
11442 * common/diagnostics.h: New file.
11443
11444 2017-06-22 Pedro Alves <palves@redhat.com>
11445
11446 * common/agent.h: Add include guards.
11447
11448 2017-06-21 Simon Marchi <simon.marchi@ericsson.com>
11449
11450 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
11451 talk about addressable units instead of bytes.
11452
11453 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
11454
11455 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
11456 of '::const_iterator'.
11457
11458 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
11459
11460 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11461 'unittests/environ-selftests.c'.
11462 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
11463 * charset.c (find_charset_names): Declare object 'iconv_env'.
11464 Update code to use 'iconv_env' object. Remove call to
11465 'free_environ'.
11466 * common/environ.c: Include <utility>.
11467 (make_environ): Delete function.
11468 (free_environ): Delete function.
11469 (gdb_environ::clear): New function.
11470 (gdb_environ::operator=): New function.
11471 (gdb_environ::get): Likewise.
11472 (environ_vector): Delete function.
11473 (set_in_environ): Delete function.
11474 (gdb_environ::set): New function.
11475 (unset_in_environ): Delete function.
11476 (gdb_environ::unset): New function.
11477 (gdb_environ::envp): Likewise.
11478 * common/environ.h: Include <vector>.
11479 (struct gdb_environ): Delete; transform into...
11480 (class gdb_environ): ... this class.
11481 (free_environ): Delete prototype.
11482 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
11483 environ_vector): Likewise.
11484 * infcmd.c (run_command_1): Update code to call
11485 'envp' from 'gdb_environ' class.
11486 (environment_info): Update code to call methods from 'gdb_environ'
11487 class.
11488 (unset_environment_command): Likewise.
11489 (path_info): Likewise.
11490 (path_command): Likewise.
11491 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
11492 (inferior::inferior): Initialize 'environment' using the host's
11493 information.
11494 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
11495 Include "environ.h".
11496 (class inferior) <environment>: Change type from 'struct
11497 gdb_environ' to 'gdb_environ'.
11498 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
11499 methods from 'gdb_environ' class.
11500 * solib.c (solib_find_1): Likewise
11501 * unittests/environ-selftests.c: New file.
11502
11503 2017-06-20 Yao Qi <yao.qi@linaro.org>
11504
11505 * features/i386/i386-linux.xml: Exchange the order of including
11506 32bit-linux.xml and 32bit-sse.xml.
11507 * features/i386/i386-linux.c: Regenerated.
11508
11509 2017-06-20 Yao Qi <yao.qi@linaro.org>
11510
11511 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
11512 Delete copy ctor and assignment operator.
11513 (tdesc_type): Likewise.
11514 (tdesc_feature): Likewise.
11515 (tdesc_free_reg): Remove.
11516 (tdesc_create_reg): Use new.
11517 (tdesc_free_type): Remove.
11518 (tdesc_create_vector): Use new.
11519 (tdesc_create_union): Likewise.
11520 (tdesc_create_flags): Likewise.
11521 (tdesc_create_enum): Likewise.
11522 (tdesc_free_feature): Delete.
11523 (free_target_description): Use delete.
11524
11525 2017-06-19 John Baldwin <jhb@FreeBSD.org>
11526
11527 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
11528 registers.
11529
11530 2017-06-19 Pedro Alves <palves@redhat.com>
11531
11532 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
11533 after gdb::unlinker.
11534
11535 2017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
11536
11537 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
11538 gdb_environ to access an environment variable.
11539
11540 2017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
11541
11542 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
11543 gdb_byte*.
11544
11545 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
11546
11547 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
11548
11549 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
11550
11551 * configure: Re-generate.
11552 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
11553
11554 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
11555
11556 * configure: Re-generate.
11557 * warning.m4: Pass -Werror to compiler when checking for
11558 supported warning flags.
11559
11560 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
11561
11562 * Makefile.in (COMPILE.pre): Add "-x c++".
11563
11564 2017-06-16 Alan Hayward <alan.hayward@arm.com>
11565 Pedro Alves <palves@redhat.com>
11566 Yao Qi <yao.qi@linaro.org>
11567
11568 * defs.h (RequireLongest): New.
11569 (extract_integer): Declare function template.
11570 (extract_signed_integer): Remove the declaration, but define it
11571 static inline.
11572 (extract_unsigned_integer): Likewise.
11573 (store_integer): Declare function template.
11574 (store_signed_integer): Remove the declaration, but define it
11575 static inline.
11576 (store_unsigned_integer): Likewise.
11577 * findvar.c (extract_integer): New function template.
11578 (extract_signed_integer): Remove.
11579 (extract_unsigned_integer): Remove.
11580 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
11581 instantiations.
11582 (store_integer): New function template.
11583 (store_signed_integer): Remove.
11584 (store_unsigned_integer): Remove.
11585 (store_integer): Explicit instantiations.
11586 * regcache.c (regcache_raw_read_signed): Update.
11587 (regcache::raw_read): New function.
11588 (regcache::raw_read_signed): Remove.
11589 (regcache::raw_read_unsigned): Remove.
11590 (regcache_raw_read_unsigned): Update.
11591 (regcache_raw_write_unsigned): Update.
11592 (regcache::raw_write_signed): Remove.
11593 (regcache::raw_write): New function.
11594 (regcache_cooked_read_signed): Update.
11595 (regcache::raw_write_unsigned): Remove.
11596 (regcache::cooked_read_signed): Remove.
11597 (regcache_cooked_read_unsigned): Update.
11598 (regcache::cooked_read_unsigned): Remove.
11599 (regcache_cooked_write_signed): Update.
11600 (regcache_cooked_write_unsigned): Update.
11601 * regcache.h (regcache) <raw_read_signed>: Remove.
11602 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
11603 <raw_read, raw_write>: New.
11604 <cooked_read_signed, cooked_write_signed>: Remove.
11605 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
11606 <cooked_read, cooked_write>: New.
11607 * sh64-tdep.c (sh64_pseudo_register_read): Update.
11608 (sh64_pseudo_register_write): Update.
11609
11610 2017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
11611
11612 * arc-tdep.c (arc_disassembler_options): New variable.
11613 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
11614 of default_print_insn.
11615 (arc_delayed_print_insn): Set info->section when needed,
11616 use default_print_insn to retrieve a disassembler.
11617
11618 2017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
11619
11620 PR gdb/21574
11621 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
11622 to mention $SHELL and startup-with-shell.
11623
11624 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
11625
11626 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
11627
11628 2017-06-14 Yao Qi <yao.qi@linaro.org>
11629
11630 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
11631 default_print_insn instead of print_insn_aarch64.
11632 * arm-tdep.c (gdb_print_insn_arm): Call
11633 default_print_insn instead of print_insn_big_arm
11634 and print_insn_little_arm.
11635 * i386-tdep.c (i386_print_insn): Call default_print_insn
11636 instead of print_insn_i386.
11637 * ia64-tdep.c (ia64_print_insn): Call
11638 default_print_insn instead of print_insn_ia64.
11639 * mips-tdep.c (gdb_print_insn_mips): Call
11640 default_print_insn instead of print_insn_big_mips
11641 and print_insn_little_mips.
11642 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
11643 instead of print_insn_spu.
11644
11645 2017-06-14 Pedro Alves <palves@redhat.com>
11646
11647 * ada-lang.c: Include "common/byte-vector.h".
11648 (ada_value_primitive_packed_val): Use gdb::byte_vector.
11649 * charset.c (wchar_iterator::iterate): Resize the vector instead
11650 of reserving it.
11651 * common/byte-vector.h: Include "common/def-vector.h".
11652 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
11653 * cli/cli-dump.c: Include "common/byte-vector.h".
11654 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
11655 * common/byte-vector.h: New file.
11656 * common/def-vector.h: New file.
11657 * common/default-init-alloc.h: New file.
11658 * dwarf2loc.c: Include "common/byte-vector.h".
11659 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
11660 instead of reserving it.
11661 * dwarf2read.c: Include "common/byte-vector.h".
11662 (data_buf::m_vec): Now a gdb::byte_vector.
11663 * gdb_regex.c: Include "common/def-vector.h".
11664 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
11665 * mi/mi-main.c: Include "common/byte-vector.h".
11666 (mi_cmd_data_read_memory): Use gdb::byte_vector.
11667 * printcmd.c: Include "common/byte-vector.h".
11668 (print_scalar_formatted): Use gdb::byte_vector.
11669 * valprint.c: Include "common/byte-vector.h".
11670 (maybe_negate_by_bytes, print_decimal_chars): Use
11671 gdb::byte_vector.
11672
11673 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
11674
11675 * darwin-nat.c: Include "nat/fork-inferior.h".
11676
11677 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
11678
11679 * configure.nat: Factor out Darwin bits that are not
11680 architecture-specific. Add fork-inferior.o.
11681
11682 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
11683
11684 * configure.nat: Factor out AIX bits that are not
11685 architecture-specific. Add fork-inferior.o.
11686
11687 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11688
11689 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
11690 (read_pieced_value, write_pieced_value): ...here. Reduce to
11691 wrappers that just call rw_pieced_value.
11692
11693 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11694
11695 * dwarf2loc.c (write_pieced_value): When writing the data for a
11696 memory piece, use write_memory_with_notification instead of
11697 write_memory.
11698
11699 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11700
11701 * valops.c (read_value_memory): Change embedded_offset to
11702 represent a bit offset instead of a byte offset.
11703 * value.h (read_value_memory): Adjust comment.
11704
11705 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11706
11707 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
11708 dest_offset_bits and source_offset_bits.
11709 (write_pieced_value): Likewise.
11710
11711 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11712
11713 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
11714 given by DW_OP_bit_piece.
11715 (write_pieced_value): Likewise.
11716
11717 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11718
11719 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
11720 some other preparations to the places where sufficient information
11721 is available.
11722 (write_pieced_value): Likewise.
11723
11724 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11725
11726 * dwarf2loc.c (bits_to_bytes): New function.
11727 (read_pieced_value): Fix offset calculations for register pieces
11728 on big-endian targets.
11729 (write_pieced_value): Likewise.
11730
11731 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11732
11733 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
11734 (write_pieced_value): Likewise.
11735
11736 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11737
11738 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
11739 transfer the source value's least significant bits, instead of its
11740 lowest-addressed ones. Rename type_len to max_offset.
11741 (read_pieced_value): Mirror above changes to write_pieced_value as
11742 applicable.
11743
11744 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11745
11746 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
11747 truncate full bytes from dest_offset_bits before using it as an
11748 offset into the buffer.
11749
11750 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11751
11752 * dwarf2loc.c (write_pieced_value): Include transfer size in
11753 byte-wise check.
11754
11755 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11756
11757 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
11758 calculation of this_size.
11759
11760 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11761
11762 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
11763 when targeting a bit-field.
11764 (write_pieced_value): Likewise.
11765
11766 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11767
11768 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
11769 (allocate_piece_closure): Drop addr_size parameter.
11770 (dwarf2_evaluate_loc_desc_full): Adjust call to
11771 allocate_piece_closure.
11772
11773 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11774
11775 PR gdb/21226
11776 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
11777 the LSB end, independent of endianness.
11778
11779 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11780
11781 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
11782 size capping.
11783
11784 2017-06-13 Yao Qi <yao.qi@linaro.org>
11785
11786 * mips-linux-nat.c: Move include features/mips*-linux.c to
11787 mips-linux-tdep.c.
11788 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
11789 to mips-linux-tdep.c.
11790 * mips-linux-tdep.c: Include features/mips*-linux.c
11791 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
11792 functions.
11793 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
11794 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
11795 (tdesc_mips64_dsp_linux): Declare.
11796
11797 2017-06-12 Tom Tromey <tom@tromey.com>
11798
11799 * valprint.h (val_print_type_code_int): Remove.
11800 * valprint.c (generic_val_print_int): Always call
11801 val_print_scalar_formatted.
11802 (val_print_type_code_int): Remove.
11803 * printcmd.c (print_scalar_formatted): Handle options->format==0.
11804 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
11805 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
11806 * ada-valprint.c (ada_val_print_num): Use
11807 val_print_scalar_formatted.
11808
11809 2017-06-12 Tom Tromey <tom@tromey.com>
11810
11811 * printcmd.c (print_scalar_formatted): Unify the two switches.
11812 Don't convert scalars to LONGEST.
11813
11814 2017-06-12 Tom Tromey <tom@tromey.com>
11815
11816 PR exp/16225:
11817 * valprint.h (print_decimal_chars): Update.
11818 * valprint.c (maybe_negate_by_bytes): New function.
11819 (print_decimal_chars): Add "is_signed" argument.
11820 * printcmd.c (print_scalar_formatted): Update.
11821
11822 2017-06-12 Tom Tromey <tom@tromey.com>
11823
11824 PR exp/16225:
11825 * valprint.h (print_binary_chars, print_hex_chars): Update.
11826 * valprint.c (val_print_type_code_int): Update.
11827 (print_binary_chars): Add "zero_pad" argument.
11828 (emit_octal_digit): New function.
11829 (print_octal_chars): Don't zero-pad.
11830 (print_decimal_chars): Likewise.
11831 (print_hex_chars): Add "zero_pad" argument.
11832 * sh64-tdep.c (sh64_do_fp_register): Update.
11833 * regcache.c (regcache::dump): Update.
11834 * printcmd.c (print_scalar_formatted): Update.
11835 * infcmd.c (default_print_one_register_info): Update.
11836
11837 2017-06-12 Pedro Alves <palves@redhat.com>
11838 Alan Hayward <alan.hayward@arm.com>
11839
11840 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
11841 (mips_eabi_push_dummy_call): Rename local 'regsize' to
11842 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
11843 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
11844 Assert that abi_regsize bytes fit in 'ref_valbuf'.
11845
11846 2017-06-12 Pedro Alves <palves@redhat.com>
11847
11848 * dwarf2read.c (mapped_symtab::data): Now a vector of
11849 symtab_index_entry instead of vector of
11850 std::unique_ptr<symtab_index_entry>. All users adjusted to check
11851 whether an element's name is NULL instead of checking whether the
11852 element itself is NULL.
11853 (find_slot): Change return type. Adjust.
11854 (hash_expand, , add_index_entry, uniquify_cu_indices)
11855 (write_hash_table): Adjust.
11856
11857 2017-06-12 Pedro Alves <palves@redhat.com>
11858
11859 * dwarf2read.c (recursively_count_psymbols): New function.
11860 (write_psymtabs_to_index): Call it to compute number of psyms and
11861 pass estimate size of psyms_seen to unordered_set's ctor.
11862
11863 2017-06-12 Pedro Alves <palves@redhat.com>
11864
11865 * dwarf2read.c (write_hash_table): Check if key already exists
11866 before emplacing.
11867
11868 2017-06-12 Pedro Alves <palves@redhat.com>
11869
11870 * dwarf2read.c (data_buf::append_space): Rename to...
11871 (data_buf::grow): ... this, and make private. Adjust all callers.
11872 (data_buf::append_uint): New method.
11873 (add_address_entry, write_one_signatured_type)
11874 (write_psymtabs_to_index): Use it.
11875
11876 2017-06-12 Pedro Alves <palves@redhat.com>
11877
11878 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
11879 (file_write (FILE *, const std::vector<Elem>&)): Delete.
11880 (data_buf::file_write): Call ::fwrite directly.
11881
11882 2017-06-12 Pedro Alves <palves@redhat.com>
11883
11884 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
11885 std::vector::erase.
11886
11887 2017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
11888
11889 Code cleanup: C++ify .gdb_index producer.
11890 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
11891 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
11892 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
11893 (create_strtab, add_string): Remove.
11894 (file_write, data_buf): New.
11895 (struct symtab_index_entry): Use std::vector for cu_indices.
11896 (struct mapped_symtab): Use std::vector for data.
11897 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
11898 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
11899 Remove.
11900 (find_slot): Change return type. Update it to the new data structures.
11901 (hash_expand, add_index_entry): Update it to the new data structures.
11902 (offset_type_compare): Remove.
11903 (uniquify_cu_indices): Update it to the new data structures.
11904 (c_str_view, c_str_view_hasher, vector_hasher): New.
11905 (add_indices_to_cpool): Remove.
11906 (write_hash_table): Update it to the new data structures.
11907 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
11908 (eq_psymtab_cu_index): Remove.
11909 (psym_index_map): New typedef.
11910 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
11911 reference and std::unordered_map for cu_index_htab.
11912 (add_address_entry, add_address_entry_worker, write_address_map)
11913 (write_psymbols): Update it to the new data structures.
11914 (write_obstack): Remove.
11915 (struct signatured_type_index_data): Change types_list to a data_buf
11916 reference and psyms_seen to a std::unordered_set reference.
11917 (write_one_signatured_type, recursively_write_psymbols)
11918 (write_psymtabs_to_index): Update it to the new data structures.
11919
11920 2017-06-11 Simon Marchi <simon.marchi@ericsson.com>
11921
11922 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
11923 separate-debug-file commands.
11924 * symfile.h (separate_debug_file_debug): New global.
11925 * symfile.c (separate_debug_file_debug): New global.
11926 (separate_debug_file_exists, find_separate_debug_file): Add
11927 debug output.
11928 (_initialize_symfile): Add "set debug separate-debug-file"
11929 command.
11930 * build-id.c (build_id_to_debug_bfd,
11931 find_separate_debug_file_by_buildid): Add debug output.
11932
11933 2017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
11934
11935 * gdbarch.sh (displaced_step_free_closure): Remove.
11936 * gdbarch.h, gdbarch.c: Re-generate.
11937 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
11938 displaced_step_free_closure.
11939 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
11940 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
11941 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
11942 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
11943 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
11944 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
11945 * arch-utils.h (simple_displaced_step_free_closure): Remove.
11946 * arch-utils.c (simple_displaced_step_free_closure): Remove.
11947 * infrun.c (displaced_step_clear): Call xfree instead of
11948 gdbarch_displaced_step_free_closure.
11949
11950 2017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
11951
11952 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
11953 NULL".
11954
11955 2017-06-08 Alan Hayward <alan.hayward@arm.com>
11956
11957 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
11958 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
11959 (mn10300_push_dummy_call): Likewise.
11960
11961 2017-06-08 Alan Hayward <alan.hayward@arm.com>
11962
11963 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
11964
11965 2017-06-08 Alan Hayward <alan.hayward@arm.com>
11966
11967 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
11968
11969 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
11970
11971 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
11972 able to start inferiors using a shell.
11973 (New remote packets): Announce new packet "QStartupWithShell".
11974 * remote.c: Add PACKET_QStartupWithShell.
11975 (extended_remote_create_inferior): Handle new
11976 PACKET_QStartupWithShell.
11977 (remote_protocol_features) <QStartupWithShell>: New entry for
11978 PACKET_QStartupWithShell.
11979 (_initialize_remote): Call "add_packet_config_cmd" for
11980 QStartupShell.
11981
11982 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
11983 Pedro Alves <palves@redhat.com>
11984
11985 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
11986 and "nat/fork-inferior.h".
11987 * common/common-inferior.h: New file, with contents from
11988 "gdb/inferior.h".
11989 * commom/common-utils.c: Include "common-utils.h".
11990 (stringify_argv): New function.
11991 * common/common-utils.h (stringify_argv): New prototype.
11992 * configure.nat: Add "fork-inferior.o" as a dependency for
11993 "*linux*", "fbsd*" and "nbsd*" hosts.
11994 * corefile.c (get_exec_file): Update comment.
11995 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
11996 instead of "startup_inferior".
11997 (darwin_create_inferior): Call "add_thread_silent" after
11998 "fork_inferior".
11999 * fork-child.c: Cleanup unnecessary includes.
12000 (SHELL_FILE): Move to "common/common-fork-child.c".
12001 (environ): Likewise.
12002 (exec_wrapper): Initialize.
12003 (get_exec_wrapper): New function.
12004 (breakup_args): Move to "common/common-fork-child.c"; rename to
12005 "breakup_args_for_exec".
12006 (escape_bang_in_quoted_argument): Move to
12007 "common/common-fork-child.c".
12008 (saved_ui): New variable.
12009 (prefork_hook): New function.
12010 (postfork_hook): Likewise.
12011 (postfork_child_hook): Likewise.
12012 (gdb_startup_inferior): Likewise.
12013 (fork_inferior): Move to "common/common-fork-child.c". Update
12014 function to support gdbserver.
12015 (startup_inferior): Likewise.
12016 * gdbcore.h (get_exec_file): Remove declaration.
12017 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
12018 instead of "startup_inferior". Call "add_thread_silent" after
12019 "fork_inferior".
12020 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
12021 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
12022 instead of "startup_inferior". Call "add_thread_silent" after
12023 "fork_inferior".
12024 * inferior.h: Include "common-inferior.h".
12025 (trace_start_error): Move to "common/common-utils.h".
12026 (trace_start_error_with_name): Likewise.
12027 (fork_inferior): Move prototype to "nat/fork-inferior.h".
12028 (startup_inferior): Likewise.
12029 (gdb_startup_inferior): New prototype.
12030 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
12031 * nat/fork-inferior.h: New file.
12032 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
12033 instead of "startup_inferior". Call "add_thread_silent" after
12034 "fork_inferior".
12035 * target.h (target_terminal_init): Move prototype to
12036 "target/target.h".
12037 (target_terminal_inferior): Likewise.
12038 (target_terminal_ours): Likewise.
12039 * target/target.h (target_terminal_init): New prototype, moved
12040 from "target.h".
12041 (target_terminal_inferior): Likewise.
12042 (target_terminal_ours): Likewise.
12043 * utils.c (gdb_flush_out_err): New function.
12044
12045 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
12046
12047 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
12048 * common/common-gdbthread.h: New file, with parts from
12049 "gdb/gdbthread.h".
12050 * gdbthread.h: Include "common-gdbthread.h".
12051 (switch_to_thread): Moved to "common/common-gdbthread.h".
12052
12053 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
12054
12055 * Makefile.in (SFILES): Add "common/job-control.c".
12056 (HFILES_NO_SRCDIR): Add "common/job-control.h".
12057 (COMMON_OBS): Add "job-control.o".
12058 * common/job-control.c: New file, with contents from
12059 "gdb/inflow.c".
12060 * common/job-control.h: New file, with contents from "terminal.h".
12061 * fork-child.c: Include "job-control.h".
12062 * inflow.c: Include "job-control.h".
12063 (gdb_setpgid): Move to "common/common-inflow.c".
12064 (_initialize_inflow): Move setting of "job_control" to
12065 "handle_job_control".
12066 * terminal.h (job_control): Moved to "common/common-terminal.h".
12067 (gdb_setpgid): Likewise.
12068 * top.c: Include "job_control.h".
12069 * utils.c: Likewise.
12070 (job_control): Moved to "job-control.c".
12071
12072 2017-06-07 Pedro Alves <palves@redhat.com>
12073
12074 * Makefile.in (SFILES): Add gdb_regex.c.
12075 (COMMON_OBS): Add gdb_regex.o.
12076 * ada-lang.c (ada_add_standard_exceptions)
12077 (ada_add_exceptions_from_frame, name_matches_regex)
12078 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
12079 parameter type to compiled_regex. Adjust.
12080 (ada_exceptions_list): Use compiled_regex.
12081 * break-catch-throw.c (exception_catchpoint::pattern): Now a
12082 std::unique_ptr<compiled_regex>.
12083 (exception_catchpoint::~exception_catchpoint): Remove regfree
12084 call.
12085 (check_status_exception_catchpoint): Adjust to use compiled_regex.
12086 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
12087 * breakpoint.c (solib_catchpoint::compiled): Now a
12088 std::unique_ptr<compiled_regex>.
12089 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
12090 (check_status_catch_solib): Adjust to use compiled_regex.
12091 (add_solib_catchpoint): Adjust to use compiled_regex.
12092 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
12093 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
12094 compiled_regex reference. Adjust to use it.
12095 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
12096 declaration. Include "gdb_regex.h".
12097 (apropos_cmd): Change regex parameter to compiled_regex reference.
12098 * gdb_regex.c: New file.
12099 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
12100 declarations.
12101 (class compiled_regex): New.
12102 * linux-tdep.c: Include "common/gdb_optional.h".
12103 (struct mapping_regexes): New, factored out from
12104 mapping_is_anonymous_p, and adjusted to use compiled_regex.
12105 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
12106 gdb::optional and remove cleanups. Adjust to compiled_regex.
12107 * probe.c: Include "common/gdb_optional.h".
12108 (collect_probes): Use compiled_regex and gdb::optional and remove
12109 cleanups.
12110 * skip.c: Include "common/gdb_optional.h".
12111 (skiplist_entry::compiled_function_regexp): Now a
12112 gdb::optional<compiled_regex>.
12113 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
12114 (free_skiplist_entry): Remove regfree call.
12115 (compile_skip_regexp, skip_rfunction_p): Adjust to use
12116 compiled_regex and gdb::optional.
12117 * symtab.c: Include "common/gdb_optional.h".
12118 (search_symbols): Use compiled_regex and gdb::optional.
12119 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
12120 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
12121 to gdb_regex.c.
12122
12123 2017-06-07 Alan Hayward <alan.hayward@arm.com>
12124
12125 * regcache.c (regcache::save): Avoid buffer use.
12126 (regcache::dump): Likewise.
12127
12128 2017-06-07 Alan Hayward <alan.hayward@arm.com>
12129
12130 * sh-tdep.c (sh_pseudo_register_read): Remove
12131 MAX_REGISTER_SIZE.
12132 (sh_pseudo_register_write): Likewise.
12133 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
12134 (sh64_pseudo_register_write): Likewise
12135
12136 2017-06-07 Alan Hayward <alan.hayward@arm.com>
12137
12138 * aarch64-tdep.c (aarch64_store_return_value): Use
12139 V_REGISTER_SIZE.
12140 (aarch64_pseudo_read_value): Likewise.
12141 (aarch64_pseudo_write): Likewise.
12142
12143 2017-06-06 Yao Qi <yao.qi@linaro.org>
12144
12145 * regformats/regdef.h (set_register_cache): Remove the
12146 declaration.
12147
12148 2017-06-06 Alan Hayward <alan.hayward@arm.com>
12149
12150 * frame.c (frame_unwind_register_signed): Use
12151 frame_unwind_register_value.
12152
12153 2017-06-06 Pedro Alves <palves@redhat.com>
12154
12155 PR breakpoints/21553
12156 * breakpoint.c (create_breakpoints_sal_default)
12157 (init_breakpoint_sal, create_breakpoint_sal): Use
12158 gdb::unique_xmalloc_ptr for string parameters.
12159 (create_breakpoint): Constify 'extra_string' and 'cond_string'
12160 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
12161 (base_breakpoint_create_breakpoints_sal)
12162 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
12163 (strace_marker_create_breakpoints_sal)
12164 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
12165 string parameters.
12166 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
12167 gdb::unique_xmalloc_ptr for string parameters.
12168 (create_breakpoint): Constify 'extra_string' and 'cond_string'
12169 parameters.
12170
12171 2017-06-06 Alan Hayward <alan.hayward@arm.com>
12172
12173 * alpha-tdep.c (alpha_register_to_value): Use
12174 get_frame_register_value.
12175 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
12176
12177 2017-06-06 Alan Hayward <alan.hayward@arm.com>
12178
12179 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
12180 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
12181 (ia64_value_to_register): Likewise.
12182 (ia64_extract_return_value): Likewise.
12183 (ia64_store_return_value): Likewise.
12184 (ia64_push_dummy_call): Likewise.
12185
12186 2017-06-04 Joel Brobecker <brobecker@adacore.com>
12187
12188 GDB 8.0 released.
12189
12190 2017-06-03 Simon Marchi <simon.marchi@ericsson.com>
12191
12192 * x86-linux-nat.c (struct arch_lwp_info): Remove.
12193
12194 2017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
12195
12196 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
12197 parameter.
12198 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
12199
12200 2017-06-02 Simon Marchi <simon.marchi@ericsson.com>
12201
12202 * event-loop.c (poll_timers): Unallocate timer using delete
12203 instead of xfree.
12204
12205 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
12206
12207 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
12208 (struct breakpoint) <~breakpoint>: New.
12209 (struct watchpoint): Inherit from breakpoint.
12210 <~watchpoint>: New.
12211 <base>: Remove.
12212 (struct tracepoint): Inherit from breakpoint.
12213 <base>: Remove.
12214 * breakpoint.c (longjmp_breakpoint_ops): Remove.
12215 (struct longjmp_breakpoint): Inherit from breakpoint.
12216 <~longjmp_breakpoint>: New.
12217 <base>: Remove.
12218 (new_breakpoint_from_type): Remove casts.
12219 (watchpoint_in_thread_scope): Remove reference to base field.
12220 (watchpoint_del_at_next_stop): Likewise.
12221 (update_watchpoint): Likewise.
12222 (watchpoint_check): Likewise.
12223 (bpstat_check_watchpoint): Likewise.
12224 (set_longjmp_breakpoint): Likewise.
12225 (struct fork_catchpoint): Inherit from breakpoint.
12226 <base>: Remove.
12227 (struct solib_catchpoint): Inherit from breakpoint.
12228 <~solib_catchpoint>: New.
12229 <base>: Remove.
12230 (dtor_catch_solib): Change to ...
12231 (solib_catchpoint::~solib_catchpoint): ... this.
12232 (breakpoint_hit_catch_solib): Remove reference to base field.
12233 (add_solib_catchpoint): Likewise.
12234 (create_fork_vfork_event_catchpoint): Likewise.
12235 (struct exec_catchpoint): Inherit from breakpoint.
12236 <~exec_catchpoint>: New.
12237 <base>: Remove.
12238 (dtor_catch_exec): Change to ...
12239 (exec_catchpoint::~exec_catchpoint): ... this.
12240 (dtor_watchpoint): Change to ...
12241 (watchpoint::~watchpoint): ... this.
12242 (watch_command_1): Remove reference to base field.
12243 (catch_exec_command_1): Likewise.
12244 (base_breakpoint_dtor): Change to ...
12245 (breakpoint::~breakpoint): ... this.
12246 (base_breakpoint_ops): Remove dtor field value.
12247 (longjmp_bkpt_dtor): Change to ...
12248 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
12249 (strace_marker_create_breakpoints_sal): Remove reference to base
12250 field.
12251 (delete_breakpoint): Don't manually call breakpoint destructor.
12252 (create_tracepoint_from_upload): Remove reference to base field.
12253 (trace_pass_set_count): Likewise.
12254 (initialize_breakpoint_ops): Don't initialize
12255 momentary_breakpoint_ops, don't set dtors.
12256 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
12257 <~ada_catchpoint>: New.
12258 <base>: Remove.
12259 (create_excep_cond_exprs): Remove reference to base field.
12260 (dtor_exception): Change to ...
12261 (ada_catchpoint::~ada_catchpoint): ... this.
12262 (dtor_catch_exception): Remove.
12263 (dtor_catch_exception_unhandled): Remove.
12264 (dtor_catch_assert): Remove.
12265 (create_ada_exception_catchpoint): Remove reference to base
12266 field.
12267 (initialize_ada_catchpoint_ops): Don't set dtors.
12268 * break-catch-sig.c (struct signal_catchpoint): Inherit from
12269 breakpoint.
12270 <~signal_catchpoint>: New.
12271 <base>: Remove.
12272 (signal_catchpoint_dtor): Change to ...
12273 (signal_catchpoint::~signal_catchpoint): ... this.
12274 (create_signal_catchpoint): Remove reference to base field.
12275 (initialize_signal_catchpoint_ops): Don't set dtor.
12276 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
12277 from breakpoint.
12278 <~syscall_catchpoint>: New.
12279 <base>: Remove.
12280 (dtor_catch_syscall): Change to ...
12281 (syscall_catchpoint::~syscall_catchpoint): ... this.
12282 (create_syscall_event_catchpoint): Remove reference to base
12283 field.
12284 (initialize_syscall_catchpoint_ops): Don't set dtor.
12285 * break-catch-throw.c (struct exception_catchpoint): Inherit
12286 from breakpoint.
12287 <~exception_catchpoint>: New.
12288 <base>: Remove.
12289 (dtor_exception_catchpoint): Change to ...
12290 (exception_catchpoint::~exception_catchpoint): ... this.
12291 (handle_gnu_v3_exceptions): Remove reference to base field.
12292 (initialize_throw_catchpoint_ops): Don't set dtor.
12293 * ctf.c (ctf_get_traceframe_address): Remove reference to base
12294 field.
12295 * remote.c (remote_get_tracepoint_status): Likewise.
12296 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
12297 * tracefile.c (tracefile_fetch_registers): Likewise.
12298 * tracepoint.c (actions_command): Likewise.
12299 (validate_actionline): Likewise.
12300 (tfind_1): Likewise.
12301 (get_traceframe_location): Likewise.
12302 (find_matching_tracepoint_location): Likewise.
12303 (parse_tracepoint_status): Likewise.
12304 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
12305
12306 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
12307
12308 * breakpoint.c (struct longjmp_breakpoint): New struct.
12309 (is_tracepoint_type): Change return type to bool.
12310 (is_longjmp_type): New function.
12311 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
12312 (set_raw_breakpoint_without_location): Use
12313 new_breakpoint_from_type.
12314 (set_raw_breakpoint): Likewise.
12315
12316 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
12317
12318 * breakpoint.c (new_breakpoint_from_type): New function.
12319 (create_breakpoint_sal): Use new_breakpoint_from_type and
12320 unique_ptr.
12321 (create_breakpoint): Likewise.
12322
12323 2017-05-31 Simon Marchi <simon.marchi@ericsson.com>
12324
12325 * memattr.c (mem_info_command): Rename to ...
12326 (info_mem_command): ... this.
12327 (mem_enable_command): Rename to ...
12328 (enable_mem_command): ... this.
12329 (mem_disable_command): Rename to ...
12330 (disable_mem_command): ... this.
12331 (mem_delete_command): Rename to ...
12332 (delete_mem_command): ... this.
12333 (_initialize_mem): Adjust function names.
12334
12335 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
12336
12337 * btrace.c (handle_pt_insn_events): New.
12338 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
12339 STATUS. Split into this and ...
12340 (handle_pt_insn_event_flags): ... this.
12341
12342 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
12343
12344 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
12345 and struct pt_insn.resynced.
12346 * configure: Regenerated.
12347 * config.in: Regenerated.
12348
12349 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12350
12351 * btrace.c (ftrace_find_call_by_number): New function.
12352 (ftrace_new_function): Store objects, not pointers.
12353 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
12354 ftrace_new_gap, ftrace_update_function,
12355 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
12356 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
12357 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
12358 btrace_ends_with_single_insn, btrace_call_get): Account for
12359 btrace_thread_info::functions now storing objects.
12360 * btrace.h (struct btrace_thread_info): Add constructor.
12361 (struct btrace_thread_info) <functions>: Make std::vector.
12362 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
12363 Initialize with default values.
12364 * record-btrace.c (record_btrace_frame_sniffer): Account for
12365 btrace_thread_info::functions now storing objects.
12366
12367 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12368
12369 * btrace.c: Remove typedef bfun_s.
12370 (ftrace_new_gap): Directly add gaps to the list of gaps.
12371 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
12372 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
12373 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
12374 instead of gdb VEC.
12375
12376 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12377
12378 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
12379 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
12380 with btrace_thread_info::next_segment and
12381 btrace_thread_info::prev_segment.
12382 * btrace.h: Remove struct btrace_func_link.
12383 (struct btrace_function): Replace pair of function segment pointers
12384 with pair of indices.
12385 * python/py-record-btrace.c (btpy_call_prev_sibling,
12386 btpy_call_next_sibling): Replace references to
12387 btrace_thread_info::segment with btrace_thread_info::next_segment and
12388 btrace_thread_info::prev_segment.
12389 * record-btrace.c (record_btrace_frame_this_id): Use
12390 btrace_find_call_by_number.
12391
12392 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12393
12394 * btrace.c (ftrace_new_function, ftrace_fixup_level,
12395 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
12396 btrace_insn_next, btrace_insn_prev): Remove references to
12397 btrace_thread_info::flow.
12398 * btrace.h (struct btrace_function): Remove FLOW.
12399
12400 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12401
12402 * btrace.c (ftrace_find_call_by_number): New function.
12403 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
12404 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
12405 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
12406 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
12407 index.
12408 * btrace.h (struct btrace_function): Turn UP into an index.
12409 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
12410 as an index.
12411 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
12412 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
12413 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
12414
12415 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12416
12417 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
12418 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
12419 ftrace_update_function, ftrace_compute_global_level_offset,
12420 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
12421 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
12422 btrace_insn_end, btrace_is_empty): Remove references to
12423 btrace_thread_info::begin and btrace_thread_info::end.
12424 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
12425 (struct btrace_thread_info) <functions>: Adjust comment.
12426 * record-btrace.c (record_btrace_start_replaying): Remove reference to
12427 btrace_thread_info::begin.
12428
12429 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12430
12431 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
12432 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
12433 ftrace_update_function): Remove arguments that implicitly were always
12434 BTINFO->END.
12435 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
12436 Don't pass BTINFO->END.
12437
12438 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12439
12440 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
12441 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
12442 btrace_find_insn_by_number): Replace function segment pointer with
12443 index.
12444 (btrace_insn_cmp): Simplify.
12445 * btrace.h: (struct btrace_insn_iterator) Rename index to
12446 insn_index. Replace function segment pointer with index into function
12447 segment vector.
12448 * record-btrace.c (record_btrace_call_history): Replace function
12449 segment pointer use with index.
12450 (record_btrace_frame_sniffer): Retrieve function call segment through
12451 vector.
12452 (record_btrace_set_replay): Remove defunc't safety check.
12453
12454 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12455
12456 * btrace.c (btrace_ends_with_single_insn): New function.
12457 (btrace_call_get, btrace_call_number, btrace_call_begin,
12458 btrace_call_end, btrace_call_next, btrace_call_prev,
12459 btrace_find_call_by_number): Use index into call segment vector
12460 instead of pointer.
12461 (btrace_call_cmp): Simplify.
12462 * btrace.h (struct btrace_call_iterator): Replace function call segment
12463 pointer with index into vector.
12464 * record-btrace.c (record_btrace_call_history): Use index instead of
12465 pointer.
12466
12467 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12468
12469 * btrace.c (btrace_insn_begin, btrace_insn_end,
12470 btrace_find_insn_by_number): Add btinfo to iterator.
12471 * btrace.h (struct btrace_insn_iterator): Add btinfo.
12472
12473 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12474
12475 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
12476 and save pointers directly.
12477 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
12478 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
12479 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
12480 changed signature of functions.
12481 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
12482 (btrace_fetch): Remove code that adds btrace_function pointers to
12483 vector of btrace_functions.
12484 (btrace_clear): Simplify freeing vector of btrace_functions.
12485
12486 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12487
12488 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
12489 Replace VEC_* with std::vector functions.
12490 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
12491 (struct btrace_thread_info)<functions>: Change type to std::vector.
12492
12493 2017-05-30 Simon Marchi <simon.marchi@ericsson.com>
12494
12495 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
12496 "Removed targets and native configurations" up. Merge duplicate
12497 "New commands" sub-sections. Add "New options" sub-sections.
12498
12499 2017-05-26 Alan Hayward <alan.hayward@arm.com>
12500
12501 * defs.h (copy_integer_to_size): New declaration.
12502 * findvar.c (copy_integer_to_size): New function.
12503 (do_cint_test): New selftest function.
12504 (copy_integer_to_size_test): Likewise.
12505 (_initialize_findvar): Likewise.
12506 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
12507 (mips_fbsd_collect_reg): Use raw_collect_integer.
12508 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
12509 (mips64_fill_gregset): Use raw_collect_integer
12510 (mips64_fill_fpregset): Use raw_supply_integer.
12511 * regcache.c (regcache::raw_supply_integer): New function.
12512 (regcache::raw_collect_integer): Likewise.
12513 * regcache.h: (regcache::raw_supply_integer): New declaration.
12514 (regcache::raw_collect_integer): Likewise.
12515
12516 2017-05-24 Yao Qi <yao.qi@linaro.org>
12517
12518 * Makefile.in (SFILES): Add gdbarch-selftests.c.
12519 (COMMON_OBS): Add gdbarch-selftests.o.
12520 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
12521 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
12522 * gdbarch-selftests.c: New file.
12523 * regcache.h (regcache) <~regcache>: Mark it virtual if
12524 GDB_SELF_TEST.
12525 <raw_write>: Likewise.
12526
12527 2017-05-24 Yao Qi <yao.qi@linaro.org>
12528
12529 * regcache.c (current_regcache): Change it to
12530 regcache::current_regcache.
12531 (regcache_observer_target_changed): Update.
12532 (regcache_thread_ptid_changed): Make it a regcache static
12533 method.
12534 (regcache_thread_ptid_changed): Update.
12535 (class regcache_access): New.
12536 (current_regcache_test): Update.
12537 (_initialize_regcache): Update.
12538 * regcache.h: Include forward_list.
12539 (regcache): Declare regcache_thread_ptid_changed and declare
12540 registers_changed_ptid as friend.
12541
12542 2017-05-24 Yao Qi <yao.qi@linaro.org>
12543
12544 * i387-tdep.c (i387_register_to_value): Use register_size
12545 instead of TYPE_LENGTH.
12546 * m68k-tdep.c (m68k_register_to_value): Likewise.
12547
12548 2017-05-24 Yao Qi <yao.qi@linaro.org>
12549
12550 * i387-tdep.c (i387_convert_register_p): Return false if type
12551 code isn't TYPE_CODE_FLT.
12552
12553 2017-05-24 Yao Qi <yao.qi@linaro.org>
12554
12555 * alpha-tdep.c (alpha_convert_register_p): Return true if type
12556 length is 4.
12557 (alpha_register_to_value): Remove type length check.
12558 (alpha_value_to_register): Likewise.
12559
12560 2017-05-24 Yao Qi <yao.qi@linaro.org>
12561
12562 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
12563 TYPE_CODE_FLT.
12564
12565 2017-05-24 Yao Qi <yao.qi@linaro.org>
12566
12567 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
12568 TYPE_CODE_FLT or not.
12569
12570 2017-05-24 Yao Qi <yao.qi@linaro.org>
12571
12572 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
12573 * avr-tdep.c (avr_gdbarch_init): Likewise.
12574 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
12575 * cris-tdep.c (cris_gdbarch_init): Likewise.
12576 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
12577 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
12578 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
12579 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
12580 * mep-tdep.c (mep_gdbarch_init): Likewise.
12581 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
12582 * mips-tdep.c (mips_gdbarch_init): Likewise.
12583 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
12584 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
12585 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
12586 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
12587 * v850-tdep.c (v850_gdbarch_init): Likewise.
12588
12589 2017-05-24 Yao Qi <yao.qi@linaro.org>
12590
12591 * selftest-arch.c (tests_with_arch): Call registers_changed
12592 and reinit_frame_cache.
12593 * selftest.c (run_self_tests): Likewise.
12594
12595 2017-05-24 Yao Qi <yao.qi@linaro.org>
12596
12597 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
12598 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
12599
12600 2017-05-24 Yao Qi <yao.qi@linaro.org>
12601
12602 * rl78-tdep.c (rl78_gdbarch_init): Don't call
12603 set_gdbarch_print_insn.
12604
12605 2017-05-24 Yao Qi <yao.qi@linaro.org>
12606
12607 * h8300-tdep.c (h8300_gdbarch_init): Don't call
12608 set_gdbarch_print_insn.
12609
12610 2017-05-24 Yao Qi <yao.qi@linaro.org>
12611
12612 * alpha-tdep.c (alpha_gdbarch_init): Don't call
12613 set_gdbarch_print_insn.
12614 * arc-tdep.c (arc_gdbarch_init): Likewise.
12615 * arch-utils.c: include dis-asm.h.
12616 (default_print_insn): New function.
12617 * arch-utils.h (default_print_insn): Declare.
12618 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
12619 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
12620 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
12621 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
12622 * frv-tdep.c (frv_gdbarch_init): Likewise.
12623 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
12624 * gdbarch.sh (print_insn): Use default_print_insn.
12625 * gdbarch.c: Regenerated.
12626 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
12627 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
12628 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
12629 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
12630 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
12631 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
12632 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
12633 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
12634 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
12635 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
12636 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
12637 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
12638 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
12639 * mt-tdep.c (mt_gdbarch_init): Likewise.
12640 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
12641 * nios2-tdep.c (nios2_print_insn): Remove.
12642 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
12643 * rx-tdep.c (rx_gdbarch_init): Likewise.
12644 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
12645 * score-tdep.c (score_print_insn): Remove.
12646 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
12647 * sh-tdep.c (sh_gdbarch_init): Likewise.
12648 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
12649 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
12650 * tic6x-tdep.c (tic6x_print_insn): Remove.
12651 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
12652 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
12653 * v850-tdep.c (v850_gdbarch_init): Likewise.
12654 * vax-tdep.c (vax_gdbarch_init): Likewise.
12655 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
12656 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
12657
12658 2017-05-23 John Baldwin <jhb@FreeBSD.org>
12659
12660 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
12661 (MIPS_FP0_REGNUM): Remove.
12662 (MIPS_FSR_REGNUM): Remove.
12663 (mips_fbsd_supply_fpregs): Use mips_regnum.
12664 (mips_fbsd_supply_gregs): Likewise.
12665 (mips_fbsd_collect_fpregs): Likewise.
12666 (mips_fbsd_collect_gregs): Likewise.
12667
12668 2017-05-23 John Baldwin <jhb@FreeBSD.org>
12669
12670 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
12671 (getpfpregs_supplies): New function.
12672 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
12673 getfpregs_supplies.
12674 (mips_fbsd_store_inferior_registers): Likewise.
12675
12676 2017-05-22 Pedro Alves <palves@redhat.com>
12677
12678 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
12679 maintainer.
12680
12681 2017-05-22 Alan Hayward <alan.hayward@arm.com>
12682
12683 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
12684 (store_register): Likewise.
12685 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
12686 (get_decimal_float_return_value): Likewise.
12687 (do_ppc_sysv_return_value): Likewise.
12688 (ppc64_sysv_abi_push_integer): Likewise.
12689 (ppc64_sysv_abi_push_freg): Likewise.
12690 (ppc64_sysv_abi_return_value_base): Likewise.
12691 (ppc64_sysv_abi_return_value): Likewise.
12692 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
12693 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
12694 * rs6000-nat.c: Likewise.
12695 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
12696 (rs6000_value_to_register): Likewise.
12697 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
12698
12699 2017-05-21 Tom Tromey <tom@tromey.com>
12700
12701 PR rust/21466:
12702 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
12703 arrays as "[T]", not "[T; ]".
12704
12705 2017-05-19 Tom Tromey <tom@tromey.com>
12706
12707 PR rust/21484:
12708 * rust-lang.c (exp_descriptor_rust): New function.
12709 (rust_language_defn): Use it.
12710 * p-lang.c (pascal_language_defn): Update.
12711 * opencl-lang.c (opencl_language_defn): Update.
12712 * objc-lang.c (objc_language_defn): Update.
12713 * m2-lang.c (m2_language_defn): Update.
12714 * language.h (struct language_defn)
12715 <la_watch_location_expression>: New member.
12716 * language.c (unknown_language_defn, auto_language_defn)
12717 (local_language_defn): Update.
12718 * go-lang.c (go_language_defn): Update.
12719 * f-lang.c (f_language_defn): Update.
12720 * d-lang.c (d_language_defn): Update.
12721 * c-lang.h (c_watch_location_expression): Declare.
12722 * c-lang.c (c_watch_location_expression): New function.
12723 (c_language_defn, cplus_language_defn, asm_language_defn)
12724 (minimal_language_defn): Use it.
12725 * breakpoint.c (watch_command_1): Call
12726 la_watch_location_expression.
12727 * ada-lang.c (ada_language_defn): Update.
12728
12729 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12730
12731 PR tui/21482
12732 * gdb_curses.h (NOMACROS): Define.
12733 (NCURSES_NOMACROS): Define.
12734
12735 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12736
12737 PR tui/21482
12738 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
12739 arg to char *.
12740 * tui/tui-wingeneral.c (box_win): Likewise.
12741 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
12742 (tui_show_source_line): Likewise.
12743 (tui_show_exec_info_content): Likewise.
12744
12745 2017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
12746
12747 * sparc-tdep.c (sparc_structure_return_p)
12748 (sparc_arg_on_registers_p): New functions.
12749 (sparc32_store_arguments): Use them.
12750 * sparc64-tdep.c (sparc64_16_byte_align_p)
12751 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
12752 Handle TYPE_CODE_ARRAY.
12753
12754 2017-05-17 Yao Qi <yao.qi@linaro.org>
12755
12756 * cli/cli-decode.c (add_alias_cmd): New function.
12757 * command.h (add_alias_cmd): Declare.
12758 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
12759 instead call add_alias_cmd.
12760
12761 2017-05-17 Pedro Alves <palves@redhat.com>
12762
12763 * Makefile.in (nat_extra_makefile_frag): Rename to ...
12764 (nat_makefile_frag): ... this. All references updated.
12765 * configure.ac: Likewise.
12766 * configure.nat: Likewise. Enhance comments.
12767 * configure: Regenerate.
12768
12769 2017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12770
12771 * procfs.c (procfs_create_inferior): Change prototype to match
12772 definition.
12773
12774 2017-05-13 Eli Zaretskii <eliz@gnu.org>
12775
12776 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
12777 C++ compiler warning.
12778
12779 2017-05-12 Tom Tromey <tom@tromey.com>
12780
12781 PR rust/21483:
12782 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
12783 recurse, just call value_struct_elt directly.
12784
12785 2017-05-12 Tom Tromey <tom@tromey.com>
12786
12787 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
12788 OP_RUST_ARRAY>: Fix.
12789
12790 2017-05-12 Tom Tromey <tom@tromey.com>
12791
12792 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
12793
12794 2017-05-09 Yao Qi <yao.qi@linaro.org>
12795
12796 * regcache.c: Include <forward_list>.
12797 (struct regcache_list): Remove.
12798 (current_regcache): Update.
12799 (get_thread_arch_aspace_regcache): Update for std::forward_list.
12800 (regcache_thread_ptid_changed): Likewise.
12801 (registers_changed_ptid): Likewise.
12802 (current_regcache_size): Likewise.
12803
12804 2017-05-09 Yao Qi <yao.qi@linaro.org>
12805
12806 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
12807 (current_regcache_size): New function.
12808 (current_regcache_test): New function.
12809 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
12810
12811 2017-05-08 Alan Hayward <alan.hayward@arm.com>
12812
12813 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
12814 (print_gp_register_row): Use get_frame_register_value.
12815
12816 2017-05-08 Alan Hayward <alan.hayward@arm.com>
12817
12818 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
12819 (mips_supply_fpregset): Likewise.
12820 (mips64_supply_gregset): Likewise.
12821
12822 2017-05-08 Alan Hayward <alan.hayward@arm.com>
12823
12824 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
12825 regcache->raw_supply_zeroed.
12826
12827 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
12828
12829 * configure.nat: Rearrange 'case' statements to match
12830 host before cpu.
12831
12832 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
12833
12834 * Makefile.in: Remove "@host_makefile_frag@". Add variables
12835 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
12836 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
12837 "@nat_extra_makefile_frag@".
12838 (Makefile): Remove dependency on "@frags@".
12839 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
12840 (data-directory/Makefile): Likewise.
12841 * config/aarch64/linux.mh: Deleted; moved contents to
12842 "gdb/configure.nat".
12843 * config/alpha/alpha-linux.mh: Likewise.
12844 * config/alpha/nbsd.mh: Likewise.
12845 * config/arm/linux.mh: Likewise.
12846 * config/arm/nbsdelf.mh: Likewise.
12847 * config/i386/cygwin.mh: Likewise.
12848 * config/i386/cygwin64.mh: Likewise.
12849 * config/i386/darwin.mh: Likewise.
12850 * config/i386/fbsd.mh: Likewise.
12851 * config/i386/fbsd64.mh: Likewise.
12852 * config/i386/go32.mh: Likewise.
12853 * config/i386/i386gnu.mh: Likewise.
12854 * config/i386/i386sol2.mh: Likewise.
12855 * config/i386/linux.mh: Likewise.
12856 * config/i386/linux64.mh: Likewise.
12857 * config/i386/mingw.mh: Likewise.
12858 * config/i386/mingw64.mh: Likewise.
12859 * config/i386/nbsd64.mh: Likewise.
12860 * config/i386/nbsdelf.mh: Likewise.
12861 * config/i386/nto.mh: Likewise.
12862 * config/i386/obsd.mh: Likewise.
12863 * config/i386/obsd64.mh: Likewise.
12864 * config/i386/sol2-64.mh: Likewise.
12865 * config/ia64/linux.mh: Likewise.
12866 * config/m32r/linux.mh: Likewise.
12867 * config/m68k/linux.mh: Likewise.
12868 * config/m68k/nbsdelf.mh: Likewise.
12869 * config/m68k/obsd.mh: Likewise.
12870 * config/m88k/obsd.mh: Likewise.
12871 * config/mips/fbsd.mh: Likewise.
12872 * config/mips/linux.mh: Likewise.
12873 * config/mips/nbsd.mh: Likewise.
12874 * config/mips/obsd64.mh: Likewise.
12875 * config/pa/linux.mh: Likewise.
12876 * config/pa/nbsd.mh: Likewise.
12877 * config/pa/obsd.mh: Likewise.
12878 * config/powerpc/aix.mh: Likewise.
12879 * config/powerpc/fbsd.mh: Likewise.
12880 * config/powerpc/linux.mh: Likewise.
12881 * config/powerpc/nbsd.mh: Likewise.
12882 * config/powerpc/obsd.mh: Likewise.
12883 * config/powerpc/ppc64-linux.mh: Likewise.
12884 * config/powerpc/spu-linux.mh: Likewise.
12885 * config/s390/linux.mh: Likewise.
12886 * config/sh/nbsd.mh: Likewise.
12887 * config/sparc/fbsd.mh: Likewise.
12888 * config/sparc/linux.mh: Likewise.
12889 * config/sparc/linux64.mh: Likewise.
12890 * config/sparc/nbsd64.mh: Likewise.
12891 * config/sparc/nbsdelf.mh: Likewise.
12892 * config/sparc/obsd64.mh: Likewise.
12893 * config/sparc/sol2.mh: Likewise.
12894 * config/tilegx/linux.mh: Likewise.
12895 * config/vax/nbsdelf.mh: Likewise.
12896 * config/vax/obsd.mh: Likewise.
12897 * config/xtensa/linux.mh: Likewise.
12898 * config/i386/i386gnu.mn: New file, with excerpts from
12899 "config/i386/i386gnu.mh".
12900 * configure: Regenerate.
12901 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
12902 *.mh files under "gdb/config".
12903 * configure.nat: New file, with contents from the
12904 "gdb/config/*/*.mh" files.
12905
12906 2017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
12907
12908 * btrace.c (btrace_clear): Free insn vector.
12909
12910 2017-05-05 Pedro Alves <palves@redhat.com>
12911
12912 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
12913 * configure: Regenerate.
12914
12915 2017-05-04 Pedro Alves <palves@redhat.com>
12916
12917 * Makefile.in (SFILES): Add progspace-and-thread.c.
12918 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
12919 (COMMON_OBS): Add progspace-and-thread.o.
12920 * breakpoint.c: Include "progspace-and-thread.h".
12921 (update_inserted_breakpoint_locations)
12922 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
12923 Use scoped_restore_current_pspace_and_thread.
12924 (create_std_terminate_master_breakpoint): Use
12925 scoped_restore_current_program_space.
12926 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
12927 (print_breakpoint_location): Use
12928 scoped_restore_current_program_space.
12929 (bp_loc_is_permanent): Use
12930 scoped_restore_current_pspace_and_thread.
12931 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
12932 (download_tracepoint_locations): Use
12933 scoped_restore_current_pspace_and_thread.
12934 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
12935 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
12936 (enum step_over_calls_kind): Moved from inferior.h.
12937 (class scoped_restore_current_thread): New class.
12938 * gdbthread.h (make_cleanup_restore_current_thread): Delete
12939 declaration.
12940 (scoped_restore_current_thread): New class.
12941 * infcmd.c: Include "common/gdb_optional.h".
12942 (continue_1, proceed_after_attach): Use
12943 scoped_restore_current_thread.
12944 (notice_new_inferior): Use scoped_restore_current_thread.
12945 * inferior.c: Include "progspace-and-thread.h".
12946 (restore_inferior, save_current_inferior): Delete.
12947 (add_inferior_command, clone_inferior_command): Use
12948 scoped_restore_current_pspace_and_thread.
12949 * inferior.h (scoped_restore_current_inferior): New class.
12950 * infrun.c: Include "progspace-and-thread.h" and
12951 "common/gdb_optional.h".
12952 (follow_fork_inferior): Use
12953 scoped_restore_current_pspace_and_thread.
12954 (scoped_restore_exited_inferior): New class.
12955 (handle_vfork_child_exec_or_exit): Use
12956 scoped_restore_exited_inferior,
12957 scoped_restore_current_pspace_and_thread,
12958 scoped_restore_current_thread and scoped_restore.
12959 (fetch_inferior_event): Use scoped_restore_current_thread.
12960 * linespec.c (decode_line_full, decode_line_1): Use
12961 scoped_restore_current_program_space.
12962 * mi/mi-main.c: Include "progspace-and-thread.h".
12963 (exec_continue): Use scoped_restore_current_thread.
12964 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
12965 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
12966 * proc-service.c (ps_pglobal_lookup): Use
12967 scoped_restore_current_program_space.
12968 * progspace-and-thread.c: New file.
12969 * progspace-and-thread.h: New file.
12970 * progspace.c (release_program_space, clone_program_space): Use
12971 scoped_restore_current_program_space.
12972 (restore_program_space, save_current_program_space)
12973 (save_current_space_and_thread): Delete.
12974 (switch_to_program_space_and_thread): Moved to
12975 progspace-and-thread.c.
12976 * progspace.h (save_current_program_space)
12977 (save_current_space_and_thread): Delete declarations.
12978 (scoped_restore_current_program_space): New class.
12979 * remote.c (remote_btrace_maybe_reopen): Use
12980 scoped_restore_current_thread.
12981 * symtab.c: Include "progspace-and-thread.h".
12982 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
12983 * thread.c (print_thread_info_1): Use
12984 scoped_restore_current_thread.
12985 (struct current_thread_cleanup): Delete.
12986 (do_restore_current_thread_cleanup)
12987 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
12988 (scoped_restore_current_thread::~scoped_restore_current_thread):
12989 ... this new dtor.
12990 (make_cleanup_restore_current_thread): Rename/convert to ...
12991 (scoped_restore_current_thread::scoped_restore_current_thread):
12992 ... this new ctor.
12993 (thread_apply_all_command): Use scoped_restore_current_thread.
12994 (thread_apply_command): Use scoped_restore_current_thread.
12995 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
12996 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
12997
12998 2017-05-04 Pedro Alves <palves@redhat.com>
12999
13000 * thread.c (make_cleanup_restore_current_thread): Move
13001 find_thread_ptid call before the is_stopped call. Assert that the
13002 thread is found. Replace is_stopped call by checking the thread's
13003 state directly. Remove unnecessary NULL-thread check.
13004
13005 2017-05-04 Pedro Alves <palves@redhat.com>
13006
13007 * corelow.c (thread_section_name): New class.
13008 (get_core_register_section, get_core_siginfo): Use it.
13009
13010 2017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
13011
13012 * corelow.c (sniff_core_bfd): Remove extra semicolon.
13013 (get_core_register_section): Remove xfree of NULL pointer.
13014
13015 2017-05-03 Alan Hayward <alan.hayward@arm.com>
13016
13017 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
13018 * regcache.c (regcache::raw_supply_zeroed): New function.
13019 * regcache.h (regcache::raw_supply_zeroed): New declaration.
13020
13021 2017-05-03 Simon Marchi <simon.marchi@ericsson.com>
13022
13023 * gdbarch.sh: Remove commented out definition of
13024 TARGET_CHAR_BIT.
13025 * gdbarch.h: Re-generate.
13026
13027 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
13028
13029 * configure: Regenerate.
13030
13031 2017-05-02 Simon Marchi <simon.marchi@ericsson.com>
13032
13033 * solib-target.c (solib_target_relocate_section_addresses):
13034 Remove num_section_bases, num_bases, segment_bases variables.
13035
13036 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
13037
13038 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
13039
13040 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
13041
13042 * solib-target.c: Include <vector>
13043 (struct lm_info_target) <~lm_info_target>: Remove.
13044 <segment_bases, section_bases>: Change type to
13045 std::vector<CORE_ADDR>.
13046 (library_list_start_segment, library_list_start_section,
13047 library_list_end_library,
13048 solib_target_relocate_section_addresses): Adjust.
13049
13050 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
13051
13052 * gdbarch.sh (software_single_step): Change return type to
13053 std::vector<CORE_ADDR>.
13054 * gdbarch.c, gdbarch.h: Re-generate.
13055 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
13056 Adjust.
13057 (arm_deal_with_atomic_sequence_raw): Adjust.
13058 (thumb_get_next_pcs_raw): Adjust.
13059 (arm_get_next_pcs_raw): Adjust.
13060 (arm_get_next_pcs): Adjust.
13061 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
13062 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
13063 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
13064 (alpha_software_single_step): Adjust.
13065 * alpha-tdep.h (alpha_software_single_step): Adjust.
13066 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
13067 * arm-tdep.c (arm_software_single_step): Adjust.
13068 (arm_breakpoint_kind_from_current_state): Adjust.
13069 * arm-tdep.h (arm_software_single_step): Adjust.
13070 * breakpoint.c (insert_single_step_breakpoint): Adjust.
13071 * cris-tdep.c (cris_software_single_step): Adjust.
13072 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
13073 (micromips_deal_with_atomic_sequence): Adjust.
13074 (deal_with_atomic_sequence): Adjust.
13075 (mips_software_single_step): Adjust.
13076 * mips-tdep.h (mips_software_single_step): Adjust.
13077 * moxie-tdep.c (moxie_software_single_step): Adjust.
13078 * nios2-tdep.c (nios2_software_single_step): Adjust.
13079 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
13080 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
13081 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
13082 * s390-linux-tdep.c (s390_software_single_step): Adjust.
13083 * sparc-tdep.c (sparc_software_single_step): Adjust.
13084 * spu-tdep.c (spu_software_single_step): Adjust.
13085 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
13086
13087 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
13088
13089 * gdbarch.sh: Use semi-colon as field separator instead of colon.
13090 * gdbarch.h: Re-generate.
13091
13092 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
13093
13094 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
13095 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
13096 * python/py-instruction.c, python/py-instruction.h: New file.
13097 * python/py-record.c: Add py-instruction.h include.
13098 (gdbpy_initialize_record): Make gdb.Instruction a super class of
13099 gdb.RecordInstruction.
13100 * python/python-internal.h: Add gdbpy_initialize_instruction
13101 declaration.
13102 * python/python.c (do_start_initialization): Add
13103 gdbpy_initialize_instruction.
13104
13105 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
13106
13107 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
13108 Remove.
13109 (btrace_func_from_recpy_func): New function.
13110 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
13111 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
13112 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
13113 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
13114 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
13115 Also, use new helper functions.
13116 (btpy_list_item): Use new helper functions.
13117 (recpy_bt_function_call_history): Use new type name.
13118 (btpy_call_getset): Remove.
13119 (gdbpy_initialize_btrace): Remove code to initialize
13120 gdb.BtraceFunctionCall.
13121 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
13122 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
13123 recpy_bt_func_prev, recpy_bt_func_next): New export.
13124 * python/py-record.c (recpy_func_type): New static object.
13125 (recpy_func_new, recpy_func_level, recpy_func_symbol,
13126 recpy_func_instructions, recpy_func_up, recpy_func_prev,
13127 recpy_func_next): New function.
13128 (recpy_element_hash, recpy_element_richcompare): Updated comment.
13129 (recpy_func_getset): New static object.
13130 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
13131 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
13132
13133 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
13134
13135 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
13136 (btpy_object, btpy_insn_type, btpy_new): Remove.
13137 (btpy_list_object): Use gdb.RecordInstruction type instead of
13138 gdb.BtraceInstruction type.
13139 (btrace_insn_from_recpy_insn): New function.
13140 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
13141 btpy_new.
13142 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
13143 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
13144 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
13145 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
13146 instead of btpy_object.
13147 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
13148 btpy_insn_data, btpy_insn_decode): Rename to ...
13149 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
13150 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
13151 recpy_bt_insn_decode): This. Also, use new helper functions.
13152 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
13153 recpy_insn_type.
13154 (btpy_insn_getset): Remove.
13155 (gdbpy_initialize_btrace): Remove code to initialize
13156 gdb.BtraceInstruction. Use recpy_element_object.
13157 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
13158 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
13159 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
13160 * python/py-record.c (recpy_insn_type): New static object.
13161 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
13162 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
13163 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
13164 New function.
13165 (recpy_insn_getset): New static object.
13166 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
13167 * python/py-record.h (recpy_element_object): New typedef.
13168 (recpy_insn_type, recpy_insn_new): New export.
13169
13170 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
13171
13172 * py-record-btrace.c (btpy_insn_new): Removed.
13173 (btpy_insn_or_gap_new): New function.
13174 (btpy_insn_error): Removed.
13175 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
13176 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
13177 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
13178 btpy_insn_or_gap_new instead of btpy_insn_new.
13179 (btpy_insn_getset): Remove btpy_insn_error.
13180 * py-record.c (recpy_gap_type): New static object.
13181 (recpy_gap_object): New typedef.
13182 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
13183 recpy_gap_reason_string): New function.
13184 (recpy_gap_getset): New static object.
13185 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
13186 * py-record.h (recpy_gap_new): New export.
13187
13188 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
13189
13190 * python/py-record.c (recpy_ptid): Remove.
13191 (recpy_record_getset): Remove recpy_ptid.
13192
13193 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
13194
13195 * btrace.c (btrace_fetch): Set inferior_ptid.
13196 * python/py-record-btrace.c: Add "py-record.h" include.
13197 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
13198 recpy_bt_end, recpy_bt_instruction_history,
13199 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
13200 in gdb.Record object instead of current ptid.
13201 * python/py-record.c: Include new "py-record.h" file.
13202 (recpy_record_object): Moved to py-record.h.
13203 * python/py-record.h: New file.
13204
13205 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
13206
13207 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
13208 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
13209 indentation.
13210
13211 2017-05-01 Joel Brobecker <brobecker@adacore.com>
13212
13213 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
13214 the past maintainers section.
13215
13216 2017-04-28 Yao Qi <yao.qi@linaro.org>
13217
13218 * infcmd.c (get_return_value): Use regcache ctor, and remove
13219 cleanup.
13220
13221 2017-04-28 Yao Qi <yao.qi@linaro.org>
13222 Pedro Alves <palves@redhat.com>
13223
13224 * regcache.c (regcache::regcache): New tag dispatch ctor.
13225 (do_cooked_read): Moved above.
13226 (regcache_dup): Use the tag dispatch ctor..
13227 * regcache.h (regcache): Declare ctor, delete copy ctor and
13228 assignment operator, remove friend regcache_dup.
13229
13230 2017-04-28 Yao Qi <yao.qi@linaro.org>
13231
13232 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
13233 call method save instead of regcache_cpy.
13234 * regcache.h (struct regcache): Make regcache_dup a friend.
13235
13236 2017-04-28 Yao Qi <yao.qi@linaro.org>
13237
13238 * regcache.c (struct regcache): Move to regcache.h
13239 (regcache::arch): New method.
13240 (regcache_get_ptid): Update.
13241 (get_regcache_arch): Call arch method.
13242 (get_regcache_aspace): Call method aspace.
13243 (register_buffer): Change it to method.
13244 (regcache_save): Change it to regcache::save.
13245 (regcache_restore): Likewise.
13246 (regcache_cpy_no_passthrough): Remove the declaration.
13247 (regcache_cpy): Call methods restore and cpy_no_passthrough.
13248 (regcache_cpy_no_passthrough): Change it to method
13249 cpy_no_passthrough.
13250 (regcache_register_status): Change it to method
13251 get_register_status.
13252 (regcache_invalidate): Change it to method invalidate.
13253 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
13254 (regcache_raw_update): Change it to method raw_update.
13255 (regcache_raw_read): Likewise.
13256 (regcache_raw_read_signed): Likewise.
13257 (regcache_raw_read_unsigned): Likewise.
13258 (regcache_raw_write_signed): Likewise.
13259 (regcache_raw_write_unsigned): Likewise.
13260 (regcache_cooked_read): Likewise.
13261 (regcache_cooked_read_value): Likewise.
13262 (regcache_cooked_read_signed): Likewise.
13263 (regcache_cooked_read_unsigned): Likewise.
13264 (regcache_cooked_write_signed): Likewise.
13265 (regcache_cooked_write_unsigned): Likewise.
13266 (regcache_raw_set_cached_value): Likewise.
13267 (regcache_raw_write): Likewise.
13268 (regcache_cooked_write): Likewise.
13269 (regcache_xfer_part): Likewise.
13270 (regcache_raw_read_part): Likewise.
13271 (regcache_raw_write_part): Likewise.
13272 (regcache_cooked_read_part): Likewise.
13273 (regcache_cooked_write_part): Likewise.
13274 (regcache_raw_supply): Likewise.
13275 (regcache_raw_collect): Likewise.
13276 (regcache_transfer_regset): Likewise.
13277 (regcache_supply_regset): Likewise.
13278 (regcache_collect_regset): Likewise.
13279 (regcache_debug_print_register): Likewise.
13280 (enum regcache_dump_what): Move it to regcache.h.
13281 (regcache_dump): Change it to method dump.
13282 * regcache.h (enum regcache_dump_what): New.
13283 (class regcache): New.
13284 * target.c (target_fetch_registers): Call method
13285 debug_print_register.
13286 (target_store_registers): Likewise.
13287
13288 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13289
13290 * windows-nat.c (struct lm_info_windows): Initialize field.
13291 (windows_make_so): Allocate lm_info_windows with new.
13292 (windows_free_so): Free lm_info_windows with delete.
13293
13294 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13295
13296 * solib-darwin.c (struct lm_info_darwin): Initialize field.
13297 (darwin_current_sos): Allocate lm_info_darwin with new, remove
13298 cleanup.
13299 (darwin_free_so): Free lm_info_darwin with delete.
13300
13301 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13302
13303 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
13304 <l_addr_p>: Change type to bool.
13305 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
13306 (svr4_free_so): Free lm_info_svr4 with delete.
13307 (svr4_copy_library_list): Replace memcpy with call to copy
13308 constructor.
13309 (library_list_start_library, svr4_default_sos): Allocate
13310 lm_info_svr4 with new.
13311
13312 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13313
13314 * solib-target.c (struct lm_info_target): Add destructor,
13315 initialize fields.
13316 <name>: Change type to std::string.
13317 (library_list_start_library): Allocate lm_info_target with new.
13318 (solib_target_free_library_list): Free lm_info_target with
13319 delete.
13320 (solib_target_current_sos): Adapt to std::string.
13321 (solib_target_free_so): Free lm_info_target with delete.
13322
13323 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13324
13325 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
13326 fields.
13327 (frv_current_sos): Allocate lm_info_frv with new.
13328 (frv_relocate_main_executable): Free lm_info_frv with delete,
13329 allocate with new.
13330 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
13331
13332 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13333
13334 * solib-frv.c (struct lm_info_frv): Fix indentation.
13335
13336 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13337
13338 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
13339 map field.
13340 (dsbt_current_sos): Allocate lm_info_dsbt with new.
13341 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
13342 and allocate with new.
13343 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
13344
13345 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13346
13347 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
13348 <filename, member_name>: Change type to std::string.
13349 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
13350 (library_list_start_library): Allocate lm_info_aix with new.
13351 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
13352 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
13353 with copy constructor.
13354
13355 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13356
13357 * solist.h (struct lm_info): Remove.
13358 (struct lm_info_base): New class.
13359 (struct so_list) <lm_info>: Change type to lm_info_base *.
13360 * nto-tdep.c (struct lm_info): Remove.
13361 (lm_addr): Adjust.
13362 * solib-aix.c (struct lm_info): Rename to ...
13363 (struct lm_info_aix): ... this. Extend lm_info_base.
13364 (lm_info_p): Rename to ...
13365 (lm_info_aix_p): ... this, and adjust.
13366 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
13367 solib_aix_parse_libraries, library_list_start_library,
13368 solib_aix_free_library_list, solib_aix_parse_libraries,
13369 solib_aix_get_library_list,
13370 solib_aix_relocate_section_addresses, solib_aix_free_so,
13371 solib_aix_get_section_offsets,
13372 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
13373 Adjust.
13374 (struct solib_aix_inferior_data) <library_list>: Adjust.
13375 * solib-darwin.c (struct lm_info): Rename to ...
13376 (struct lm_info_darwin): ... this. Extend lm_info_base.
13377 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
13378 * solib-dsbt.c (struct lm_info): Rename to ...
13379 (struct lm_info_dsbt): ... this. Extend lm_info_base.
13380 (struct dsbt_info) <main_executable_lm_info): Adjust.
13381 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
13382 dsbt_relocate_section_addresses): Adjust.
13383 * solib-frv.c (struct lm_info): Rename to ...
13384 (struct lm_info_frv): ... this. Extend lm_info_base.
13385 (main_executable_lm_info): Adjust.
13386 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
13387 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
13388 find_canonical_descriptor_in_load_object,
13389 frv_fdpic_find_canonical_descriptor): Adjust.
13390 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
13391 to lm_info_svr4.
13392 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
13393 svr4_clear_so, svr4_copy_library_list,
13394 library_list_start_library, svr4_default_sos, svr4_read_so_list,
13395 svr4_current_sos, svr4_fetch_objfile_link_map,
13396 solist_update_incremental): Adjust.
13397 * solib-svr4.h (struct lm_info_svr4): Move here from
13398 solib-svr4.c.
13399 * solib-target.c (struct lm_info): Rename to ...
13400 (struct lm_info_target): ... this. Extend lm_info_base.
13401 (lm_info_p): Rename to ...
13402 (lm_info_target_p): ... this.
13403 (solib_target_parse_libraries, library_list_start_segment,
13404 library_list_start_section, library_list_start_library,
13405 library_list_end_library, solib_target_free_library_list,
13406 solib_target_current_sos, solib_target_free_so,
13407 solib_target_relocate_section_addresses): Adjust.
13408 * windows-nat.c (struct lm_info): Rename to ...
13409 (struct lm_info_windows): ... this. Extend lm_info_base.
13410 (windows_make_so, handle_load_dll, handle_unload_dll,
13411 windows_xfer_shared_libraries): Adjust.
13412
13413 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13414
13415 * solib-darwin.c (struct darwin_so_list): Remove.
13416 (darwin_current_sos): Allocate an so_list object instead of a
13417 darwin_so_list, separately allocate an lm_info object.
13418 (darwin_free_so): Free lm_info.
13419
13420 2017-04-28 John Baldwin <jhb@FreeBSD.org>
13421
13422 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
13423 with fprintf_filtered.
13424
13425 2017-04-28 Yao Qi <yao.qi@linaro.org>
13426
13427 * regcache.c (regcache::regcache): New function.
13428 (regcache::~regcache): New function.
13429 (regcache_xmalloc_1): Remove.
13430 (regcache_xmalloc): Call new regcache.
13431 (regcache_xfree): Call delete regcache.
13432 (get_thread_arch_aspace_regcache): Call new regcache.
13433
13434 2017-04-28 Yao Qi <yao.qi@linaro.org>
13435
13436 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
13437 lwp instead of ptid_get_lwp.
13438
13439 2017-04-28 Yao Qi <yao.qi@linaro.org>
13440
13441 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
13442 lwp_info instead of getting from inferior_ptid.
13443
13444 2017-04-27 Keith Seitz <keiths@redhat.com>
13445
13446 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
13447 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
13448 (CV_CONVERSION_BADNESS): Define.
13449 (rank_one_type): Remove overly restrictive rvalue reference
13450 rank checks.
13451 Add cv-qualifier checks and subranks for type equality.
13452 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
13453 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
13454 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
13455
13456 2017-04-27 Simon Marchi <simon.marchi@ericsson.com>
13457
13458 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
13459 count when creating the object.
13460
13461 2017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
13462 Ulrich Weigand <uweigand@de.ibm.com>
13463
13464 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
13465 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
13466 is used in AIX.
13467 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
13468 (process_xcoff_symbol): Likewise.
13469 (scan_xcoff_symtab): Likewise.
13470
13471 2017-04-26 Alan Hayward <alan.hayward@arm.com>
13472
13473 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
13474 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
13475 (ia64_access_reg): Use get_frame_register_unsigned.
13476 (ia64_access_rse_reg): Likewise.
13477 (ia64_libunwind_frame_prev_register): Likewise.
13478
13479 2017-04-26 Jiong Wang <jiong.wang@arm.com>
13480
13481 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
13482 * gdbarch.c: Regenerated.
13483 * gdbarch.h: Regenerated.
13484 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
13485 visibility external.
13486 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
13487 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
13488 (enum cfa_how_kind): Move to ...
13489 (struct dwarf2_frame_state_reg_info): Likewise.
13490 (struct dwarf2_frame_state): Likewise.
13491 * dwarf2-frame.h: ... here.
13492 (dwarf2_frame_state_alloc_regs): New declaration.
13493 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
13494 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
13495
13496 2017-04-26 Alan Hayward <alan.hayward@arm.com>
13497
13498 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
13499 regcache_raw_read_unsigned.
13500 (xtensa_pseudo_register_write): Likewise.
13501
13502 2017-04-26 Alan Hayward <alan.hayward@arm.com>
13503
13504 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
13505 (nds32_pseudo_register_write): Likewise.
13506
13507 2017-04-25 Yao Qi <yao.qi@linaro.org>
13508
13509 * regcache.c (struct regcache) <readonly_p>: Change its type
13510 to bool.
13511 (regcache_xmalloc_1): Update parameter type and callers update.
13512
13513 2017-04-25 Yao Qi <yao.qi@linaro.org>
13514
13515 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
13516 set_gdbarch_wchar_bit.
13517 * arm-tdep.c (arm_gdbarch_init): Likewise.
13518
13519 2017-04-25 Pedro Alves <palves@redhat.com>
13520
13521 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
13522 (BothAreRelocatable, memcopy, memmove): Don't define.
13523 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
13524 macros.
13525
13526 2017-04-25 Pedro Alves <palves@redhat.com>
13527
13528 * common/common-defs.h: Include "common/poison.h".
13529 * common/function-view.h: (Not, Or, Requires): Move to traits.h
13530 and adjust.
13531 * common/poison.h: New file.
13532 * common/traits.h: Include <type_traits>.
13533 (Not, Or, Requires): New, moved from common/function-view.h.
13534
13535 2017-04-25 Pedro Alves <palves@redhat.com>
13536
13537 * breakpoint.h (struct breakpoint): In-class initialize all
13538 fields. Make boolean fields "bool".
13539 * breakpoint.c (init_raw_breakpoint_without_location): Remove
13540 memset call and initializations no longer necessary.
13541
13542 2017-04-25 Pedro Alves <palves@redhat.com>
13543
13544 * btrace.c (pt_btrace_insn_flags): Change parameter type to
13545 reference.
13546 (pt_btrace_insn): New function.
13547 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
13548
13549 2017-04-25 Pedro Alves <palves@redhat.com>
13550
13551 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
13552 "base" field and inherit from "bp_location" instead. Add
13553 non-default ctor.
13554 (allocate_location_exception): Use new non-default ctor.
13555 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
13556 (init_bp_location): Convert to ...
13557 (bp_location::bp_location): ... this new ctor, and remove memset
13558 call.
13559 (base_breakpoint_allocate_location): Use the new non-default ctor.
13560 * breakpoint.h (bp_location): Now a class. Declare default and
13561 non-default ctors. In-class initialize all members.
13562 (init_bp_location): Remove declaration.
13563
13564 2017-04-25 Pedro Alves <palves@redhat.com>
13565
13566 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
13567 assignment operator.
13568
13569 2017-04-24 Yao Qi <yao.qi@linaro.org>
13570
13571 * doublest.c (convert_doublest_to_floatformat): Call
13572 floatformat_totalsize_bytes.
13573
13574 2017-04-22 Tom Tromey <tom@tromey.com>
13575
13576 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
13577 ui_out_emit_list.
13578 * stack.c (print_frame): Use ui_out_emit_list.
13579 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
13580 ui_out_emit_list.
13581 * mi/mi-main.c (print_one_inferior)
13582 (mi_cmd_data_list_register_names)
13583 (mi_cmd_data_list_register_values, mi_cmd_list_features)
13584 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
13585 ui_out_emit_list.
13586 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
13587 (mi_output_solib_attribs): Use ui_out_emit_list,
13588 ui_out_emit_tuple.
13589 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
13590 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
13591 (mi_cmd_stack_list_args, list_args_or_locals): Use
13592 ui_out_emit_list.
13593 * disasm.c (do_assembly_only): Use ui_out_emit_list.
13594 * breakpoint.c (print_solib_event, output_thread_groups): Use
13595 ui_out_emit_list.
13596
13597 2017-04-22 Tom Tromey <tom@tromey.com>
13598
13599 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
13600 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
13601 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
13602
13603 2017-04-22 Tom Tromey <tom@tromey.com>
13604
13605 * tracepoint.c (tvariables_info_1)
13606 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
13607
13608 2017-04-22 Tom Tromey <tom@tromey.com>
13609
13610 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
13611 annotate_arg_emitter.
13612 * breakpoint.c (print_mention_watchpoint)
13613 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
13614 * annotate.h (struct annotate_arg_emitter): New.
13615
13616 2017-04-22 Tom Tromey <tom@tromey.com>
13617
13618 * record-btrace.c (record_btrace_insn_history)
13619 (record_btrace_insn_history_range, record_btrace_call_history)
13620 (record_btrace_call_history_range): Use ui_out_emit_tuple.
13621 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
13622 ui_out_emit_tuple.
13623 * stack.c (print_frame_info): Use ui_out_emit_tuple.
13624 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
13625 * skip.c (skip_info): Use ui_out_emit_tuple.
13626 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
13627 * progspace.c (print_program_space): Use ui_out_emit_tuple.
13628 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
13629 * osdata.c (info_osdata): Use ui_out_emit_tuple.
13630 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
13631 ui_out_emit_tuple.
13632 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
13633 (output_register, mi_cmd_data_read_memory)
13634 (mi_cmd_data_read_memory_bytes, mi_load_progress)
13635 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
13636 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
13637 Use ui_out_emit_tuple.
13638 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
13639 ui_out_emit_tuple.
13640 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
13641 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
13642 * linux-thread-db.c (info_auto_load_libthread_db): Use
13643 ui_out_emit_tuple.
13644 * inferior.c (print_inferior): Use ui_out_emit_tuple.
13645 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
13646 * disasm.c (do_mixed_source_and_assembly_deprecated)
13647 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
13648 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
13649 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
13650 * breakpoint.c (print_one_breakpoint_location)
13651 (print_one_breakpoint): Use ui_out_emit_tuple.
13652 * auto-load.c (print_script, info_auto_load_cmd): Use
13653 ui_out_emit_tuple.
13654 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
13655
13656 2017-04-21 Simon Marchi <simon.marchi@ericsson.com>
13657
13658 * thread.c (print_thread_info_1): Remove dead code.
13659
13660 2017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13661
13662 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
13663 GDB_SELF_TEST.
13664 * arm-tdep.c (selftests::arm_record_test): Likewise.
13665
13666 2017-04-21 Yao Qi <yao.qi@linaro.org>
13667
13668 * regcache.c (regcache_restore): Remove argument 2. Replace
13669 argument 3 with regcache. Get register status from
13670 src->register_status and get register contents from
13671 register_buffer (src, regnum).
13672 (regcache_cpy): Update.
13673
13674 2017-04-19 Pedro Alves <palves@redhat.com>
13675
13676 * gdbthread.h (thread): Add missing closing parenthesis in
13677 comment.
13678
13679 2017-04-19 Pedro Alves <palves@redhat.com>
13680
13681 * common/refcounted-object.h: New file.
13682 * gdbthread.h: Include "common/refcounted-object.h".
13683 (thread_info): Inherit from refcounted_object and add comments.
13684 (thread_info::incref, thread_info::decref)
13685 (thread_info::m_refcount): Delete.
13686 (thread_info::deletable): Use the refcounted_object::refcount()
13687 method.
13688 * inferior.c (current_inferior_): Add comment.
13689 (set_current_inferior): Increment/decrement refcounts.
13690 (prune_inferiors, remove_inferior_command): Skip inferiors marked
13691 not-deletable instead of comparing with the current inferior.
13692 (initialize_inferiors): Increment the initial inferior's refcount.
13693 * inferior.h (struct inferior): Forward declare.
13694 Include "common/refcounted-object.h".
13695 (current_inferior, set_current_inferior): Move declaration to
13696 before struct inferior's definition, and fix comment.
13697 (inferior): Inherit from refcounted_object. Add comments.
13698 * thread.c (switch_to_thread_no_regs): Reference the thread's
13699 inferior pointer directly instead of doing a ptid lookup.
13700 (switch_to_no_thread): New function.
13701 (switch_to_thread(thread_info *)): New function, factored out
13702 from ...
13703 (switch_to_thread(ptid_t)): ... this.
13704 (restore_current_thread): Delete.
13705 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
13706 fields, and add 'inf' field.
13707 (do_restore_current_thread_cleanup): Check whether old->inf is
13708 alive instead of looking up an inferior by ptid. Use
13709 switch_to_thread and switch_to_no_thread.
13710 (restore_current_thread_cleanup_dtor): Use old->inf directly
13711 instead of lookup up an inferior by id. Decref the inferior.
13712 Don't restore 'removable'.
13713 (make_cleanup_restore_current_thread): Same the inferior pointer
13714 in old, instead of the inferior number. Incref the inferior.
13715 Don't save/clear 'removable'.
13716
13717 2017-04-19 Pedro Alves <palves@redhat.com>
13718
13719 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13720 unittests/scoped_restore-selftests.c.
13721 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
13722 * common/scoped_restore.h (scoped_restore_base): Make "class".
13723 (scoped_restore_base::release): New public method.
13724 (scoped_restore_base::scoped_restore_base): New protected ctor.
13725 (scoped_restore_base::m_saved_var): New protected field.
13726 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
13727 scoped_restore_base base class instead of m_saved_var directly.
13728 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
13729 (scoped_restore_tmpl::scoped_restore_tmpl(const
13730 scoped_restore_tmpl<T>&)): Likewise.
13731 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
13732 method.
13733 (scoped_restore_tmpl::saved_var): New method.
13734 (scoped_restore_tmpl::m_saved_var): Delete.
13735 * inferior.h (inferior::detaching): Now a bool.
13736 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
13737 cleanup.
13738 * unittests/scoped_restore-selftests.c: New file.
13739
13740 2017-04-19 Pedro Alves <palves@redhat.com>
13741
13742 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
13743 Re-sort in alphabetic order.
13744
13745 2017-04-18 Pedro Alves <palves@redhat.com>
13746
13747 * xml-support.c (obstack_xml_printf): Delete.
13748 * xml-support.h (obstack_xml_printf): Delete.
13749
13750 2017-04-18 Pedro Alves <palves@redhat.com>
13751
13752 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
13753 vdebug, verror, body_text, start_element, end_element, name,
13754 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
13755 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
13756 is_xinclude>: Make private and add m_ prefix.
13757 (gdb_xml_parser::body_text): New method, based on ...
13758 (gdb_xml_body_text): ... this. Adjust.
13759 (gdb_xml_parser::vdebug): New method, based on ...
13760 (gdb_xml_debug): ... this. Adjust.
13761 (gdb_xml_parser::verror): New method, based on ...
13762 (gdb_xml_error): ... this. Adjust.
13763 (gdb_xml_parser::start_element): New method, based on ...
13764 (gdb_xml_start_element): ... this. Adjust.
13765 (gdb_xml_start_element_wrapper): Defer to
13766 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
13767 (gdb_xml_parser::end_element): New method, based on ...
13768 (gdb_xml_end_element_wrapper): ... this. Adjust.
13769 (gdb_xml_parser::~gdb_xml_parser): Adjust.
13770 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
13771 (gdb_xml_parser::use_dtd): New method, based on ...
13772 (gdb_xml_use_dtd): ... this. Adjust.
13773 (gdb_xml_parser::parse): New method, based on ...
13774 (gdb_xml_parse): ... this. Adjust.
13775 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
13776 (xinclude_start_include): Adjust to call the parser's name method.
13777 (xml_xinclude_default, xml_xinclude_start_doctype)
13778 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
13779 method.
13780 (xml_process_xincludes): Adjust to call parser methods.
13781 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
13782 declarations.
13783
13784 2017-04-18 Pedro Alves <palves@redhat.com>
13785
13786 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
13787 gdb::optional<std::string>.
13788 * xml-support.c: Include <string>.
13789 (scope_level::scope_level(scope_level &&))
13790 (scope_level::~scope_level): Delete.
13791 (scope_level::body): Now a std::string.
13792 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
13793 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
13794 parameter.
13795 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
13796 (xinclude_parsing_data::output): Now a std::string reference.
13797 (xinclude_start_include): Adjust.
13798 (xml_xinclude_default): Adjust.
13799 (xml_process_xincludes): Add 'output' parameter, and return bool.
13800 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
13801 and return bool.
13802 * xml-tdesc.c: Include <unordered_map> and <string>.
13803 (tdesc_xml_cache): Delete.
13804 (tdesc_xml_cache_s): Delete.
13805 (xml_cache): Now an std::unordered_map.
13806 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
13807 (target_fetch_description_xml): Change return type to
13808 gdb::optional<std::string>, and adjust.
13809 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
13810 (target_fetch_description_xml): Change return type to
13811 gdb::optional<std::string>.
13812
13813 2017-04-18 Pedro Alves <palves@redhat.com>
13814
13815 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13816 unittests/optional-selftests.c.
13817 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
13818 * unittests/optional-selftests.c: New file.
13819 * unittests/optional/assignment/1.cc: New file.
13820 * unittests/optional/assignment/2.cc: New file.
13821 * unittests/optional/assignment/3.cc: New file.
13822 * unittests/optional/assignment/4.cc: New file.
13823 * unittests/optional/assignment/5.cc: New file.
13824 * unittests/optional/assignment/6.cc: New file.
13825 * unittests/optional/assignment/7.cc: New file.
13826 * unittests/optional/cons/copy.cc: New file.
13827 * unittests/optional/cons/default.cc: New file.
13828 * unittests/optional/cons/move.cc: New file.
13829 * unittests/optional/cons/value.cc: New file.
13830 * unittests/optional/in_place.cc: New file.
13831 * unittests/optional/observers/1.cc: New file.
13832 * unittests/optional/observers/2.cc: New file.
13833
13834 2017-04-18 Pedro Alves <palves@redhat.com>
13835
13836 * common/gdb_optional.h: Include common/traits.h.
13837 (in_place_t): New type.
13838 (in_place): New constexpr variable.
13839 (optional::optional): Remove member initialization of
13840 m_instantiated.
13841 (optional::optional(in_place_t...)): New constructor.
13842 (optional::~optional): Use reset.
13843 (optional::optional(const optional&)): New.
13844 (optional::optional(const optional&&)): New.
13845 (optional::optional(T &)): New.
13846 (optional::optional(T &&)): New.
13847 (operator::operator=(const optional &)): New.
13848 (operator::operator=(optional &&)): New.
13849 (operator::operator= (const T &))
13850 (operator::operator= (T &&))
13851 (operator::emplace (Args &&... args)): Return a T&. Use reset.
13852 (operator::reset): New.
13853 (operator::m_instantiated):: Add in-class initializer.
13854 * common/traits.h: Include <type_traits>.
13855 (struct And): New types.
13856
13857 2017-04-18 Pedro Alves <palves@redhat.com>
13858
13859 * xml-support.c: Include <vector>.
13860 (scope_level::scope_level(const gdb_xml_element *))
13861 (scope_level::scope_level(scope_level&&)): New.
13862 (scope_level::~scope_level): New.
13863 (scope_level_s): Delete.
13864 (gdb_xml_parser::scopes): Now a std::vector.
13865 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
13866 Use std::vector.
13867 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
13868 scope cleanup code.
13869 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
13870 of the scopes member. Use std::vector::emplace_back.
13871
13872 2017-04-18 Pedro Alves <palves@redhat.com>
13873
13874 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
13875 a bool.
13876 (gdb_xml_end_element): Change type of first parameter.
13877 (gdb_xml_cleanup): Rename to ...
13878 (gdb_xml_parser::~gdb_xml_parser): ... this.
13879 (gdb_xml_create_parser_and_cleanup): Delete with ...
13880 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
13881 to this new ctor.
13882 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
13883 using gdb_xml_create_parser_and_cleanup.
13884 (xinclude_parsing_data): Add ctor/dtor.
13885 (xml_xinclude_cleanup): Delete.
13886 (xml_process_xincludes): Create a local xinclude_parsing_data
13887 instead of heap-allocating one. Create a local gdb_xml_parser
13888 instead of heap-allocating one with
13889 gdb_xml_create_parser_and_cleanup.
13890
13891 2017-04-18 John Baldwin <jhb@FreeBSD.org>
13892
13893 PR threads/20743
13894 * fbsd-nat.c (resume_one_thread_cb): Remove.
13895 (resume_all_threads_cb): Remove.
13896 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
13897 iterate_over_threads.
13898
13899 2017-04-17 Joel Brobecker <brobecker@adacore.com>
13900
13901 * NEWS: Create a new section for the next release branch.
13902 Rename the section of the current branch, now that it has
13903 been cut.
13904
13905 2017-04-17 Joel Brobecker <brobecker@adacore.com>
13906
13907 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
13908 * version.in: Bump version to 8.0.50.DATE-git.
13909
13910 2017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
13911
13912 PR gdb/21385
13913 * windows-nat.c (windows_create_inferior): Declare 'allargs'
13914 independently of the host, and fix build breakage on Cygwin.
13915
13916 2017-04-13 Pedro Alves <palves@redhat.com>
13917
13918 * inferior.c (free_inferior): Convert to ...
13919 (inferior::~inferior): ... this dtor.
13920 (inferior::inferior): New ctor, factored out from ...
13921 (add_inferior_silent): ... here. Allocate the inferior with a new
13922 expression.
13923 (delete_inferior): Call delete instead of free_inferior.
13924 * inferior.h (gdb_environ, continuation): Forward declare.
13925 (inferior): Now a class. Add in-class initialization to all
13926 members. Make boolean fields bool, except 'detaching'.
13927 (inferior::inferior): New explicit ctor.
13928 (inferior::~inferior): New.
13929
13930 2017-04-13 Pedro Alves <palves@redhat.com>
13931
13932 * inferior.c (init_inferior_list): Delete.
13933 * inferior.h (init_inferior_list): Delete.
13934
13935 2017-04-13 Pedro Alves <palves@redhat.com>
13936
13937 PR threads/13217
13938 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
13939 (top level): Call it twice, with different thread sets.
13940
13941 2017-04-13 Pedro Alves <palves@redhat.com>
13942
13943 * thread.c: Include <algorithm>.
13944 (thread_array_cleanup): Delete.
13945 (scoped_inc_dec_ref): New class.
13946 (live_threads_count): New function.
13947 (set_thread_refcount): Delete.
13948 (tp_array_compar_ascending): Now a bool.
13949 (tp_array_compar): Convert to a std::sort comparison function.
13950 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
13951 and live_threads_count.
13952
13953 2017-04-13 Pedro Alves <palves@redhat.com>
13954
13955 * infrun.c (follow_fork_inferior): Also switch the current
13956 inferior.
13957
13958 2017-04-13 Pedro Alves <palves@redhat.com>
13959
13960 * breakpoint.c (watch_command_1): Save watchpoint-frame info
13961 before calling create_internal_breakpoint.
13962
13963 2017-04-13 Pedro Alves <palves@redhat.com>
13964
13965 * fork-child.c (execv_argv): New class.
13966 (breakup_args): Refactored as ...
13967 (execv_argv::init_for_no_shell): .. this method of execv_argv.
13968 Copy arguments to storage and replace separators with NULL
13969 terminators in place.
13970 (escape_bang_in_quoted_argument): Adjust to return bool.
13971 (execv_argv::execv_argv): New ctor.
13972 (execv_argv::init_for_shell): New method, factored out from
13973 fork_inferior. Don't strdup strings into the vector.
13974 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
13975 Remove free_vector_argv call.
13976
13977 2017-04-13 Yao Qi <yao.qi@linaro.org>
13978
13979 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
13980 tdep->rx_psw_type.
13981
13982 2017-04-13 Yao Qi <yao.qi@linaro.org>
13983
13984 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
13985 * rx-tdep.c (rx_gdbarch_init): Likewise.
13986
13987 2017-04-13 Pedro Alves <palves@redhat.com>
13988
13989 * breakpoint.h (struct breakpoint): Reindent.
13990
13991 2017-04-13 Pedro Alves <palves@redhat.com>
13992
13993 * breakpoint.c (bp_location): Rename to ...
13994 (bp_locations): ... this. All references updated.
13995 (bp_location_count): Rename to ...
13996 (bp_locations_count): ... this. All references updated.
13997 (bp_location_placed_address_before_address_max): Rename to ...
13998 (bp_locations_placed_address_before_address_max): ... this. All
13999 references updated.
14000 (bp_location_shadow_len_after_address_max): Rename to ...
14001 (bp_locations_shadow_len_after_address_max): ... this. All
14002 references updated.
14003 (bp_location_compare_addrs): Rename to ...
14004 (bp_locations_compare_addrs): ... this. All references updated.
14005 (bp_location_compare):Rename to ...
14006 (bp_locations_compare): ... this. All references updated.
14007 (bp_location_target_extensions_update): Rename to ...
14008 (bp_locations_target_extensions_update): ... this. All references
14009 updated.
14010
14011 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
14012
14013 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
14014 * common/common.m4: Check headers 'termios.h', 'termio.h' and
14015 'sgtty.h'.
14016 * common/gdb_termios.h: New file, with parts of "terminal.h".
14017 * inflow.c: Include "gdb_termios.h".
14018 * ser-unix.c: Include "gdb_termios.h".
14019 * terminal.h: Move terminal-related defines to
14020 "common/gdb_termios.h".
14021
14022 2017-04-12 Tom Tromey <tom@tromey.com>
14023
14024 * probe.c (parse_probes): Update.
14025 * location.h (delete_event_location): Don't declare.
14026 (event_location_deleter::operator()): Update.
14027 * location.c (event_location_deleter::operator()): Rename from
14028 delete_event_location.
14029 * linespec.h (linespec_result) <location>: Change type to
14030 event_location_up.
14031 * linespec.c (canonicalize_linespec, event_location_to_sals)
14032 (decode_objc): Update.
14033 (linespec_result): Don't call delete_event_location.
14034 * breakpoint.c (create_breakpoints_sal)
14035 (bkpt_probe_create_sals_from_location)
14036 (strace_marker_create_sals_from_location): Update.
14037
14038 2017-04-12 Tom Tromey <tom@tromey.com>
14039
14040 * linespec.h (struct linespec_result): Add constructor and
14041 destructor.
14042 (init_linespec_result, destroy_linespec_result)
14043 (make_cleanup_destroy_linespec_result): Don't declare.
14044 * linespec.c (init_linespec_result): Remove.
14045 (linespec_result::~linespec_result): Rename from
14046 destroy_linespec_result. Update.
14047 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
14048 Remove.
14049 * breakpoint.c (create_breakpoint, break_range_command)
14050 (decode_location_default): Update.
14051 * ax-gdb.c (agent_command_1): Update.
14052
14053 2017-04-12 Tom Tromey <tom@tromey.com>
14054
14055 * remote.c (remote_download_tracepoint): Update.
14056 * python/py-breakpoint.c (bppy_get_location): Update.
14057 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
14058 (gdbscm_breakpoint_location): Update.
14059 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
14060 * breakpoint.h (struct breakpoint) <location, location_range_end>:
14061 Change type to event_location_up.
14062 * breakpoint.c (create_overlay_event_breakpoint)
14063 (create_longjmp_master_breakpoint)
14064 (create_std_terminate_master_breakpoint)
14065 (create_exception_master_breakpoint)
14066 (breakpoint_event_location_empty_p, print_breakpoint_location)
14067 (print_one_breakpoint_location, create_thread_event_breakpoint)
14068 (init_breakpoint_sal, create_breakpoint)
14069 (print_recreate_ranged_breakpoint, break_range_command)
14070 (init_ada_exception_breakpoint, say_where): Update.
14071 (base_breakpoint_dtor): Don't call delete_event_location.
14072 (bkpt_print_recreate, tracepoint_print_recreate)
14073 (dprintf_print_recreate, update_static_tracepoint)
14074 (breakpoint_re_set_default): Update.
14075
14076 2017-04-12 Tom Tromey <tom@tromey.com>
14077
14078 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
14079 type of "to_do". Update.
14080 (compute_stack_depth): Use std::vector.
14081
14082 2017-04-12 Tom Tromey <tom@tromey.com>
14083
14084 * printcmd.c (find_instruction_backward): Use std::vector.
14085
14086 2017-04-12 Tom Tromey <tom@tromey.com>
14087
14088 * symfile.c (objfilep): Remove typedef.
14089 (reread_symbols): Use a std::vector.
14090
14091 2017-04-12 Tom Tromey <tom@tromey.com>
14092
14093 * mi/mi-main.c (exec_direction_forward): Remove.
14094 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
14095 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
14096 scoped_restore.
14097 * guile/guile.c (guile_repl_command, guile_command)
14098 (gdbscm_execute_gdb_command): Use scoped_restore.
14099 * go-exp.y (go_parse): Use scoped_restore.
14100 * d-exp.y (d_parse): Use scoped_restore.
14101 * cli/cli-decode.c (cmd_func): Use scoped_restore.
14102 * c-exp.y (c_parse): Use scoped_restore.
14103
14104 2017-04-12 Tom Tromey <tom@tromey.com>
14105
14106 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
14107 (mi_parse): Update return type.
14108 (mi_parse_free): Remove.
14109 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
14110 (mi_parse::~mi_parse): Rename from mi_parse_free.
14111 (mi_parse_cleanup): Remove.
14112 (mi_parse): Return a unique_ptr. Use new.
14113 * mi/mi-main.c (mi_execute_command): Update.
14114
14115 2017-04-12 Tom Tromey <tom@tromey.com>
14116
14117 * location.c (explicit_location_lex_one): Return a
14118 unique_xmalloc_ptr.
14119 (string_to_explicit_location): Update. Remove cleanups.
14120
14121 2017-04-12 Tom Tromey <tom@tromey.com>
14122
14123 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
14124 (compare_value_and_voffset): Change type. Update.
14125 (compute_vtable_size): Change type of "offset_vec".
14126 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
14127 (gnuv3_get_typeid): Remove extraneous declaration.
14128
14129 2017-04-12 Tom Tromey <tom@tromey.com>
14130
14131 * charset.h (wchar_iterator): Fix comment.
14132
14133 2017-04-12 Tom Tromey <tom@tromey.com>
14134
14135 * charset.c (iconv_wrapper): New class.
14136 (cleanup_iconv): Remove.
14137 (convert_between_encodings): Use it.
14138
14139 2017-04-12 Tom Tromey <tom@tromey.com>
14140
14141 * symfile.h (increment_reading_symtab): Update type.
14142 * symfile.c (decrement_reading_symtab): Remove.
14143 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
14144 * psymtab.c (psymtab_to_symtab): Update.
14145 * dwarf2read.c (dw2_instantiate_symtab): Update.
14146
14147 2017-04-12 Tom Tromey <tom@tromey.com>
14148
14149 * jit.c (struct jit_reader): Declare separately. Add constructor
14150 and destructor. Change type of "handle".
14151 (loaded_jit_reader): Define separately.
14152 (jit_reader_load): Update. New "new".
14153 (jit_reader_unload_command): Use "delete".
14154 * gdb-dlfcn.h (struct dlclose_deleter): New.
14155 (gdb_dlhandle_up): New typedef.
14156 (gdb_dlopen, gdb_dlsym): Update types.
14157 (gdb_dlclose): Remove.
14158 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
14159 (gdb_dlsym): Change type of "handle".
14160 (make_cleanup_dlclose): Remove.
14161 (dlclose_deleter::operator()): Rename from gdb_dlclose.
14162 * compile/compile-c-support.c (load_libcc): Update.
14163
14164 2017-04-12 Tom Tromey <tom@tromey.com>
14165
14166 * symtab.h (find_pcs_for_symtab_line): Change return type.
14167 * symtab.c (find_pcs_for_symtab_line): Change return type.
14168 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
14169 type of "vec". Update.
14170 (ltpy_get_pcs_for_line): Update.
14171 * linespec.c (decode_digits_ordinary): Update.
14172
14173 2017-04-12 Tom Tromey <tom@tromey.com>
14174
14175 * tracepoint.c (actions_command): Update.
14176 * python/python.c (python_command, python_interactive_command):
14177 Update.
14178 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
14179 * guile/guile.c (guile_command): Update.
14180 * defs.h (read_command_lines, read_command_lines_1): Return
14181 command_line_up.
14182 (command_lines_deleter): New struct.
14183 (command_line_up): New typedef.
14184 * compile/compile.c (compile_code_command)
14185 (compile_print_command): Update.
14186 * cli/cli-script.h (get_command_line, copy_command_lines): Return
14187 command_line_up.
14188 (make_cleanup_free_command_lines): Remove.
14189 * cli/cli-script.c (get_command_line, read_command_lines_1)
14190 (copy_command_lines): Return command_line_up.
14191 (while_command, if_command, read_command_lines, define_command)
14192 (document_command): Update.
14193 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
14194 Remove.
14195 * breakpoint.h (breakpoint_set_commands): Change type of
14196 "commands".
14197 * breakpoint.c (breakpoint_set_commands): Change type of
14198 "commands". Update.
14199 (do_map_commands_command, update_dprintf_command_list)
14200 (create_tracepoint_from_upload): Update.
14201
14202 2017-04-12 Tom Tromey <tom@tromey.com>
14203
14204 * tracepoint.c (scope_info): Update.
14205 * spu-tdep.c (spu_catch_start): Update.
14206 * python/python.c (gdbpy_decode_line): Update.
14207 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
14208 * python/py-breakpoint.c (bppy_init): Update.
14209 * probe.c (parse_probes): Update.
14210 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
14211 * location.h (event_location_deleter): New struct.
14212 (event_location_up): New typedef.
14213 (new_linespec_location, new_address_location, new_probe_location)
14214 (new_explicit_location, copy_event_location)
14215 (string_to_event_location, string_to_event_location_basic)
14216 (string_to_explicit_location): Update return type.
14217 (make_cleanup_delete_event_location): Remove.
14218 * location.c (new_linespec_location, new_address_location)
14219 (new_probe_location, new_explicit_location, copy_event_location):
14220 Return event_location_up.
14221 (delete_event_location_cleanup)
14222 (make_cleanup_delete_event_location): Remove.
14223 (string_to_explicit_location, string_to_event_location_basic)
14224 (string_to_event_location): Return event_location_up.
14225 * linespec.c (canonicalize_linespec, event_location_to_sals)
14226 (decode_line_with_current_source)
14227 (decode_line_with_last_displayed, decode_objc): Update.
14228 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
14229 * completer.c (location_completer): Update.
14230 * cli/cli-cmds.c (edit_command, list_command): Update.
14231 * breakpoint.c (create_overlay_event_breakpoint)
14232 (create_longjmp_master_breakpoint)
14233 (create_std_terminate_master_breakpoint)
14234 (create_exception_master_breakpoint)
14235 (create_thread_event_breakpoint): Update.
14236 (init_breakpoint_sal): Update. Remove some dead code.
14237 (create_breakpoint_sal): Change type of "location". Update.
14238 (create_breakpoints_sal, create_breakpoint, break_command_1)
14239 (dprintf_command, break_range_command, until_break_command)
14240 (init_ada_exception_breakpoint)
14241 (strace_marker_create_sals_from_location)
14242 (update_static_tracepoint, trace_command, ftrace_command)
14243 (strace_command, create_tracepoint_from_upload): Update.
14244 * break-catch-throw.c (re_set_exception_catchpoint): Update.
14245 * ax-gdb.c (agent_command_1): Update.
14246
14247 2017-04-12 Pedro Alves <palves@redhat.com>
14248
14249 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
14250 * configure.tgt: Handle i[34567]86-*-go32* and
14251 i[34567]86-*-msdosdjgpp*.
14252 * i386-tdep.c (i386_svr4_reg_to_regnum):
14253 Make extern.
14254 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
14255 i386-go32-tdep.c.
14256 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
14257 * i386-go32-tdep.c: New file.
14258 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
14259 declarations.
14260
14261 2017-04-12 Simon Marchi <simon.marchi@ericsson.com>
14262
14263 * aix-thread.c (pd_status2str): Change return type to const char *.
14264
14265 2017-04-12 Pedro Alves <palves@redhat.com>
14266
14267 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
14268 calls to set_gdbarch_gnu_triplet_regexp.
14269
14270 2017-04-12 Pedro Alves <palves@redhat.com>
14271
14272 PR gdb/21323
14273 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
14274 New enum value.
14275 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
14276 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
14277 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
14278 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
14279 * gdbarch.h, gdbarch.c: Regenerate.
14280 * aarch64-tdep.c (aarch64_gdbarch_init): Override
14281 gdbarch_wchar_bit and gdbarch_wchar_signed.
14282 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
14283 * arm-tdep.c (arm_gdbarch_init): Likewise.
14284 * avr-tdep.c (avr_gdbarch_init): Likewise.
14285 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
14286 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
14287 * i386-tdep.c (i386_go32_init_abi): Likewise.
14288 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
14289 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
14290 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
14291 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
14292 * sh-tdep.c (sh_gdbarch_init): Likewise.
14293 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
14294 * sparc64-tdep.c (sparc64_init_abi): Likewise.
14295 * windows-tdep.c (windows_init_abi): Likewise.
14296 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
14297
14298 2017-04-12 Pedro Alves <palves@redhat.com>
14299
14300 PR c++/21323
14301 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
14302 cplus_primitive_type_char32_t>: New enum values.
14303 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
14304 and cplus_primitive_type_char32_t.
14305 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
14306 32, use the archtecture's built-in type for char16_t and char32_t,
14307 respectively. Otherwise, fallback to init_integer_type as before,
14308 but make the type unsigned, and issue a complaint.
14309 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
14310
14311 2017-04-12 Alan Hayward <alan.hayward@arm.com>
14312
14313 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
14314 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
14315
14316 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
14317
14318 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
14319 'const char *'.
14320
14321 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
14322
14323 * common/common-utils.c (free_vector_argv): New function.
14324 * common/common-utils.h: Include <vector>.
14325 (free_vector_argv): New prototype.
14326 * darwin-nat.c (darwin_create_inferior): Rewrite function
14327 prototype in order to constify "exec_file" and accept a
14328 "std::string" for "allargs".
14329 * fork-child.c: Include <vector>.
14330 (breakup_args): Rewrite function, using C++.
14331 (fork_inferior): Rewrite function header, constify "exec_file_arg"
14332 and accept "std::string" for "allargs". Update the code to
14333 calculate "argv" based on "allargs". Update calls to "exec_fun"
14334 and "execvp".
14335 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
14336 order to constify "exec_file" and accept a "std::string" for
14337 "allargs".
14338 * go32-nat.c (go32_create_inferior): Likewise.
14339 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
14340 * infcmd.c (run_command_1): Constify "exec_file". Use
14341 "std::string" for inferior arguments.
14342 * inferior.h (fork_inferior): Update prototype.
14343 * linux-nat.c (linux_nat_create_inferior): Rewrite function
14344 prototype in order to constify "exec_file" and accept a
14345 "std::string" for "allargs".
14346 * nto-procfs.c (procfs_create_inferior): Likewise.
14347 * procfs.c (procfs_create_inferior): Likewise.
14348 * remote-sim.c (gdbsim_create_inferior): Likewise.
14349 * remote.c (extended_remote_run): Update code to accept
14350 "std::string" as argument.
14351 (extended_remote_create_inferior): Rewrite function prototype in
14352 order to constify "exec_file" and accept a "std::string" for
14353 "allargs".
14354 * rs6000-nat.c (super_create_inferior): Likewise.
14355 (rs6000_create_inferior): Likewise.
14356 * target.h (struct target_ops) <to_create_inferior>: Likewise.
14357 * windows-nat.c (windows_create_inferior): Likewise.
14358
14359 2017-04-11 Pedro Alves <palves@redhat.com>
14360
14361 * thread.c: Fix whitespace throughout.
14362
14363 2017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
14364
14365 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
14366
14367 2017-04-11 Alan Hayward <alan.hayward@arm.com>
14368
14369 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
14370
14371 2017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
14372
14373 PR gdb/21364
14374 * osdata.c (info_osdata): Check if 'type' is an empty string
14375 instead of NULL.
14376
14377 2017-04-10 Pedro Alves <palves@redhat.com>
14378
14379 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
14380 (ptid_to_global_thread_id, in_thread_list)
14381 (do_captured_list_thread_ids, set_resumed, set_running)
14382 (set_executing, set_stop_requested, finish_thread_state)
14383 (validate_registers_access, can_access_registers_ptid)
14384 (print_thread_info_1, switch_to_thread)
14385 (do_restore_current_thread_cleanup)
14386 (make_cleanup_restore_current_thread, thread_command)
14387 (thread_name_command): Use operator== instead of ptid_equal.
14388
14389 2017-04-10 Pedro Alves <palves@redhat.com>
14390
14391 * thread.c (struct current_thread_cleanup) <next>: Delete field.
14392 (current_thread_cleanup_chain): Delete.
14393 (restore_current_thread_cleanup_dtor)
14394 (make_cleanup_restore_current_thread): Remove references to
14395 current_thread_cleanup_chain.
14396
14397 2017-04-10 Alan Hayward <alan.hayward@arm.com>
14398
14399 * msp430-tdep.c (msp430_pseudo_register_read): Never return
14400 REG_UNKNOWN.
14401
14402 2017-04-10 Yao Qi <yao.qi@linaro.org>
14403
14404 PR gdb/19942
14405 * gdbthread.h (thread_info::deletable): New method.
14406 (thread_info::incref): New method.
14407 (thread_info::decref): New method.
14408 (thread_info::refcount): Move it to private.
14409 * infrun.c (save_stop_context): Call inc_refcount.
14410 (release_stop_context_cleanup): Likewise.
14411 * thread.c (set_thread_exited): New function.
14412 (init_thread_list): Delete "tp" only it is deletable, otherwise
14413 call set_thread_exited.
14414 (delete_thread_1): Call set_thread_exited.
14415 (current_thread_cleanup) <inferior_pid>: Remove.
14416 <thread>: New field.
14417 (restore_current_thread_ptid_changed): Removed.
14418 (do_restore_current_thread_cleanup): Adjust.
14419 (restore_current_thread_cleanup_dtor): Don't call
14420 find_thread_ptid.
14421 (set_thread_refcount): Use dec_refcount.
14422 (make_cleanup_restore_current_thread): Adjust.
14423 (thread_apply_all_command): Call inc_refcount.
14424 (_initialize_thread): Don't call
14425 observer_attach_thread_ptid_changed.
14426
14427 2017-04-10 Yao Qi <yao.qi@linaro.org>
14428
14429 * thread.c (delete_thread_1): Hoist code on marking thread as
14430 exited.
14431
14432 2017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
14433
14434 * windows-nat.c (windows_detach): Initialize ptid with
14435 minus_one_ptid.
14436
14437 2017-04-07 Simon Marchi <simon.marchi@ericsson.com>
14438
14439 * unittests/ptid-selftests.c: Fix erroneous assert messages.
14440
14441 2017-04-07 Alan Hayward <alan.hayward@arm.com>
14442
14443 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
14444 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
14445 (bfin_pseudo_register_write): Likewise
14446
14447 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
14448
14449 * common/ptid.h (struct ptid): Change to...
14450 (class ptid_t): ... this.
14451 <ptid_t>: New constructors.
14452 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
14453 matches>: New methods.
14454 <make_null, make_minus_one>: New static methods.
14455 <pid>: Rename to...
14456 <m_pid>: ...this.
14457 <lwp>: Rename to...
14458 <m_lwp>: ...this.
14459 <tid>: Rename to...
14460 <m_tid>: ...this.
14461 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
14462 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
14463 as references, move comment to class ptid_t.
14464 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
14465 ptid_t static methods.
14466 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
14467 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
14468 Take ptid arguments as references, implement using ptid_t methods.
14469 * unittests/ptid-selftests.c: New file.
14470 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14471 unittests/ptid-selftests.c.
14472 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
14473
14474 2017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
14475
14476 * python/python.c (python_run_simple_file): Cast mode literal to
14477 non-const char pointer as expected by PyFile_FromString.
14478
14479 2017-04-05 Simon Marchi <simon.marchi@ericsson.com>
14480
14481 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
14482 minus_one_ptid and null_ptid.
14483
14484 2017-04-05 Pedro Alves <palves@redhat.com>
14485
14486 * warning.m4 (build_warnings): Remove -Wno-write-strings.
14487 * configure: Regenerate.
14488
14489 2017-04-05 Pedro Alves <palves@redhat.com>
14490
14491 * ada-exp.y (yyerror): Constify.
14492 * ada-lang.c (bound_name, get_selections)
14493 (ada_variant_discrim_type)
14494 (ada_variant_discrim_name, ada_value_struct_elt)
14495 (ada_lookup_struct_elt_type, is_unchecked_variant)
14496 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
14497 (catch_ada_exception_command_split)
14498 (catch_ada_assert_command_split, catch_assert_command)
14499 (ada_op_name): Constify.
14500 * ada-lang.h (ada_yyerror, get_selections)
14501 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
14502 * arc-tdep.c (arc_print_frame_cache): Constify.
14503 * arm-tdep.c (arm_skip_stub): Constify.
14504 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
14505 (gen_aggregate_elt_ref): Constify.
14506 * bcache.c (print_bcache_statistics): Constify.
14507 * bcache.h (print_bcache_statistics): Constify.
14508 * break-catch-throw.c (catch_exception_command_1):
14509 * breakpoint.c (struct ep_type_description::description):
14510 Constify.
14511 (add_solib_catchpoint): Constify.
14512 (catch_fork_command_1): Add cast.
14513 (add_catch_command): Constify.
14514 * breakpoint.h (add_catch_command, add_solib_catchpoint):
14515 Constify.
14516 * bsd-uthread.c (bsd_uthread_state): Constify.
14517 * buildsym.c (patch_subfile_names): Constify.
14518 * buildsym.h (next_symbol_text_func, patch_subfile_names):
14519 Constify.
14520 * c-exp.y (yyerror): Constify.
14521 (token::oper): Constify.
14522 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
14523 * c-varobj.c (cplus_describe_child): Constify.
14524 * charset.c (find_charset_names): Add cast.
14525 (find_charset_names): Constify array and add const_cast.
14526 * cli/cli-cmds.c (complete_command, cd_command): Constify.
14527 (edit_command): Constify.
14528 * cli/cli-decode.c (lookup_cmd): Constify.
14529 * cli/cli-dump.c (dump_memory_command, dump_value_command):
14530 Constify.
14531 (struct dump_context): Constify.
14532 (add_dump_command, restore_command): Constify.
14533 * cli/cli-script.c (get_command_line): Constify.
14534 * cli/cli-script.h (get_command_line): Constify.
14535 * cli/cli-utils.c (check_for_argument): Constify.
14536 * cli/cli-utils.h (check_for_argument): Constify.
14537 * coff-pe-read.c (struct read_pe_section_data): Constify.
14538 * command.h (lookup_cmd): Constify.
14539 * common/print-utils.c (decimal2str): Constify.
14540 * completer.c (gdb_print_filename): Constify.
14541 * corefile.c (set_gnutarget): Constify.
14542 * cp-name-parser.y (yyerror): Constify.
14543 * cp-valprint.c (cp_print_class_member): Constify.
14544 * cris-tdep.c (cris_register_name, crisv32_register_name):
14545 Constify.
14546 * d-exp.y (yyerror): Constify.
14547 (struct token::oper): Constify.
14548 * d-lang.h (d_yyerror): Constify.
14549 * dbxread.c (struct header_file_location::name): Constify.
14550 (add_old_header_file, add_new_header_file, last_function_name)
14551 (dbx_next_symbol_text, add_bincl_to_list)
14552 (find_corresponding_bincl_psymtab, set_namestring)
14553 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
14554 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
14555 * defs.h (command_line_input, print_address_symbolic)
14556 (deprecated_readline_begin_hook): Constify.
14557 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
14558 Constify.
14559 * event-top.c (handle_line_of_input): Constify and add cast.
14560 * exceptions.c (catch_errors): Constify.
14561 * exceptions.h (catch_errors): Constify.
14562 * expprint.c (print_subexp_standard, op_string, op_name)
14563 (op_name_standard, dump_raw_expression, dump_raw_expression):
14564 * expression.h (op_name, op_string, dump_raw_expression):
14565 Constify.
14566 * f-exp.y (yyerror): Constify.
14567 (struct token::oper): Constify.
14568 (struct f77_boolean_val::name): Constify.
14569 * f-lang.c (f_word_break_characters): Constify.
14570 * f-lang.h (f_yyerror): Constify.
14571 * fork-child.c (fork_inferior): Add cast.
14572 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
14573 (new_variant): Constify.
14574 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
14575 * gdbarch.c: Regenerate.
14576 * gdbcore.h (set_gnutarget): Constify.
14577 * go-exp.y (yyerror): Constify.
14578 (token::oper): Constify.
14579 * go-lang.h (go_yyerror): Constify.
14580 * go32-nat.c (go32_sysinfo): Constify.
14581 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
14582 * guile/scm-cmd.c (cmdscm_function): Constify.
14583 * guile/scm-param.c (pascm_param_value): Constify.
14584 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
14585 (h8300sx_register_name): Constify.
14586 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
14587 Constify.
14588 * ia64-tdep.c (ia64_register_names): Constify.
14589 * infcmd.c (construct_inferior_arguments): Constify.
14590 (path_command, attach_post_wait): Constify.
14591 * language.c (show_range_command, show_case_command)
14592 (unk_lang_error): Constify.
14593 * language.h (language_defn::la_error)
14594 (language_defn::la_name_of_this): Constify.
14595 * linespec.c (decode_line_2): Constify.
14596 * linux-thread-db.c (thread_db_err_str): Constify.
14597 * lm32-tdep.c (lm32_register_name): Constify.
14598 * m2-exp.y (yyerror): Constify.
14599 * m2-lang.h (m2_yyerror): Constify.
14600 * m32r-tdep.c (m32r_register_names): Constify and make static.
14601 * m68hc11-tdep.c (m68hc11_register_names): Constify.
14602 * m88k-tdep.c (m88k_register_name): Constify.
14603 * macroexp.c (appendmem): Constify.
14604 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
14605 (upgrade_type, parse_external, parse_partial_symbols)
14606 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
14607 (new_symbol): Constify.
14608 * memattr.c (mem_info_command): Constify.
14609 * mep-tdep.c (register_name_from_keyword): Constify.
14610 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
14611 Constify.
14612 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
14613 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
14614 * mi/mi-main.c (captured_mi_execute_command): Constify and add
14615 cast.
14616 (mi_execute_async_cli_command): Constify.
14617 * mips-tdep.c (mips_register_name): Constify.
14618 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
14619 (am33_register_name, am33_2_register_name)
14620 * moxie-tdep.c (moxie_register_names): Constify.
14621 * nat/linux-osdata.c (osdata_type): Constify fields.
14622 * nto-tdep.c (nto_parse_redirection): Constify.
14623 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
14624 (lookup_child_selector): Constify.
14625 (objc_methcall::name): Constify.
14626 * objc-lang.h (lookup_objc_class, lookup_child_selector)
14627 (lookup_struct_typedef): Constify.
14628 * objfiles.c (pc_in_section): Constify.
14629 * objfiles.h (pc_in_section): Constify.
14630 * p-exp.y (struct token::oper): Constify.
14631 (yyerror): Constify.
14632 * p-lang.h (pascal_yyerror): Constify.
14633 * parser-defs.h (op_name_standard): Constify.
14634 (op_print::string): Constify.
14635 (exp_descriptor::op_name): Constify.
14636 * printcmd.c (print_address_symbolic): Constify.
14637 * psymtab.c (print_partial_symbols): Constify.
14638 * python/py-breakpoint.c (stop_func): Constify.
14639 (bppy_get_expression): Constify.
14640 * python/py-cmd.c (cmdpy_completer::name): Constify.
14641 (cmdpy_function): Constify.
14642 * python/py-event.c (evpy_add_attribute)
14643 (gdbpy_initialize_event_generic): Constify.
14644 * python/py-event.h (evpy_add_attribute)
14645 (gdbpy_initialize_event_generic): Constify.
14646 * python/py-evts.c (add_new_registry): Constify.
14647 * python/py-finishbreakpoint.c (outofscope_func): Constify.
14648 * python/py-framefilter.c (get_py_iter_from_func): Constify.
14649 * python/py-inferior.c (get_buffer): Add cast.
14650 * python/py-param.c (parm_constant::name): Constify.
14651 * python/py-unwind.c (fprint_frame_id): Constify.
14652 * python/python.c (gdbpy_parameter_value): Constify.
14653 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
14654 * remote.c (memory_packet_config::name): Constify.
14655 (show_packet_config_cmd, remote_write_bytes)
14656 (remote_buffer_add_string):
14657 * reverse.c (exec_reverse_once): Constify.
14658 * rs6000-tdep.c (variant::name, variant::description): Constify.
14659 * rust-exp.y (rustyyerror): Constify.
14660 * rust-lang.c (rust_op_name): Constify.
14661 * rust-lang.h (rustyyerror): Constify.
14662 * serial.h (serial_ops::name): Constify.
14663 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
14664 (sh_sh3e_register_name, sh_sh2e_register_name)
14665 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
14666 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
14667 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
14668 (sh_sh4al_dsp_register_name): Constify.
14669 * sh64-tdep.c (sh64_register_name): Constify.
14670 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
14671 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
14672 * stabsread.c (patch_block_stabs, read_type_number)
14673 (ref_map::stabs, ref_add, process_reference)
14674 (symbol_reference_defined, define_symbol, define_symbol)
14675 (error_type, read_type, read_member_functions, read_cpp_abbrev)
14676 (read_one_struct_field, read_struct_fields, read_baseclasses)
14677 (read_tilde_fields, read_struct_type, read_array_type)
14678 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
14679 (read_huge_number, read_range_type, read_args, common_block_start)
14680 (find_name_end): Constify.
14681 * stabsread.h (common_block_start, define_symbol)
14682 (process_one_symbol, symbol_reference_defined, ref_add):
14683 * symfile.c (get_section_index, add_symbol_file_command):
14684 * symfile.h (get_section_index): Constify.
14685 * target-descriptions.c (tdesc_type::name): Constify.
14686 (tdesc_free_type): Add cast.
14687 * target.c (find_default_run_target):
14688 (add_deprecated_target_alias, find_default_run_target)
14689 (target_announce_detach): Constify.
14690 (do_option): Constify.
14691 * target.h (add_deprecated_target_alias): Constify.
14692 * thread.c (print_thread_info_1): Constify.
14693 * top.c (deprecated_readline_begin_hook, command_line_input):
14694 Constify.
14695 (init_main): Add casts.
14696 * top.h (handle_line_of_input): Constify.
14697 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
14698 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
14699 (tfind_command): Rename to ...
14700 (tfind_command_1): ... this and constify.
14701 (tfind_command): New function.
14702 (tfind_end_command, tfind_start_command): Adjust.
14703 (encode_source_string): Constify.
14704 * tracepoint.h (encode_source_string): Constify.
14705 * tui/tui-data.c (tui_partial_win_by_name): Constify.
14706 * tui/tui-data.h (tui_partial_win_by_name): Constify.
14707 * tui/tui-source.c (tui_set_source_content_nil): Constify.
14708 * tui/tui-source.h (tui_set_source_content_nil): Constify.
14709 * tui/tui-win.c (parse_scrolling_args): Constify.
14710 * tui/tui-windata.c (tui_erase_data_content): Constify.
14711 * tui/tui-windata.h (tui_erase_data_content): Constify.
14712 * tui/tui-winsource.c (tui_erase_source_content): Constify.
14713 * tui/tui.c (tui_enable): Add cast.
14714 * utils.c (defaulted_query): Constify.
14715 (init_page_info): Add cast.
14716 (puts_debug, subset_compare): Constify.
14717 * utils.h (subset_compare): Constify.
14718 * varobj.c (varobj_format_string): Constify.
14719 * varobj.h (varobj_format_string): Constify.
14720 * vax-tdep.c (vax_register_name): Constify.
14721 * windows-nat.c (windows_detach): Constify.
14722 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
14723 * xml-support.c (gdb_xml_end_element): Constify.
14724 * xml-tdesc.c (tdesc_start_reg): Constify.
14725 * xstormy16-tdep.c (xstormy16_register_name): Constify.
14726 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
14727 * xtensa-tdep.h (xtensa_register_t::name): Constify.
14728
14729 2017-04-05 Pedro Alves <palves@redhat.com>
14730
14731 * proc-api.c (struct trans): Constify.
14732 (procfs_note): Constify.
14733 * proc-events.c (struct trans, syscall_table):
14734 * proc-flags.c (struct trans): Constify.
14735 * proc-utils.h (procfs_note): Constify.
14736 * proc-why.c (struct trans): Constify.
14737 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
14738 (procfs_detach): Constify.
14739 * sol-thread.c (struct string_map): Constify.
14740 (td_err_string, td_state_string): Constify.
14741
14742 2017-04-05 Pedro Alves <palves@redhat.com>
14743
14744 * proc-api.c (procfs_filename): Don't initialize
14745 procfs_filename.
14746 (prepare_to_trace): Assume procfs_filename is non-NULL.
14747 (_initialize_proc_api): Give procfs_filename a default value here.
14748
14749 2017-04-05 Pedro Alves <palves@redhat.com>
14750
14751 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
14752 'cond_string' parameter.
14753 (extract_exception_regexp): Constify 'string' parameter.
14754 (catch_exception_command_1): Constify.
14755 * breakpoint.c (init_catchpoint)
14756 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
14757 parameter.
14758 (ep_parse_optional_if_clause, catch_fork_command_1)
14759 (catch_exec_command_1): Constify.
14760 * breakpoint.h (init_catchpoint): Constify 'cond_string'
14761 parameter.
14762 (ep_parse_optional_if_clause): Constify.
14763 * cli/cli-utils.c (remove_trailing_whitespace)
14764 (check_for_argument): Constify.
14765 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
14766 non-const overload.
14767 (check_for_argument): Likewise.
14768
14769 2017-04-05 Pedro Alves <palves@redhat.com>
14770
14771 * event-top.c (command_line_handler): Add cast to execute_command
14772 call.
14773 * record-btrace.c (cmd_record_btrace_bts_start)
14774 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
14775 (cmd_record_btrace_start): Add cast to execute_command call.
14776 * record-full.c (record_full_goto_insn):
14777 * record.c (record_start, record_stop): Add cast to
14778 execute_command_to_string calls.
14779 (cmd_record_start): Add cast to execute_command calls.
14780
14781 2017-04-05 Pedro Alves <palves@redhat.com>
14782
14783 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
14784 static inline function.
14785 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
14786 array and use gdb_PyArg_ParseTupleAndKeywords.
14787 * python/py-cmd.c (cmdpy_init): Likewise.
14788 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
14789 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
14790 (infpy_search_memory): Likewise.
14791 * python/py-objfile.c (objfpy_add_separate_debug_file)
14792 (gdbpy_lookup_objfile): Likewise.
14793 * python/py-symbol.c (gdbpy_lookup_symbol)
14794 (gdbpy_lookup_global_symbol): Likewise.
14795 * python/py-type.c (gdbpy_lookup_type): Likewise.
14796 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
14797 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
14798 Likewise.
14799
14800 2017-04-05 Pedro Alves <palves@redhat.com>
14801
14802 * python/python-internal.h (gdb_PyGetSetDef): New type.
14803 * python/py-block.c (block_object_getset)
14804 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
14805 * python/py-event.c (event_object_getset)
14806 (finish_breakpoint_object_getset): Likewise.
14807 * python/py-inferior.c (inferior_object_getset): Likewise.
14808 * python/py-infthread.c (thread_object_getset): Likewise.
14809 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
14810 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
14811 * python/py-objfile.c (objfile_getset): Likewise.
14812 * python/py-progspace.c (pspace_getset): Likewise.
14813 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
14814 Likewise.
14815 * python/py-record.c (recpy_record_getset): Likewise.
14816 * python/py-symbol.c (symbol_object_getset): Likewise.
14817 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
14818 Likewise.
14819 * python/py-type.c (type_object_getset, field_object_getset):
14820 Likewise.
14821 * python/py-value.c (value_object_getset): Likewise.
14822
14823 2017-04-05 Pedro Alves <palves@redhat.com>
14824
14825 * python/python-internal.h (gdb_PyObject_CallMethod)
14826 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
14827 New functions.
14828 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
14829 (PySys_GetObject, PySys_SetPath): New macros.
14830
14831 2017-04-05 Pedro Alves <palves@redhat.com>
14832
14833 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
14834 info_osdata_command.
14835 * osdata.c (info_osdata_command): Rename to ...
14836 (info_osdata): ... this. Constify 'type' parameter, and remove
14837 the 'from_tty' parameter. Accept NULL TYPE.
14838 (info_osdata_command): New function.
14839 * osdata.h (info_osdata_command): Remove declaration.
14840 (info_osdata): New declaration.
14841
14842 2017-04-05 Pedro Alves <palves@redhat.com>
14843
14844 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
14845 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
14846 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
14847 parameter.
14848 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
14849 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
14850 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
14851 parameter.
14852 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
14853 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
14854 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
14855 (mi_cmd_file_list_exec_source_files)
14856 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
14857 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
14858 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
14859 parameter.
14860 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
14861 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
14862 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
14863 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
14864 (mi_cmd_stack_info_frame): Constify 'command' parameter.
14865 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
14866 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
14867 'command' parameter.
14868 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
14869 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
14870 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
14871 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
14872 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
14873 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
14874 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
14875 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
14876 (mi_cmd_var_set_update_range): Constify 'command' parameter.
14877 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
14878 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
14879 parameter.
14880 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
14881 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
14882 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
14883 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
14884 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
14885 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
14886 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
14887 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
14888 (mi_cmd_data_list_changed_registers)
14889 (mi_cmd_data_write_register_values)
14890 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
14891 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
14892 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
14893 (mi_cmd_list_features, mi_cmd_list_target_features)
14894 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
14895 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
14896 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
14897 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
14898 (mi_cmd_trace_frame_collected): Constify 'command'
14899 parameter.
14900 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
14901 'command' parameter.
14902
14903 2017-04-05 Pedro Alves <palves@redhat.com>
14904
14905 * ada-lang.c (ada_completer_word_break_characters): Now a const
14906 array.
14907 (ada_get_gdb_completer_word_break_characters): Constify.
14908 * completer.c (gdb_completer_command_word_break_characters)
14909 (gdb_completer_file_name_break_characters)
14910 (gdb_completer_quote_characters): Now const arrays.
14911 (get_gdb_completer_quote_characters): Constify.
14912 (set_rl_completer_word_break_characters): New function.
14913 (set_gdb_completion_word_break_characters)
14914 (complete_line_internal): Use it.
14915 * completer.h (get_gdb_completer_quote_characters): Constify.
14916 (set_rl_completer_word_break_characters): Declare.
14917 * f-lang.c (f_word_break_characters): Constify.
14918 * language.c (default_word_break_characters): Constify.
14919 * language.h (language_defn::la_word_break_characters): Constify.
14920 (default_word_break_characters): Constify.
14921 * top.c (init_main): Use set_rl_completer_word_break_characters.
14922
14923 2017-04-05 Pedro Alves <palves@redhat.com>
14924
14925 * aix-thread.c (aix_thread_pid_to_str)
14926 (aix_thread_extra_thread_info): Constify.
14927 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
14928 * bsd-uthread.c (bsd_uthread_extra_thread_info)
14929 (bsd_uthread_pid_to_str): Constify.
14930 * corelow.c (core_pid_to_str): Constify.
14931 * darwin-nat.c (darwin_pid_to_str): Constify.
14932 * fbsd-nat.c (fbsd_pid_to_str): Constify.
14933 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
14934 Constify.
14935 * gnu-nat.c (gnu_pid_to_str): Constify.
14936 * go32-nat.c (go32_pid_to_str): Constify.
14937 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
14938 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
14939 * inferior.c (inferior_pid_to_str): Constify.
14940 * linux-nat.c (linux_nat_pid_to_str): Constify.
14941 * linux-tdep.c (linux_core_pid_to_str): Constify.
14942 * linux-thread-db.c (thread_db_pid_to_str)
14943 (thread_db_extra_thread_info): Constify.
14944 * nto-tdep.c (nto_extra_thread_info): Constify.
14945 * nto-tdep.h (nto_extra_thread_info): Constify.
14946 * obsd-nat.c (obsd_pid_to_str): Constify.
14947 * procfs.c (procfs_pid_to_str): Constify.
14948 * ravenscar-thread.c (ravenscar_extra_thread_info)
14949 (ravenscar_pid_to_str): Constify.
14950 * remote-sim.c (gdbsim_pid_to_str): Constify.
14951 * remote.c (remote_threads_extra_info, remote_pid_to_str):
14952 Constify.
14953 * sol-thread.c (solaris_pid_to_str): Constify.
14954 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
14955 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
14956 * target.c (default_pid_to_str, target_pid_to_str)
14957 (normal_pid_to_str, default_pid_to_str): Constify.
14958 * target.h (target_ops::to_pid_to_str)
14959 (target_ops::to_extra_thread_info): Constify.
14960 (target_pid_to_str, normal_pid_to_str): Constify.
14961 * windows-nat.c (windows_pid_to_str): Constify.
14962 * gdbarch.sh (core_pid_to_str): Constify.
14963 * target-delegates.c: Regenerate.
14964 * gdbarch.h, gdbarch.c: Regenerate.
14965
14966 2017-04-05 Pedro Alves <palves@redhat.com>
14967
14968 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
14969 the memory of the temporary warning_pre_print override.
14970 * utils.c (warning_pre_print): Constify.
14971 * utils.h (warning_pre_print): Constify.
14972
14973 2017-04-05 Pedro Alves <palves@redhat.com>
14974
14975 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
14976 (shell_command): New function.
14977 (make_command): Use std::string.
14978 (init_cli_cmds): Register shell_command instead of shell_escape.
14979
14980 2017-04-05 Pedro Alves <palves@redhat.com>
14981
14982 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
14983 * tracepoint.c (default_collect): Don't initialize.
14984
14985 2017-04-05 Pedro Alves <palves@redhat.com>
14986
14987 * macroexp.c (macro_buffer::shared): Now a bool.
14988 (init_buffer): Update.
14989 (init_shared_buffer): Constify 'addr' parameter.
14990 (substitute_args, expand, macro_expand, macro_expand_next): Remove
14991 casts.
14992
14993 2017-04-05 Pedro Alves <palves@redhat.com>
14994
14995 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
14996 * disasm.c (set_disassembler_options): Constify local.
14997 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
14998
14999 2017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
15000
15001 PR gdb/21352
15002 * tracefile.c (tsave_command): Fix argument parsing for '-r'
15003 option.
15004
15005 2017-04-05 Yao Qi <yao.qi@linaro.org>
15006
15007 * frame.c (frame_unwind_register_unsigned): Call
15008 frame_unwind_register_value.
15009
15010 2017-04-05 Yao Qi <yao.qi@linaro.org>
15011
15012 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
15013 Use gdb_test_multiple, and don't match anchor.
15014
15015 2017-04-05 Pedro Alves <palves@redhat.com>
15016
15017 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
15018 (Write After Approval): Remove Simon Marchi.
15019
15020 2017-04-05 Pedro Alves <palves@redhat.com>
15021
15022 * common/gdb_optional.h (optional::optional): Make constexpr and
15023 initialize m_dummy.
15024
15025 2017-04-04 John Baldwin <jhb@FreeBSD.org>
15026
15027 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
15028 (amd64fbsd_jmp_buf_reg_offset): Remove.
15029 (amd64fbsd_supply_uthread): Remove function.
15030 (amd64fbsd_collect_uthread): Remove function.
15031 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
15032 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
15033 (x86_64-*-freebsd*): Remove bsd-uthread.o.
15034 (fbsd-nat.c): Update comment.
15035 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
15036 (i386fbsd_jmp_buf_reg_offset): Remove.
15037 (i386fbsd_supply_uthread): Remove function.
15038 (i386fbsd_collect_uthread): Remove function.
15039 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
15040
15041 2017-04-04 John Baldwin <jhb@FreeBSD.org>
15042
15043 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
15044 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
15045 * NEWS: Mention that support for FreeBSD/alpha was removed.
15046 * alpha-fbsd-tdep.c: Delete file.
15047 * config/alpha/fbsd.mh: Delete file.
15048 * configure.host: Delete alpha*-*-freebsd* and
15049 alpha*-*-kfreebsd*-gnu.
15050 * configure.tgt: Delete alpha*-*-freebsd* and
15051 alpha*-*-kfreebsd*-gnu.
15052
15053 2017-04-04 John Baldwin <jhb@FreeBSD.org>
15054
15055 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
15056 amd64bsd_store_inferior_registers): Use ptid from regcache.
15057
15058 2017-04-04 Pedro Alves <palves@redhat.com>
15059
15060 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
15061 data fields, make them private and add "m_" prefixes.
15062 (lnp_state_machine::lnp_state_machine): New ctor.
15063 (record_line, check_line_address, handle_set_discriminator)
15064 (handle_set_address, handle_advance_pc, handle_special_opcode)
15065 (handle_advance_line, handle_set_file, handle_negate_stmt)
15066 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
15067 (end_sequence, advance_line): New methods.
15068 (m_gdbarch, m_record_lines_p): New fields.
15069 (lnp_reader_state): Delete.
15070 (dwarf_record_line): Rename to ...
15071 (lnp_state_machine::record_line): ... adjust.
15072 (init_lnp_state_machine): Delete.
15073 (lnp_state_machine::lnp_state_machine): New.
15074 (check_line_address): Rename to ...
15075 (lnp_state_machine::check_line_address): This.
15076 (dwarf_decode_lines_1): Remove reference to "reader_state".
15077 Adjust lnp_state_machine having a non-default ctor. Use bool.
15078 State machine internal state manipulation moved to
15079 lnp_state_machine methods.
15080
15081 2017-04-04 Pedro Alves <palves@redhat.com>
15082
15083 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
15084 unittests/offset-type-selftests.c.
15085 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
15086 * common/offset-type.h: New file.
15087 * common/preprocessor.h: New file.
15088 * common/traits.h: New file.
15089 * common/valid-expr.h: New file.
15090 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
15091 sect_offset and cu_offset strong typedefs throughout.
15092 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
15093 typedefs throughout.
15094 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
15095 sect_offset and cu_offset strong typedefs throughout.
15096 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
15097 typedefs throughout.
15098 * gdbtypes.h: Include "common/offset-type.h".
15099 (cu_offset): Now an offset type (strong typedef) instead of a
15100 struct.
15101 (sect_offset): Likewise.
15102 (union call_site_parameter_u): Rename "param_offset" field to
15103 "param_cu_off".
15104 * unittests/offset-type-selftests.c: New file.
15105
15106 2017-04-04 Pedro Alves <palves@redhat.com>
15107
15108 * common/underlying.h: New file.
15109 * dwarf2read.c: Include "common/gdb_optional.h" and
15110 "common/underlying.h".
15111 (dir_index, file_name_index): New types.
15112 (file_entry): Use them.
15113 (file_entry::include): Use to_underlying.
15114 (line_header::add_file_name): Use dir_index.
15115 (read_formatted_entries): Use gdb::optional. Read form before
15116 writting to file_entry.
15117 (dwarf_decode_line_header): Use dir_index.
15118 (lnp_state_machine::current_file): Use to_underlying.
15119 (lnp_state_machine::file): Change type to file_name_index.
15120 (dwarf_record_line): Use to_underlying.
15121 (init_lnp_state_machine): Use file_name_index.
15122 (dwarf_decode_lines_1): Use dir_index and file_name_index.
15123
15124 2017-04-04 Pedro Alves <palves@redhat.com>
15125
15126 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
15127 operator bool, has_value and get methods.
15128
15129 2017-04-04 Pedro Alves <palves@redhat.com>
15130
15131 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
15132 fields.
15133 (line_header): Initialize all data fields. Change type of
15134 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
15135 Change type of include_dirs to std::vector<const char *>. Remove
15136 num_include_dirs, include_dirs_size. Change type of file_names to
15137 std::vector<file_entry>. Remove num_file_names, file_names_size.
15138 (line_header::line_header): New.
15139 (line_header::add_include_dir, line_header::add_file_name): New
15140 methods.
15141 (line_header::include_dir_at): Remove NULL check.
15142 (line_header::file_name_at): Add const overload.
15143 (line_header_up): New unique_ptr typedef.
15144 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
15145 std::vector. Remove free_line_header call.
15146 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
15147 free_line_header call.
15148 (free_cu_line_header): Delete.
15149 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
15150 (setup_type_unit_groups): Use line_header_up instead of cleanups.
15151 Adjust to use std::vector.
15152 (free_line_header): Delete.
15153 (free_line_header_voidp): Use delete.
15154 (add_include_dir): Replace with ...
15155 (line_header::add_include_dir): ... this method. Use std::vector.
15156 (add_file_name): Replace with ...
15157 (line_header::add_file_name): ... this method. Use std::vector.
15158 (add_include_dir_stub): Delete.
15159 (read_formatted_entries): Remove memset.
15160 (dwarf_decode_line_header): Return a line_header_up instead of a
15161 raw pointer. Remove cleanup handling. Pass lambdas to
15162 read_formatted_entries. Adjust to use line_header methods.
15163 (dwarf_decode_lines_1): Adjust to use line_header methods.
15164 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
15165 use std::vector.
15166
15167 2017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
15168
15169 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
15170 instead of struct ptid.
15171
15172 2017-05-04 Alan Hayward <alan.hayward@arm.com>
15173
15174 * frame.c (get_frame_register_bytes): Unwind using value.
15175 (put_frame_register_bytes): Likewise.
15176
15177 2017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
15178
15179 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
15180 aggregate-like.
15181
15182 2017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
15183
15184 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
15185
15186 2017-03-29 Yao Qi <yao.qi@linaro.org>
15187
15188 * gdbthread.h (struct thread_info): Declare constructor and
15189 destructor. Add some in-class member initializers.
15190 * thread.c (free_thread): Remove.
15191 (init_thread_list): Call delete instead of free_thread.
15192 (new_thread): Call thread_info constructor.
15193 (thread_info::thread_info): New function.
15194 (thread_info::~thread_info): New function.
15195 (delete_thread_1): Call delete instead of free_thread.
15196 (make_cleanup_restore_current_thread): Move tp and frame to
15197 inner block.
15198
15199 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
15200
15201 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
15202 (arc_skip_prologue): Likewise.
15203 (arc_make_frame_cache): Likewise.
15204 (arc_pv_get_operand): New function.
15205 (arc_is_in_prologue): Likewise.
15206 (arc_analyze_prologue): Likewise.
15207 (arc_print_frame_cache): Likewise.
15208 (MAX_PROLOGUE_LENGTH): New constant.
15209
15210 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
15211
15212 * configure.tgt: Add arc-insn.o.
15213 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
15214 (dump_arc_instruction_command): New function.
15215 (arc_fprintf_disasm): Likewise.
15216 (arc_disassemble_info): Likewise.
15217 (arc_insn_get_operand_value): Likewise.
15218 (arc_insn_get_operand_value_signed): Likewise.
15219 (arc_insn_get_memory_base_reg): Likewise.
15220 (arc_insn_get_memory_offset): Likewise.
15221 (arc_insn_get_branch_target): Likewise.
15222 (arc_insn_dump): Likewise.
15223 (arc_insn_get_linear_next_pc): Likewise.
15224 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
15225 (arc_disassemble_info): Likewise.
15226 (arc_insn_get_branch_target): Likewise.
15227 (arc_insn_get_linear_next_pc): Likewise.
15228 * NEWS: Mention new "maint print arc arc-instruction".
15229
15230 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
15231
15232 * arc-tdep (maintenance_print_arc_list): New variable.
15233 (maintenance_print_arc_command): New function.
15234
15235 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
15236
15237 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
15238 Add "limm" and "reserved".
15239 (arc_cannot_fetch_register, arc_cannot_store_register): Add
15240 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
15241 * arc-tdep.h (arc_regnum): Likewise.
15242
15243 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
15244
15245 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
15246 for THREADPTR register.
15247 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
15248 register.
15249 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
15250 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
15251 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
15252
15253 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
15254
15255 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
15256 registers above gdbarch_num_regs (gdbarch) as privileged in
15257 call0 ABI.
15258
15259 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
15260
15261 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
15262 for a single specified register or for all registers in
15263 a0_base..a0_base + C0_NREGS range.
15264 (supply_gregset_reg): Call regcache_raw_supply for a single
15265 specified register or for all registers in a0_base..a0_base +
15266 C0_NREGS range.
15267
15268 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
15269
15270 * arch/xtensa.h (C0_NREGS): Add definition.
15271 * xtensa-tdep.c (C0_NREGS): Remove definition.
15272
15273 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
15274
15275 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
15276 Drop xtensa_default_isa initialization.
15277 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
15278
15279 2017-03-27 Pedro Alves <palves@redhat.com>
15280
15281 * dwarf2read.c (file_entry) <dir_index>: Add comment.
15282 (file_entry::include_dir): New method.
15283 (line_header::include_dir_at, line_header::file_name_at): New
15284 methods.
15285 (setup_type_unit_groups, setup_type_unit_groups)
15286 (psymtab_include_file_name): Simplify using the new methods.
15287 (lnp_state_machine) <the_line_header>: New field.
15288 <file>: Add comment.
15289 (lnp_state_machine::current_file): New method.
15290 (dwarf_record_line): Simplify using the new methods.
15291 (init_lnp_state_machine): Initialize the "the_line_header" field.
15292 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
15293 Simplify using the new methods.
15294
15295 2017-03-27 Pedro Alves <palves@redhat.com>
15296
15297 * cp-name-parser.y (make_empty): Delete.
15298 (demangler_special, nested_name, ptr_operator, array_indicator)
15299 (direct_declarator, declarator_1): Use fill_comp instead of
15300 make_empty.
15301
15302 2017-03-27 Pedro Alves <palves@redhat.com>
15303
15304 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
15305 to ATTRIBUTE_PRINTF.
15306 * solib-target.c (library_list_start_list): Print "string" not
15307 "version".
15308 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
15309 gdb_xml_error call.
15310
15311 2017-03-27 Pedro Alves <palves@redhat.com>
15312
15313 * dwarf2read.c (struct file_and_directory): New.
15314 (dwarf2_get_dwz_file): Adjust to use std::string.
15315 (dw2_get_file_names_reader): Adjust to use file_and_directory.
15316 (find_file_and_directory): Adjust to return a file_and_directory
15317 object.
15318 (read_file_scope): Adjust to use file_and_directory. Remove
15319 make_cleanup/do_cleanups calls.
15320 (open_and_init_dwp_file): Adjust to use std::string. Remove
15321 make_cleanup/do_cleanups calls.
15322 * python/python.c (do_start_initialization): Adjust to ldirname
15323 returning a std::string.
15324 * utils.c (ldirname): Now returns a std::string.
15325 * utils.h (ldirname): Change return type to std::string.
15326 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
15327 returning a std::string.
15328 * xml-tdesc.c (file_read_description_xml): Likewise.
15329
15330 2017-03-24 Alan Hayward <alan.hayward@arm.com>
15331
15332 * regcache.c (regcache_debug_print_register): New function.
15333 * regcache.h (regcache_debug_print_register): New declaration.
15334 * target.c (debug_print_register): Remove.
15335 (target_fetch_registers): Call regcache_debug_print_register.
15336 (target_store_registers): Likewise.
15337
15338 2017-03-24 Pádraig Brady <pbrady@fb.com>
15339
15340 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
15341 reference beyond the 'lh->include_dirs' array before accessing to
15342 it.
15343 (psymtab_include_file_name): Likewise.
15344 (dwarf_decode_lines_1): Likewise.
15345 (dwarf_decode_lines): Likewise.
15346 (file_file_name): Likewise.
15347
15348 2017-03-23 Simon Marchi <simon.marchi@ericsson.com>
15349
15350 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
15351 inferior_ptid.
15352 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
15353 ps_lsetfpregs): Likewise.
15354 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
15355 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
15356 ps_lsetfpregs): Likewise.
15357 * target.c (target_fetch_registers, target_store_registers):
15358 Remove asserts.
15359
15360 2017-03-23 Alan Hayward <alan.hayward@arm.com>
15361
15362 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
15363
15364 2017-03-23 Yao Qi <yao.qi@linaro.org>
15365
15366 * aarch64-tdep.c (aarch64_process_record_test): Declare.
15367 (_initialize_aarch64_tdep): Register it.
15368 (aarch64_record_load_store): Handle PRFM instruction.
15369 (aarch64_process_record_test): New function.
15370
15371 2017-03-23 Yao Qi <yao.qi@linaro.org>
15372
15373 * aarch64-tdep.c (aarch64_record_load_store): Fix code
15374 indentation.
15375
15376 2017-03-23 Yao Qi <yao.qi@linaro.org>
15377
15378 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
15379
15380 2017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
15381
15382 python/python.c (do_start_initialization): Fix memory leak.
15383
15384 2017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
15385
15386 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
15387 using get_ptrace_pid.
15388 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
15389 inferior_ptid.
15390 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
15391 inferior_ptid instead of pid.
15392
15393 2017-03-22 Yao Qi <yao.qi@linaro.org>
15394
15395 * aarch64-tdep.c: Wrap locally used classes in anonymous
15396 namespace.
15397 * arm-tdep.c: Likewise.
15398 * linespec.c: Likewise.
15399 * ui-out.c: Likewise.
15400
15401 2017-03-22 Jonah Graham <jonah@kichwacoders.com>
15402
15403 PR gdb/19637
15404 * python/lib/gdb/printer/bound_registers.py: Import sys.
15405
15406 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
15407
15408 * windows-nat.c (do_windows_fetch_inferior_registers): Add
15409 windows_thread_info parameter and use it instead of
15410 current_thread.
15411 (windows_fetch_inferior_registers): Don't set current_thread,
15412 pass the thread to do_windows_fetch_inferior_registers. Use
15413 ptid from regcache instead of inferior_ptid.
15414 (do_windows_store_inferior_registers): Add windows_thread_info
15415 parameter and use it instead of current_thread.
15416 (windows_store_inferior_registers): Don't set current_thread,
15417 pass the thread to do_windows_store_inferior_registers. Use
15418 ptid from regcache instead of inferior_ptid.
15419
15420 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
15421
15422 * ser-mingw.c (ser_windows_raw): Remove reference to
15423 struct serial::current_timeout.
15424
15425 2017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
15426
15427 PR tdep/20928
15428 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
15429 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
15430 (sparc64_fsr_type): Fix %fsr decoding.
15431
15432 2017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
15433
15434 * python/py-record-btrace.c (btpy_insn_data): Change return type
15435 for Python 2.
15436
15437 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
15438
15439 * spu-linux-nat.c (spu_fetch_inferior_registers,
15440 spu_store_inferior_registers): Use ptid from regcache, set and
15441 restore inferior_ptid.
15442 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
15443 Likewise.
15444
15445 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
15446
15447 * i386-linux-nat.c (fetch_register, store_register,
15448 i386_linux_fetch_inferior_registers,
15449 i386_linux_store_inferior_registers): Use ptid from regcache.
15450 * ia64-linux-nat.c (ia64_linux_fetch_register,
15451 ia64_linux_store_register): Likewise.
15452 * inf-ptrace.c (inf_ptrace_fetch_register,
15453 inf_ptrace_store_register): Likewise.
15454 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
15455 m32r_linux_store_inferior_registers): Likewise.
15456 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
15457 m68kbsd_store_inferior_registers): Likewise.
15458 * m68k-linux-nat.c (fetch_register, store_register,
15459 m68k_linux_fetch_inferior_registers,
15460 m68k_linux_store_inferior_registers): Likewise.
15461 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
15462 m88kbsd_store_inferior_registers): Likewise.
15463 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
15464 mips_fbsd_store_inferior_registers): Likewise.
15465 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
15466 mips64_linux_regsets_store_registers): Likewise.
15467 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
15468 mipsnbsd_store_inferior_registers): Likewise.
15469 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
15470 mips64obsd_store_inferior_registers): Likewise.
15471 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
15472 Likewise.
15473 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
15474 ppcfbsd_store_inferior_registers): Likewise.
15475 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
15476 ppc_linux_store_inferior_registers): Likewise.
15477 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
15478 ppcnbsd_store_inferior_registers): Likewise.
15479 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
15480 ppcobsd_store_registers): Likewise.
15481 * procfs.c (procfs_fetch_registers, procfs_store_registers):
15482 Likewise.
15483 * ravenscar-thread.c (ravenscar_fetch_registers,
15484 ravenscar_store_registers, ravenscar_prepare_to_store):
15485 Likewise.
15486 * record-btrace.c (record_btrace_fetch_registers,
15487 record_btrace_store_registers, record_btrace_prepare_to_store):
15488 Likewise.
15489 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
15490 Lookup inferior using ptid from regcache, instead of
15491 current_inferior.
15492 * remote.c (remote_fetch_registers, remote_store_registers): Use
15493 ptid from regcache.
15494 * rs6000-nat.c (fetch_register, store_register): Likewise.
15495 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
15496 s390_linux_store_inferior_registers): Likewise.
15497 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
15498 shnbsd_store_inferior_registers): Likewise.
15499 * sol-thread.c (sol_thread_fetch_registers,
15500 sol_thread_store_registers): Likewise.
15501 * sparc-nat.c (sparc_fetch_inferior_registers,
15502 sparc_store_inferior_registers): Likewise.
15503 * tilegx-linux-nat.c (fetch_inferior_registers,
15504 store_inferior_registers): Likewise.
15505 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
15506 vaxbsd_store_inferior_registers): Likewise.
15507 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
15508 store_xtregs): Likewise.
15509
15510 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15511
15512 PR gdb/14441
15513 * NEWS: Mention support for rvalue references in GDB and python.
15514 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
15515 supports both lvalue and rvalue references.
15516
15517 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15518
15519 PR gdb/14441
15520 * gdbtypes.c (rank_one_type): Implement overloading
15521 resolution rules regarding rvalue references.
15522
15523 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15524
15525 PR gdb/14441
15526 * aarch64-tdep.c (aarch64_type_align)
15527 (aarch64_extract_return_value, aarch64_store_return_value): Change
15528 lvalue reference type checks to general reference type checks.
15529 * amd64-tdep.c (amd64_classify): Likewise.
15530 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
15531 Likewise.
15532 * arm-tdep.c (arm_type_align, arm_extract_return_value)
15533 (arm_store_return_value): Likewise.
15534 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
15535 * c-typeprint.c (c_print_type): Likewise.
15536 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
15537 (cplus_number_of_children, cplus_describe_child): Likewise.
15538 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
15539 * completer.c (expression_completer): Likewise.
15540 * cp-support.c (make_symbol_overload_list_adl_namespace):
15541 Likewise.
15542 * darwin-nat-info.c (info_mach_region_command): Likewise.
15543 * dwarf2loc.c (entry_data_value_coerce_ref)
15544 (value_of_dwarf_reg_entry): Likewise.
15545 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
15546 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
15547 Likewise.
15548 * findvar.c (extract_typed_address, store_typed_address):
15549 Likewise.
15550 * gdbtypes.c (rank_one_type): Likewise.
15551 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
15552 * infcall.c (value_arg_coerce): Likewise.
15553 * language.c (pointer_type): Likewise.
15554 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
15555 Likewise.
15556 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
15557 * mn10300-tdep.c (mn10300_type_align): Likewise.
15558 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
15559 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
15560 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
15561 Likewise.
15562 * printcmd.c (print_formatted, x_command): Likewise.
15563 * python/py-type.c (typy_get_composite, typy_template_argument):
15564 Likewise.
15565 * python/py-value.c (valpy_referenced_value)
15566 (valpy_get_dynamic_type, value_has_field): Likewise.
15567 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
15568 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
15569 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
15570 * spu-tdep.c (spu_scalar_value_p): Likewise.
15571 * symtab.c (lookup_symbol_aux): Likewise.
15572 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
15573 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
15574 Likewise.
15575 * valops.c (value_cast_pointers, value_cast)
15576 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
15577 (value_struct_elt, value_struct_elt_bitpos)
15578 (value_find_oload_method_list, find_overload_match)
15579 (value_rtti_indirect_type): Likewise.
15580 * valprint.c (val_print_scalar_type_p, generic_val_print):
15581 Likewise.
15582 * value.c (value_actual_type, value_as_address, unpack_long)
15583 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
15584 (coerce_ref): Likewise.
15585 * varobj.c (varobj_get_value_type): Likewise.
15586
15587 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15588
15589 PR gdb/14441
15590 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
15591 table of constants.
15592 * python/lib/gdb/command/explore.py: Support exploring values
15593 of rvalue reference types.
15594 * python/lib/gdb/types.py: Implement get_basic_type() for
15595 rvalue reference types.
15596 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
15597 constant.
15598 * python/py-value.c (valpy_getitem): Add an rvalue reference
15599 check.
15600 (valpy_reference_value): Add new parameter "refcode".
15601 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
15602 New wrappers for valpy_reference_value().
15603 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
15604 (gdbpy_invoke_xmethod): Likewise.
15605
15606 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15607
15608 PR gdb/14441
15609 * dwarf2read.c (process_die, read_type_die_1): Handle the
15610 DW_TAG_rvalue_reference_type DIE.
15611 (read_tag_reference_type): Add new parameter "refcode".
15612
15613 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15614
15615 PR gdb/14441
15616 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
15617 (c_type_print_modifier, c_type_print_varspec_suffix)
15618 (c_type_print_base): Support printing rvalue reference types.
15619 * c-valprint.c (c_val_print, c_value_print): Support printing
15620 rvalue reference values.
15621
15622 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15623
15624 PR gdb/14441
15625 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
15626 typename.
15627 * cp-support.c (replace_typedefs): Handle
15628 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
15629 * python/py-type.c (typy_lookup_type): Likewise.
15630
15631 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15632
15633 PR gdb/14441
15634 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
15635 * parse.c (insert_type): Change assert statement.
15636 (follow_types): Handle rvalue reference types.
15637 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
15638 constant.
15639
15640 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15641
15642 PR gdb/14441
15643 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
15644 value_ref() interface.
15645 * c-valprint.c (c_value_print): Likewise.
15646 * infcall.c (value_arg_coerce): Likewise.
15647 * python/py-value.c (valpy_reference_value): Likewise.
15648 * valops.c (value_cast, value_reinterpret_cast)
15649 (value_dynamic_cast, typecmp): Likewise.
15650 (value_ref): Parameterize by kind of return value reference type.
15651 * value.h (value_ref): Add new parameter "refcode".
15652
15653 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15654
15655 PR gdb/14441
15656 * dwarf2read.c (read_tag_reference_type): Use
15657 lookup_lvalue_reference_type() instead of lookup_reference_type().
15658 * eval.c (evaluate_subexp_standard): Likewise.
15659 * f-exp.y: Likewise.
15660 * gdbtypes.c (make_reference_type, lookup_reference_type):
15661 Generalize with rvalue reference types.
15662 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
15663 convenience wrappers for lookup_reference_type().
15664 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
15665 reference kind parameter.
15666 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
15667 wrappers for lookup_reference_type().
15668 * guile/scm-type.c (gdbscm_type_reference): Use
15669 lookup_lvalue_reference_type() instead of lookup_reference_type().
15670 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
15671 * parse.c (follow_types): Likewise.
15672 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
15673 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
15674 Likewise.
15675 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
15676 (gdbpy_invoke_xmethod): Likewise.
15677 * stabsread.c: Provide extra argument to make_reference_type()
15678 call.
15679 * valops.c (value_ref, value_rtti_indirect_type): Use
15680 lookup_lvalue_reference_type() instead of lookup_reference_type().
15681
15682 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15683
15684 PR gdb/14441
15685 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
15686 (TYPE_IS_REFERENCE): New macro.
15687 (struct type): Add rvalue_reference_type field.
15688 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
15689
15690 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
15691
15692 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
15693 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
15694 New function definition.
15695 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
15696 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
15697 New function declaration.
15698 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
15699 * mi/mi-interp.h: New file.
15700 * solib.c (info_sharedlibrary_command): Replace for loop with
15701 ALL_SO_LIBS macro
15702 * solib.h (update_solib_list): New function declaration.
15703 (so_list_head): Move macro.
15704 * solist.h (ALL_SO_LIBS): New macro.
15705
15706 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
15707
15708 * infcmd.c (post_create_inferior): Remove unused argument in
15709 call to solib_add.
15710 * remote.c (remote_start_remote): Likewise.
15711 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
15712 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
15713 (enable_break): Likewise.
15714 * solib.c (update_solib_list): Remove unused target argument
15715 and its documentation.
15716 (solib_add): Remove unused target argument. Remove unused
15717 argument in call to update_solib_list.
15718 (info_sharedlibrary_command): Remove unused argument in call
15719 to update_solib_list.
15720 (sharedlibrary_command): Remove unused argument in call to
15721 solib_add.
15722 (handle_solib_event): Likewise.
15723 (reload_shared_libraries): Likewise.
15724 * solib.h (solib_add): Remove unused target argument.
15725
15726 2017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
15727
15728 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
15729 (s390_displaced_step_fixup): Cover relative branches with the
15730 default fixup handling. This fixes lack of support for some
15731 relative branch instructions.
15732
15733 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15734
15735 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
15736 ptid from regcache.
15737
15738 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15739
15740 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
15741 i386_darwin_store_inferior_registers): Use ptid from regcache.
15742
15743 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15744
15745 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
15746 i386bsd_store_inferior_registers): Use ptid from regcache.
15747
15748 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15749
15750 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
15751 hppaobsd_store_registers): Use ptid from regcache.
15752
15753 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15754
15755 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
15756 hppanbsd_store_registers): Use ptid from regcache.
15757
15758 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15759
15760 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
15761 from regcache. Use get_ptrace_pid.
15762
15763 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15764
15765 * corelow.c (get_core_register_section): Use ptid from regcache,
15766 update doc.
15767
15768 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15769
15770 * bsd-uthread.c (bsd_uthread_fetch_registers,
15771 bsd_uthread_store_registers): Use ptid from regcache, set and
15772 restore inferior_ptid.
15773
15774 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15775
15776 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
15777 fetch_fp_regs, store_register, store_regs, store_fp_register,
15778 store_fp_regs): Use ptid from regcache.
15779
15780 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15781
15782 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
15783 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
15784 store_vfp_regs): Use ptid from regcache.
15785
15786 2017-03-17 Pedro Alves <palves@redhat.com>
15787
15788 PR remote/21188
15789 * ser-base.c (ser_base_wait_for): Add comment.
15790 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
15791 version.
15792 * ser-unix.c (hardwire_raw): Remove reference to
15793 scb->current_timeout.
15794 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
15795 (hardwire_ops): Install ser_base_readchar instead of
15796 hardwire_readchar.
15797 * serial.h (struct serial) <current_timeout, timeout_remaining>:
15798 Remove fields.
15799
15800 2017-03-17 Jonah Graham <jonah@kichwacoders.com>
15801
15802 PR gdb/19637
15803 * python/lib/gdb/printer/bound_registers.py: Add support for
15804 Python 3.
15805
15806 2017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
15807
15808 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
15809 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
15810 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
15811 byte_offset to subobj_byte_offset. Fix the handling of
15812 DWARF_VALUE_STACK on big-endian targets when coming via an
15813 implicit pointer.
15814 (dwarf2_evaluate_loc_desc): Adjust call to
15815 dwarf2_evaluate_loc_desc_full.
15816 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
15817 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
15818
15819 2017-03-16 Yao Qi <yao.qi@linaro.org>
15820
15821 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
15822 and REVSH instructions.
15823
15824 2017-03-16 Yao Qi <yao.qi@linaro.org>
15825
15826 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
15827 (arm_record_test): Declare.
15828 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
15829 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
15830 align with the manual.
15831 (thumb_record_misc): Adjust the code order to align with the
15832 manual.
15833 (thumb2_record_decode_insn_handler): Fix instruction matching.
15834 (instruction_reader_thumb): New class.
15835 (arm_record_test): New function.
15836
15837 2017-03-16 Yao Qi <yao.qi@linaro.org>
15838
15839 * arm-tdep.c (abstract_memory_reader): New class.
15840 (instruction_reader): New class.
15841 (extract_arm_insn): Add argument 'reader'. Callers updated.
15842 (decode_insn): Likewise.
15843
15844 2017-03-16 Doug Evans <dje@google.com>
15845
15846 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
15847 member. Change type of TYPE member to SCM. All uses updated.
15848 (lsscm_make_lazy_string_smob): Add assert.
15849 (lsscm_make_lazy_string): Flag bad length values.
15850 (lsscm_elt_type): New function.
15851 (gdbscm_lazy_string_to_value): Rewrite to use
15852 lsscm_safe_lazy_string_to_value.
15853 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
15854 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
15855 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
15856 in incoming type.
15857 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
15858 * guile/scm-type.c (tyscm_scm_to_type): New function.
15859
15860 2017-03-15 Doug Evans <dje@google.com>
15861
15862 PR python/17728, python/18439, python/18779
15863 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
15864 member. Change type of TYPE member to PyObject *. All uses updated.
15865 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
15866 (gdbpy_create_lazy_string_object): Flag bad length values.
15867 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
15868 Handle typedefs in incoming type.
15869 (stpy_lazy_string_elt_type): New function.
15870 (gdbpy_extract_lazy_string): Call it.
15871 * python/py-value.c (valpy_lazy_string): Flag bad length values.
15872 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
15873 typedefs in incoming type.
15874
15875 2017-03-16 Doug Evans <dje@google.com>
15876
15877 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
15878 * guile/scm-type.c (tyscm_scm_to_type): New function.
15879
15880 2017-03-16 Jiong Wang <jiong.wang@arm.com>
15881
15882 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
15883 "ULONGEST" for "skip".
15884
15885 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
15886
15887 PR gdb/21220
15888 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
15889 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
15890 (inf_ptrace_peek_poke): ...here. New function. Now also loop
15891 over ptrace peek/poke until end of buffer or error.
15892
15893 2017-03-14 Simon Marchi <simon.marchi@ericsson.com>
15894
15895 * parse.c (length_of_subexp): Make static.
15896 * parser-defs.h (length_of_subexp): Remove.
15897
15898 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
15899
15900 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
15901 as well.
15902
15903 2017-03-14 Pedro Alves <palves@redhat.com>
15904
15905 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
15906 (main): Use std::unique_ptr. Remove calls to
15907 cp_demangled_name_parse_free.
15908
15909 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
15910
15911 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
15912 alphabsd_store_inferior_registers): Use regcache->ptid instead
15913 of inferior_ptid.
15914
15915 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
15916
15917 * aix-thread.c (aix_thread_fetch_registers,
15918 aix_thread_store_registers): Use regcache->ptid instead of
15919 inferior_ptid.
15920
15921 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
15922
15923 * aarch64-linux-nat.c (fetch_gregs_from_thread,
15924 store_gregs_to_thread, fetch_fpregs_from_thread,
15925 store_fpregs_to_thread): Use regcache->ptid instead of
15926 inferior_ptid.
15927
15928 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
15929
15930 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
15931 amd64_linux_fetch_inferior_registers): Use regcache->ptid
15932 instead of inferior_ptid.
15933
15934 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
15935
15936 * target.c (target_fetch_registers, target_store_registers): Add
15937 assert.
15938
15939 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
15940
15941 * regcache.h (regcache_get_ptid): New function.
15942 * regcache.c (regcache_get_ptid): New function.
15943
15944 2017-03-13 Mark Wielaard <mark@klomp.org>
15945
15946 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
15947
15948 2017-03-10 Keith Seitz <keiths@redhat.com>
15949
15950 PR c++/8218
15951 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
15952
15953 2017-03-08 Pedro Alves <palves@redhat.com>
15954
15955 PR gdb/18360
15956 * infrun.c (start_step_over, do_target_resume, resume)
15957 (restart_threads): Assert we're not resuming a thread that is
15958 meant to be stopped.
15959 (infrun_thread_stop_requested_callback): Delete.
15960 (infrun_thread_stop_requested): If the thread is internally
15961 stopped, queue a pending stop event and clear the thread's
15962 inline-frame state.
15963 (handle_stop_requested): New function.
15964 (handle_syscall_event, handle_inferior_event_1): Use
15965 handle_stop_requested.
15966 (handle_stop_requested): New function.
15967 (handle_signal_stop): Set the thread's stop_signal here instead of
15968 at caller.
15969 (finish_step_over): Clear step over info unconditionally.
15970 (handle_signal_stop): If the user had interrupted the event
15971 thread, consider the stop a random signal.
15972 (handle_signal_stop) <signal arrived while stepping over
15973 breakpoint>: Don't restart threads here.
15974 (stop_waiting): Don't clear step-over info here.
15975
15976 2017-03-08 Pedro Alves <palves@redhat.com>
15977
15978 PR 21206
15979 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
15980 goes to argument 2, not 1.
15981
15982 2017-03-08 Pedro Alves <palves@redhat.com>
15983
15984 PR cli/21218
15985 * top.c (gdb_readline_wrapper): Avoid passing NULL to
15986 display_gdb_prompt.
15987 (command_line_input): Add comment.
15988
15989 2017-03-08 Pedro Alves <palves@redhat.com>
15990
15991 PR tui/21216
15992 * tui/tui-file.c (tui_file::write): New.
15993 * tui/tui-file.h (tui_file): Override "write".
15994 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
15995 factored out from ...
15996 (tui_puts): ... here.
15997 (tui_putc): Use them.
15998 (tui_write): New function.
15999 * tui/tui-io.h (tui_write): Declare.
16000
16001 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
16002
16003 * Makefile.in (SFILES): Replace "environ.c" with
16004 "common/environ.c".
16005 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
16006 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
16007 to...
16008 * common/environ.c: ... here.
16009 * environ.h: Moved to...
16010 * common/environ.h: ... here.
16011
16012 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
16013
16014 * gdbarch.sh (pstring_ptr): New static function.
16015 (gdbarch_disassembler_options): Use it.
16016 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
16017 not valid_disassembler_option->name.
16018 * gdbarch.c: Regenerate.
16019
16020 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
16021
16022 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
16023
16024 2017-03-07 Pedro Alves <palves@redhat.com>
16025
16026 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
16027
16028 2017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
16029
16030 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
16031 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
16032 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
16033 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
16034
16035 2017-03-06 Simon Marchi <simon.marchi@ericsson.com>
16036
16037 * xtensa-linux-nat.c (fetch_gregs): Remove const.
16038
16039 2017-03-03 Simon Marchi <simon.marchi@ericsson.com>
16040
16041 * remote.c (remote_add_target_side_commands): Use range-based
16042 for loop.
16043
16044 2017-03-03 Yao Qi <yao.qi@linaro.org>
16045
16046 PR gdb/21165
16047 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
16048 value is lazy.
16049 * valprint.c (common_val_print): Likewise.
16050
16051 2017-02-28 Peter Bergner <bergner@vnet.ibm.com>
16052
16053 * NEWS: Mention new set/show disassembler-options commands.
16054 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
16055 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
16056 (prospective_options): New static variable.
16057 (gdb_disassembler::gdb_disassembler): Initialize
16058 m_di.disassembler_options.
16059 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
16060 (get_disassembler_options): New function.
16061 (set_disassembler_options): Likewise.
16062 (set_disassembler_options_sfunc): Likewise.
16063 (show_disassembler_options_sfunc): Likewise.
16064 (disassembler_options_completer): Likewise.
16065 (_initialize_disasm): Likewise.
16066 * disasm.h (get_disassembler_options): New prototype.
16067 (set_disassembler_options): Likewise.
16068 * gdbarch.sh (gdbarch_disassembler_options): New variable.
16069 (gdbarch_verify_disassembler_options): Likewise.
16070 * gdbarch.c: Regenerate.
16071 * gdbarch.h: Likewise.
16072 * arm-tdep.c (num_disassembly_options): Delete.
16073 (set_disassembly_style): Likewise.
16074 (arm_disassembler_options): New static variable.
16075 (set_disassembly_style_sfunc): Convert short style name into long
16076 option name. Call set_disassembler_options.
16077 (show_disassembly_style_sfunc): New function.
16078 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
16079 set_gdbarch_verify_disassembler_options.
16080 (_initialize_arm_tdep): Delete regnames variable and update callers.
16081 (arm_disassembler_options): Initialize.
16082 (disasm_options): New variable.
16083 (num_disassembly_options): Rename from this...
16084 (num_disassembly_styles): ...to this. Compute by scanning through
16085 disasm_options.
16086 (valid_disassembly_styles): Initialize using disasm_options.
16087 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
16088 set_arm_regname_option.
16089 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
16090 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
16091 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
16092 set_gdbarch_verify_disassembler_options.
16093 * s390-tdep.c (s390_disassembler_options): New static variable.
16094 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
16095 set_gdbarch_verify_disassembler_options.
16096
16097 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
16098
16099 * remote.c (remote_add_target_side_condition): Remove "struct"
16100 keyword from range-based for loop.
16101
16102 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
16103
16104 * remote.c (remote_add_target_side_condition): Use range-based
16105 for loop. Update comment.
16106
16107 2017-02-27 Yao Qi <yao.qi@linaro.org>
16108
16109 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
16110
16111 2017-02-26 Alan Hayward <alan.hayward@arm.com>
16112
16113 * regcache.c (regcache_raw_update): New function.
16114 (regcache_raw_read): Move code to regcache_raw_update.
16115 * regcache.h (regcache_raw_update): New declaration.
16116 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
16117
16118 2017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
16119
16120 * dwarf2read.c (create_debug_type_hash_table): Initialize
16121 header.signature and header.type_offset_in_tu.
16122
16123 2017-02-24 Pedro Alves <palves@redhat.com>
16124
16125 * symtab.c (make_file_symbol_completion_list_1): Use
16126 add_symtab_completions.
16127
16128 2017-02-24 Alan Hayward <alan.hayward@arm.com>
16129
16130 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
16131
16132 2017-02-24 Alan Hayward <alan.hayward@arm.com>
16133
16134 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
16135 I386_MAX_REGISTER_SIZE.
16136 (i386_pseudo_register_write): Likewise.
16137 (i386_process_record): Likewise.
16138 * i387-tdep.c (i387_supply_xsave): Likewise.
16139 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
16140 (store_register): Likewise.
16141
16142 2017-02-23 Pedro Alves <palves@redhat.com>
16143
16144 * ada-lang.c: Include "common/function-view.h".
16145 (ada_iterate_over_symbols): Adjust to use function_view as
16146 callback type.
16147 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
16148 (ada_make_symbol_completion_list): Use a lambda.
16149 (ada_exc_search_name_matches): Delete.
16150 (name_matches_regex): New.
16151 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
16152 * compile/compile-c-support.c: Include "common/function-view.h".
16153 (print_one_macro): Change prototype to accept a ui_file pointer.
16154 (write_macro_definitions): Use a lambda.
16155 * dwarf2read.c: Include "common/function-view.h".
16156 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
16157 (dw2_expand_symtabs_matching): Adjust to use function_view as
16158 callback type.
16159 * language.h: Include "common/function-view.h".
16160 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
16161 function_view as callback type.
16162 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
16163 * linespec.c: Include "common/function-view.h".
16164 (collect_info::add_symbol): New method.
16165 (struct symbol_and_data_callback, iterate_inline_only, struct
16166 symbol_matcher_data, iterate_name_matcher): Delete.
16167 (iterate_over_all_matching_symtabs): Adjust to use function_view
16168 as callback type and lambdas.
16169 (iterate_over_file_blocks): Adjust to use function_view as
16170 callback type.
16171 (decode_compound_collector): Now a class with private fields.
16172 (decode_compound_collector::release_symbols): New method.
16173 (collect_one_symbol): Rename to...
16174 (decode_compound_collector::operator()): ... this and adjust.
16175 (lookup_prefix_sym): decode_compound_collector construction bits
16176 move to decode_compound_collector ctor. Pass the
16177 decode_compound_collector object directly as callback. Remove
16178 cleanups and use decode_compound_collector::release_symbols
16179 instead.
16180 (symtab_collector): Now a class with private fields.
16181 (symtab_collector::release_symtabs): New method.
16182 (add_symtabs_to_list): Rename to...
16183 (symtab_collector::operator()): ... this and adjust.
16184 (collect_symtabs_from_filename): symtab_collector construction
16185 bits move to symtab_collector ctor. Pass the symtab_collector
16186 object directly as callback. Remove cleanups and use
16187 symtab_collector::release_symtabs instead.
16188 (collect_symbols): Delete.
16189 (add_matching_symbols_to_info): Use lambdas.
16190 * macrocmd.c (print_macro_callback): Delete.
16191 (info_macro_command): Use a lambda.
16192 (info_macros_command): Pass print_macro_definition as callable
16193 directly.
16194 (print_one_macro): Remove 'ignore' parameter.
16195 (macro_list_command): Adjust.
16196 * macrotab.c (macro_for_each_data::fn): Now a function_view.
16197 (macro_for_each_data::user_data): Delete field.
16198 (foreach_macro): Adjust to call the function_view.
16199 (macro_for_each): Adjust to use function_view as callback type.
16200 (foreach_macro_in_scope): Adjust to call the function_view.
16201 (macro_for_each_in_scope): Adjust to use function_view as callback
16202 type.
16203 * macrotab.h: Include "common/function-view.h".
16204 (macro_callback_fn): Declare a prototype instead of a pointer.
16205 Remove "user_data" parameter.
16206 (macro_for_each, macro_for_each_in_scope): Adjust to use
16207 function_view as callback type.
16208 * psymtab.c (partial_map_expand_apply)
16209 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
16210 Adjust to use function_view as callback type and to return bool.
16211 (psym_expand_symtabs_matching): Adjust to use function_view as
16212 callback types.
16213 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
16214 to use function_view as callback type and to return bool.
16215 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
16216 callback types.
16217 * symfile.c (expand_symtabs_matching): Adjust to use function_view
16218 as callback types.
16219 * symfile.h: Include "common/function-view.h".
16220 (expand_symtabs_file_matcher_ftype)
16221 (expand_symtabs_symbol_matcher_ftype)
16222 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
16223 return bool.
16224 (quick_symbol_functions::map_symtabs_matching_filename)
16225 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
16226 function_view as callback type and return bool.
16227 (expand_symtabs_matching): Adjust to use function_view as callback
16228 type.
16229 (maintenance_expand_name_matcher)
16230 (maintenance_expand_file_matcher): Delete.
16231 (maintenance_expand_symtabs): Use lambdas.
16232 * symtab.c (iterate_over_some_symtabs): Adjust to use
16233 function_view as callback types and return bool.
16234 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
16235 of a cleanup.
16236 (lookup_symtab_callback): Delete.
16237 (lookup_symtab): Use a lambda.
16238 (iterate_over_symbols): Adjust to use function_view as callback
16239 type.
16240 (struct search_symbols_data, search_symbols_file_matches)
16241 (search_symbols_name_matches): Delete.
16242 (search_symbols): Use a pair of lambdas.
16243 (struct add_name_data, add_macro_name, symbol_completion_matcher)
16244 (symtab_expansion_callback): Delete.
16245 (default_make_symbol_completion_list_break_on_1): Use lambdas.
16246 * symtab.h: Include "common/function-view.h".
16247 (iterate_over_some_symtabs): Adjust to use function_view as
16248 callback type and return bool.
16249 (iterate_over_symtabs): Adjust to use function_view as callback
16250 type.
16251 (symbol_found_callback_ftype): Remove 'data' parameter and return
16252 bool.
16253 (iterate_over_symbols): Adjust to use function_view as callback
16254 type.
16255
16256 2017-02-23 Pedro Alves <palves@redhat.com>
16257
16258 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
16259 (%.o) <unittests/%.c>: New pattern.
16260 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
16261 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
16262 * common/function-view.h: New file.
16263 * unittests/function-view-selftests.c: New file.
16264 * configure: Regenerate.
16265
16266 2017-02-23 Simon Marchi <simon.marchi@ericsson.com>
16267
16268 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
16269 inferior_ptid.
16270 * go32-nat.c (go32_thread_alive): Likewise.
16271
16272 2017-02-23 Yao Qi <yao.qi@linaro.org>
16273
16274 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
16275 delete.
16276
16277 2017-02-23 Yao Qi <yao.qi@linaro.org>
16278
16279 * varobj.c (varobj_clear_saved_item): Use delete instead of
16280 xfree.
16281 (update_dynamic_varobj_children): Likewise.
16282
16283 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
16284
16285 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
16286
16287 2017-02-21 Simon Marchi <simon.marchi@ericsson.com>
16288
16289 * common/enum-flags.h (enum_flags::enum_flags): Initialize
16290 m_enum_value to 0 in default constructor.
16291
16292 2017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
16293
16294 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
16295 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
16296 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
16297 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
16298 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
16299 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
16300 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
16301 IS_STORE_CONDITIONAL_INSN.
16302
16303 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
16304
16305 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
16306
16307 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
16308
16309 * NEWS (Changes since GDB 7.12): Add DWARF-5.
16310
16311 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
16312
16313 * dwarf2read.c (skip_one_die, read_attribute_value)
16314 (dwarf2_const_value_attr, dump_die_shallow)
16315 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
16316 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
16317
16318 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
16319
16320 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
16321 (dwarf_parse_macro_header): Accept DWARF version 5.
16322 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
16323
16324 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
16325
16326 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
16327 DW_AT_GNU_*.
16328 * common/common-exceptions.h (enum errors): Likewise.
16329 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
16330 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
16331 (dwarf_expr_context::execute_stack_op): Likewise.
16332 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
16333 Likewise.
16334 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
16335 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
16336 (show_entry_values_debug, call_site_to_target_addr)
16337 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
16338 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
16339 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
16340 (value_of_dwarf_block_entry, indirect_pieced_value)
16341 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
16342 (disassemble_dwarf_expression): Likewise.
16343 * dwarf2read.c (process_die, inherit_abstract_dies)
16344 (read_call_site_scope): Likewise.
16345 * gdbtypes.h (struct func_type, struct call_site_parameter)
16346 (struct call_site): Likewise.
16347 * stack.c (read_frame_arg): Likewise.
16348 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
16349
16350 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
16351
16352 * defs.h (read_unsigned_leb128): New declaration.
16353 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
16354 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
16355 (dwarf2_find_location_expression): Call also
16356 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
16357 * dwarf2loc.h (dwarf2_version): New declaration.
16358 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
16359 rnglists.
16360 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
16361 .debug_rnglists.
16362 (struct dwop_section_names): Add loclists_dwo.
16363 (dwop_section_names): Add .debug_loclists.dwo.
16364 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
16365 (struct dwarf2_per_cu_data): Add dwarf_version.
16366 (struct dwo_sections): Add loclists.
16367 (struct attr_abbrev): Add implicit_const.
16368 (read_indirect_line_string): New declaration.
16369 (read_unsigned_leb128): Delete declaration.
16370 (rcuh_kind): New definition.
16371 (read_and_check_comp_unit_head): Change parameter
16372 is_debug_types_section to section_kind.
16373 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
16374 (read_comp_unit_head): Change parameter abfd to section, add parameter
16375 section_kind. Handle DWARF-5.
16376 (error_check_comp_unit_head): Accept also DWARF version 5.
16377 (read_and_check_comp_unit_head): Change parameter
16378 is_debug_types_section to section_kind.
16379 (read_and_check_type_unit_head): Delete function.
16380 (read_abbrev_offset): Handle DWARF-5.
16381 (create_debug_type_hash_table): Add parameter section_kind. Process
16382 only DW_UT_type. Use signature and type_offset_in_tu from struct
16383 comp_unit_head.
16384 (create_debug_types_hash_table): Update create_debug_type_hash_table
16385 caller.
16386 (create_all_type_units): Call create_debug_type_hash_table.
16387 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
16388 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
16389 caller.
16390 (skip_one_die): Handle DW_FORM_implicit_const.
16391 (dwarf2_rnglists_process): New function.
16392 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
16393 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
16394 (read_attribute_value): Handle DW_FORM_implicit_const,
16395 DW_FORM_line_strp.
16396 (read_attribute): Handle DW_FORM_implicit_const.
16397 (read_indirect_string_at_offset_from): New function from
16398 read_indirect_string_at_offset.
16399 (read_indirect_string_at_offset): Call
16400 read_indirect_string_at_offset_from.
16401 (read_indirect_line_string_at_offset): New function.
16402 (read_indirect_string): New function comment.
16403 (read_indirect_line_string): New function.
16404 (read_unsigned_leb128): Make it global.
16405 (dwarf2_string_attr): Handle DWARF-5.
16406 (add_include_dir_stub, read_formatted_entries): New functions.
16407 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
16408 Handle DWARF-5.
16409 (per_cu_header_read_in): Update read_comp_unit_head caller.
16410 (dwarf2_version): New function.
16411 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
16412 rnglists.
16413 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
16414 fields.
16415
16416 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
16417
16418 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
16419
16420 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
16421
16422 * dwarf2read.c (dwarf2_ranges_process): New function from
16423 dwarf2_ranges_read.
16424 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
16425 dwarf2_ranges_process.
16426
16427 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
16428
16429 * dwarf2read.c (create_debug_type_hash_table): New function from
16430 create_debug_types_hash_table.
16431 (create_debug_types_hash_table): Call create_debug_type_hash_table.
16432 (create_all_type_units, open_and_init_dwo_file): Update
16433 create_debug_types_hash_table callers.
16434
16435 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
16436
16437 PR gdb/16188
16438 * fork-child.c (trace_start_error): Fix thinko. va_end should
16439 refer to 'ap', not 'args'.
16440
16441 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
16442 Pedro Alves <palves@redhat.com>
16443
16444 PR gdb/16188
16445 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
16446 calls succeeded.
16447 * fork-child.c (trace_start_error): New function.
16448 (trace_start_error_with_name): Likewise.
16449 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
16450 * inf-ptrace.c (inf_ptrace_me): Likewise.
16451 * inferior.h (trace_start_error): New prototype.
16452 (trace_start_error_with_name): Likewise.
16453
16454 2017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
16455
16456 PR gdb/21164
16457 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
16458 NULL before using it.
16459 * symmisc.c (maintenance_print_symbols): Likewise.
16460 (maintenance_print_msymbols): Likewise.
16461
16462 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16463
16464 * NEWS: Add record Python bindings entry.
16465
16466 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16467
16468 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
16469 py-record-full.o.
16470 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
16471 * python/py-record-btrace.c, python/py-record-btrace.h,
16472 python/py-record-full.c, python/py-record-full.h: New file.
16473 * python/py-record.c: Add include for py-record-btrace.h and
16474 py-record-full.h.
16475 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
16476 recpy_instruction_history, recpy_function_call_history, recpy_begin,
16477 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
16478 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
16479 New definition.
16480 (gdbpy_initialize_btrace): New export.
16481 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
16482
16483 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16484
16485 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
16486 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
16487 * python/py-record.c: New file.
16488 * python/python-internal.h (gdbpy_start_recording,
16489 gdbpy_current_recording, gdpy_stop_recording,
16490 gdbpy_initialize_record): New export.
16491 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
16492 (python_GdbMethods): Add gdbpy_start_recording,
16493 gdbpy_current_recording and gdbpy_stop_recording.
16494
16495 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16496
16497 * record-btrace.c (record_btrace_record_method): New function.
16498 (init_record_btrace_ops): Initialize to_record_method.
16499 * record-full.c (record_full_record_method): New function.
16500 (init_record_full_ops, init_record_full_core_ops): Add
16501 record_full_record_method.
16502 * record.h (enum record_method): New enum.
16503 * target-debug.h (target_debug_print_enum_record_method: New define.
16504 * target-delegates.c: Regenerate.
16505 * target.c (target_record_method): New function.
16506 * target.h: Include record.h.
16507 (struct target_ops) <to_record_method>: New field.
16508 (target_record_method): New export.
16509
16510 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16511
16512 * record.h (record_start, record_stop): New export.
16513 * record.c (record_start, record_stop): New function.
16514
16515 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16516
16517 * btrace.c (btrace_fetch): Copy function call segments pointer
16518 into a vector.
16519 (btrace_clear): Clear the vector.
16520 (btrace_find_insn_by_number): Use binary search to find the correct
16521 function call segment.
16522 * btrace.h (brace_fun_p): New typedef.
16523 (struct btrace_thread_info) <functions>: New field.
16524
16525 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16526
16527 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
16528 * btrace.c (btrace_decode_error): ... here. New function.
16529 * btrace.h (btrace_decode_error): New export.
16530
16531 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16532
16533 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
16534 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
16535 btrace_find_insn_by_number): Remove special case for gaps.
16536 * btrace.h (btrace_insn_get_error): New export.
16537 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
16538 * record-btrace.c (btrace_insn_history): Print number for gaps.
16539 (record_btrace_info, record_btrace_goto): Handle gaps.
16540
16541 2017-02-14 Tom Tromey <tom@tromey.com>
16542
16543 PR python/13598:
16544 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
16545 event.
16546 * python/py-evts.c (gdbpy_initialize_py_events): Add
16547 before_prompt registry.
16548 * python/py-events.h (events_object) <before_prompt>: New field.
16549
16550 2017-02-14 Markus Metzger <markus.t.metzger@intel.com>
16551
16552 * btrace.c (ftrace_new_switch): Preserve up link and flags.
16553
16554 2017-02-13 Luis Machado <lgustavo@codesourcery.com>
16555
16556 * symfile (_initialize_symfile): Add usage text to the load command's
16557 help text.
16558
16559 2017-02-10 Simon Marchi <simon.marchi@ericsson.com>
16560
16561 * utils.c (defaulted_query): Don't query on secondary UIs.
16562
16563 2017-02-10 Tom Tromey <tom@tromey.com>
16564
16565 * rust-lang.c (rust_get_disr_info): Remove unused variable.
16566
16567 2017-02-10 Tom Tromey <tom@tromey.com>
16568
16569 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
16570 "cleanup" local.
16571 * python/py-type.c (typy_legacy_template_argument): Remove
16572 unnecessary "cleanup" local.
16573
16574 2017-02-10 Tom Tromey <tom@tromey.com>
16575
16576 * python/python.c (do_start_initialization): New function, from
16577 _initialize_python.
16578 (_initialize_python): Call do_start_initialization.
16579 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
16580 goto.
16581
16582 2017-02-10 Tom Tromey <tom@tromey.com>
16583
16584 * python/py-prettyprint.c (pretty_print_one_value): Use
16585 gdbpy_ref.
16586
16587 2017-02-10 Tom Tromey <tom@tromey.com>
16588
16589 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
16590 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
16591 gdbpy_ref.
16592 * python/py-type.c (field_new): Use gdbpy_ref.
16593 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
16594 gdbpy_ref.
16595 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
16596 (py_free_pspace): Likewise.
16597 (pspace_to_pspace_object): Likewise.
16598 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
16599 (py_free_objfile): Likewise.
16600 (objfile_to_objfile_object): Likewise.
16601 * python/py-inferior.c (delete_thread_object): Use
16602 gdbpy_ref.
16603 (infpy_read_memory): Likewise.
16604 (py_free_inferior): Likewise.
16605 * python/py-evtregistry.c (create_eventregistry_object): Use
16606 gdbpy_ref.
16607 * python/py-event.c (create_event_object): Use gdbpy_ref.
16608
16609 2017-02-10 Tom Tromey <tom@tromey.com>
16610
16611 * python/py-ref.h (gdbpy_ref_policy): Now a template.
16612 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
16613 used.
16614 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
16615 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
16616 python/py-exitedevent.c, python/py-finishbreakpoint.c,
16617 python/py-framefilter.c, python/py-function.c,
16618 python/py-inferior.c, python/py-infevents.c,
16619 python/py-linetable.c, python/py-newobjfileevent.c,
16620 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
16621 python/py-signalevent.c, python/py-stopevent.c,
16622 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
16623 python/py-unwind.c, python/py-utils.c, python/py-value.c,
16624 python/py-varobj.c, python/py-xmethods.c, python/python.c,
16625 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
16626
16627 2017-02-10 Tom Tromey <tom@tromey.com>
16628
16629 * ui-out.h (ui_out_emit_type): New class.
16630 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
16631 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
16632 and ui_out_emit_tuple.
16633 (enumerate_locals): Likewise.
16634 (py_mi_print_variables, py_print_locals, py_print_args): Use
16635 ui_out_emit_list.
16636 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
16637 ui_out_emit_list.
16638 * common/gdb_optional.h: New file.
16639
16640 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
16641
16642 * MAINTAINERS (Write After Approval): Update my e-mail address.
16643
16644 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
16645
16646 PR gdb/21122
16647 * breakpoint.c (_initialize_breakpoint): Update the help description
16648 of the 'commands' command to indicate that it takes a list argument.
16649
16650 2017-02-09 Simon Marchi <simon.marchi@ericsson.com>
16651
16652 * interps.c (current_interp_set_logging): Remove "return".
16653
16654 2017-02-09 Gary Benson <gbenson@redhat.com>
16655
16656 * symtab.c (add_symtab_completions): Prevent NULL pointer
16657 dereference.
16658
16659 2017-02-08 Pedro Alves <palves@redhat.com>
16660
16661 * interps.c (interp::interp): Remove reference to quiet_p.
16662 (interp_set): Make static. Remove dead "Switching to" output
16663 code.
16664 (interp_quiet_p, interp_set_quiet): Delete.
16665 (interpreter_exec_cmd): Don't set the interpreter quiet.
16666 * interps.h (interp_quiet_p): Make static.
16667 (class interp) <quiet_p>: Remove field
16668
16669 2017-02-08 Jerome Guitton <guitton@adacore.com>
16670
16671 * cli/cli-decode.c (find_command_name_length): Make it extern.
16672 * cli/cli-decode.h (find_command_name_length): Declare.
16673 * cli/cli-script.c (command_name_equals, line_first_arg):
16674 New functions.
16675 (process_next_line): Use cli-decode to parse command names.
16676 (build_command_line): Make args a constant pointer.
16677
16678 2017-02-08 Jerome Guitton <guitton@adacore.com>
16679
16680 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
16681 Remove case-insensitive search.
16682
16683 2017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
16684
16685 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
16686 at the end of the line. Avoids an ARI warning.
16687
16688 2017-02-06 Luis Machado <lgustavo@codesourcery.com>
16689
16690 * NEWS: Mention support for record/replay of Intel 64 rdrand and
16691 rdseed instructions.
16692 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
16693
16694 2017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
16695
16696 PR tdep/20936
16697 Provide and use sparc32 and sparc64 target description XML files.
16698 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
16699 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
16700 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
16701 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
16702 * features/sparc/sparc32-solaris.xml: New file.
16703 * features/sparc/sparc64-solaris.xml: New file.
16704 * features/sparc/sparc32-solaris.c: Generated.
16705 * features/sparc/sparc64-solaris.c: Generated.
16706 * sparc-tdep.h: Account for differences in target descriptions.
16707 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
16708 (sparc32_register_type): Use target provided registers.
16709 (validate_tdesc_registers): New function.
16710 (sparc32_gdbarch_init): Use tdesc_has_registers.
16711 Set pseudoregister functions.
16712 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
16713 (sparc64_register_type): Use target provided registers.
16714 (sparc64_init_abi): Set pseudoregister functions.
16715
16716 2017-02-03 Tom Tromey <tom@tromey.com>
16717
16718 PR rust/21097:
16719 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
16720 with a single member.
16721
16722 2017-02-03 Pedro Alves <palves@redhat.com>
16723
16724 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
16725 (cli_interp_base::~cli_interp_base): New.
16726 (cli_interp): New struct.
16727 (as_cli_interp): Cast the interp itself to cli_interp.
16728 (cli_interpreter_pre_command_loop): Rename to ...
16729 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
16730 parameter.
16731 (cli_interpreter_init): Rename to ...
16732 (cli_interp::init): ... this. Remove 'self' parameter. Use
16733 boolean. Make extern.
16734 (cli_interpreter_resume): Rename to ...
16735 (cli_interp::resume): ... this. Remove 'data' parameter. Make
16736 extern.
16737 (cli_interpreter_suspend): Rename to ...
16738 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
16739 extern.
16740 (cli_interpreter_exec): Rename to ...
16741 (cli_interp::exec): ... this. Remove 'data' parameter. Make
16742 extern.
16743 (cli_interpreter_supports_command_editing): Rename to ...
16744 (cli_interp_base::supports_command_editing): ... this. Remove
16745 'interp' parameter. Make extern.
16746 (cli_ui_out): Rename to ...
16747 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
16748 Make extern.
16749 (cli_set_logging): Rename to ...
16750 (cli_interp_base::set_logging): ... this. Remove 'interp'
16751 parameter. Make extern.
16752 (cli_interp_procs): Delete.
16753 (cli_interp_factory): Adjust to use "new".
16754 * cli/cli-interp.h: Include "interps.h".
16755 (struct cli_interp_base): New struct.
16756 * interps.c (struct interp): Delete. Fields moved to interps.h.
16757 (interp_new): Delete.
16758 (interp::interp, interp::~interp): New.
16759 (interp_set): Use bool, and return void. Assume the interpreter
16760 has suspend, init and resume methods, and that the all return
16761 void.
16762 (set_top_level_interpreter): interp_set returns void.
16763 (interp_ui_out): Adapt.
16764 (current_interp_set_logging): Adapt.
16765 (interp_data): Delete.
16766 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
16767 (interp_exec): Adapt.
16768 (top_level_interpreter_data): Delete.
16769 * interps.h (interp_init_ftype, interp_resume_ftype)
16770 (interp_suspend_ftype, interp_exec_ftype)
16771 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
16772 (class interp): New.
16773 (interp_new): Delete.
16774 (interp_set): Now returns void. Use bool.
16775 (interp_data, top_level_interpreter_data): Delete.
16776 * mi/mi-common.h: Include interps.h.
16777 (class mi_interp): Inherit from interp. Define a ctor. Declare
16778 init, resume, suspect, exec, interp_ui_out, set_logging and
16779 pre_command_loop methods.
16780 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
16781 (mi_interpreter_init): Rename to ...
16782 (mi_interp::init): ... this. Remove the 'interp' parameter, use
16783 bool, return void and make extern. Adjust.
16784 (mi_interpreter_resume): ... Rename to ...
16785 (mi_interp::resume): ... this. Remove the 'data' parameter,
16786 return void and make extern. Adjust.
16787 (mi_interpreter_suspend): ... Rename to ...
16788 (mi_interp::suspend): ... this. Remove the 'data' parameter,
16789 return void and make extern. Adjust.
16790 (mi_interpreter_exec): ... Rename to ...
16791 (mi_interp::exec): ... this. Remove the 'data' parameter and make
16792 extern. Adjust.
16793 (mi_interpreter_pre_command_loop): ... Rename to ...
16794 (mi_interp::pre_command_loop): ... this. Remove the 'self'
16795 parameter and make extern.
16796 (mi_on_normal_stop_1): Adjust.
16797 (mi_ui_out): Rename to ...
16798 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
16799 parameter and make extern. Adjust.
16800 (mi_set_logging): Rename to ...
16801 (mi_interp::set_logging): ... this. Remove the 'interp'
16802 parameter and make extern. Adjust.
16803 (mi_interp_procs): Delete.
16804 (mi_interp_factory): Adjust to use 'new'.
16805 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
16806 (mi_print_exception, mi_execute_command, mi_load_progress):
16807 Adjust.
16808 * tui/tui-interp.c (tui_interp): New class.
16809 (as_tui_interp): Return a tui_interp pointer.
16810 (tui_on_normal_stop, tui_on_signal_received)
16811 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
16812 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
16813 to use interp::interp_ui_out.
16814 (tui_init): Rename to ...
16815 (tui_interp::init): ... this. Remove the 'self' parameter, use
16816 bool, return void and make extern. Adjust.
16817 (tui_resume): Rename to ...
16818 (tui_interp::resume): ... this. Remove the 'data' parameter,
16819 return void and make extern. Adjust.
16820 (tui_suspend): Rename to ...
16821 (tui_interp::suspend): ... this. Remove the 'data' parameter,
16822 return void and make extern. Adjust.
16823 (tui_ui_out): Rename to ...
16824 (tui_interp::interp_ui_out): ... this. Remove the 'self'
16825 parameter, and make extern. Adjust.
16826 (tui_exec): Rename to ...
16827 (tui_interp::exec): ... this. Remove the 'data' parameter and
16828 make extern.
16829 (tui_interp_procs): Delete.
16830 (tui_interp_factory): Use "new".
16831
16832 2017-02-02 Tom Tromey <tom@tromey.com>
16833
16834 * rust-exp.y (ends_raw_string, space_then_number)
16835 (rust_identifier_start_p): Return bool.
16836 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
16837 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
16838 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
16839 (rust_chartype_p): Return bool.
16840 (val_print_struct, rust_print_struct_def, rust_print_type):
16841 Update.
16842 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
16843 Return bool.
16844
16845 2017-02-02 Tom Tromey <tom@tromey.com>
16846
16847 * rust-lang.c: Reindent.
16848
16849 2017-02-02 Tom Tromey <tom@tromey.com>
16850
16851 * rust-lang.h (rust_crate_for_block): Update.
16852 * rust-lang.c (rust_crate_for_block): Return std::string.
16853 (rust_get_disr_info): Use std:;string, not
16854 gdb::unique_xmalloc_ptr.
16855 * rust-exp.y (crate_name): Update.
16856
16857 2017-02-02 Pedro Alves <palves@redhat.com>
16858
16859 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
16860 field out of gdb_disassembler_test and make it static.
16861
16862 2017-02-02 Pedro Alves <palves@redhat.com>
16863
16864 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
16865 mi1_interp and mi_interp fields.
16866
16867 2017-02-02 Pedro Alves <palves@redhat.com>
16868
16869 * cli/cli-interp.c (struct saved_output_files, saved_output):
16870 Moved from cli/cli-logging.c.
16871 (cli_set_logging): New function.
16872 (cli_interp_procs): Install cli_set_logging.
16873 * cli/cli-interp.h (make_logging_output, cli_set_logging):
16874 Declare.
16875 * cli/cli-logging.c (struct saved_output_files, saved_output):
16876 Moved to cli/cli-interp.c.
16877 (pop_output_files): Don't save outputs here.
16878 (make_logging_output): New function.
16879 (handle_redirections): Don't build tee nor save previous outputs
16880 here.
16881 * interps.c (current_interp_set_logging): Change prototype.
16882 Assume there's always a set_logging_proc method installed.
16883 * interps.h (interp_set_logging_ftype): Change prototype.
16884 (current_interp_set_logging): Change prototype and adjust comment.
16885 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
16886 use make_logging_output.
16887 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
16888 2017-02-02 Pedro Alves <palves@redhat.com>
16889
16890 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
16891 from ...
16892 (set_logging_overwrite): ... here.
16893 (logging_no_redirect_file): Delete.
16894 (set_logging_redirect): Don't handle redirection on the fly.
16895 Instead warn that "logging off" / "logging on" is necessary.
16896 (pop_output_files): Delete references to logging_no_redirect_file.
16897 (show_logging_command): Always speak in terms of what will happen
16898 once logging is reenabled.
16899
16900 2017-02-02 Pedro Alves <palves@redhat.com>
16901
16902 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
16903
16904 2017-02-02 Pedro Alves <palves@redhat.com>
16905
16906 * disasm.c (gdb_pretty_print_insn): Rename to ...
16907 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
16908 Remove gdbarch parameter. Adapt to clear the object's buffers
16909 instead of allocating new buffers, and to print using the object's
16910 gdb_disassembler instead of calling gdb_print_insn.
16911 (dump_insns): Use gdb_pretty_print_disassembler.
16912 * disasm.h (gdb_pretty_print_insn): Delete declaration.
16913 (gdb_pretty_print_disassembler): New class.
16914 * record-btrace.c (btrace_insn_history): Use
16915 gdb_pretty_print_disassembler.
16916
16917 2017-02-02 Pedro Alves <palves@redhat.com>
16918
16919 * ada-lang.c (type_as_string): Use string_file.
16920 * ada-valprint.c (ada_print_floating): Use string_file.
16921 * ada-varobj.c (ada_varobj_scalar_image)
16922 (ada_varobj_get_value_image): Use string_file.
16923 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
16924 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
16925 * breakpoint.c (update_inserted_breakpoint_locations)
16926 (insert_breakpoint_locations, reattach_breakpoints)
16927 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
16928 (print_it_watchpoint): Use string_file.
16929 (save_breakpoints): Use stdio_file.
16930 * c-exp.y (oper): Use string_file.
16931 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
16932 tee_file.
16933 (pop_output_files): Use delete.
16934 (handle_redirections): Use stdio_file and tee_file.
16935 * cli/cli-setshow.c (do_show_command): Use string_file.
16936 * compile/compile-c-support.c (c_compute_program): Use
16937 string_file.
16938 * compile/compile-c-symbols.c (generate_vla_size): Take a
16939 'string_file &' instead of a 'ui_file *'.
16940 (generate_c_for_for_one_variable): Take a 'string_file &' instead
16941 of a 'ui_file *'. Use string_file.
16942 (generate_c_for_variable_locations): Take a 'string_file &'
16943 instead of a 'ui_file *'.
16944 * compile/compile-internal.h (generate_c_for_for_one_variable):
16945 Take a 'string_file &' instead of a 'ui_file *'.
16946 * compile/compile-loc2c.c (push, pushf, unary, binary)
16947 (print_label, pushf_register_address, pushf_register)
16948 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
16949 'ui_file *'. Adjust.
16950 * compile/compile.c (compile_to_object): Use string_file.
16951 * compile/compile.h (compile_dwarf_expr_to_c)
16952 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
16953 'ui_file *'.
16954 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
16955 (replace_typedefs_qualified_name): Use string_file and
16956 obstack_copy0.
16957 * disasm.c (gdb_pretty_print_insn): Use string_file.
16958 (gdb_disassembly): Adjust reference the null_stream global.
16959 (do_ui_file_delete): Delete.
16960 (gdb_insn_length): Use null_stream.
16961 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
16962 * dwarf2loc.c (dwarf2_compile_property_to_c)
16963 (locexpr_generate_c_location, loclist_generate_c_location): Take a
16964 'string_file &' instead of a 'ui_file *'.
16965 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
16966 * dwarf2read.c (do_ui_file_peek_last): Delete.
16967 (dwarf2_compute_name): Use string_file.
16968 * event-top.c (gdb_setup_readline): Use stdio_file.
16969 * gdbarch.sh (verify_gdbarch): Use string_file.
16970 * gdbtypes.c (safe_parse_type): Use null_stream.
16971 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
16972 string_file.
16973 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
16974 'string_file *' instead of a 'ui_file *'.
16975 (gdbscm_arch_disassemble): Use string_file.
16976 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
16977 * guile/scm-ports.c (class ioscm_file_port): Now a class that
16978 inherits from ui_file.
16979 (ioscm_file_port_delete, ioscm_file_port_rewind)
16980 (ioscm_file_port_put): Delete.
16981 (ioscm_file_port_write): Rename to ...
16982 (ioscm_file_port::write): ... this. Remove file_port_magic
16983 checks.
16984 (ioscm_file_port_new): Delete.
16985 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
16986 ui_file_up.
16987 * guile/scm-type.c (tyscm_type_name): Use string_file.
16988 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
16989 Use string_file.
16990 * infcmd.c (print_return_value_1): Use string_file.
16991 * infrun.c (print_target_wait_results): Use string_file.
16992 * language.c (add_language): Use string_file.
16993 * location.c (explicit_to_string_internal): Use string_file.
16994 * main.c (captured_main_1): Use null_file.
16995 * maint.c (maintenance_print_architecture): Use stdio_file.
16996 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
16997 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
16998 event_channel>: Change type to mi_console_file pointer.
16999 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
17000 (mi_console_file_delete): Delete.
17001 (struct mi_console_file): Delete.
17002 (mi_console_file_magic): Delete.
17003 (mi_console_file_new): Delete.
17004 (mi_console_file::mi_console_file): New.
17005 (mi_console_file_delete): Delete.
17006 (mi_console_file_fputs): Delete.
17007 (mi_console_file::write): New.
17008 (mi_console_raw_packet): Delete.
17009 (mi_console_file::flush): New.
17010 (mi_console_file_flush): Delete.
17011 (mi_console_set_raw): Rename to ...
17012 (mi_console_file::set_raw): ... this.
17013 * mi/mi-console.h (class mi_console_file): New class.
17014 (mi_console_file_new, mi_console_set_raw): Delete.
17015 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
17016 (mi_set_logging): Use delete and tee_file. Adjust.
17017 * mi/mi-main.c (output_register): Use string_file.
17018 (mi_cmd_data_evaluate_expression): Use string_file.
17019 (mi_cmd_data_read_memory): Use string_file.
17020 (mi_cmd_execute, print_variable_or_computed): Use string_file.
17021 * mi/mi-out.c (mi_ui_out::main_stream): New.
17022 (mi_ui_out::rewind): Use main_stream and
17023 string_file.
17024 (mi_ui_out::put): Use main_stream and string_file.
17025 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
17026 Allocate a 'string_file' instead.
17027 (mi_out_new): Don't allocate a mem_fileopen stream here.
17028 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
17029 (mi_ui_out::main_stream): Declare method.
17030 * printcmd.c (eval_command): Use string_file.
17031 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
17032 * python/py-arch.c (archpy_disassemble): Use string_file.
17033 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
17034 * python/py-frame.c (frapy_str): Use string_file.
17035 * python/py-framefilter.c (py_print_type, py_print_single_arg):
17036 Use string_file.
17037 * python/py-type.c (typy_str): Use string_file.
17038 * python/py-unwind.c (unwind_infopy_str): Use string_file.
17039 * python/py-value.c (valpy_str): Use string_file.
17040 * record-btrace.c (btrace_insn_history): Use string_file.
17041 * regcache.c (regcache_print): Use stdio_file.
17042 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
17043 * remote.c (escape_buffer): Use string_file.
17044 * rust-lang.c (rust_get_disr_info): Use string_file.
17045 * serial.c (serial_open_ops_1): Use stdio_file.
17046 (do_serial_close): Use delete.
17047 * stack.c (print_frame_arg): Use string_file.
17048 (print_frame_args): Remove local mem_fileopen stream, not used.
17049 (print_frame): Use string_file.
17050 * symmisc.c (maintenance_print_symbols): Use stdio_file.
17051 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
17052 Take a 'string_file *' instead of a 'ui_file *'.
17053 * top.c (new_ui): Use stdio_file and stderr_file.
17054 (free_ui): Use delete.
17055 (execute_command_to_string): Use string_file.
17056 (quit_confirm): Use string_file.
17057 * tracepoint.c (collection_list::append_exp): Use string_file.
17058 * tui/tui-disasm.c (tui_disassemble): Use string_file.
17059 * tui/tui-file.c: Don't include "ui-file.h".
17060 (enum streamtype, struct tui_stream): Delete.
17061 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
17062 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
17063 (tui_file::tui_file): New method.
17064 (tui_file_fputs): Delete.
17065 (tui_file_get_strbuf): Delete.
17066 (tui_file::puts): New method.
17067 (tui_file_adjust_strbuf): Delete.
17068 (tui_file_flush): Delete.
17069 (tui_file::flush): New method.
17070 * tui/tui-file.h: Tweak intro comment.
17071 Include ui-file.h.
17072 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
17073 (tui_file_adjust_strbuf): Delete declarations.
17074 (class tui_file): New class.
17075 * tui/tui-io.c (tui_initialize_io): Use tui_file.
17076 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
17077 (tui_register_format): Use string_stream.
17078 * tui/tui-stack.c (tui_make_status_line): Use string_file.
17079 (tui_get_function_from_frame): Use string_file.
17080 * typeprint.c (type_to_string): Use string_file.
17081 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
17082 (null_stream): New global.
17083 (ui_file_delete): Delete.
17084 (ui_file::ui_file): New.
17085 (null_file_isatty): Delete.
17086 (ui_file::~ui_file): New.
17087 (null_file_rewind): Delete.
17088 (ui_file::printf): New.
17089 (null_file_put): Delete.
17090 (null_file_flush): Delete.
17091 (ui_file::putstr): New.
17092 (null_file_write): Delete.
17093 (ui_file::putstrn): New.
17094 (null_file_read): Delete.
17095 (ui_file::putc): New.
17096 (null_file_fputs): Delete.
17097 (null_file_write_async_safe): Delete.
17098 (ui_file::vprintf): New.
17099 (null_file_delete): Delete.
17100 (null_file::write): New.
17101 (null_file_fseek): Delete.
17102 (null_file::puts): New.
17103 (ui_file_data): Delete.
17104 (null_file::write_async_safe): New.
17105 (gdb_flush, ui_file_isatty): Adjust.
17106 (ui_file_put, ui_file_rewind): Delete.
17107 (ui_file_write): Adjust.
17108 (ui_file_write_for_put): Delete.
17109 (ui_file_write_async_safe, ui_file_read): Adjust.
17110 (ui_file_fseek): Delete.
17111 (fputs_unfiltered): Adjust.
17112 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
17113 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
17114 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
17115 (set_ui_file_data): Delete.
17116 (string_file::~string_file, string_file::write)
17117 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
17118 (do_ui_file_as_string, ui_file_as_string): Delete.
17119 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
17120 (struct mem_file): Delete.
17121 (mem_file_new): Delete.
17122 (stdio_file::stdio_file): New.
17123 (mem_file_delete): Delete.
17124 (stdio_file::stdio_file): New.
17125 (mem_fileopen): Delete.
17126 (stdio_file::~stdio_file): New.
17127 (mem_file_rewind): Delete.
17128 (stdio_file::set_stream): New.
17129 (mem_file_put): Delete.
17130 (stdio_file::open): New.
17131 (mem_file_write): Delete.
17132 (stdio_file_magic, struct stdio_file): Delete.
17133 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
17134 (stdio_file::flush): New.
17135 (stdio_file_read): Rename to ...
17136 (stdio_file::read): ... this. Adjust.
17137 (stdio_file_write): Rename to ...
17138 (stdio_file::write): ... this. Adjust.
17139 (stdio_file_write_async_safe): Rename to ...
17140 (stdio_file::write_async_safe) ... this. Adjust.
17141 (stdio_file_fputs): Rename to ...
17142 (stdio_file::puts) ... this. Adjust.
17143 (stdio_file_isatty): Delete.
17144 (stdio_file_fseek): Delete.
17145 (stdio_file::isatty): New.
17146 (stderr_file_write): Rename to ...
17147 (stderr_file::write) ... this. Adjust.
17148 (stderr_file_fputs): Rename to ...
17149 (stderr_file::puts) ... this. Adjust.
17150 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
17151 (stderr_file::stderr_file): New.
17152 (tee_file_magic): Delete.
17153 (struct tee_file): Delete.
17154 (tee_file::tee_file): New.
17155 (tee_file_new): Delete.
17156 (tee_file::~tee_file): New.
17157 (tee_file_delete): Delete.
17158 (tee_file_flush): Rename to ...
17159 (tee_file::flush): ... this. Adjust.
17160 (tee_file_write): Rename to ...
17161 (tee_file::write): ... this. Adjust.
17162 (tee_file::write_async_safe): New.
17163 (tee_file_fputs): Rename to ...
17164 (tee_file::puts): ... this. Adjust.
17165 (tee_file_isatty): Rename to ...
17166 (tee_file::isatty): ... this. Adjust.
17167 * ui-file.h (struct obstack, struct ui_file): Don't
17168 forward-declare.
17169 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
17170 (ui_file_write_ftype)
17171 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
17172 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
17173 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
17174 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
17175 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
17176 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
17177 (set_ui_file_fseek): Delete.
17178 (ui_file_data, ui_file_delete, ui_file_rewind)
17179 (struct ui_file): New.
17180 (ui_file_up): New.
17181 (class null_file): New.
17182 (null_stream): Declare.
17183 (ui_file_write_for_put, ui_file_put): Delete.
17184 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
17185 Delete.
17186 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
17187 (gdb_fopen, tee_file_new): Delete.
17188 (struct string_file): New.
17189 (struct stdio_file): New.
17190 (stdio_file_up): New.
17191 (struct stderr_file): New.
17192 (class tee_file): New.
17193 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
17194 of a 'ui_file *'. Adjust.
17195 * ui-out.h (class ui_out) <field_stream>: Likewise.
17196 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
17197 (null_stream): Delete.
17198 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
17199 Adjust.
17200 * utils.h (struct ui_file): Delete forward declaration..
17201 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
17202 (error_stream): Take a 'string_file &' instead of a
17203 'ui_file *'.
17204 * varobj.c (varobj_value_get_print_value): Use string_file.
17205 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
17206 * gdbarch.c: Regenerate.
17207
17208 2017-02-02 Pedro Alves <palves@redhat.com>
17209
17210 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
17211 (gdb_pretty_print_insn): ... this. Now a free function. Add back
17212 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
17213 Adjust to call gdb_print_insn instead of
17214 gdb_disassembler::print_insn.
17215 (dump_insns, do_mixed_source_and_assembly_deprecated)
17216 (do_mixed_source_and_assembly, do_assembly_only): Add back a
17217 'gdbarch' parameter. Remove gdb_disassembler parameter.
17218 (gdb_disassembly): Don't allocate a gdb_disassembler here.
17219 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
17220 declaration.
17221 (gdb_pretty_print_insn): Re-add declaration.
17222 * record-btrace.c (btrace_insn_history): Don't allocate a
17223 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
17224
17225 2017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
17226
17227 * disasm.h (gdb_disassembly): Remove file_string parameter.
17228 * disasm.c (gdb_disassembly): Likewise.
17229 * cli/cli-cmds.c (print_disassembly): Adapt.
17230 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
17231 * stack.c (do_gdb_disassembly): Likewise.
17232
17233 2017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
17234
17235 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
17236 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
17237 targets. And if the implicit value is longer than needed, extract
17238 the first bytes instead of the "least significant" ones.
17239
17240 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
17241
17242 * btrace.c (btrace_enable): Do not call btrace_add_pc for
17243 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
17244 (btrace_fetch): Assert can_access_registers_ptid.
17245 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
17246 validate_registers_access.
17247
17248 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
17249
17250 * gdbthread.h (can_access_registers_ptid): New.
17251 * thread.c (can_access_registers_ptid): New.
17252
17253 2017-02-01 Pedro Alves <palves@redhat.com>
17254
17255 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
17256
17257 2017-01-31 Pedro Alves <palves@redhat.com>
17258
17259 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
17260 Fix typos.
17261
17262 2017-01-31 Pedro Alves <palves@redhat.com>
17263
17264 * stack.c (print_frame_args): Remove local mem_fileopen stream,
17265 not used.
17266
17267 2017-01-31 Pedro Alves <palves@redhat.com>
17268
17269 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
17270
17271 2017-01-31 Pedro Alves <palves@redhat.com>
17272
17273 * common/scoped_restore.h
17274 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
17275 change the value's parameter type to T2.
17276 (make_scoped_restore): Likewise.
17277
17278 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
17279 Richard Henderson <rth@redhat.com>
17280
17281 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
17282 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
17283 GS_BASE for older kernels.
17284 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
17285 GS_BASE for older kernels.
17286 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
17287 and GS_BASE to the offset table.
17288 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
17289 system register group.
17290 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
17291 for older kernels.
17292 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
17293 amd64 ABI.
17294 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
17295 AMD64_GSBASE_REGNUM.
17296 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
17297 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
17298 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
17299 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
17300 i386/64bit-segments.xml in those rules.
17301 * features/i386/64bit-segments.xml: New file.
17302 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
17303 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
17304 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
17305 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
17306 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
17307 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
17308 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
17309 * features/i386/amd64-avx-linux.c: Regenerated.
17310 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
17311 * features/i386/amd64-avx-mpx.c: Regenerated.
17312 * features/i386/amd64-avx512-linux.c: Regenerated.
17313 * features/i386/amd64-linux.c: Regenerated.
17314 * features/i386/amd64-mpx-linux.c: Regenerated.
17315 * features/i386/i386-avx-mpx-linux.c: Regenerated.
17316 * features/i386/i386-avx-mpx.c: Regenerated.
17317 * features/i386/x32-avx-linux.c: Regenerated.
17318 * features/i386/x32-avx512-linux.c: Regenerated.
17319 * regformats/i386/amd64-avx-linux.dat: Regenerated.
17320 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
17321 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
17322 * regformats/i386/amd64-linux.dat: Regenerated.
17323 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
17324 * regformats/i386/x32-avx-linux.dat: Regenerated.
17325 * regformats/i386/x32-avx512-linux.dat: Regenerated.
17326 * regformats/i386/x32-linux.dat: Regenerated.
17327
17328 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
17329
17330 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
17331 Set to AMD64_NUM_REGS.
17332
17333 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
17334
17335 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
17336 that checks validity of a register number.
17337
17338 2017-01-27 Kees Cook <keescook@google.com>
17339
17340 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
17341 fetch_fpregs if target has fpa registers.
17342 (arm_linux_store_inferior_registers): Call store_fpregs if target
17343 has fpa registers.
17344
17345 2017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
17346
17347 * cris-tdep.c (cris_gdbarch_init): Remove check for
17348 info.byte_order and force it to BFD_ENDIAN_LITTLE.
17349
17350 2017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
17351
17352 * corelow.c (get_core_register_section): Check for regset
17353 existence before checking for REGSET_VARIABLE_SIZE.
17354
17355 2017-01-26 Yao Qi <yao.qi@linaro.org>
17356 Pedro Alves <palves@redhat.com>
17357
17358 PR gdb/20939
17359 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
17360 call memory_error, save memaddr instead.
17361 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
17362 negative, cal memory_error.
17363 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
17364
17365 2017-01-26 Yao Qi <yao.qi@linaro.org>
17366
17367 * disasm-selftests.c (memory_error_test): New function.
17368 (_initialize_disasm_selftests): Register memory_error_test.
17369
17370 2017-01-26 Yao Qi <yao.qi@linaro.org>
17371
17372 * Makefile.in (SFILES): Add disasm-selftests.c and
17373 selftest-arch.c.
17374 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
17375 * disasm-selftests.c: New file.
17376 * selftest-arch.c: New file.
17377 * selftest-arch.h: New file.
17378
17379 2017-01-26 Yao Qi <yao.qi@linaro.org>
17380
17381 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
17382 to bfd_arch_mep. Don't return 0 if section is not
17383 found. Call print_insn_mep.
17384
17385 2017-01-26 Pedro Alves <palves@redhat.com>
17386 Yao Qi <yao.qi@linaro.org>
17387
17388 * arm-tdep.c: Include "disasm.h".
17389 (gdb_print_insn_arm): Update code to get gdbarch.
17390 * disasm.c (dis_asm_read_memory): Change it to
17391 gdb_disassembler::dis_asm_read_memory.
17392 (dis_asm_memory_error): Likewise.
17393 (dis_asm_print_address): Likewise.
17394 (gdb_pretty_print_insn): Change it to
17395 gdb_disassembler::pretty_print_insn.
17396 (dump_insns): Add one argument gdb_disassemlber. All
17397 callers updated.
17398 (do_mixed_source_and_assembly_deprecated): Likewise.
17399 (do_mixed_source_and_assembly): Likewise.
17400 (do_assembly_only): Likewise.
17401 (gdb_disassembler::gdb_disassembler): New.
17402 (gdb_disassembler::print_insn): New.
17403 * disasm.h (class gdb_disassembler): New.
17404 (gdb_pretty_print_insn): Remove declaration.
17405 (gdb_disassemble_info): Likewise.
17406 * guile/scm-disasm.c (class gdbscm_disassembler): New.
17407 (gdbscm_disasm_read_memory_worker): Update.
17408 (gdbscm_disasm_read_memory): Update.
17409 (gdbscm_disasm_memory_error): Remove.
17410 (gdbscm_disasm_print_address): Remove.
17411 (gdbscm_disassembler::gdbscm_disassembler): New.
17412 (gdbscm_print_insn_from_port): Update.
17413 * mips-tdep.c: Include disasm.h.
17414 (gdb_print_insn_mips): Update code to get gdbarch.
17415 * record-btrace.c (btrace_insn_history): Update.
17416 * spu-tdep.c: Include disasm.h.
17417 (struct spu_dis_asm_data): Remove.
17418 (struct spu_dis_asm_info): New.
17419 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
17420 SPU id.
17421 (gdb_print_insn_spu): Cast disassemble_info to
17422 spu_dis_asm_info.
17423
17424 2017-01-26 Yao Qi <yao.qi@linaro.org>
17425
17426 * disasm.c (do_ui_file_delete): Delete.
17427 (gdb_insn_length): Move code creating stream to ...
17428 * utils.c (null_stream): ... here. New function.
17429 * utils.h (null_stream): Declare.
17430
17431 2017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
17432
17433 * python/py-inferior.c (find_thread_object): Return directly
17434 from the loop. Remove "found" variable.
17435
17436 2017-01-21 Joel Brobecker <brobecker@adacore.com>
17437
17438 GDB 7.12.1 released.
17439
17440 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
17441
17442 * python/py-function.c (fnpy_call): Reorder declarations to have
17443 the gdbpy_enter object declared first.
17444 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
17445
17446 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
17447
17448 PR python/21068
17449 * python/python-internal.h (PyMem_RawMalloc): Define for
17450 Python < 3.4.
17451 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
17452 PyMem_RawMalloc instead of PyMem_Malloc.
17453
17454 2017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
17455 Luis Machado <lgustavo@codesourcery.com>
17456
17457 * NEWS (New commands): Mention flash-erase.
17458 (New MI commands): Mention target-flash-erase.
17459 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
17460 command.
17461 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
17462 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
17463 * target.c (flash_erase_command): New function.
17464 (initialize_targets): Add new flash-erase command.
17465 * target.h (flash_erase_command): New declaration.
17466
17467 2017-01-20 Joel Brobecker <brobecker@adacore.com>
17468
17469 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
17470 HAVE_SYS_PROCFS_H is defined.
17471
17472 2017-01-18 Alan Hayward <alan.hayward@arm.com>
17473
17474 * remote.c (struct cached_reg): Change data into a pointer.
17475 * (stop_reply_dtr): Free data pointers before deleting vector.
17476 (process_stop_reply): Likewise.
17477 (remote_parse_stop_reply): Allocate space for data
17478
17479 2017-01-18 Alan Hayward <alan.hayward@arm.com>
17480
17481 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
17482 MAX_REGISTER_SIZE.
17483 (amd64_pseudo_register_read_value): Likewise.
17484 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
17485 (store_register_using_P): Likewise.
17486 * regcache.c (regcache_xfer_part): Likewise.
17487
17488 2017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
17489
17490 Split real and pseudo registers.
17491 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
17492 (sparc32_pseudo_regnum): New enum.
17493 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
17494 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
17495 (SPARC32_CP0_REGISTERS): New macro.
17496 (sparc32_pseudo_register_name): New function.
17497 (sparc32_register_name): Use sparc32_pseudo_register_name.
17498 (sparc32_pseudo_register_type): New function.
17499 (sparc32_register_type): Use sparc32_pseudo_register_type.
17500 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
17501 pseudo register numbers.
17502 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
17503 (SPARC64_CP0_REGISTERS): New macro.
17504 (sparc64_pseudo_register_name): New function.
17505 (sparc64_register_name): Use sparc64_pseudo_register_name.
17506 (sparc64_pseudo_register_type): New function.
17507 (sparc64_register_type): Use sparc64_pseudo_register_type.
17508 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
17509 pseudo register numbers.
17510 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
17511 sparc64_store_arguments): Handle pseudo register numbers.
17512
17513 2017-01-13 Yao Qi <yao.qi@linaro.org>
17514
17515 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
17516 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
17517 output.
17518 (getpkt_or_notif_sane_1): Likewise.
17519
17520 2017-01-13 Yao Qi <yao.qi@linaro.org>
17521
17522 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
17523 of CC. Pass "-x c++-header" instead of "-x c".
17524
17525 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
17526
17527 * remote.c (remote_can_async_p): Update comment.
17528
17529 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
17530
17531 * linux-nat.c (linux_nat_can_async_p): Update comment.
17532
17533 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
17534
17535 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
17536
17537 2017-01-11 Simon Marchi <simon.marchi@ericsson.com>
17538
17539 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
17540
17541 2017-01-10 Tom Tromey <tom@tromey.com>
17542
17543 * python/py-type.c (typy_legacy_template_argument): Update.
17544 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
17545 ~demangle_parse_info): Declare new members.
17546 (cp_demangled_name_to_comp): Return unique_ptr.
17547 (cp_demangled_name_parse_free)
17548 (make_cleanup_cp_demangled_name_parse_free)
17549 (cp_new_demangle_parse_info): Remove.
17550 * cp-support.c (do_demangled_name_parse_free_cleanup)
17551 (make_cleanup_cp_demangled_name_parse_free): Remove.
17552 (inspect_type, cp_canonicalize_string_full)
17553 (cp_canonicalize_string): Update.
17554 (mangled_name_to_comp): Change return type.
17555 (cp_class_name_from_physname, method_name_from_physname)
17556 (cp_func_name, cp_remove_params): Update.
17557 * cp-name-parser.y (demangle_parse_info): New constructor, from
17558 cp_new_demangle_parse_info.
17559 (~demangle_parse_info): New destructor, from
17560 cp_demangled_name_parse_free.
17561 (cp_merge_demangle_parse_infos): Update.
17562 (cp_demangled_name_to_comp): Change return type.
17563
17564 2017-01-10 Tom Tromey <tom@tromey.com>
17565
17566 * top.c (prevent_dont_repeat): Change return type.
17567 * python/python.c (execute_gdb_command): Use std::string.
17568 Update.
17569 * guile/guile.c (gdbscm_execute_gdb_command): Update.
17570 * command.h (prevent_dont_repeat): Change return type.
17571 * breakpoint.c (bpstat_do_actions_1): Update.
17572
17573 2017-01-10 Tom Tromey <tom@tromey.com>
17574
17575 * value.h (scoped_value_mark::~scoped_value_mark): Call
17576 free_to_mark.
17577 (scoped_value_mark::free_to_mark): New method.
17578 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
17579 scoped_value_mark.
17580
17581 2017-01-10 Tom Tromey <tom@tromey.com>
17582
17583 * python/py-value.c (valpy_dereference, valpy_referenced_value)
17584 (valpy_reference_value, valpy_const_value, valpy_get_address)
17585 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
17586 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
17587 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
17588 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
17589 scoped_value_mark.
17590 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
17591 * value.h (scoped_value_mark): New class.
17592
17593 2017-01-10 Tom Tromey <tom@tromey.com>
17594
17595 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
17596 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
17597 * psymtab.c (discard_psymtabs_upto): Remove.
17598 (make_cleanup_discard_psymtabs): Remove.
17599 (struct psymtab_state): Remove.
17600
17601 2017-01-10 Tom Tromey <tom@tromey.com>
17602
17603 * record-full.c (record_full_save_cleanups): Remove.
17604 (record_full_save): Use gdb::unlinker.
17605 * gcore.c (do_bfd_delete_cleanup): Remove.
17606 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
17607 cleanups.
17608 * dwarf2read.c (unlink_if_set): Remove.
17609 (write_psymtabs_to_index): Use gdb::unlinker.
17610 * common/gdb_unlinker.h: New file.
17611
17612 2017-01-10 Tom Tromey <tom@tromey.com>
17613
17614 * windows-tdep.c (windows_xfer_shared_library): Update.
17615 * windows-nat.c (windows_make_so): Update.
17616 * utils.h (make_cleanup_bfd_unref): Remove.
17617 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
17618 * symfile.h (symfile_bfd_open)
17619 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
17620 * symfile.c (read_symbols, symbol_file_add)
17621 (separate_debug_file_exists): Update.
17622 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
17623 (generic_load, reread_symbols): Update.
17624 * symfile-mem.c (symbol_file_add_from_memory): Update.
17625 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
17626 (spu_symbol_file_add_from_memory): Update.
17627 * solist.h (struct target_so_ops) <bfd_open>: Return
17628 gdb_bfd_ref_ptr.
17629 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
17630 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
17631 gdb_bfd_ref_ptr.
17632 (solib_map_sections, reload_shared_libraries_1): Update.
17633 * solib-svr4.c (enable_break): Update.
17634 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
17635 * solib-frv.c (enable_break2): Update.
17636 * solib-dsbt.c (enable_break): Update.
17637 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
17638 gdb_bfd_ref_ptr.
17639 (darwin_solib_get_all_image_info_addr_at_init): Update.
17640 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
17641 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
17642 * record-full.c (record_full_save): Update.
17643 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
17644 * procfs.c (insert_dbx_link_bpt_in_file): Update.
17645 * minidebug.c (find_separate_debug_file_in_section): Return
17646 gdb_bfd_ref_ptr.
17647 * machoread.c (macho_add_oso_symfile): Change abfd to
17648 gdb_bfd_ref_ptr.
17649 (macho_symfile_read_all_oso): Update.
17650 (macho_check_dsym): Return gdb_bfd_ref_ptr.
17651 (macho_symfile_read): Update.
17652 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
17653 (jit_bfd_try_read_symtab): Update.
17654 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
17655 (gdb_bfd_openw, gdb_bfd_openr_iovec)
17656 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
17657 gdb_bfd_ref_ptr.
17658 (gdb_bfd_ref_policy): New struct.
17659 (gdb_bfd_ref_ptr): New typedef.
17660 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
17661 (gdb_bfd_openw, gdb_bfd_openr_iovec)
17662 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
17663 gdb_bfd_ref_ptr.
17664 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
17665 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
17666 (gcore_command): Update.
17667 * exec.c (exec_file_attach): Update.
17668 * elfread.c (elf_symfile_read): Update.
17669 * dwarf2read.c (dwarf2_get_dwz_file): Update.
17670 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
17671 (open_and_init_dwo_file): Update.
17672 (open_dwp_file): Return gdb_bfd_ref_ptr.
17673 (open_and_init_dwp_file): Update.
17674 * corelow.c (core_open): Update.
17675 * compile/compile-object-load.c (compile_object_load): Update.
17676 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
17677 * coffread.c (coff_symfile_read): Update.
17678 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
17679 gdb_bfd_ref_ptr. Rename.
17680 (dump_bfd_file, restore_command): Update.
17681 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
17682 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
17683 (find_separate_debug_file_by_buildid): Update.
17684
17685 2017-01-10 Tom Tromey <tom@tromey.com>
17686
17687 * common/gdb_ref_ptr.h: New file.
17688 * python/py-ref.h (struct gdbpy_ref_policy): New.
17689 (gdbpy_ref): Now a typedef.
17690
17691 2017-01-10 Tom Tromey <tom@tromey.com>
17692
17693 * utils.h (make_cleanup_htab_delete): Don't declare.
17694 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
17695 Remove.
17696 * linespec.c (decode_compound_collector): Add constructor,
17697 destructor.
17698 (lookup_prefix_sym): Remove cleanup.
17699 (symtab_collector): Add constructor, destructor.
17700 (collect_symtabs_from_filename): Remove cleanup.
17701 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
17702 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
17703 Use htab_up.
17704 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
17705 * dwarf2read.c (dw2_expand_symtabs_matching)
17706 (dw2_map_symbol_filenames, dwarf_decode_macros)
17707 (write_psymtabs_to_index): Use htab_up.
17708 * dwarf2loc.c (func_verify_no_selftailcall)
17709 (call_site_find_chain_1, func_verify_no_selftailcall)
17710 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
17711 std::vector, gdb::unique_xmalloc_ptr.
17712 (call_sitep): Remove typedef.
17713 (dwarf2_locexpr_baton_eval): Remove unused variable.
17714
17715 2017-01-10 Tom Tromey <tom@tromey.com>
17716
17717 * python/python-internal.h (make_cleanup_py_decref)
17718 (make_cleanup_py_xdecref): Don't declare.
17719 * python/py-utils.c (py_decref, make_cleanup_py_decref)
17720 (py_xdecref, make_cleanup_py_xdecref): Remove.
17721
17722 2017-01-10 Tom Tromey <tom@tromey.com>
17723
17724 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
17725 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
17726
17727 2017-01-10 Tom Tromey <tom@tromey.com>
17728
17729 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
17730
17731 2017-01-10 Tom Tromey <tom@tromey.com>
17732
17733 * python/py-utils.c (unicode_to_encoded_string)
17734 (python_string_to_target_string)
17735 (python_string_to_target_python_string)
17736 (python_string_to_host_string, gdbpy_obj_to_string)
17737 (get_addr_from_python): Use gdbpy_ref.
17738
17739 2017-01-10 Tom Tromey <tom@tromey.com>
17740
17741 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
17742 gdbpy_ref.
17743
17744 2017-01-10 Tom Tromey <tom@tromey.com>
17745
17746 * python/python.c (eval_python_command, gdbpy_decode_line)
17747 (gdbpy_run_events, gdbpy_start_type_printers)
17748 (gdbpy_apply_type_printers): Use gdbpy_ref.
17749
17750 2017-01-10 Tom Tromey <tom@tromey.com>
17751
17752 * python/py-param.c (get_doc_string, compute_enum_values): Use
17753 gdbpy_ref.
17754
17755 2017-01-10 Tom Tromey <tom@tromey.com>
17756
17757 * python/py-inferior.c (find_thread_object, build_inferior_list):
17758 Use gdbpy_ref.
17759
17760 2017-01-10 Tom Tromey <tom@tromey.com>
17761
17762 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
17763
17764 2017-01-10 Tom Tromey <tom@tromey.com>
17765
17766 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
17767 gdbpy_ref.
17768
17769 2017-01-10 Tom Tromey <tom@tromey.com>
17770
17771 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
17772 extra incref.
17773 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
17774 Use gdbpy_ref.
17775
17776 2017-01-10 Tom Tromey <tom@tromey.com>
17777
17778 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
17779 gdbpy_ref.
17780
17781 2017-01-10 Tom Tromey <tom@tromey.com>
17782
17783 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
17784 decref results of PyArg_ParseTupleAndKeywords.
17785
17786 2017-01-10 Tom Tromey <tom@tromey.com>
17787
17788 * python/python.c (python_run_simple_file): Use
17789 unique_xmalloc_ptr, gdbpy_ref.
17790
17791 2017-01-10 Tom Tromey <tom@tromey.com>
17792
17793 * python/py-prettyprint.c (print_stack_unless_memory_error)
17794 (print_string_repr, print_children): Use gdbpy_ref.
17795 (dummy_python_frame): New class.
17796 (dummy_python_frame::dummy_python_frame): Rename from
17797 push_dummy_python_frame.
17798 (py_restore_tstate): Remove.
17799
17800 2017-01-10 Tom Tromey <tom@tromey.com>
17801
17802 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
17803
17804 2017-01-10 Tom Tromey <tom@tromey.com>
17805
17806 * python/python.c (ensure_python_env, restore_python_env):
17807 Remove.
17808 * python/python-internal.h (ensure_python_env): Don't declare.
17809 * varobj.h (varobj_ensure_python_env): Don't declare.
17810 * varobj.c (varobj_ensure_python_env): Remove.
17811
17812 2017-01-10 Tom Tromey <tom@tromey.com>
17813
17814 * varobj.c (varobj_value_get_print_value): Use
17815 gdbpy_enter_varobj.
17816
17817 2017-01-10 Tom Tromey <tom@tromey.com>
17818
17819 * python/py-prettyprint.c (print_string_repr, print_children):
17820 Update.
17821 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
17822 of "encoding".
17823 * varobj.c (varobj_value_get_print_value): Update.
17824 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
17825
17826 2017-01-10 Tom Tromey <tom@tromey.com>
17827
17828 * varobj.c (varobj_get_display_hint)
17829 (dynamic_varobj_has_child_method, install_new_value_visualizer)
17830 (varobj_set_visualizer, free_variable): Use
17831 gdbpy_enter_varobj.
17832
17833 2017-01-10 Tom Tromey <tom@tromey.com>
17834
17835 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
17836 (do_finish_initialization): New function. Use gdbpy_ref.
17837 (gdbpy_finish_initialization): Use gdbpy_enter. Call
17838 do_finish_initialization.
17839
17840 2017-01-10 Tom Tromey <tom@tromey.com>
17841
17842 * python/py-param.c (get_set_value, get_show_value): Use
17843 gdbpy_enter, gdbpy_ref.
17844
17845 2017-01-10 Tom Tromey <tom@tromey.com>
17846
17847 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
17848
17849 2017-01-10 Tom Tromey <tom@tromey.com>
17850
17851 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
17852
17853 2017-01-10 Tom Tromey <tom@tromey.com>
17854
17855 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
17856 Use gdbpy_enter_varobj.
17857
17858 2017-01-10 Tom Tromey <tom@tromey.com>
17859
17860 * varobj.c (gdbpy_enter_varobj): New constructor.
17861 * python/python-internal.h (gdbpy_enter_varobj): New class.
17862 * python/py-varobj.c (py_varobj_get_iterator): Use
17863 gdbpy_enter_varobj.
17864
17865 2017-01-10 Tom Tromey <tom@tromey.com>
17866
17867 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
17868 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
17869 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
17870 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
17871 unique_xmalloc_ptr.
17872 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
17873
17874 2017-01-10 Tom Tromey <tom@tromey.com>
17875
17876 * python/py-xmethods.c (invoke_match_method): Use
17877 gdbpy_ref.
17878
17879 2017-01-10 Tom Tromey <tom@tromey.com>
17880
17881 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
17882 gdbpy_enter, gdbpy_ref.
17883
17884 2017-01-10 Tom Tromey <tom@tromey.com>
17885
17886 * python/python.c (python_interactive_command): Use gdbpy_enter.
17887
17888 2017-01-10 Tom Tromey <tom@tromey.com>
17889
17890 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
17891 gdbpy_ref.
17892
17893 2017-01-10 Tom Tromey <tom@tromey.com>
17894
17895 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
17896 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
17897
17898 2017-01-10 Tom Tromey <tom@tromey.com>
17899
17900 * utils.h (htab_deleter): New struct.
17901 (htab_up): New typedef.
17902 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
17903 gdbpy_enter, gdbpy_ref, htab_up.
17904
17905 2017-01-10 Tom Tromey <tom@tromey.com>
17906
17907 * python/py-unwind.c (pending_frame_invalidate): Remove.
17908 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
17909
17910 2017-01-10 Tom Tromey <tom@tromey.com>
17911
17912 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
17913 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
17914
17915 2017-01-10 Tom Tromey <tom@tromey.com>
17916
17917 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
17918
17919 2017-01-10 Tom Tromey <tom@tromey.com>
17920
17921 * python/python.c (gdbpy_eval_from_control_command)
17922 (gdbpy_source_script, gdbpy_run_events)
17923 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
17924 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
17925 gdbpy_enter.
17926
17927 2017-01-10 Tom Tromey <tom@tromey.com>
17928
17929 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
17930
17931 2017-01-10 Tom Tromey <tom@tromey.com>
17932
17933 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
17934
17935 2017-01-10 Tom Tromey <tom@tromey.com>
17936
17937 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
17938 (python_on_inferior_call_pre, python_on_inferior_call_post)
17939 (python_on_memory_change, python_on_register_change)
17940 (python_inferior_exit, python_new_objfile, add_thread_object)
17941 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
17942
17943 2017-01-10 Tom Tromey <tom@tromey.com>
17944
17945 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
17946 (bpfinishpy_handle_exit): Use gdbpy_enter.
17947
17948 2017-01-10 Tom Tromey <tom@tromey.com>
17949
17950 * python/py-cmd.c (cmdpy_destroyer)
17951 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
17952 gdbpy_enter.
17953
17954 2017-01-10 Tom Tromey <tom@tromey.com>
17955
17956 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
17957 gdbpy_enter.
17958 (gdbpy_breakpoint_has_cond): Likewise.
17959
17960 2017-01-10 Tom Tromey <tom@tromey.com>
17961
17962 * python/python.c (gdbpy_enter): New constructor.
17963 (~gdbpy_enter): New destructor.
17964 (restore_python_env, ensure_python_env): Rewrite.
17965 * python/python-internal.h (gdbpy_enter): New class.
17966
17967 2017-01-10 Tom Tromey <tom@tromey.com>
17968
17969 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
17970
17971 2017-01-10 Tom Tromey <tom@tromey.com>
17972
17973 * python/py-value.c (value_has_field, get_field_flag)
17974 (get_field_type, valpy_getitem, convert_value_from_python): Use
17975 gdbpy_ref.
17976
17977 2017-01-10 Tom Tromey <tom@tromey.com>
17978
17979 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
17980 gdbpy_ref.
17981
17982 2017-01-10 Tom Tromey <tom@tromey.com>
17983
17984 * python/py-prettyprint.c (search_pp_list)
17985 (find_pretty_printer_from_objfiles)
17986 (find_pretty_printer_from_progspace)
17987 (find_pretty_printer_from_gdb, find_pretty_printer)
17988 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
17989 gdbpy_ref.
17990
17991 2017-01-10 Tom Tromey <tom@tromey.com>
17992
17993 * python/py-param.c (call_doc_function): Use gdbpy_ref.
17994
17995 2017-01-10 Tom Tromey <tom@tromey.com>
17996
17997 * python/py-linetable.c (build_line_table_tuple_from_pcs)
17998 (ltpy_get_all_source_lines): Use gdbpy_ref.
17999
18000 2017-01-10 Tom Tromey <tom@tromey.com>
18001
18002 * python/py-framefilter.c (extract_sym, extract_value)
18003 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
18004 gdbpy_ref.
18005
18006 2017-01-10 Tom Tromey <tom@tromey.com>
18007
18008 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
18009
18010 2017-01-10 Tom Tromey <tom@tromey.com>
18011
18012 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
18013
18014 2017-01-10 Tom Tromey <tom@tromey.com>
18015
18016 * python/py-function.c (convert_values_to_python, fnpy_init): Use
18017 gdbpy_ref.
18018
18019 2017-01-10 Tom Tromey <tom@tromey.com>
18020
18021 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
18022
18023 2017-01-10 Tom Tromey <tom@tromey.com>
18024
18025 * python/py-type.c (convert_field, make_fielditem, typy_fields)
18026 (typy_range): Use gdbpy_ref.
18027
18028 2017-01-10 Tom Tromey <tom@tromey.com>
18029
18030 * python/py-threadevent.c (create_thread_event_object): Use
18031 gdbpy_ref.
18032 * python/py-stopevent.c (create_stop_event_object): Simplify.
18033 (emit_stop_event): Use gdbpy_ref.
18034 * python/py-signalevent.c (create_signal_event_object): Use
18035 gdbpy_ref.
18036 * python/py-newobjfileevent.c (create_new_objfile_event_object)
18037 (emit_new_objfile_event, create_clear_objfiles_event_object)
18038 (emit_clear_objfiles_event): Use gdbpy_ref.
18039 * python/py-infevents.c (create_inferior_call_event_object)
18040 (create_register_changed_event_object)
18041 (create_memory_changed_event_object, emit_inferior_call_event)
18042 (emit_memory_changed_event, emit_register_changed_event): Use
18043 gdbpy_ref.
18044 * python/py-exitedevent.c (create_exited_event_object)
18045 (emit_exited_event): Use gdbpy_ref.
18046 * python/py-event.h (evpy_emit_event): Remove
18047 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
18048 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
18049 * python/py-continueevent.c (emit_continue_event): Use
18050 gdbpy_ref.
18051 * python/py-breakpoint.c (gdbpy_breakpoint_created)
18052 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
18053 gdbpy_ref.
18054 * python/py-bpevent.c (create_breakpoint_event_object): Use
18055 gdbpy_ref.
18056
18057 2017-01-10 Tom Tromey <tom@tromey.com>
18058
18059 * python/py-ref.h: New file.
18060
18061 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
18062
18063 * cli-out.c (cli_ui_out::do_redirect): Change return type to
18064 void.
18065 * cli-out.h (cli_ui_out::do_redirect): Likewise.
18066 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
18067 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
18068 * ui-out.c (ui_out::redirect): Likewise.
18069 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
18070 * cli/cli-logging.c (set_logging_redirect): Update call site of
18071 ui_out::redirect.
18072 (handle_redirections): Likewise.
18073 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
18074 * top.c (execute_command_to_string): Likewise.
18075 * utils.c (do_ui_out_redirect_pop): Likewise.
18076
18077 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
18078
18079 * stack.c (_initialize_stack): Update "frame" command help message.
18080
18081 2017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
18082
18083 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
18084
18085 2017-01-06 Yao Qi <yao.qi@linaro.org>
18086
18087 * x86-linux-nat.h: Include gdb_proc_service.h.
18088
18089 2017-01-06 Yao Qi <yao.qi@linaro.org>
18090
18091 * ser-base.h: Include serial.h.
18092
18093 2017-01-06 Yao Qi <yao.qi@linaro.org>
18094
18095 * ppc-linux-tdep.h: Include ppc-tdep.h.
18096
18097 2017-01-06 Yao Qi <yao.qi@linaro.org>
18098
18099 * nat/amd64-linux-siginfo.h: Include signal.h.
18100
18101 2017-01-06 Yao Qi <yao.qi@linaro.org>
18102
18103 * nat/aarch64-linux-hw-point.h: Include break-common.h.
18104
18105 2017-01-06 Yao Qi <yao.qi@linaro.org>
18106
18107 * mi/mi-parse.h: Include mi-cmds.h.
18108
18109 2017-01-06 Yao Qi <yao.qi@linaro.org>
18110
18111 * inf-loop.c: Don't include "target.h".
18112 * inf-loop.h: Include it here.
18113
18114 2017-01-06 Yao Qi <yao.qi@linaro.org>
18115
18116 * dfp.h: Include "dboulest.h" and "expression.h".
18117
18118 2017-01-06 Yao Qi <yao.qi@linaro.org>
18119
18120 * ax-gdb.h: Include "ax.h".
18121
18122 2017-01-06 Yao Qi <yao.qi@linaro.org>
18123
18124 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
18125 with nat/gdb_ptrace.h.
18126
18127 2017-01-05 Yao Qi <yao.qi@linaro.org>
18128
18129 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
18130 new line.
18131 (mips64_fbsd_sigframe_init): Likewise.
18132
18133 2017-01-04 John Baldwin <jhb@FreeBSD.org>
18134
18135 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
18136 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
18137
18138 2017-01-04 John Baldwin <jhb@FreeBSD.org>
18139
18140 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
18141 * NEWS: Mention new FreeBSD/mips native configuration.
18142 * config/mips/fbsd.mh: New file.
18143 * configure.host: Add mips*-*-freebsd*.
18144 * mips-fbsd-nat.c: New file.
18145
18146 2017-01-04 John Baldwin <jhb@FreeBSD.org>
18147
18148 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
18149 (ALLDEPFILES): Add mips-fbsd-tdep.c.
18150 * NEWS: Mention new FreeBSD/mips target.
18151 * configure.tgt: Add mips*-*-freebsd*.
18152 * mips-fbsd-tdep.c: New file.
18153 * mips-fbsd-tdep.h: New file.
18154
18155 2017-01-04 Yao Qi <yao.qi@linaro.org>
18156
18157 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
18158 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
18159
18160 2017-01-01 Joel Brobecker <brobecker@adacore.com>
18161
18162 Update copyright year range in all GDB files.
18163
18164 2017-01-01 Joel Brobecker <brobecker@adacore.com>
18165
18166 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
18167
18168 For older changes see ChangeLog-2016.
18169 \f
18170 Local Variables:
18171 mode: change-log
18172 left-margin: 8
18173 fill-column: 74
18174 version-control: never
18175 coding: utf-8
18176 End:
This page took 0.407045 seconds and 5 git commands to generate.