Implement pahole-like 'ptype /o' option
[deliverable/binutils-gdb.git] / gdb / ChangeLog
1 2017-12-15 Sergio Durigan Junior <sergiodj@redhat.com>
2 Pedro Alves <palves@redhat.com>
3
4 PR cli/16224
5 * NEWS (Changes since GDB 8.0): Mention new '/o' flag.
6 * c-typeprint.c (OFFSET_SPC_LEN): New define.
7 (c_type_print_varspec_prefix): New argument 'struct
8 print_offset_data *'.
9 (c_type_print_base_1): New function and prototype.
10 (c_print_type_1): New function, with code from 'c_print_type'.
11 (c_print_type): Use 'c_print_type_1'.
12 (c_type_print_varspec_prefix): New argument 'struct
13 print_offset_data *'. Use it. Call 'c_type_print_base_1'
14 instead of 'c_print_type_base'.
15 (print_spaces_filtered_with_print_options): New function.
16 (output_access_specifier): Take new argument FLAGS. Modify
17 function to call 'print_spaces_filtered_with_print_options'.
18 (c_print_type_vtable_offset_marker): New function.
19 (c_print_type_union_field_offset): New function.
20 (c_print_type_struct_field_offset): New function.
21 (c_print_type_no_offsets): New function.
22 (c_type_print_base_struct_union): New argument 'struct
23 print_offset_data *'. Print offsets and sizes for
24 struct/union/class fields.
25 * typeprint.c (const struct type_print_options
26 type_print_raw_options): Initialize 'print_offsets'.
27 (static struct type_print_options default_ptype_flags):
28 Likewise.
29 (struct print_offset_data print_offset_default_data): New
30 variable.
31 (whatis_exp): Handle '/o' option.
32 (_initialize_typeprint): Add '/o' flag to ptype's help.
33 * typeprint.h (struct print_offset_data): New struct.
34 (struct type_print_options) <print_offsets>: New field.
35
36 2017-12-15 Sergio Durigan Junior <sergiodj@redhat.com>
37
38 * c-typeprint.c (need_access_label_p): New function.
39 (c_type_print_base_struct_union): New function.
40 (c_type_print_base): Move code to handle
41 TYPE_CODE_{STRUCT,UNION} to the functions mentioned above.
42
43 2017-12-15 Richard Henderson <rth@redhat.com>
44 Uros Bizjak <ubizjak@gmail.com>
45
46 PR gdb/19061
47 * alpha-tdep.c (alpha_software_single_step): Call
48 alpha_deal_with_atomic_sequence here.
49 (set_gdbarch_software_single_step): Set to
50 alpha_software_single_step.
51 * nat/linux-ptrace.h [__alpha__]: Define GDB_ARCH_IS_TRAP_BRKPT
52 and GDB_ARCH_IS_TRAP_HWBKPT.
53
54 2017-12-15 Yao Qi <yao.qi@linaro.org>
55
56 * unittests/memory-map-selftests.c: Wrap test with HAVE_LIBEXPAT.
57
58 2017-12-15 Xavier Roirand <roirand@adacore.com>
59
60 * ada-lang.c (ada_value_primitive_field): Handle field search
61 in case of homonyms.
62 (find_struct_field): Ditto.
63 (ada_search_struct_field): Ditto.
64 (ada_value_struct_elt): Ditto.
65 (ada_lookup_struct_elt_type): Ditto.
66
67 2017-12-14 Simon Marchi <simon.marchi@ericsson.com>
68
69 * python/py-breakpoint.c (bppy_init): Use 'O' format specifier
70 for "qualified" and use PyObject_IsTrue.
71
72 2017-12-14 Jan Kratochvil <jan.kratochvil@redhat.com>
73
74 * dwarf2read.c (dw2_debug_names_iterator::next): Support
75 DW_IDX_type_unit.
76 (debug_names::dwarf5_offset_size, unit_kind): New.
77 (debug_names::insert): Add parameter kind.
78 (debug_names::build): Support DW_IDX_type_unit.
79 (debug_names::recursively_write_psymbols): Update
80 (debug_names::write_psymbols caller.
81 (debug_names::write_one_signatured_type_data)
82 (debug_names::write_one_signatured_type): New.
83 (debug_names::index_key, debug_names::symbol_value)
84 (debug_names::write_psymbols): Add kind.
85 (debug_names::write_one_signatured_type): New.
86 (write_debug_names): Move dwarf5_offset_size to debug_names.
87 Use debug_names::write_one_signatured_type for type units.
88
89 2017-12-14 Joel Brobecker <brobecker@adacore.com>
90
91 * ada-lang.c (ada_value_equal): Add handling of typedef types
92 when comparing array objects.
93
94 2017-12-14 Joel Brobecker <brobecker@adacore.com>
95
96 * ada-tasks.c (read_atcb): Properly set task_info->ptid
97 when !target_has_execution as well.
98 (task_command): Remove error when !target_has_execution.
99
100 2017-12-13 Simon Marchi <simon.marchi@ericsson.com>
101
102 * location.h (string_to_event_location): Add match_type
103 parameter.
104 * location.c (string_to_event_location): Likewise.
105 * python/py-breakpoint.c (bppy_init): Handle qualified
106 parameter.
107
108 2017-12-13 Pedro Alves <palves@redhat.com>
109
110 * completer.c (completion_tracker::maybe_add_completion): New
111 'text' and 'word' parameters. Use make_completion_match_str.
112 (completion_tracker::add_completion): New 'text' and 'word'
113 parameters. Pass down.
114 (completion_tracker::recompute_lowest_common_denominator): Change
115 parameter type to gdb::unique_xmalloc_ptr rval ref. Adjust.
116 * completer.h (completion_tracker::add_completion): New 'text' and
117 'word' parameters.
118 (completion_tracker::recompute_lowest_common_denominator): Change
119 parameter type to gdb::unique_xmalloc_ptr rval ref.
120 (completion_tracker::recompute_lowest_common_denominator): Change
121 parameter type to gdb::unique_xmalloc_ptr rval ref.
122 * symtab.c (completion_list_add_name): Pass down 'text' and 'word'
123 as well.
124
125 2017-12-13 Pedro Alves <palves@redhat.com>
126
127 * cli/cli-decode.c (complete_on_cmdlist, complete_on_enum): Use
128 make_completion_match_str.
129 * completer.c: Use gdb::unique_xmalloc_ptr and
130 make_completion_match_str.
131 (make_completion_match_str_1): New.
132 (make_completion_match_str(const char *, const char *,
133 const char *)): New.
134 (make_completion_match_str(gdb::unique_xmalloc_ptr<char> &&,
135 const char *, const char *)): New.
136 * completer.h (make_completion_match_str(const char *,
137 const char *, const char *)): New.
138 (make_completion_match_str(gdb::unique_xmalloc_ptr<char> &&,
139 const char *, const char *)): New.
140 * interps.c (interpreter_completer): Use make_completion_match_str.
141 * symtab.c (completion_list_add_name, add_filename_to_list): Use
142 make_completion_match_str.
143
144 2017-12-13 Stafford Horne <shorne@gmail.com>
145
146 * or1k-tdep.c (or1k_analyse_inst): Use _() wrapper for message
147 strings.
148 (or1k_unwind_pc): Use paddress() instead of %p.
149 (or1k_unwind_sp): Likewise.
150 (or1k_frame_cache): Use host_address_to_string()/paddress()
151 instead of %p and use _() wrapper for message strings.
152
153 2017-12-13 Simon Marchi <simon.marchi@ericsson.com>
154
155 * contrib/ari/gdb_ari.sh: Fix typo in help.
156
157 2017-12-13 Joel Brobecker <brobecker@adacore.com>
158
159 * event-top.c (handle_line_of_input): Set server_command.
160
161 2017-12-12 Stafford Horne <shorne@gmail.com>
162 Stefan Wallentowitz <stefan@wallentowitz.de>
163 Stefan Kristiansson <stefan.kristiansson@saunalahti.fi>
164 Franck Jullien <franck.jullien@gmail.com>
165 Jeremy Bennett <jeremy.bennett@embecosm.com>
166
167 * configure.tgt: Add targets for or1k and or1knd.
168 * or1k-tdep.c: New file.
169 * or1k-tdep.h: New file.
170 * features/Makefile: Add or1k.xml to build.
171 * features/or1k.xml: New file.
172 * features/or1k-core.xml: New file.
173 * features/or1k.c: Generated.
174
175 2017-12-12 Alan Modra <amodra@gmail.com>
176
177 PR tdep/22576
178 * ppc64-tdep.c (ppc64_plt_entry_point): Rewrite to take TOC-relative
179 PLT offset, and retrieve r2 from stack when executing in reverse.
180 (ppc64_standard_linkage1_target): Drop pc param. Calculate offset
181 rather than PLT address.
182 (ppc64_standard_linkage2_target): Likewise.
183 (ppc64_standard_linkage3_target): Likewise.
184 (ppc64_standard_linkage4_target): Likewise.
185 (ppc64_skip_trampoline_code_1): Adjust to suit.
186
187 2017-12-11 Simon Marchi <simon.marchi@ericsson.com>
188
189 PR gdb/22556
190 * remote.c (remote_thread_name): Return NULL if name is empty.
191 (remote_threads_extra_info): Return NULL if extra info is empty.
192
193 2017-12-11 Pedro Alves <palves@redhat.com>
194
195 * defs.h (elf_sym_fns_lazy_psyms, elf_sym_fns_gdb_index)
196 (elf_sym_fns_debug_names): Move to elfread.c.
197 * dwarf2read.c (dwarf2_initialize_objfile): Return a boolean
198 instead of a sym_fns and add 'index_kind' output parameter. Fill
199 the latter in with the index variant kind if using an index.
200 (enum dw_index_kind): Moved to symfile.h.
201 * elfread.c (elf_sym_fns_gdb_index, elf_sym_fns_debug_names)
202 (elf_sym_fns_lazy_psyms): Move from defs.h.
203 (elf_symfile_read): Adjust to new dwarf2_initialize_objfile
204 interface.
205 * symfile.h (enum class dw_index_kind): New, moved from
206 dwarf2read.c.
207 (dwarf2_initialize_objfile): Change prototype.
208
209 2017-12-11 Ulrich Weigand <uweigand@de.ibm.com>
210
211 * target-float.c (mpfr_float_ops::from_target): Use mpfr_set_ui
212 instead of mpfr_set_si to convert mantissa bits.
213
214 2017-12-11 Xavier Roirand <roirand@adacore.com>
215 Joel Brobecker <brobecker@adacore.com>
216
217 * ada-lang.c (ada_tag_value_at_base_address): Change the way
218 tagged type base address is computed.
219 (enum ada_primitive_types) <ada_primitive_type_storage_offset>:
220 New enumerate.
221 (ada_language_arch_info): Set the ada_primitive_type_storage_offset
222 element of lai->primitive_type_vector.
223
224 2017-12-08 Pedro Alves <palves@redhat.com>
225
226 * dwarf2read.c (mock_mapped_index): Reimplement as an extension of
227 mapped_index_base.
228 (check_match): Adjust to use mock_index directly.
229 (check_find_bounds_finds)
230 (test_mapped_index_find_name_component_bounds): Adjust to work
231 with a mapped_index_base.
232
233 2017-12-08 Pedro Alves <palves@redhat.com>
234
235 * dwarf2read.c (struct mapped_index_base): New, partially factored
236 out from ...
237 (struct mapped_index): ... this. Inherit mapped_index_base.
238 (mapped_index::symbol_name_slot_invalid):
239 (mapped_index::symbol_name_at): Add override marker.
240 (mapped_index::symbol_name_count): New.
241 (struct mapped_debug_names): Inherit mapped_index_base.
242 (mapped_debug_names::symbol_name_at): New.
243 (mapped_debug_names::symbol_name_count): New.
244 (mapped_index::find_name_components_bounds): Rename to ...
245 (mapped_index_base::find_name_components_bounds): ... this.
246 (mapped_index::build_name_components): Rename to ...
247 (mapped_index_base::build_name_components): ... this. Adjust to
248 use mapped_index_base::symbol_name_count and
249 mapped_index_base::symbol_name_slot_invalid.
250 (dw2_expand_symtabs_matching_symbol): Take a mapped_index_base
251 instead of a mapped_index. Use
252 dw2_expand_symtabs_matching_symbol.
253
254 2017-12-08 Pedro Alves <palves@redhat.com>
255
256 * dwarf2read.c (mapped_index::symbol_table_slot): New.
257 (mapped_index::address_table): Now a gdb::array_view of const
258 gdb_byte.
259 (mapped_index::symbol_table): Now a gdb::array_view of
260 symbol_table_slot.
261 (mapped_index::address_table_size)
262 (mapped_index::symbol_table_slots): Delete.
263 (create_addrmap_from_index): Adjust.
264 (find_slot_in_mapped_hash): Adjust.
265 (read_index_from_section): Adjust.
266 (dwarf2_read_index): Adjust.
267
268 2017-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
269 Pedro Alves <palves@redhat.com>
270
271 * defs.h (elf_sym_fns_debug_names): New declaration.
272 * dwarf2read.c: Include "hash_enum.h".
273 (mapped_debug_names): New.
274 (struct dwarf2_per_objfile): Add debug_names, debug_aranges and
275 debug_names_table.
276 (dwarf2_elf_names): Add ".debug_names" and ".debug_aranges".
277 (struct dwz_file): Add debug_names.
278 (dwarf2_per_objfile::locate_sections): Handle debug_names and
279 debug_aranges.
280 (locate_dwz_sections): Handle debug_names.
281 (create_signatured_type_table_from_debug_names)
282 (create_addrmap_from_aranges): New.
283 (dwarf2_read_index): Update function comment.
284 (dwarf5_augmentation): Moved up.
285 (read_debug_names_from_section, create_cus_from_debug_names_list)
286 (create_cus_from_debug_names, dwarf2_read_debug_names): New.
287 (dwarf5_djb_hash): Moved up.
288 (dw2_debug_names_iterator): New.
289 (read_indirect_string_at_offset): New declaration.
290 (mapped_debug_names::namei_to_name)
291 (dw2_debug_names_iterator::find_vec_in_debug_names)
292 (dw2_debug_names_iterator::next, dw2_debug_names_lookup_symbol)
293 (dw2_debug_names_dump, dw2_debug_names_expand_symtabs_for_function)
294 (dw2_debug_names_expand_symtabs_matching, dwarf2_debug_names_functions):
295 New.
296 (dwarf2_initialize_objfile): Return also elf_sym_fns_debug_names.
297 (debug_names::djb_hash): Rename it to dwarf5_djb_hash.
298 (debug_names::build): Update djb_hash caller.
299 (write_debug_names): Move out and rename augmentation to
300 dwarf5_augmentation.
301 * elfread.c (elf_sym_fns_debug_names): New.
302 * psymtab.h (dwarf2_debug_names_functions): New declaration.
303 * symfile.h (struct dwarf2_debug_sections): Add debug_names and
304 debug_aranges.
305 * xcoffread.c (dwarf2_xcoff_names): Add debug_names and debug_aranges.
306
307 2017-12-08 Pedro Alves <palves@redhat.com>
308
309 * common/hash_enum.h: New file.
310
311 2017-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
312
313 * dwarf2read.c (create_cu_from_index_list): New from ...
314 (create_cus_from_index_list): ... this function, use it.
315 (dw_expand_symtabs_matching_file_matcher)
316 (dw2_expand_symtabs_matching_one): New from ...
317 (dw2_expand_symtabs_matching): ... this function, use them.
318
319 2017-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
320
321 * defs.h (elf_sym_fns_lazy_psyms, elf_sym_fns_gdb_index): Move here
322 declarations from elfread.c.
323 (dwarf2_initialize_objfile): Change return value.
324 * elfread.c (elf_sym_fns_lazy_psyms, elf_sym_fns_gdb_index): Move these
325 declarations to defs.h.
326 (elf_symfile_read): Adjust dwarf2_initialize_objfile caller.
327 * symfile.h (dwarf2_initialize_objfile): Change return type.
328
329 2017-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
330 Pedro Alves <palves@redhat.com>
331
332 * contrib/gdb-add-index.sh (index): Rename to ...
333 (index4): ... here.
334 (index5, debugstr, debugstrmerge, debugstrerr): New variables.
335 Support also .debug_names and .debug_str.
336 * dwarf2read.c: Include cmath, set, list.
337 (INDEX_SUFFIX): Rename to ...
338 (INDEX4_SUFFIX): ... here.
339 (INDEX5_SUFFIX, DEBUG_STR_SUFFIX): New.
340 (file_write(FILE *, const void *, size_t)): New.
341 (file_write(FILE *, const std::vector<Elem, Alloc> &)): New.
342 (data_buf::append_unsigned_leb128, data_buf::empty): New.
343 (data_buf::file_write): Use ::file_write.
344 (data_buf::c_str, dwarf5_djb_hash, debug_names)
345 (check_dwarf64_offsets): New.
346 (psyms_seen_size, write_gdbindex): New from
347 write_psymtabs_to_index code.
348 (dwarf5_gdb_augmentation, write_debug_names, assert_file_size)
349 (enum dw_index_kind): New.
350 (write_psymtabs_to_index): New parameter index_kind. Support
351 filename_str and out_file_str. Move code to write_gdbindex,
352 possibly call write_debug_names.
353 (save_gdb_index_command): New parameter -dwarf-5.
354 (_initialize_dwarf2_read): Document the new parameter -dwarf-5.
355
356 2017-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
357 Pedro Alves <palves@redhat.com>
358
359 * contrib/cc-with-tweaks.sh: Change interpreter to bash, incl. initial
360 comment.
361 (GDB_ADD_INDEX): New variable.
362 <$want_index>: Call $GDB_ADD_INDEX.
363
364 2017-12-08 Sergio Durigan Junior <sergiodj@redhat.com>
365
366 * dtrace-probe.c (dtrace_process_dof_probe): Do not declare a new
367 "expression_up" inside the TRY block.
368
369 2017-12-08 Yao Qi <yao.qi@linaro.org>
370
371 * breakpoint.c (update_watchpoint): Call
372 address_significant.
373
374 2017-12-08 Yao Qi <yao.qi@linaro.org>
375
376 * breakpoint.c (adjust_breakpoint_address): Call
377 address_significant.
378
379 2017-12-08 Yao Qi <yao.qi@linaro.org>
380
381 * aarch64-tdep.c (aarch64_gdbarch_init): Install gdbarch
382 significant_addr_bit.
383 * gdbarch.sh (significant_addr_bit): New.
384 * gdbarch.c, gdbarch.h: Re-generated.
385 * target.c (memory_xfer_partial): Call address_significant.
386 * utils.c (address_significant): New function.
387 * utils.h (address_significant): Declare.
388
389 2017-12-08 Tom Tromey <tom@tromey.com>
390
391 * printcmd.c (ui_printf): Update. Use std::vector.
392 * common/format.h (struct format_piece): Add constructor.
393 <string>: Now const.
394 (class format_pieces): New class.
395 (parse_format_string, free_format_pieces)
396 (free_format_pieces_cleanup): Remove.
397 * common/format.c (format_pieces::format_pieces): Rename from
398 parse_format_string. Update.
399 (free_format_pieces, free_format_pieces_cleanup): Remove.
400 * breakpoint.c (parse_cmd_to_aexpr): Update. Use std::vector.
401 * ax-gdb.h (gen_printf): Remove argument.
402 * ax-gdb.c (gen_printf): Remove "frags" argument.
403 (maint_agent_printf_command): Update. Use std::vector.
404
405 2017-12-08 Yao Qi <yao.qi@linaro.org>
406
407 PR breakpionts/22567
408 * linespec.c (minsym_found): Set sal.section.
409
410 2017-12-08 Andreas Arnez <arnez@linux.vnet.ibm.com>
411
412 * configure.tgt (s390*-*-linux*): Add symfile-mem.o.
413
414 2017-12-07 Keith Seitz <keiths@redhat.com>
415
416 PR breakpoints/22569
417 * location.c (string_to_explicit_location): When terminating
418 parsing early, break out of enclosing loop instead of returning.
419
420 2017-12-07 Keith Seitz <keiths@redhat.com>
421
422 * NEWS (New commands): Mention set/show print type nested-type-limit.
423 * c-typeprint.c (c_type_print_base): Print out nested types.
424 * dwarf2read.c (struct typedef_field_list): Rename to ...
425 (struct decl_field_list): ... this. Change all uses.
426 (struct field_info) <nested_types_list, nested_types_list_count>:
427 New fields.
428 (add_partial_symbol): Look for nested type definitions in C++, too.
429 (dwarf2_add_typedef): Rename to ...
430 (dwarf2_add_type_defn): ... this.
431 (type_can_define_types): New function.
432 Update assertion to use type_can_define_types.
433 Permit NULL for a field's name.
434 (process_structure_scope): Handle child DIEs of types that can
435 define types.
436 Copy the list of nested types into the type struct.
437 * gdbtypes.h (struct typedef_field): Rename to ...
438 (struct decl_field): ... this. Change all uses.
439 [is_protected, is_private]: New fields.
440 (struct cplus_struct_type) <nested_types, nested_types_count>: New
441 fields.
442 (TYPE_NESTED_TYPES_ARRAY, TYPE_NESTED_TYPES_FIELD)
443 (TYPE_NESTED_TYPES_FIELD_NAME, TYPE_NESTED_TYPES_FIELD_TYPE)
444 (TYPE_NESTED_TYPES_COUNT, TYPE_NESTED_TYPES_FIELD_PROTECTED)
445 (TYPE_NESTED_TYPES_FIELD_PRIVATE): New macros.
446 * typeprint.c (type_print_raw_options, default_ptype_flags): Add
447 default value for print_nested_type_limit.
448 (print_nested_type_limit): New static variable.
449 (set_print_type_nested_types, show_print_type_nested_types): New
450 functions.
451 (_initialize_typeprint): Register new commands for set/show
452 `print-nested-type-limit'.
453 * typeprint.h (struct type_print_options) [print_nested_type_limit]:
454 New field.
455
456 2017-12-07 Tom Tromey <tom@tromey.com>
457
458 PR breakpoints/22511:
459 * breakpoint.c (commands_command_1): Don't throw an exception when
460 no commands have been read.
461
462 2017-12-07 Adam Stylinski <adam.stylinski@etegent.com>
463
464 PR c++/21222
465 * target-descriptions.c (print_c_tdesc::visit_pre): Change type of
466 range-for variable.
467
468 2017-12-07 Simon Marchi <simon.marchi@ericsson.com>
469
470 * common/selftest.h (struct selftest): Add virtual destructor.
471
472 2017-12-07 Phil Muldoon <pmuldoon@redhat.com>
473
474 * python/py-breakpoint.c (bppy_init): Use string_to_event_location
475 over basic location code. Implement explicit location keywords.
476 (bppy_init_validate_args): New function.
477 * NEWS: Document Python explicit breakpoint locations.
478
479 2017-12-07 Joel Brobecker <brobecker@adacore.com>
480
481 * MAINTAINERS: Restore target entries for m68hc11-elf,
482 score-elf and xstormy16-elf, incorrectly removed in a previous
483 patch meant to only update the list of active maintainers.
484
485 2017-12-06 Pedro Alves <palves@redhat.com>
486
487 * break-catch-syscall.c (insert_catch_syscall)
488 (remove_catch_syscall): Adjust to pass reference to
489 inf_data->syscalls_counts directly via gdb::array_view.
490 * fbsd-nat.c (fbsd_set_syscall_catchpoint): Adjust to use bool
491 and gdb::array_view.
492 * linux-nat.c (linux_child_set_syscall_catchpoint): Likewise.
493 * remote.c (remote_set_syscall_catchpoint): Likewise.
494 * target-debug.h (target_debug_print_bool): New.
495 (define target_debug_print_gdb_array_view_const_int): New.
496 * target-delegates.c: Regenerate.
497 * target.h (target_ops) <to_set_syscall_catchpoint>: Use
498 gdb::array_view and bool.
499 (target_set_syscall_catchpoint): Likewise.
500
501 2017-12-06 Simon Marchi <simon.marchi@ericsson.com>
502
503 * break-catch-syscall.c (catch_syscall_completer): Get pointers
504 to syscall group strings after building the string vector.
505
506 2017-12-06 Pedro Alves <palves@redhat.com>
507
508 * remote.c (remote_query_supported): Don't send "xmlRegisters=" if
509 "qXfer:features:read"" is disabled.
510 (remote_write_qxfer, remote_read_qxfer, remote_search_memory):
511 Check packet_config_support instead of packet->support directly.
512
513 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
514
515 * target-descriptions.c (struct tdesc_feature) <registers>: Use
516 tdesc_reg_up typedef.
517 (struct target_desc) <features>: Use tdesc_feature_up typedef.
518
519 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
520
521 * target-descriptions.c (struct tdesc_type): Use default
522 destructor.
523 <u>: Remove.
524 <accept>: Remove.
525 (struct tdesc_type_builtin): New.
526 (struct tdesc_type_vector): New.
527 (struct tdesc_type_with_fields): New.
528 (tdesc_predefined_types): Change type to tdesc_type_builtin[].
529 (tdesc_gdb_type): Remove.
530 (tdesc_register_type): Adjust.
531 (tdesc_create_vector): Create tdesc_type_vector.
532 (tdesc_create_struct): Create tdesc_type_with_fields.
533 (tdesc_set_struct_size): Change parameter type.
534 (tdesc_create_union): Create tdesc_type_with_fields.
535 (tdesc_create_flags): Likewise.
536 (tdesc_create_enum): Likewise.
537 (tdesc_add_field): Change parameter type.
538 (tdesc_add_typed_bitfield): Likewise.
539 (tdesc_add_bitfield): Likewise.
540 (tdesc_add_flag): Likewise.
541 (tdesc_add_enum_value): Likewise.
542 (print_c_tdesc) <visit>: Remove overload with tdesc_type
543 parameter, add overloads for tdesc_type_builtin,
544 tdesc_type_with_fields and tdesc_type_vector.
545 <m_printed_type>: Remove.
546 <m_printed_element_type, m_printed_type_with_fields>: Add.
547 * target-descriptions.h (tdesc_create_enum): Change return type.
548 (tdesc_add_typed_bitfield): Change parameter type.
549 (tdesc_add_enum_value): Change parameter type.
550 * xml-tdesc.c (struct tdesc_parsing_data) <current_type>: Change
551 type to tdesc_type_with_fields.
552 (tdesc_start_struct): Adjust.
553 (tdesc_start_flags): Adjust.
554 (tdesc_start_enum): Adjust.
555 (tdesc_start_field): Adjust.
556 * arch/tdesc.h (struct tdesc_type_builtin): Forward-declare.
557 (struct tdesc_type_vector): Forward-declare.
558 (struct tdesc_type_with_fields): Forward-declare.
559 (tdesc_create_struct): Change return type.
560 (tdesc_create_union): Likewise.
561 (tdesc_create_flags): Likewise.
562 (tdesc_add_field): Change parameter type.
563 (tdesc_set_struct_size): Likewise.
564 (tdesc_add_bitfield): Likewise.
565 (tdesc_add_flag): Likewise.
566 * features: Re-generate C files.
567
568 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
569
570 * target-descriptions.c (tdesc_arch_reg): Remove typedef.
571 (struct tdesc_arch_reg): Add constructor.
572 (DEF_VEC_O (tdesc_arch_reg)): Remove.
573 (struct tdesc_arch_data): Initialize fields.
574 <arch_regs>: Change type to std::vector.
575 (target_find_description): Adjust.
576 (tdesc_find_type): Adjust.
577 (tdesc_data_init): Call tdesc_arch_data constructor.
578 (tdesc_data_alloc): Allocate tdesc_arch_data with new.
579 (tdesc_data_cleanup): Free data with delete.
580 (tdesc_numbered_register): Adjust.
581 (tdesc_find_arch_register): Adjust.
582 (tdesc_use_registers): Adjust.
583
584 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
585
586 * target-descriptions.c (tdesc_type_field): Remove typedef.
587 (DEF_VEC_O (tdesc_type_field)): Remove.
588 (struct tdesc_type_field): Add constructor.
589 <name>: Change type to std::string.
590 (struct tdesc_type) <tdesc_type>: Instantiate vector if the type
591 kind uses it.
592 <~tdesc_type>: Destroy vector if the type kind uses it.
593 <u::u::fields>: Change type to std::vector.
594 (tdesc_gdb_type): Adjust.
595 (tdesc_add_field): Adjust.
596 (tdesc_add_typed_bitfield): Adjust.
597 (tdesc_add_field): Adjust.
598 (tdesc_add_enum_value): Adjust.
599 (class print_c_tdesc) <visit>: Adjust.
600
601 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
602
603 * target-descriptions.c (struct tdesc_type) <name>: Change type
604 to std::string.
605 <~tdesc_type>: Don't manually free name.
606 <operator==>: Adjust.
607 (tdesc_named_type): Adjust.
608 (tdesc_find_type): Adjust.
609 (tdesc_gdb_type): Adjust.
610 (class print_c_tdesc) <visit>: Adjust.
611
612 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
613
614 * target-descriptions.c (tdesc_type_p): Remove typedef.
615 (DEF_VEC_P (tdesc_type_p)): Remove.
616 (struct tdesc_feature) <types>: Change type to std::vector.
617 <~tdesc_feature>: Replace with default implementation.
618 <accept>: Adjust.
619 (tdesc_named_type): Adjust.
620 (tdesc_create_vector): Adjust.
621 (tdesc_create_struct): Adjust.
622 (tdesc_create_union): Adjust.
623 (tdesc_create_flags): Adjust.
624 (tdesc_create_enum): Adjust.
625
626 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
627
628 * target-descriptions.c (struct tdesc_reg) <tdesc_reg>: Change
629 type of name_ parameter, adjust to std::string change.
630 <name, group, type>: Change type to std::string.
631 <~tdesc_reg>: Replace with default implementation.
632 <operator==>: Adjust.
633 (tdesc_find_register_early): Adjust.
634 (tdesc_register_name): Adjust.
635 (tdesc_register_type): Adjust.
636 (tdesc_register_in_reggroup_p): Adjust.
637 (class print_c_tdesc) <visit>: Adjust.
638 (class print_c_feature) <visit>: Adjust.
639 * features/arc-arcompact.c: Re-generate.
640 * features/arc-v2.c: Re-generate.
641
642 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
643
644 * target-descriptions.c (tdesc_reg_p): Remove typedef.
645 (DEF_VEC_P (tdesc_reg_p)): Remove.
646 (struct tdesc_feature) <registers>: Change type to std::vector.
647 <~tdesc_feature>: Don't manually free registers.
648 <accept>: Adjust.
649 <operator==>: Adjust.
650 (tdesc_has_registers): Adjust.
651 (tdesc_find_register_early): Adjust.
652 (tdesc_use_registers): Adjust.
653 (tdesc_create_reg): Adjust.
654
655 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
656
657 * target-descriptions.c (tdesc_feature) <name>: Change type to
658 std::string.
659 <~tdesc_feature>: Don't manually free name.
660 <operator==>: Adjust.
661 (tdesc_find_feature): Adjust.
662 (tdesc_feature_name): Adjust.
663 (class print_c_tdesc) <visit_pre>: Adjust.
664 (class print_c_feature) <visit_pre>: Adjust.
665
666 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
667
668 * target-descriptions.c (tdesc_feature_p): Remove typedef.
669 (DEF_VEC_P (tdesc_feature_p)): Remove.
670 (struct target_desc) <features>: Change type to std::vector.
671 <~target_desc>: Replace with default implementation.
672 <accept>: Adjust.
673 <operator==>: Adjust.
674 (tdesc_has_registers): Adjust.
675 (tdesc_find_feature): Adjust.
676 (tdesc_use_registers): Adjust.
677 (tdesc_create_feature): Adjust.
678
679 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
680
681 * target-descriptions.c (arch_p): Remove typedef.
682 (DEF_VEC_P (arch_p)): Remove.
683 (struct target_desc) <compatible>: Change type to std::vector.
684 <~target_desc>: Don't manually free compatible.
685 (tdesc_compatible_p): Adjust.
686 (tdesc_add_compatible): Adjust.
687 (class print_c_tdesc) <visit_pre>: Adjust.
688
689 2017-12-05 Simon Marchi <simon.marchi@polymtl.ca>
690
691 * target-descriptions.c (property_s): Remove typedef.
692 (DEF_VEC_O (property_s)): Remove.
693 (struct target_desc) <properties>: Make an std::vector.
694 <~target_desc>: Don't manually free properties.
695 (tdesc_property): Adjust.
696 (set_tdesc_property): Adjust.
697 (class print_c_tdesc) <visit_pre>: Adjust.
698
699 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
700
701 * common/gdb_assert.h (gdb_static_assert): Redefine using
702 static_assert.
703
704 2017-12-05 Simon Marchi <simon.marchi@ericsson.com>
705
706 * ada-lang.c (ada_collect_symbol_completion_matches): Remove
707 unused variables.
708 (ada_is_redundant_range_encoding): Likewise.
709 * ada-varobj.c (ada_varobj_get_value_of_array_variable):
710 Likewise.
711 * alpha-tdep.c (alpha_software_single_step): Likewise.
712 * arm-tdep.c (_initialize_arm_tdep): Likewise.
713 * auto-load.c (info_auto_load_cmd): Likewise.
714 * break-catch-syscall.c (insert_catch_syscall): Likewise.
715 (remove_catch_syscall): Likewise.
716 * breakpoint.c (condition_completer): Likewise.
717 (clear_command): Likewise.
718 (update_breakpoint_locations): Likewise.
719 * btrace.c (btrace_disable): Likewise.
720 (btrace_teardown): Likewise.
721 (btrace_maint_update_pt_packets): Likewise.
722 (maint_btrace_clear_cmd): Likewise.
723 * cli/cli-decode.c (lookup_cmd_1): Likewise.
724 (lookup_cmd_composition): Likewise.
725 * cli/cli-dump.c (scan_filename): Likewise.
726 (restore_command): Likewise.
727 * compile/compile-loc2c.c (compute_stack_depth): Likewise.
728 * compile/compile-object-load.c (compile_object_load): Likewise.
729 * compile/compile-object-run.c (compile_object_run): Likewise.
730 * compile/compile.c (compile_to_object): Likewise.
731 * completer.c (filename_completer): Likewise.
732 (complete_files_symbols): Likewise.
733 (complete_expression): Likewise.
734 * corelow.c (core_open): Likewise.
735 * ctf.c (ctf_start): Likewise.
736 (ctf_write_status): Likewise.
737 (ctf_write_uploaded_tsv): Likewise.
738 (ctf_write_definition_end): Likewise.
739 (ctf_open_dir): Likewise.
740 (ctf_xfer_partial): Likewise.
741 (ctf_trace_find): Likewise.
742 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn):
743 Likewise.
744 * dwarf2loc.c (allocate_piece_closure): Likewise.
745 (indirect_pieced_value): Likewise.
746 (dwarf2_evaluate_loc_desc_full): Likewise.
747 * dwarf2read.c (dw2_expand_marked_cus): Likewise.
748 (dw2_expand_symtabs_matching): Likewise.
749 (dw2_map_symbol_filenames): Likewise.
750 (read_and_check_comp_unit_head): Likewise.
751 (read_cutu_die_from_dwo): Likewise.
752 (lookup_dwo_unit): Likewise.
753 (read_comp_units_from_section): Likewise.
754 (dwarf2_compute_name): Likewise.
755 (handle_DW_AT_stmt_list): Likewise.
756 (create_cus_hash_table): Likewise.
757 (create_dwp_v2_section): Likewise.
758 (dwarf2_rnglists_process): Likewise.
759 (dwarf2_ranges_process): Likewise.
760 (dwarf2_record_block_ranges): Likewise.
761 (is_vtable_name): Likewise.
762 (read_formatted_entries): Likewise.
763 (skip_form_bytes): Likewise.
764 * elfread.c (elf_symtab_read): Likewise.
765 * exec.c (exec_file_command): Likewise.
766 * f-valprint.c (f_val_print): Likewise.
767 (info_common_command_for_block): Likewise.
768 * guile/guile.c (initialize_scheme_side): Likewise.
769 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Likewise.
770 * guile/scm-cmd.c (cmdscm_completer): Likewise.
771 (gdbscm_register_command_x): Likewise.
772 * guile/scm-frame.c (gdbscm_frame_read_var): Likewise.
773 * guile/scm-param.c (gdbscm_parameter_value): Likewise.
774 * guile/scm-ports.c (file_port_magic): Likewise.
775 * guile/scm-pretty-print.c (ppscm_search_pp_list): Likewise.
776 (ppscm_pretty_print_one_value): Likewise.
777 (ppscm_print_children): Likewise.
778 * guile/scm-string.c (gdbscm_string_to_argv): Likewise.
779 * guile/scm-symtab.c (gdbscm_sal_symtab): Likewise.
780 * guile/scm-type.c (gdbscm_type_next_field_x): Likewise.
781 * guile/scm-utils.c (gdbscm_parse_function_args): Likewise.
782 * i386-tdep.c (i386_register_reggroup_p): Likewise.
783 * infcmd.c (run_command_1): Likewise.
784 (until_next_fsm_clean_up): Likewise.
785 * linespec.c (linespec_complete): Likewise.
786 (find_label_symbols): Likewise.
787 * m2-valprint.c (m2_val_print): Likewise.
788 * memattr.c (require_user_regions): Likewise.
789 (lookup_mem_region): Likewise.
790 (disable_mem_command): Likewise.
791 (mem_delete): Likewise.
792 * mep-tdep.c (mep_register_name): Likewise.
793 (mep_analyze_prologue): Likewise.
794 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Likewise.
795 * mi/mi-interp.c (mi_on_sync_execution_done): Likewise.
796 * mi/mi-main.c (mi_cmd_trace_frame_collected): Likewise.
797 * microblaze-linux-tdep.c (microblaze_linux_init_abi): Likewise.
798 * minidebug.c (lzma_open): Likewise.
799 * minsyms.c (lookup_minimal_symbol): Likewise.
800 * mips-linux-tdep.c (mips64_fill_fpregset): Likewise.
801 * mips-tdep.c (mips_stub_frame_sniffer): Likewise.
802 (mips_o64_return_value): Likewise.
803 (mips_single_step_through_delay): Likewise.
804 (_initialize_mips_tdep): Likewise.
805 * nios2-tdep.c (nios2_push_dummy_call): Likewise.
806 (nios2_software_single_step): Likewise.
807 * parse.c (find_minsym_type_and_address): Likewise.
808 * psymtab.c (psym_relocate): Likewise.
809 * python/py-breakpoint.c (bppy_get_commands): Likewise.
810 (gdbpy_breakpoint_modified): Likewise.
811 * python/py-infevents.c (create_inferior_call_event_object):
812 Likewise.
813 * python/py-record-btrace.c (btpy_list_item): Likewise.
814 * python/py-type.c (typy_str): Likewise.
815 * python/py-value.c (valpy_call): Likewise.
816 * python/python.c (do_start_initialization): Likewise.
817 * record-btrace.c (record_btrace_insn_history_range): Likewise.
818 (record_btrace_call_history_range): Likewise.
819 (record_btrace_record_method): Likewise.
820 (record_btrace_xfer_partial): Likewise.
821 (btrace_get_frame_function): Likewise.
822 * record-full.c (record_full_open): Likewise.
823 * record.c (get_context_size): Likewise.
824 * registry.h (DEFINE_REGISTRY): Likewise.
825 * remote-fileio.c (remote_fileio_request): Likewise.
826 * remote.c (remote_update_thread_list): Likewise.
827 (remote_check_symbols): Likewise.
828 (remote_commit_resume): Likewise.
829 (remote_interrupt): Likewise.
830 (remote_insert_breakpoint): Likewise.
831 (compare_sections_command): Likewise.
832 * rust-exp.y (super_name): Likewise.
833 (lex_string): Likewise.
834 (convert_ast_to_type): Likewise.
835 (convert_ast_to_expression): Likewise.
836 * rust-lang.c (rust_print_struct_def): Likewise.
837 (rust_print_type): Likewise.
838 (rust_evaluate_subexp): Likewise.
839 * rx-tdep.c (rx_register_type): Likewise.
840 * ser-event.c (serial_event_clear): Likewise.
841 * serial.c (serial_open): Likewise.
842 * spu-tdep.c (spu_overlay_new_objfile): Likewise.
843 * symfile.c (section_is_overlay): Likewise.
844 (overlay_unmapped_address): Likewise.
845 (overlay_mapped_address): Likewise.
846 (simple_overlay_update_1): Likewise.
847 (simple_overlay_update): Likewise.
848 * symtab.c (symbol_find_demangled_name): Likewise.
849 (search_symbols): Likewise.
850 * target-descriptions.c (tdesc_predefined_type): Likewise.
851 * target.c (target_commit_resume): Likewise.
852 * thread.c (print_selected_thread_frame): Likewise.
853 * top.c (new_ui_command): Likewise.
854 (gdb_readline_no_editing): Likewise.
855 * tracefile-tfile.c (tfile_open): Likewise.
856 * tracepoint.c (create_tsv_from_upload): Likewise.
857 * utils.c (quit): Likewise.
858 (defaulted_query): Likewise.
859 * valarith.c (value_concat): Likewise.
860 * xml-syscall.c (xml_list_syscalls_by_group): Likewise.
861 * xml-tdesc.c (target_fetch_description_xml): Likewise.
862 * xtensa-tdep.c (xtensa_pseudo_register_read): Likewise.
863 (xtensa_pseudo_register_write): Likewise.
864
865 2017-12-04 Tom Tromey <tom@tromey.com>
866
867 * NEWS: Mention Rust trait object inspection.
868
869 2017-12-04 Pedro Alves <palves@redhat.com>
870
871 PR gdb/22499
872 * amd64-tdep.c (amd64_insn::rex_offset): Rename to...
873 (amd64_insn::enc_prefix_offset): ... this, and tweak comment.
874 (vex2_prefix_p, vex3_prefix_p): New functions.
875 (amd64_get_insn_details): Adjust to rename. Also skip VEX2 and
876 VEX3 prefixes.
877 (fixup_riprel): Set VEX3.!B.
878
879 2017-12-03 Simon Marchi <simon.marchi@ericsson.com>
880
881 * target.h (mem_region_vector): Remove.
882 (struct target_ops) <to_memory_map>: Change return type to
883 std::vector<mem_region>.
884 * target-debug.h (target_debug_print_mem_region_vector): Rename
885 to ...
886 (target_debug_print_std_vector_mem_region): ... this.
887 * target-delegates.c: Re-generate.
888
889 2017-12-03 Pedro Alves <palves@redhat.com>
890
891 * make-target-delegates (munge_type): Also munge '<', '>', and
892 ':'. Avoid double underscores in identifiers, and trailing
893 underscores.
894 * target-debug.h
895 (target_debug_print_VEC_static_tracepoint_marker_p__p): Rename to
896 ...
897 (target_debug_print_VEC_static_tracepoint_marker_p_p): ... this.
898 * target-delegates.c: Regenerate.
899
900 2017-12-02 Simon Marchi <simon.marchi@polymtl.ca>
901
902 * common/poison.h (XDELETE): Fix typo.
903
904 2017-12-01 Andrew Cagney <cagney@redhat.com>
905 Joel Brobecker <brobecker@adacore.com>
906 Sergio Durigan Junior <sergiodj@redhat.com>
907
908 * NEWS (Changes since GDB 8.0: Mention new '--readnever'
909 feature.
910 * coffread.c (coff_symfile_read): Do not map over sections with
911 'coff_locate_sections' if readnever is on.
912 * dwarf2read.c (dwarf2_has_info): Return 0 if
913 readnever is on.
914 * elfread.c (elf_symfile_read): Do not map over sections with
915 'elf_locate_sections' if readnever is on.
916 * main.c (validate_readnow_readnever): New function.
917 (captured_main_1): Add support for --readnever.
918 (print_gdb_help): Document --readnever.
919 * objfile-flags.h (enum objfile_flag) <OBJF_READNEVER>: New
920 flag.
921 * symfile.c (readnever_symbol_files): New global.
922 (symbol_file_add_with_addrs): Set 'OBJF_READNEVER' when
923 'READNEVER_SYMBOL_FILES' is set.
924 (validate_readnow_readnever): New function.
925 (symbol_file_command): Handle '-readnever' option.
926 Call 'validate_readnow_readnever'.
927 (add_symbol_file_command): Handle '-readnever' option.
928 Call 'validate_readnow_readnever'.
929 (_initialize_symfile): Document new '-readnever' option for
930 both 'symbol-file' and 'add-symbol-file' commands.
931 * top.h (readnever_symbol_files): New extern global.
932 * xcoffread.c (xcoff_initial_scan): Do not read debug
933 information if readnever is on.
934
935 2017-12-01 Sergio Durigan Junior <sergiodj@redhat.com>
936
937 * symfile.c (symbol_file_command): Call
938 'symbol_file_add_main_1' only after processing all command
939 line options.
940 (add_symbol_file_command): Modify logic to make arguments
941 position-independent.
942
943 2017-12-01 Joel Brobecker <brobecker@adacore.com>
944
945 * ada-lang.c (symbol_list_obstack): Delete.
946 (resolve_subexp): Make sure "candidates" gets xfree'ed.
947 (ada_lookup_symbol_list_worker): Remove the limitation that
948 the result is only good until the next call, now making it
949 the responsibility of the caller to free the result when no
950 longer needed. Adjust the function's intro comment accordingly.
951 (ada_lookup_symbol_list): Adjust the function's intro comment.
952 (ada_iterate_over_symbols): Make sure "results" gets xfree'ed.
953 (ada_lookup_encoded_symbol, get_var_value): Likewise.
954 (_initialize_ada_language): Remove symbol_list_obstack
955 initialization.
956 * ada-exp.y (block_lookup): Make sure "syms" gets xfree'ed.
957 (write_var_or_type, write_name_assoc): Likewise.
958
959 2017-12-01 Tom Tromey <tom@tromey.com>
960
961 * Makefile.in (all_deps_files): New variable.
962 Include .Po files using all_deps_files.
963
964 2017-12-01 Joel Brobecker <brobecker@adacore.com>
965
966 * MAINTAINERS: Update list of maintainers, moving those who
967 stepped down or became inactive to the "Past Maintainers"
968 section.
969
970 2017-11-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
971
972 * configure.ac Don't check for sys/fault.h, sys/syscall.h,
973 sys/proc.h.
974 (NEW_PROC_API): Remove.
975 (prsysent_t, pr_sigset_t, pr_sigaction64_t, pr_siginfo64_t):
976 Likewise.
977 * common/common.m4 (GDB_AC_COMMON): Don't check for sys/syscall.h.
978 * configure: Regenerate.
979 * config.in: Regenerate.
980 * gdbserver/configure: Regenerate.
981 * gdbserver/config.in: Regenerate.
982
983 * i386-sol2-nat.c (_initialize_amd64_sol2_nat): Remove
984 NEW_PROC_API test.
985 * sparc-sol2-nat.c (_initialize_sparc_sol2_nat): Likewise.
986
987 * linux-btrace.c: Remove HAVE_SYS_SYSCALL_H test.
988
989 * proc-api.c: Remove !NEW_PROC_API support.
990 Remove HAVE_SYS_PROC_H and HAVE_SYS_USER_H tests.
991 Remove tests for macros always defined on Solaris.
992 * proc-events.c: Remove !NEW_PROC_API support.
993 Remove Remove HAVE_SYS_SYSCALL_H, HAVE_SYS_PROC_H and
994 HAVE_SYS_USER_H tests.
995 (init_syscall_table): Remove non-Solaris syscalls.
996 Remove tests for syscalls present on all Solaris versions.
997 Add missing Solaris 10+ syscalls.
998 (signal_table): Remove non-Solaris signals.
999 Remove tests for signals present on all Solaris versions.
1000 (fault_table): Remove non-Solaris faults.
1001 Remove tests for faults present on all Solaris versions.
1002 * proc-flags.c: Remove !NEW_PROC_API support.
1003 (pr_flag_table): Remove non-Solaris and pre-Solaris 7 comments.
1004 Remove non-Solaris flags.
1005 * proc-why.c: Remove !NEW_PROC_API support.
1006 (pr_why_table): Remove meaningless comments.
1007 Remove tests for reasons present on all Solaris versions.
1008 Remove OSF/1 cases.
1009 (proc_prettyfprint_why): Likewise.
1010
1011 * procfs.c: Remove !NEW_PROC_API and DYNAMIC_SYSCALLS support.
1012 Remove HAVE_SYS_FAULT_H and HAVE_SYS_SYSCALL_H tests.
1013 Remove WA_READ test, IRIX watchpoint support.
1014 (gdb_sigset_t, gdb_sigaction_t, gdb_siginfo_t): Replace by base
1015 types. Change users.
1016 (gdb_praddset, gdb_prdelset, gdb_premptysysset, gdb_praddsysset)
1017 (gdb_prdelset, gdb_pr_issyssetmember): Replace by base macros.
1018 Change callers.
1019 Remove CTL_PROC_NAME_FMT tests.
1020 (gdb_prstatus_t, gdb_lwpstatus_t): Replace by base types. Change
1021 users.
1022 (sysset_t_size): Remove. Use sizeof (sysset_t) in callers.
1023 Remove PROCFS_DONT_PIOCSSIG_CURSIG support.
1024 (proc_modify_flag): Replace GDBRESET by PCUNSET.
1025 Remove PR_ASYNC, PR_KLC tests.
1026 (proc_unset_inherit_on_fork): Remove PR_ASYNC test.
1027 (proc_parent_pid): Remove PCWATCH etc. tests.
1028 (proc_set_watchpoint): Remove !PCWATCH && !PIOCSWATCH support.
1029 Remove PCAGENT test.
1030 (proc_get_nthreads) [PIOCNTHR && PIOCTLIST]: Remove.
1031 Remove SYS_lwpcreate || SYS_lwp_create test.
1032 (proc_get_current_thread): Likewise.
1033 [PIOCNTHR && PIOCTLIST]: Remove.
1034 [PIOCLSTATUS]: Remove.
1035 (procfs_debug_inferior): Remove non-Solaris cases, conditionals.
1036 [PRFS_STOPEXEC]: Remove.
1037 (syscall_is_lwp_exit): Remove non-Solaris cases, conditionals.
1038 (syscall_is_exit): Likewise.
1039 (syscall_is_exec): Likewise.
1040 (syscall_is_lwp_create): Likewise.
1041 Remove SYS_syssgi support.
1042 (procfs_wait): Remove PR_ASYNC, !PIOCSSPCACT tests.
1043 [SYS_syssgi]: Remove.
1044 Remove non-Solaris cases, conditionals.
1045 (unconditionally_kill_inferior) [PROCFS_NEED_PIOCSSIG_FOR_KILL]:
1046 Remove.
1047 (procfs_init_inferior) [SYS_syssgi]: Remove.
1048 (procfs_set_exec_trap) [PRFS_STOPEXEC]: Remove.
1049 (procfs_inferior_created) [SYS_syssgi]: Remove.
1050 (procfs_set_watchpoint): Remove !AIX5 test.
1051 (procfs_stopped_by_watchpoint): Remove FLTWATCH test, FLTKWATCH
1052 case.
1053 (mappingflags) [MA_PHYS]: Remove.
1054 (info_mappings_callback): Remove PCAGENT test.
1055 Remove PIOCOPENLWP || PCAGENT test.
1056
1057 2017-11-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
1058
1059 * sol-thread.c (info_solthreads): Constify args.
1060 Cast args to void *.
1061
1062 2017-11-29 John Baldwin <jhb@FreeBSD.org>
1063
1064 * target-float.c [HAVE_LIBMPFR]: Define MPFR_USE_INTMAX_T.
1065
1066 2017-11-29 Joel Brobecker <brobecker@adacore.com>
1067
1068 * ada-lang.c (to_fixed_range_type): Make sure that the size
1069 of the range type being returned is the same as the size
1070 of the range type being fixed.
1071
1072 2017-11-29 Pedro Alves <palves@redhat.com>
1073
1074 PR c++/19436
1075 * NEWS: Mention setting breakpoints on functions with C++ ABI
1076 tags.
1077 * completer.h (completion_match_for_lcd) <match,
1078 mark_ignored_range>: New methods.
1079 <finish>: Consider ignored ranges.
1080 <clear>: Clear ignored ranges.
1081 <m_ignored_ranges, m_finished_storage>: New fields.
1082 * cp-support.c (cp_search_name_hash): Ignore ABI tags.
1083 (cp_symbol_name_matches_1, cp_fq_symbol_name_matches): Pass the
1084 completion_match_for_lcd pointer to strncmp_iw_with_mode.
1085 (test_cp_symbol_name_cmp): Add [abi:...] tags unit tests.
1086 * language.c (default_symbol_name_matcher): Pass the
1087 completion_match_for_lcd pointer to strncmp_iw_with_mode.
1088 * linespec.c (linespec_lexer_lex_string): Don't tokenize ABI tags.
1089 * utils.c (skip_abi_tag): New function.
1090 (strncmp_iw_with_mode): Add completion_match_for_lcd parameter.
1091 Handle ABI tags.
1092 * utils.h (strncmp_iw_with_mode): Add completion_match_for_lcd
1093 parameter.
1094
1095 2017-11-29 Pedro Alves <palves@redhat.com>
1096
1097 PR c++/19436
1098 * NEWS: Mention setting breakpoints on functions with C++ ABI
1099 tags.
1100 * completer.h (completion_match_for_lcd) <match,
1101 mark_ignored_range>: New methods.
1102 <finish>: Consider ignored ranges.
1103 <clear>: Clear ignored ranges.
1104 <m_ignored_ranges, m_finished_storage>: New fields.
1105 * cp-support.c (cp_search_name_hash): Ignore ABI tags.
1106 (cp_symbol_name_matches_1, cp_fq_symbol_name_matches): Pass the
1107 completion_match_for_lcd pointer to strncmp_iw_with_mode.
1108 (test_cp_symbol_name_cmp): Add [abi:...] tags unit tests.
1109 * language.c (default_symbol_name_matcher): Pass the
1110 completion_match_for_lcd pointer to strncmp_iw_with_mode.
1111 * linespec.c (linespec_lexer_lex_string): Don't tokenize ABI tags.
1112 * utils.c (skip_abi_tag): New function.
1113 (strncmp_iw_with_mode): Add completion_match_for_lcd parameter.
1114 Handle ABI tags.
1115 * utils.h (strncmp_iw_with_mode): Add completion_match_for_lcd
1116 parameter.
1117
1118 2017-11-29 Pedro Alves <palves@redhat.com>
1119
1120 * NEWS: Mention that breakpoints on C++ functions are now set on
1121 on all namespaces/classes by default, and mention "break
1122 -qualified".
1123 * ax-gdb.c (agent_command_1): Adjust to pass a
1124 symbol_name_match_type to new_linespec_location.
1125 * breakpoint.c (parse_breakpoint_sals): Adjust to
1126 get_linespec_location's return type change.
1127 (strace_marker_create_sals_from_location): Adjust to pass a
1128 symbol_name_match_type to new_linespec_location.
1129 (strace_marker_decode_location): Adjust to get_linespec_location's
1130 return type change.
1131 (strace_command): Adjust to pass a symbol_name_match_type to
1132 new_linespec_location.
1133 (LOCATION_HELP_STRING): Add paragraph about wildmatching, and
1134 mention "-qualified".
1135 * c-lang.c (cplus_language_defn): Install cp_search_name_hash.
1136 * completer.c (explicit_location_match_type::MATCH_QUALIFIED): New
1137 enumerator.
1138 (complete_address_and_linespec_locations): New parameter
1139 'match_type'. Pass it down.
1140 (explicit_options): Add "-qualified".
1141 (collect_explicit_location_matches): Pass the requested match type
1142 to the linespec completers. Handle MATCH_QUALIFIED.
1143 (location_completer): Handle "-qualified" combined with linespecs.
1144 * cp-support.c (cp_search_name_hash): New.
1145 (cp_symbol_name_matches_1): Implement wild matching for C++.
1146 (cp_fq_symbol_name_matches): Reimplement.
1147 (cp_get_symbol_name_matcher): Return different matchers depending
1148 on the lookup name's match type.
1149 (selftests::test_cp_symbol_name_matches): Add wild matching tests.
1150 * cp-support.h (cp_search_name_hash): New declaration.
1151 * dwarf2read.c
1152 (selftests::dw2_expand_symtabs_matching::test_symbols): Add
1153 symbols.
1154 (test_dw2_expand_symtabs_matching_symbol): Add wild matching
1155 tests.
1156 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Adjust to
1157 pass a symbol_name_match_type to new_linespec_location.
1158 * linespec.c (linespec_parse_basic): Lookup function symbols using
1159 the parser's symbol name match type.
1160 (convert_explicit_location_to_linespec): New
1161 symbol_name_match_type parameter. Pass it down to
1162 find_linespec_symbols.
1163 (convert_explicit_location_to_sals): Pass the location's name
1164 match type to convert_explicit_location_to_linespec.
1165 (parse_linespec): New match_type parameter. Save it in the
1166 parser.
1167 (linespec_parser_new): Default to symbol_name_match_type::WILD.
1168 (linespec_complete_function): New symbol_name_match_type
1169 parameter. Use it.
1170 (complete_linespec_component): Pass down the parser's recorded
1171 name match type.
1172 (linespec_complete_label): New symbol_name_match_type parameter.
1173 Use it.
1174 (linespec_complete): New symbol_name_match_type parameter. Save
1175 it in the parser and pass it down. Adjust to
1176 get_linespec_location's prototype change.
1177 (find_function_symbols, find_linespec_symbols): New
1178 symbol_name_match_type parameter. Pass it down instead of
1179 assuming symbol_name_match_type::WILD.
1180 * linespec.h (linespec_complete, linespec_complete_function)
1181 (linespec_complete_label): New symbol_name_match_type parameter.
1182 * location.c (event_location::linespec_location): Now a struct
1183 linespec_location.
1184 (EL_LINESPEC): Adjust.
1185 (initialize_explicit_location): Default to
1186 symbol_name_match_type::WILD.
1187 (new_linespec_location): New symbol_name_match_type parameter.
1188 Record it in the location.
1189 (get_linespec_location): Now returns a struct linespec_location.
1190 (new_explicit_location): Also copy func_name_match_type.
1191 (explicit_to_string_internal)
1192 (string_to_explicit_location): Handle "-qualified".
1193 (copy_event_location): Adjust to LINESPEC_LOCATION type change.
1194 Copy symbol_name_match_type fields.
1195 (event_location_deleter::operator()): Adjust to LINESPEC_LOCATION
1196 type change.
1197 (event_location_to_string): Adjust to LINESPEC_LOCATION type
1198 change. Handle "-qualfied".
1199 (string_to_explicit_location): Handle "-qualified".
1200 (string_to_event_location_basic): New symbol_name_match_type
1201 parameter. Pass it down.
1202 (string_to_event_location): Handle "-qualified".
1203 * location.h (struct linespec_location): New.
1204 (explicit_location::func_name_match_type): New field.
1205 (new_linespec_location): Now returns a const linespec_location *.
1206 (string_to_event_location_basic): New symbol_name_match_type
1207 parameter.
1208 (explicit_completion_info::saw_explicit_location_option): New
1209 field.
1210 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Adjust to pass a
1211 symbol_name_match_type to new_linespec_location.
1212 * python/py-breakpoint.c (bppy_init): Likewise.
1213 * python/python.c (gdbpy_decode_line): Likewise.
1214
1215 2017-11-29 Pedro Alves <palves@redhat.com>
1216
1217 * ada-lang.c (ada_lookup_name_info::matches): Change type of
1218 parameter from completion_match to completion_match_result.
1219 Adjust.
1220 (do_wild_match, do_full_match, ada_symbol_name_matches): Likewise.
1221 * completer.c (completion_tracker::maybe_add_completion): Add
1222 match_for_lcd parameter and use it.
1223 (completion_tracker::add_completion): Likewise.
1224 * completer.h (class completion_match_for_lcd): New class.
1225 (completion_match_result::match_for_lcd): New field.
1226 (completion_match_result::set_match): New method.
1227 (completion_tracker): Add comments.
1228 (completion_tracker::add_completion): Add match_for_lcd parameter.
1229 (completion_tracker::reset_completion_match_result): Reset
1230 match_for_lcd too.
1231 (completion_tracker::maybe_add_completion): Add match_for_lcd
1232 parameter.
1233 (completion_tracker::m_lowest_common_denominator_unique): Extend
1234 comments.
1235 * cp-support.c (cp_symbol_name_matches_1)
1236 (cp_fq_symbol_name_matches): Change type of parameter from
1237 completion_match to completion_match_result. Adjust.
1238 * language.c (default_symbol_name_matcher): Change type of
1239 parameter from completion_match to completion_match_result.
1240 Adjust.
1241 * language.h (completion_match_for_lcd): Forward declare.
1242 (default_symbol_name_matcher): Change type of parameter from
1243 completion_match to completion_match_result.
1244 * symtab.c (compare_symbol_name): Adjust.
1245 (completion_list_add_name): Pass the match_for_lcd to the tracker.
1246 * symtab.h (ada_lookup_name_info::matches): Change type of
1247 parameter from completion_match to completion_match_result.
1248 (symbol_name_matcher_ftype): Likewise, and update comments.
1249
1250 2017-11-29 Pedro Alves <palves@redhat.com>
1251
1252 * linespec.c (minsym_found, add_minsym): Use msymbol_is_function.
1253 * minsyms.c (msymbol_is_text): Delete.
1254 (msymbol_is_function): New function.
1255 * minsyms.h (msymbol_is_text): Delete.
1256 (msymbol_is_function): New declaration.
1257 * symtab.c (find_function_alias_target): Use msymbol_is_function.
1258
1259 2017-11-29 Tom Tromey <tom@tromey.com>
1260
1261 * Makefile.in (distclean): Handle the case where rmdir fails.
1262
1263 2017-11-29 Tom Tromey <tom@tromey.com>
1264
1265 * symfile.c (_initialize_symfile): Update usage text for
1266 add-symbol-file, symbol-file, load.
1267
1268 2017-11-29 Tom Tromey <tom@tromey.com>
1269
1270 * symfile.c (add_symbol_file_command): Error if some arguments to
1271 -s are missing. Change unrecognized-argument error message.
1272 (_initialize_symfile): Fix usage text for add-symbol-file.
1273
1274 2017-11-27 Tom Tromey <tom@tromey.com>
1275
1276 * Makefile.in (REMOTE_OBS): Remove.
1277 (SFILES): Remove remote sources.
1278 (COMMON_SFILES): Add remote sources.
1279 (ALLDEPFILES): Remove dcache.c.
1280
1281 2017-11-27 Tom Tromey <tom@tromey.com>
1282
1283 * Makefile.in (SUBDIR_TARGET_SRCS, SUBDIR_TARGET_OBS): New
1284 variables.
1285 (SFILES): Use SUBDIR_TARGET_SRCS.
1286 (COMMON_OBS): Use SUBDIR_TARGET_OBS. Remove waitstatus.o.
1287 (CONFIG_SRC_SUBDIR): Add target.
1288 (%.o): Remove target rule.
1289
1290 2017-11-27 Tom Tromey <tom@tromey.com>
1291
1292 * Makefile.in (COMMON_OBS): Remove filename-seen-cache.o,
1293 registry.o, thread-fsm.o, debug.o.
1294 (COMMON_SFILES): Add filename-seen-cache.c, registry.c,
1295 thread-fsm.c, debug.c.
1296
1297 2017-11-27 Tom Tromey <tom@tromey.com>
1298
1299 * Makefile.in (COMMON_SFILES): New.
1300 (SFILES): Move some entries to COMMON_SFILES.
1301 (COMMON_OBS): Use COMMON_SFILES.
1302
1303 2017-11-27 Tom Tromey <tom@tromey.com>
1304
1305 * Makefile.in (YYFILES): Update comment.
1306 (YYOBJ): Redefine.
1307
1308 2017-11-27 Tom Tromey <tom@tromey.com>
1309
1310 * Makefile.in (SUBDIR_PYTHON_OBS): Redefine.
1311 (CONFIG_SRC_SUBDIR): Add python.
1312 (%.o): Remove python rule.
1313 (python/%.o): New rule.
1314 * configure: Rebuild.
1315 * configure.ac (CONFIG_OBS): Refer to python/python.o
1316
1317 2017-11-27 Tom Tromey <tom@tromey.com>
1318
1319 * configure: Rebuild.
1320 * configure.ac (CONFIG_OBS): Refer to guile/guile.o.
1321 * Makefile.in (SUBDIR_GUILE_OBS): Redefine.
1322 (CONFIG_SRC_SUBDIR): Add guile.
1323 (%.o): Remove guile rule.
1324
1325 2017-11-27 Tom Tromey <tom@tromey.com>
1326
1327 * Makefile.in (SUBDIR_UNITTESTS_OBS): Redefine.
1328 (%.o): Remove unittests rule.
1329 (CONFIG_SRC_SUBDIR): Add unittests.
1330
1331 2017-11-27 Tom Tromey <tom@tromey.com>
1332
1333 * Makefile.in (SUBDIR_TUI_OBS): Redefine.
1334 (CONFIG_SRC_SUBDIR): Add tui.
1335 (%.o): Remove tui rule.
1336
1337 2017-11-27 Tom Tromey <tom@tromey.com>
1338
1339 * Makefile.in (SUBDIR_GCC_COMPILE_OBS): Redefine.
1340 (%.o): Remove compile rule.
1341 (CONFIG_SRC_SUBDIR): Add compile.
1342
1343 2017-11-27 Tom Tromey <tom@tromey.com>
1344
1345 * Makefile.in (SUBDIR_MI_OBS): Redefine.
1346 (%.o): Remove mi rule.
1347 (CONFIG_SRC_SUBDIR): Add mi.
1348 (COMMON_OBS): Use mi/mi-common.o
1349
1350 2017-11-27 Tom Tromey <tom@tromey.com>
1351
1352 * Makefile.in (SUBDIR_CLI_OBS): Redefine.
1353 (%.o): Remove cli rule.
1354 (CONFIG_SRC_SUBDIR): Add cli.
1355
1356 2017-11-27 Tom Tromey <tom@tromey.com>
1357
1358 * configure.ac (CONFIG_SRC_SUBDIR): Don't subst.
1359 * configure: Rebuild.
1360 * Makefile.in (CONFIG_SRC_SUBDIR): Redefine.
1361 (CONFIG_DEP_SUBDIR): New variable.
1362 (%.o): Add order-only dependency.
1363 ($(CONFIG_DEP_SUBDIR)): New target.
1364
1365 2017-11-26 Dominik Czarnota <dominik.b.czarnota@gmail.com>
1366
1367 PR gdb/21945
1368 * findcmd.c (_initialize_mem_search): Update find command help
1369 text.
1370
1371 2017-11-26 Simon Marchi <simon.marchi@polymtl.ca>
1372
1373 * python/python.c (do_start_initialization): Change progname
1374 type to gdb::unique_xmalloc_ptr. Release the pointer when using
1375 Python 2.
1376
1377 2017-11-26 Tom Tromey <tom@tromey.com>
1378
1379 * common/format.h: Add include guards.
1380
1381 2017-11-26 Tom Tromey <tom@tromey.com>
1382
1383 * nat/linux-personality.h (class
1384 maybe_disable_address_space_randomization): New class.
1385 (maybe_disable_address_space_randomization): Don't declare
1386 function.
1387 * nat/linux-personality.c (restore_personality)
1388 (make_disable_asr_cleanup): Remove.
1389 (maybe_disable_address_space_randomization): Now a constructor.
1390 (~maybe_disable_address_space_randomization): New destructor.
1391 * linux-nat.c (linux_nat_create_inferior): Update.
1392
1393 2017-11-26 Tom Tromey <tom@tromey.com>
1394
1395 * gcore.c (write_gcore_file_1): Use gdb::unique_xmalloc_ptr.
1396
1397 2017-11-26 Ulrich Weigand <uweigand@de.ibm.com>
1398
1399 * spu-tdep.c (spu_software_single_step): Access SPU_LSLR_REGNUM as
1400 "cooked" register. Access only first four bytes of branch target
1401 registers.
1402
1403 2017-11-25 Sergio Durigan Junior <sergiodj@redhat.com>
1404
1405 PR gdb/22491
1406 * stap-probe.c (relocate_address): New function.
1407 (stap_probe::get_relocated_address): Use 'relocate_address'.
1408 (stap_probe::set_semaphore): Use 'relocate_address' and pass
1409 'm_sem_addr'.
1410 (stap_probe::clear_semaphore): Likewise.
1411
1412 2017-11-25 Pedro Alves <palves@redhat.com>
1413
1414 * dictionary.c: Include "safe-ctype.h".
1415 * minsyms.c: Include "safe-ctype.h".
1416 * minsyms.c (SYMBOL_HASH_NEXT): Use TOLOWER instead of tolower.
1417
1418 2017-11-25 Pedro Alves <palves@redhat.com>
1419
1420 * completer.c (complete_line_internal_1): Skip spaces until the
1421 start of the command.
1422
1423 2017-11-24 Pedro Alves <palves@redhat.com>
1424
1425 * cp-support.c (cp_symbol_name_matches_1): New, factored out from
1426 cp_fq_symbol_name_matches. Pass language_cplus to
1427 strncmp_with_mode.
1428 (cp_fq_symbol_name_matches): Call cp_symbol_name_matches_1.
1429 (selftests::test_cp_symbol_name_cmp): New.
1430 (_initialize_cp_support): Register "cp_symbol_name_matches"
1431 selftests.
1432 * language.c (default_symbol_name_matcher): Pass language_minimal
1433 to strncmp_iw_with_mode.
1434 * utils.c: Include "cp-support.h" and <algorithm>.
1435 (valid_identifier_name_char, cp_skip_operator_token, skip_ws)
1436 (cp_is_operator): New functions.
1437 (strncmp_iw_with_mode): Use them. Add language parameter. Don't
1438 skip whitespace in the symbol name when the lookup name doesn't
1439 have spaces, and vice versa.
1440 (strncmp_iw, strcmp_iw): Pass language to strncmp_iw_with_mode.
1441 * utils.h (strncmp_iw_with_mode): Add language parameter.
1442
1443 2017-11-24 Joel Brobecker <brobecker@adacore.com>
1444
1445 * ada-lang.c (ada_exception_message_1, ada_exception_message):
1446 New functions.
1447 (print_it_exception): If available, display the exception
1448 message as well.
1449 * NEWS: Document new feature.
1450
1451 2017-11-24 Ulrich Weigand <uweigand@de.ibm.com>
1452
1453 * configure.nat <spu-linux>: Add fork-inferior.o to NATDEPFILES.
1454
1455 2017-11-24 Philipp Rudo <prudo@linux.vnet.ibm.com>
1456
1457 * dtrace-probe.c (dtrace_probe::build_arg_exprs)
1458 (dtrace_probe::is_enabled, dtrace_probe::enable)
1459 (dtrace_probe::disable): Remove keyword 'struct' at for-range
1460 variable
1461 * probe.c (gen_ui_out_table_header_info)
1462 (print_ui_out_not_applicables): Remove keyword 'struct' at
1463 for-range variable
1464
1465 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1466
1467 * configure.tgt: Add arch/aarch64.o
1468
1469 2017-11-24 Simon Marchi <simon.marchi@polymtl.ca>
1470
1471 * common/common-utils.h: Include poison.h.
1472 (xfree): Remove declaration, add definition with static_assert.
1473 * common/common-utils.c (xfree): Remove.
1474 * common/poison.h (IsMallocatable): Define.
1475 (IsFreeable): Define.
1476 (free): Delete for non-freeable types.
1477 (xnew): New.
1478 (XNEW): Undef and redefine.
1479 (xcnew): New.
1480 (XCNEW): Undef and redefine.
1481 (xdelete): New.
1482 (XDELETE): Undef and redefine.
1483 (xnewvec): New.
1484 (XNEWVEC): Undef and redefine.
1485 (xcnewvec): New.
1486 (XCNEWVEC): Undef and redefine.
1487 (xresizevec): New.
1488 (XRESIZEVEC): Undef and redefine.
1489 (xdeletevec): New.
1490 (XDELETEVEC): Undef and redefine.
1491 (xnewvar): New.
1492 (XNEWVAR): Undef and redefine.
1493 (xcnewvar): New.
1494 (XCNEWVAR): Undef and redefine.
1495 (xresizevar): New.
1496 (XRESIZEVAR): Undef and redefine.
1497
1498 2017-11-24 Simon Marchi <simon.marchi@polymtl.ca>
1499
1500 * gdbthread.h (private_thread_info): Define structure type, add
1501 virtual pure destructor.
1502 (thread_info) <priv>: Change type to unique_ptr.
1503 <private_dtor>: Remove.
1504 * thread.c (add_thread_with_info): Adjust to use of unique_ptr.
1505 (private_thread_info::~private_thread_info): Provide default
1506 implementation.
1507 (thread_info::~thread_info): Don't call private_dtor nor
1508 manually free priv.
1509 * aix-thread.c (private_thread_info): Rename to ...
1510 (aix_thread_info): ... this.
1511 (get_aix_thread_info): New.
1512 (sync_threadlists): Adjust.
1513 (iter_tid): Adjust.
1514 (aix_thread_resume): Adjust.
1515 (aix_thread_fetch_registers): Adjust.
1516 (aix_thread_store_registers): Adjust.
1517 (aix_thread_extra_thread_info): Adjust.
1518 * darwin-nat.h (private_thread_info): Rename to ...
1519 (darwin_thread_info): ... this.
1520 (get_darwin_thread_info): New.
1521 * darwin-nat.c (darwin_init_thread_list): Adjust.
1522 (darwin_check_new_threads): Adjust.
1523 (thread_info_from_private_thread_info): Adjust.
1524 * linux-thread-db.c (private_thread_info): Rename to ...
1525 (thread_db_thread_info): ... this, initialize fields.
1526 (get_thread_db_thread_info): New.
1527 <dying>: Change type to bool.
1528 (update_thread_state): Adjust to type rename.
1529 (record_thread): Adjust to type rename an use of unique_ptr.
1530 (thread_db_pid_to_str): Likewise.
1531 (thread_db_extra_thread_info): Likewise.
1532 (thread_db_thread_handle_to_thread_info): Likewise.
1533 (thread_db_get_thread_local_address): Likewise.
1534 * nto-tdep.h (private_thread_info): Rename to ...
1535 (nto_thread_info): ... this, initialize fields.
1536 (get_nto_thread_info): New.
1537 <name>: Change type to std::string.
1538 * nto-tdep.c (nto_extra_thread_info): Adjust to type rename and
1539 use of unique_ptr.
1540 * nto-procfs.c (update_thread_private_data_name): Adjust to
1541 std::string change, allocate nto_private_thread_info with new.
1542 (update_thread_private_data): Adjust to unique_ptr.
1543 * remote.c (private_thread_info): Rename to ...
1544 (remote_thread_info): ... this, initialize data members with
1545 default values.
1546 <extra, name>: Change type to std::string.
1547 <thread_handle>: Change type to non-pointer.
1548 (free_private_thread_info): Remove.
1549 (get_private_info_thread): Rename to...
1550 (get_remote_thread_info): ... this, change return type, adjust to
1551 use of unique_ptr, use remote_thread_info constructor.
1552 (remote_add_thread): Adjust.
1553 (get_private_info_ptid): Rename to...
1554 (get_remote_thread_info): ...this, change return type.
1555 (remote_thread_name): Use get_remote_thread_info, adjust to
1556 change to std::string.
1557 (struct thread_item) <~thread_item>: Remove.
1558 <thread_handle>: Make non pointer.
1559 (start_thread): Adjust to thread_item::thread_handle type
1560 change.
1561 (remote_update_thread_list): Adjust to type name change, move
1562 strings from temporary to long-lived object instead of
1563 duplicating.
1564 (remote_threads_extra_info): Use get_remote_thread_info.
1565 (process_initial_stop_replies): Likewise.
1566 (resume_clear_thread_private_info): Likewise.
1567 (remote_resume): Adjust to type name change.
1568 (remote_commit_resume): Use get_remote_thread_info.
1569 (process_stop_reply): Adjust to type name change.
1570 (remote_stopped_by_sw_breakpoint): Use get_remote_thread_info.
1571 (remote_stopped_by_hw_breakpoint): Likewise.
1572 (remote_stopped_by_watchpoint): Likewise.
1573 (remote_stopped_data_address): Likewise.
1574 (remote_core_of_thread): Likewise.
1575 (remote_thread_handle_to_thread_info): Use
1576 get_private_info_thread, adjust to thread_handle field type
1577 change.
1578
1579 2017-11-24 Simon Marchi <simon.marchi@polymtl.ca>
1580
1581 * remote.c (struct thread_item): Add constructor, disable copy
1582 construction and copy assignment, define default move
1583 construction and move assignment.
1584 <extra, name>: Change type to std::string.
1585 <core>: Initialize.
1586 <thread_handle>: Make non-pointer.
1587 (thread_item_t): Remove typedef.
1588 (DEF_VEC_O(thread_item_t)): Remove.
1589 (threads_listing_context) <contains_thread>: New method.
1590 <remove_thread>: New method.
1591 <items>: Change type to std::vector.
1592 (clear_threads_listing_context): Remove.
1593 (threads_listing_context_remove): Remove.
1594 (remote_newthread_step): Use thread_item constructor, adjust to
1595 change to std::vector.
1596 (start_thread): Use thread_item constructor, adjust to change to
1597 std::vector.
1598 (end_thread): Adjust to change to std::vector and std::string.
1599 (remote_get_threads_with_qthreadinfo): Use thread_item
1600 constructor, adjust to std::vector.
1601 (remote_update_thread_list): Adjust to change to std::vector and
1602 std::string, use threads_listing_context methods.
1603 (remove_child_of_pending_fork): Adjust.
1604 (remove_new_fork_children): Adjust.
1605 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add rsp-low-selftests.c.
1606 (SUBDIR_UNITTESTS_OBS): Add rsp-low-selftests.o.
1607 * unittests/rsp-low-selftests.c: New file.
1608 * common/rsp-low.h: Include common/byte-vector.h.
1609 (hex2bin): New overload.
1610 * common/rsp-low.c (hex2bin): New overload.
1611
1612 2017-11-24 Simon Marchi <simon.marchi@ericsson.com>
1613
1614 * inferior.h (private_inferior): Define structure type, add
1615 virtual pure destructor.
1616 (inferior) <priv>: Change type to unique_ptr.
1617 * inferior.c (private_inferior::~private_inferior): Provide
1618 default implementation.
1619 (inferior::~inferior): Don't free priv field.
1620 (exit_inferior_1): Likewise.
1621 * darwin-nat.h (struct darwin_exception_info): Initialize fields.
1622 (darwin_exception_info): Remove typedef.
1623 (DEF_VEC_O (darwin_thread_t)); Remove.
1624 (private_inferior): Rename to ...
1625 (darwin_private_inferior): ... this, extend private_inferior.
1626 (get_darwin_inferior): New.
1627 <threads>: Change type to std::vector of darwin_thread_t pointers.
1628 * darwin-nat.c (darwin_check_new_threads): Adjust.
1629 (find_inferior_task_it): Adjust.
1630 (darwin_find_thread); Adjust.
1631 (darwin_suspend_inferior): Adjust.
1632 (darwin_resume_inferior): Adjust.
1633 (darwin_find_new_inferior): Adjust.
1634 (darwin_decode_notify_message): Adjust.
1635 (darwin_send_reply): Adjust.
1636 (darwin_resume_inferior_threads): Adjust.
1637 (darwin_suspend_inferior_threads): Adjust.
1638 (darwin_decode_message): Adjust.
1639 (darwin_wait): Adjust.
1640 (darwin_interrupt): Adjust.
1641 (darwin_deallocate_threads): Adjust.
1642 (darwin_mourn_inferior): Adjust, don't free private data.
1643 (darwin_reply_to_all_pending_messages): Adjust.
1644 (darwin_stop_inferior): Adjust.
1645 (darwin_setup_exceptions): Adjust.
1646 (darwin_kill_inferior): Adjust.
1647 (darwin_setup_request_notification): Adjust.
1648 (darwin_attach_pid): Adjust.
1649 (darwin_init_thread_list): Adjust.
1650 (darwin_setup_fake_stop_event): Adjust.
1651 (darwin_attach): Adjust.
1652 (darwin_detach): Adjust.
1653 (darwin_xfer_partial): Adjust.
1654 (set_enable_mach_exceptions): Adjust.
1655 (darwin_pid_to_exec_file): Adjust.
1656 (darwin_get_ada_task_ptid): Adjust.
1657 * darwin-nat-info.c (get_task_from_args): Adjust.
1658 (info_mach_ports_command): Adjust.
1659 (info_mach_region_command): Adjust.
1660 (info_mach_exceptions_command): Adjust.
1661 * remote.c (private_inferior): Rename to ...
1662 (remote_private_inferior): ... this, initialize fields.
1663 (get_remote_inferior); New.
1664 (remote_commit_resume): Use get_remote_inferior.
1665 (check_pending_event_prevents_wildcard_vcont_callback): Likewise.
1666
1667 2017-11-24 Pedro Alves <palves@redhat.com>
1668
1669 * NEWS: Mention linespecs and explicit locations, and completion
1670 improvements.
1671
1672 2017-11-24 Yao Qi <yao.qi@linaro.org>
1673
1674 * regcache.c (regcache::dump): Remove footnote_register_size.
1675
1676 2017-11-24 Yao Qi <yao.qi@linaro.org>
1677
1678 * regcache.c (cooked_read_test): Add more test for readonly
1679 regcache.
1680
1681 2017-11-24 Yao Qi <yao.qi@linaro.org>
1682
1683 * gdbarch-selftests.c (test_target_has_registers): Move it to
1684 target.c.
1685 (test_target_has_stack): Likewise.
1686 (test_target_has_memory): Likewise.
1687 (test_target_prepare_to_store): Likewise.
1688 (test_target_store_registers): Likewise.
1689 (test_target_ops): Likewise.
1690 * regcache.c: Include selftest-arch.h and gdbthread.h.
1691 (target_ops_no_register): New class.
1692 (test_target_fetch_registers): New.
1693 (test_target_store_registers): New.
1694 (test_target_xfer_partial): New.
1695 (readwrite_regcache): New.
1696 (cooked_read_test): New.
1697 (_initialize_regcache): Register the test.
1698 * target.c: (test_target_has_registers): Moved from
1699 gdbarch-selftests.c.
1700 (test_target_has_stack): Likewise.
1701 (test_target_has_memory): Likewise.
1702 (test_target_prepare_to_store): Likewise.
1703 (test_target_store_registers): Likewise.
1704 * target.h (test_target_ops): New class.
1705
1706 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1707
1708 * aarch64-tdep.c (_initialize_aarch64_tdep): Add target desc
1709 selftest.
1710
1711 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1712
1713 * aarch64-tdep.c (_initialize_aarch64_tdep): Remove init.
1714 * arch/aarch64.c (aarch64_create_target_description): Create
1715 new target description.
1716 * features/Makefile: Add new files.
1717 * features/aarch64.c: Remove file.
1718 * features/aarch64-core.c: New autogenerated file.
1719 * features/aarch64-fpu.c: New autogenerated file.
1720 * target-descriptions.c (maint_print_c_tdesc_cmd): Check for aarch64.
1721
1722 2017-11-24 Alan Hayward <alan.hayward@arm.com>
1723
1724 * Makefile.in: Add new files.
1725 * aarch64-linux-nat.c (aarch64_linux_read_description): Call
1726 aarch64_read_description.
1727 * aarch64-linux-tdep.c (aarch64_linux_core_read_description):
1728 Call aarch64_read_description.
1729 * aarch64-tdep.c (aarch64_read_description): New function.
1730 (aarch64_gdbarch_init): Call aarch64_read_description.
1731 * aarch64-tdep.h (aarch64_read_description): New function.
1732 * arch/aarch64.c: New file.
1733 * configure.tgt: Add new files.
1734
1735 2017-11-24 Yao Qi <yao.qi@linaro.org>
1736
1737 * mi/mi-main.c (register_changed_p): Update.
1738 * value.c (value_contents_bits_eq): Change return type.
1739 (value_contents_eq): Likewise.
1740 * value.h: Update comments.
1741
1742 2017-11-24 Yao Qi <yao.qi@linaro.org>
1743
1744 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Remove
1745 local 'changed'. Remove error.
1746 (register_changed_p): Change return type to bool.
1747
1748 2017-11-24 Yao Qi <yao.qi@linaro.org>
1749
1750 * arch/tic6x.c: New file.
1751 * arch/tic6x.h: New file.
1752 * features/Makefile (FEATURE_XMLFILES): Add tic6x-c6xp.xml,
1753 tic6x-core.xml and tic6x-gp.xml.
1754 * features/tic6x-c6xp.c: Generated.
1755 * features/tic6x-core.c: Generated.
1756 * features/tic6x-gp.c: Generated.
1757 * target-descriptions.c (maint_print_c_tdesc_cmd): Match
1758 "tic6x-".
1759
1760 2017-11-23 Simon Marchi <simon.marchi@ericsson.com>
1761
1762 * mi/mi-main.c (list_available_thread_groups): Change map value
1763 type to std::vector.
1764
1765 2017-11-23 Simon Marchi <simon.marchi@ericsson.com>
1766
1767 * osdata.c (osdata_end_column, get_osdata): Remove std::move.
1768
1769 2017-11-23 Simon Marchi <simon.marchi@ericsson.com>
1770
1771 * varobj.c (struct varobj_dynamic) <children_requested_>: Rename
1772 back to...
1773 <children_requested>: ... this.
1774 (varobj_get_num_children, varobj_update): Adjust.
1775
1776 2017-11-23 Simon Marchi <simon.marchi@ericsson.com>
1777
1778 * ada-varobj.c (ada_value_is_changeable_p): Change int to bool where applicable.
1779 (ada_value_has_mutated): Likewise.
1780 * c-varobj.c (varobj_is_anonymous_child): Likewise.
1781 (c_is_path_expr_parent): Likewise.
1782 * mi/mi-cmd-var.c (varobj_update_one): Likewise.
1783 (mi_cmd_var_set_frozen): Likewise.
1784 (mi_cmd_var_update_iter): Likewise.
1785 (mi_cmd_var_update): Likewise.
1786 * varobj.c (pretty_printing): Likewise.
1787 (varobj_enable_pretty_printing): Likewise.
1788 (struct varobj_root) <floating, is_valid>: Likewise.
1789 (struct varobj_dynamic) <children_requested>: Likewise.
1790 (delete_variable): Likewise.
1791 (delete_variable_1): Likewise.
1792 (install_variable): Likewise.
1793 (update_type_if_necessary): Likewise.
1794 (install_new_value): Likewise.
1795 (value_of_root): Likewise.
1796 (is_root_p): Likewise.
1797 (varobj_create): Likewise.
1798 (varobj_delete): Likewise.
1799 (varobj_has_more): Likewise.
1800 (varobj_set_frozen): Likewise.
1801 (varobj_get_frozen): Likewise.
1802 (install_dynamic_child): Likewise.
1803 (dynamic_varobj_has_child_method): Likewise.
1804 (update_dynamic_varobj_children): Likewise.
1805 (varobj_get_num_children): Likewise.
1806 (varobj_list_children): Likewise.
1807 (is_path_expr_parent): Likewise.
1808 (varobj_default_is_path_expr_parent): Likewise.
1809 (varobj_is_dynamic_p): Likewise.
1810 (varobj_set_value): Likewise.
1811 (varobj_value_has_mutated): Likewise.
1812 (varobj_update): Likewise.
1813 (check_scope): Likewise.
1814 (value_of_root_1): Likewise.
1815 (varobj_value_get_print_value): Likewise.
1816 (varobj_editable_p): Likewise.
1817 (varobj_value_is_changeable_p): Likewise.
1818 (varobj_floating_p): Likewise.
1819 (varobj_default_value_is_changeable_p): Likewise.
1820 (varobj_invalidate_iter): Likewise.
1821 * varobj.h (struct varobj_update_result) <type_changed,
1822 children_changed, changed, value_installed>: Likewise.
1823 (struct varobj) <updated, frozen, not_fetched>: Likewise.
1824 (struct lang_varobj_ops) <value_is_changeable_p,
1825 value_has_mutated, is_path_expr_parent>: Likewise.
1826 (varobj_delete): Likewise.
1827 (varobj_set_frozen): Likewise.
1828 (varobj_get_frozen): Likewise.
1829 (varobj_set_value): Likewise.
1830 (varobj_update): Likewise.
1831 (varobj_editable_p): Likewise.
1832 (varobj_floating_p): Likewise.
1833 (varobj_has_more): Likewise.
1834 (varobj_is_dynamic_p): Likewise.
1835 (varobj_default_value_is_changeable_p): Likewise.
1836 (varobj_value_is_changeable_p): Likewise.
1837 (varobj_is_anonymous_child): Likewise.
1838 (varobj_default_is_path_expr_parent): Likewise.
1839
1840 2017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
1841
1842 * dtrace-probe.c (struct probe_ops dtrace_probe_ops): Delete.
1843 (struct dtrace_probe_arg) <dtrace_probe_arg>: New constructor.
1844 <type_str>: Convert to 'std::string'.
1845 <expr>: Convert to 'expression_up'.
1846 (dtrace_probe_arg_s): Delete type and VEC.
1847 (dtrace_probe_enabler_s): Likewise.
1848 (struct dtrace_probe): Replace by...
1849 (class dtrace_static_probe_ops): ...this and...
1850 (class dtrace_probe): ...this.
1851 (dtrace_probe_is_linespec): Rename to...
1852 (dtrace_static_probe_ops::is_linespec): ...this. Adjust code
1853 to reflect change.
1854 (dtrace_process_dof_probe): Use 'std::vector' instead of VEC.
1855 Adjust code. Create new instance of 'dtrace_probe'.
1856 (dtrace_build_arg_exprs): Rename to...
1857 (dtrace_probe::build_arg_exprs): ...this. Adjust code to
1858 reflect change.
1859 (dtrace_get_probes): Rename to...
1860 (dtrace_static_probe_ops::get_probes): ...this. Adjust code
1861 to reflect change.
1862 (dtrace_get_arg): Rename to...
1863 (dtrace_probe::get_arg_by_number): ...this. Adjust code to
1864 reflect change.
1865 (dtrace_probe_is_enabled): Rename to...
1866 (dtrace_probe::is_enabled): ...this. Adjust code to reflect
1867 change.
1868 (dtrace_get_probe_address): Rename to...
1869 (dtrace_probe::get_relocated_address): ...this. Adjust code
1870 to reflect change.
1871 (dtrace_get_probe_argument_count): Rename to...
1872 (dtrace_probe::get_argument_count): ...this. Adjust code to
1873 reflect change.
1874 (dtrace_can_evaluate_probe_arguments): Rename to...
1875 (dtrace_probe::can_evaluate_arguments): ...this. Adjust code
1876 to reflect change.
1877 (dtrace_evaluate_probe_argument): Rename to...
1878 (dtrace_probe::evaluate_argument): ...this. Adjust code to
1879 reflect change.
1880 (dtrace_compile_to_ax): Rename to...
1881 (dtrace_probe::compile_to_ax): ...this. Adjust code to
1882 reflect change.
1883 (dtrace_probe_destroy): Delete.
1884 (dtrace_type_name): Rename to...
1885 (dtrace_static_probe_ops::type_name): ...this. Adjust code to
1886 reflect change.
1887 (dtrace_probe::get_static_ops): New method.
1888 (dtrace_gen_info_probes_table_header): Rename to...
1889 (dtrace_static_probe_ops::gen_info_probes_table_header):
1890 ...this. Adjust code to reflect change.
1891 (dtrace_gen_info_probes_table_values): Rename to...
1892 (dtrace_probe::gen_info_probes_table_values): ...this. Adjust
1893 code to reflect change.
1894 (dtrace_enable_probe): Rename to...
1895 (dtrace_probe::enable_probe): ...this. Adjust code to reflect
1896 change.
1897 (dtrace_disable_probe): Rename to...
1898 (dtrace_probe::disable_probe): ...this. Adjust code to reflect
1899 change.
1900 (struct probe_ops dtrace_probe_ops): Delete.
1901 (info_probes_dtrace_command): Call 'info_probes_for_spops'
1902 instead of 'info_probes_for_ops'.
1903 (_initialize_dtrace_probe): Use 'all_static_probe_ops' instead
1904 of 'all_probe_ops'.
1905
1906 2017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
1907 Simon Marchi <simark@simark.ca>
1908
1909 * stap-probe.c (struct probe_ops stap_probe_ops): Delete
1910 variable.
1911 (struct stap_probe_arg) <stap_probe_arg>: New constructor.
1912 <aexpr>: Change type to 'expression_up'.
1913 (stap_probe_arg_s): Delete type and VEC.
1914 (struct stap_probe): Delete. Replace by...
1915 (class stap_static_probe_ops): ...this and...
1916 (class stap_probe): ...this. Rename variables to add 'm_'
1917 prefix. Do not use 'union' for arguments anymore.
1918 (stap_get_expected_argument_type): Receive probe name instead
1919 of 'struct stap_probe'. Adjust code.
1920 (stap_parse_probe_arguments): Rename to...
1921 (stap_probe::parse_arguments): ...this. Adjust code to
1922 reflect change.
1923 (stap_get_probe_address): Rename to...
1924 (stap_probe::get_relocated_address): ...this. Adjust code
1925 to reflect change.
1926 (stap_get_probe_argument_count): Rename to...
1927 (stap_probe::get_argument_count): ...this. Adjust code
1928 to reflect change.
1929 (stap_get_arg): Rename to...
1930 (stap_probe::get_arg_by_number'): ...this. Adjust code to
1931 reflect change.
1932 (can_evaluate_probe_arguments): Rename to...
1933 (stap_probe::can_evaluate_arguments): ...this. Adjust code
1934 to reflect change.
1935 (stap_evaluate_probe_argument): Rename to...
1936 (stap_probe::evaluate_argument): ...this. Adjust code
1937 to reflect change.
1938 (stap_compile_to_ax): Rename to...
1939 (stap_probe::compile_to_ax): ...this. Adjust code to
1940 reflect change.
1941 (stap_probe_destroy): Delete.
1942 (stap_modify_semaphore): Adjust comment.
1943 (stap_set_semaphore): Rename to...
1944 (stap_probe::set_semaphore): ...this. Adjust code to reflect
1945 change.
1946 (stap_clear_semaphore): Rename to...
1947 (stap_probe::clear_semaphore): ...this. Adjust code to
1948 reflect change.
1949 (stap_probe::get_static_ops): New method.
1950 (handle_stap_probe): Adjust code to create instance of
1951 'stap_probe'.
1952 (stap_get_probes): Rename to...
1953 (stap_static_probe_ops::get_probes): ...this. Adjust code to
1954 reflect change.
1955 (stap_probe_is_linespec): Rename to...
1956 (stap_static_probe_ops::is_linespec): ...this. Adjust code to
1957 reflect change.
1958 (stap_type_name): Rename to...
1959 (stap_static_probe_ops::type_name): ...this. Adjust code to
1960 reflect change.
1961 (stap_gen_info_probes_table_header): Rename to...
1962 (stap_static_probe_ops::gen_info_probes_table_header):
1963 ...this. Adjust code to reflect change.
1964 (stap_gen_info_probes_table_values): Rename to...
1965 (stap_probe::gen_info_probes_table_values): ...this. Adjust
1966 code to reflect change.
1967 (struct probe_ops stap_probe_ops): Delete.
1968 (info_probes_stap_command): Use 'info_probes_for_spops'
1969 instead of 'info_probes_for_ops'.
1970 (_initialize_stap_probe): Use 'all_static_probe_ops' instead
1971 of 'all_probe_ops'.
1972
1973 2017-11-22 Sergio Durigan Junior <sergiodj@redhat.com>
1974
1975 * break-catch-throw.c (fetch_probe_arguments): Use
1976 'probe.prob' instead of 'probe.probe'.
1977 * breakpoint.c (create_longjmp_master_breakpoint): Call
1978 'can_evaluate_arguments' and 'get_relocated_address' methods
1979 from probe.
1980 (create_exception_master_breakpoint): Likewise.
1981 (add_location_to_breakpoint): Use 'sal->prob' instead of
1982 'sal->probe'.
1983 (bkpt_probe_insert_location): Call 'set_semaphore' method from
1984 probe.
1985 (bkpt_probe_remove_location): Likewise, for 'clear_semaphore'.
1986 * elfread.c (elf_get_probes): Use 'static_probe_ops' instead
1987 of 'probe_ops'.
1988 (probe_key_free): Call 'delete' on probe.
1989 (check_exception_resume): Use 'probe.prob' instead of
1990 'probe.probe'.
1991 * location.c (string_to_event_location_basic): Call
1992 'probe_linespec_to_static_ops'.
1993 * probe.c (class any_static_probe_ops): New class.
1994 (any_static_probe_ops any_static_probe_ops): New variable.
1995 (parse_probes_in_pspace): Receive 'static_probe_ops' as
1996 argument. Adjust code to reflect change.
1997 (parse_probes): Use 'static_probe_ops' instead of
1998 'probe_ops'. Adjust code to reflect change.
1999 (find_probes_in_objfile): Call methods to get name and
2000 provider from probe.
2001 (find_probe_by_pc): Use 'result.prob' instead of
2002 'result.probe'. Call 'get_relocated_address' method from
2003 probe.
2004 (collect_probes): Adjust comment and argument list to receive
2005 'static_probe_ops' instead of 'probe_ops'. Adjust code to
2006 reflect change. Call necessary methods from probe.
2007 (compare_probes): Call methods to get name and provider from
2008 probes.
2009 (gen_ui_out_table_header_info): Receive 'static_probe_ops'
2010 instead of 'probe_ops'. Use 'std::vector' instead of VEC,
2011 adjust code accordingly.
2012 (print_ui_out_not_applicables): Likewise.
2013 (info_probes_for_ops): Rename to...
2014 (info_probes_for_spops): ...this. Receive 'static_probe_ops'
2015 as argument instead of 'probe_ops'. Adjust code. Call
2016 necessary methods from probe.
2017 (info_probes_command): Use 'info_probes_for_spops'.
2018 (enable_probes_command): Pass correct argument to
2019 'collect_probes'. Call methods from probe.
2020 (disable_probes_command): Likewise.
2021 (get_probe_address): Move to 'any_static_probe_ops::get_address'.
2022 (get_probe_argument_count): Move to
2023 'any_static_probe_ops::get_argument_count'.
2024 (can_evaluate_probe_arguments): Move to
2025 'any_static_probe_ops::can_evaluate_arguments'.
2026 (evaluate_probe_argument): Move to
2027 'any_static_probe_ops::evaluate_argument'.
2028 (probe_safe_evaluate_at_pc): Use 'probe.prob' instead of
2029 'probe.probe'.
2030 (probe_linespec_to_ops): Rename to...
2031 (probe_linespec_to_static_ops): ...this. Adjust code.
2032 (probe_any_is_linespec): Rename to...
2033 (any_static_probe_ops::is_linespec): ...this.
2034 (probe_any_get_probes): Rename to...
2035 (any_static_probe_ops::get_probes): ...this.
2036 (any_static_probe_ops::type_name): New method.
2037 (any_static_probe_ops::gen_info_probes_table_header): New
2038 method.
2039 (compute_probe_arg): Use 'pc_probe.prob' instead of
2040 'pc_probe.probe'. Call methods from probe.
2041 (compile_probe_arg): Likewise.
2042 (std::vector<const probe_ops *> all_probe_ops): Delete.
2043 (std::vector<const static_probe_ops *> all_static_probe_ops):
2044 New variable.
2045 (_initialize_probe): Use 'all_static_probe_ops' instead of
2046 'all_probe_ops'.
2047 * probe.h (struct info_probe_column) <field_name>: Delete
2048 extraneous newline
2049 (info_probe_column_s): Delete type and VEC.
2050 (struct probe_ops): Delete. Replace with...
2051 (class static_probe_ops): ...this and...
2052 (clas probe): ...this.
2053 (struct bound_probe) <bound_probe>: Delete extraneous
2054 newline. Adjust constructor to receive 'probe' instead of
2055 'struct probe'.
2056 <probe>: Rename to...
2057 <prob>: ...this. Delete extraneous newline.
2058 <objfile>: Delete extraneous newline.
2059 (register_probe_ops): Delete unused prototype.
2060 (info_probes_for_ops): Rename to...
2061 (info_probes_for_spops): ...this. Adjust comment.
2062 (get_probe_address): Move to 'probe::get_address'.
2063 (get_probe_argument_count): Move to
2064 'probe::get_argument_count'.
2065 (can_evaluate_probe_arguments): Move to
2066 'probe::can_evaluate_arguments'.
2067 (evaluate_probe_argument): Move to 'probe::evaluate_argument'.
2068 * solib-svr4.c (struct svr4_info): Adjust comment.
2069 (struct probe_and_action) <probe>: Rename to...
2070 <prob>: ...this.
2071 (register_solib_event_probe): Receive 'probe' instead of
2072 'struct probe' as argument. Use 'prob' instead of 'probe'
2073 when applicable.
2074 (solib_event_probe_action): Call 'get_argument_count' method
2075 from probe. Adjust comment.
2076 (svr4_handle_solib_event): Adjust comment. Call
2077 'evaluate_argument' method from probe.
2078 (svr4_create_probe_breakpoints): Call 'get_relocated_address'
2079 from probe.
2080 (svr4_create_solib_event_breakpoints): Use 'probe' instead of
2081 'struct probe'. Call 'can_evaluate_arguments' from probe.
2082 * symfile.h: Forward declare 'class probe' instead of 'struct
2083 probe'.
2084 * symtab.h: Likewise.
2085 (struct symtab_and_line) <probe>: Rename to...
2086 <prob>: ...this.
2087 * tracepoint.c (start_tracing): Use 'prob' when applicable.
2088 Call probe methods.
2089 (stop_tracing): Likewise.
2090
2091 2017-11-22 Joel Brobecker <brobecker@adacore.com>
2092
2093 * ravenscar-thread.c (ravenscar_inferior_created): Remove
2094 trailing newline at end of string in call to warning.
2095
2096 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2097
2098 * osdata.h: Include vector isntead of vec.h.
2099 (osdata_column_s): Remove typedef.
2100 (struct osdata_column): Add constructor.
2101 <name, value>: Change type to std::string.
2102 (DEF_VEC_O (osdata_column_s)): Remove.
2103 (osdata_item_s): Remove typedef.
2104 (struct osdata_item) <columns>: Change type to std::vector.
2105 (DEF_VEC_O (osdata_item_s)): Remove.
2106 (struct osdata): Add constructor.
2107 <type>: Change type to std::string.
2108 <items>: Change type to std::vector.
2109 (osdata_p): Remove typedef.
2110 (DEF_VEC_P (osdata_p)): Remove.
2111 (osdata_parse): Return a unique_ptr.
2112 (osdata_free): Remove.
2113 (make_cleanup_osdata_free): Remove.
2114 (get_osdata): Return a unique_ptr.
2115 (get_osdata_column): Return pointer to std::string, take a
2116 reference to osdata_item as parameter.
2117 * osdata.c (struct osdata_parsing_data) <osdata>: Change type to
2118 unique_ptr.
2119 <property_name>: Change type to std::string.
2120 (osdata_start_osdata): Allocate osdata with new and adjust.
2121 (osdata_start_item): Adjust.
2122 (osdata_start_column): Adjust.
2123 (osdata_end_column): Adjust.
2124 (clear_parsing_data): Remove.
2125 (osdata_parse): Return a unique_ptr and adjust, remove cleanup.
2126 (osdata_item_clear): Remove.
2127 (get_osdata): return a unique_ptr and adjust.
2128 (get_osdata_column): Return a pointer to std::string and adjust.
2129 (info_osdata): Adjust.
2130 * mi/mi-main.c: Include <map>.
2131 (free_vector_of_osdata_items): Remove.
2132 (list_available_thread_groups): Adjust, use std::map instead of
2133 splay tree.
2134
2135 2017-11-22 Simon Marchi <simon.marchi@ericsson.com>
2136
2137 * stack.c (iterate_over_block_locals): Add LOC_OPTIMIZED_OUT
2138 case in switch.
2139
2140 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2141
2142 * varobj.h (DEF_VEC_P (varobj_p)): Remove.
2143
2144 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2145
2146 * varobj.h (struct varobj_update_result): Add constructor, add
2147 move constructor, disable copy and assign, initialize fields.
2148 <newobj>: Change type to std::vector.
2149 (varobj_update): Return std::vector.
2150 * varobj.c (install_dynamic_child): Change VEC parameters to
2151 std::vector and adjust.
2152 (update_dynamic_varobj_children): Likewise.
2153 (varobj_update): Return std::vector and adjust.
2154 * mi/mi-cmd-var.c (varobj_update_one): Adjust to vector changes.
2155
2156 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2157
2158 * varobj.h (struct varobj) <parent>: Remove const.
2159 <children>: Change type to std::vector.
2160 (varobj_list_children): Return std::vector const reference.
2161 (varobj_restrict_range): Change parameter type to std::vector
2162 const reference.
2163 * varobj.c (varobj_has_more): Adjust.
2164 (varobj_restrict_range): Change parameter type to std::vector
2165 const reference and adjust.
2166 (install_dynamic_child): Adjust.
2167 (update_dynamic_varobj_children): Adjust.
2168 (varobj_list_children): Return std::vector const reference and
2169 adjust.
2170 (varobj_add_child): Adjust.
2171 (update_type_if_necessary): Adjust.
2172 (varobj_update): Adjust.
2173 (delete_variable_1): Adjust.
2174 * ada-varobj.c (ada_value_has_mutated): Adjust.
2175 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Adjust.
2176
2177 2017-11-22 Simon Marchi <simon.marchi@polymtl.ca>
2178
2179 * varobj.h (struct varobj): Add constructor and destructor,
2180 initialize fields.
2181 * varobj.c (struct varobj_root): Initialize fields.
2182 (struct varobj_dynamic): Initialize fields.
2183 (varobj_create): Use unique_ptr instead of cleanup. Create
2184 varobj with new instead of new_root_variable.
2185 (delete_variable_1): Free variable with delete instead of
2186 free_variable.
2187 (create_child_with_value): Create variable with new instead of
2188 new_variable.
2189 (varobj::varobj): New.
2190 (varobj::~varobj): New (body mostly coming from free_variable).
2191 (new_variable): Remove.
2192 (free_variable): Remove.
2193 (do_free_variable_cleanup): Remove.
2194 (make_cleanup_free_variable): Remove.
2195
2196 2017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
2197
2198 * core-regset.c: Remove file.
2199 * Makefile.in (ALLDEPFILES): Remove core-regset.c.
2200
2201 2017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
2202
2203 * NEWS: Document use of GNU MPFR.
2204 * README: Likewise.
2205
2206 * Makefile.in (LIBMPFR): Add define.
2207 (CLIBS): Add $(LIBMPFR).
2208 * configure.ac: Add --with-mpfr configure option.
2209 * configure: Regenerate.
2210 * config.in: Regenerate.
2211
2212 * target-float.c [HAVE_LIBMPFR]: Include <mpfr.h>.
2213 (class mpfr_float_ops): New type.
2214 (mpfr_float_ops::from_target): Two new overloaded functions.
2215 (mpfr_float_ops::to_target): Likewise.
2216 (mpfr_float_ops::to_string): New function.
2217 (mpfr_float_ops::from_string): Likewise.
2218 (mpfr_float_ops::to_longest): Likewise.
2219 (mpfr_float_ops::from_longest): Likewise.
2220 (mpfr_float_ops::from_ulongest): Likewise.
2221 (mpfr_float_ops::to_host_double): Likewise.
2222 (mpfr_float_ops::from_host_double): Likewise.
2223 (mpfr_float_ops::convert): Likewise.
2224 (mpfr_float_ops::binop): Likewise.
2225 (mpfr_float_ops::compare): Likewise.
2226 (get_target_float_ops): Use mpfr_float_ops if available.
2227
2228 2017-11-22 Ulrich Weigand <uweigand@de.ibm.com>
2229
2230 * target-float.c: Do not include <math.h>.
2231 Include <cmath> and <limits>.
2232 (DOUBLEST): Do not define.
2233 (class target_float_ops): New type.
2234 (class host_float_ops): New templated type.
2235 (class decimal_float_ops): New type.
2236
2237 (floatformat_to_doublest): Rename to ...
2238 (host_float_ops<T>::from_target): ... this. Use template type T
2239 instead of DOUBLEST. Use C++ math routines. Update recursive calls.
2240 (host_float_ops<T>::from_target): New overload using a type argument.
2241 (floatformat_from_doublest): Rename to ...
2242 (host_float_ops<T>::to_target): ... this. Use template type T
2243 instead of DOUBLEST. Use C++ math routines. Update recursive calls.
2244 (host_float_ops<T>::to_target): New overload using a type argument.
2245 (floatformat_printf_format): New function.
2246 (struct printf_length_modifier): New templated type.
2247 (floatformat_to_string): Rename to ...
2248 (host_float_ops<T>::to_string): ... this. Use type instead of
2249 floatformat argument. Use floatformat_printf_format and
2250 printf_length_modifier. Remove special handling of invalid numbers,
2251 infinities and NaN (moved to target_float_to_string).
2252 (struct scanf_length_modifier): New templated type.
2253 (floatformat_from_string): Rename to ...
2254 (host_float_ops<T>::from_string): ... this. Use type instead of
2255 floatformat argument. Use scanf_length_modifier.
2256 (floatformat_to_longest): Rename to ...
2257 (host_float_ops<T>::to_longest): ... this. Use type instead of
2258 floatformat argument. Handle out-of-range values deterministically.
2259 (floatformat_from_longest): Rename to ...
2260 (host_float_ops<T>::from_longest): ... this. Use type instead of
2261 floatformat argument.
2262 (floatformat_from_ulongest): Rename to ...
2263 (host_float_ops<T>::from_ulongest): ... this. Use type instead of
2264 floatformat argument.
2265 (floatformat_to_host_double): Rename to ...
2266 (host_float_ops<T>::to_host_double): ... this. Use type instead of
2267 floatformat argument.
2268 (floatformat_from_host_double): Rename to ...
2269 (host_float_ops<T>::from_host_double): ... this. Use type instead of
2270 floatformat argument.
2271 (floatformat_convert): Rename to ...
2272 (host_float_ops<T>::convert): ... this. Use type instead of
2273 floatformat arguments. Remove handling of no-op conversions.
2274 (floatformat_binop): Rename to ...
2275 (host_float_ops<T>::binop): ... this. Use type instead of
2276 floatformat arguments.
2277 (floatformat_compare): Rename to ...
2278 (host_float_ops<T>::compare): ... this. Use type instead of
2279 floatformat arguments.
2280
2281 (match_endianness): Use type instead of length/byte_order arguments.
2282 (set_decnumber_context): Likewise.
2283 (decimal_from_number): Likewise. Update calls.
2284 (decimal_to_number): Likewise.
2285 (decimal_is_zero): Likewise. Update calls. Move to earlier in file.
2286 (decimal_float_ops::to_host_double): New dummy function.
2287 (decimal_float_ops::from_host_double): Likewise.
2288 (decimal_to_string): Rename to ...
2289 (decimal_float_ops::to_string): ... this. Use type instead of
2290 length/byte_order arguments. Update calls.
2291 (decimal_from_string): Rename to ...
2292 (decimal_float_ops::from_string): ... this. Use type instead of
2293 length/byte_order arguments. Update calls.
2294 (decimal_from_longest): Rename to ...
2295 (decimal_float_ops::from_longest): ... this. Use type instead of
2296 length/byte_order arguments. Update calls.
2297 (decimal_from_ulongest): Rename to ...
2298 (decimal_float_ops::from_ulongest): ... this. Use type instead of
2299 length/byte_order arguments. Update calls.
2300 (decimal_to_longest): Rename to ...
2301 (decimal_float_ops::to_longest): ... this. Use type instead of
2302 length/byte_order arguments. Update calls.
2303 (decimal_binop): Rename to ...
2304 (decimal_float_ops::binop): ... this. Use type instead of
2305 length/byte_order arguments. Update calls.
2306 (decimal_compare): Rename to ...
2307 (decimal_float_ops::compare): ... this. Use type instead of
2308 length/byte_order arguments. Update calls.
2309 (decimal_convert): Rename to ...
2310 (decimal_float_ops::convert): ... this. Use type instead of
2311 length/byte_order arguments. Update calls.
2312
2313 (target_float_same_category_p): New function.
2314 (target_float_same_format_p): Likewise.
2315 (target_float_format_length): Likewise.
2316 (enum target_float_ops_kind): New type.
2317 (get_target_float_ops_kind): New function.
2318 (get_target_float_ops): Three new overloaded functions.
2319
2320 (target_float_is_zero): Update call.
2321 (target_float_to_string): Add special handling of invalid numbers,
2322 infinities and NaN (moved from floatformat_to_string). Use
2323 target_float_ops callback.
2324 (target_float_from_string): Use target_float_ops callback.
2325 (target_float_to_longest): Likewise.
2326 (target_float_from_longest): Likewise.
2327 (target_float_from_ulongest): Likewise.
2328 (target_float_to_host_double): Likewise.
2329 (target_float_from_host_double): Likewise.
2330 (target_float_convert): Add special case for no-op conversions.
2331 Use target_float_ops callback.
2332 (target_float_binop): Use target_float_ops callback.
2333 (target_float_compare): Likewise.
2334
2335 2017-11-22 Yao Qi <yao.qi@linaro.org>
2336
2337 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use strcpy.
2338
2339 2017-11-22 Yao Qi <yao.qi@linaro.org>
2340
2341 * cli/cli-decode.c (help_list): Use memcpy instead of strncpy.
2342 * cp-namespace.c (cp_lookup_transparent_type_loop): Likewise.
2343
2344 2017-11-21 Jerome Guitton <guitton@adacore.com>
2345
2346 * ravenscar-thread.c (ravenscar_wait): Update inferior ptid
2347 with event ptid from the lower layer before doing the
2348 ravenscar-specific update.
2349
2350 2017-11-21 Joel Brobecker <brobecker@adacore.com>
2351
2352 * ravenscar-thread.c (is_ravenscar_task): Also verify that
2353 the ptid's TID is nonzero.
2354
2355 2017-11-21 Joel Brobecker <brobecker@adacore.com>
2356
2357 * ada-lang.h (ada_get_tcb_types_info): Add declaration.
2358 * ada-tasks.c (ada_get_tcb_types_info): Renames get_tcb_types_info.
2359 Make non-static. Change return type to char *. Adjust code
2360 accordingly. Rewrite the function's documentation.
2361 (read_atcb): Adjust call to get_tcb_types_info accordingly.
2362 * ravenscar-thread.c (ravenscar_inferior_created): Check that
2363 we have enough debugging information in the runtime to support
2364 Ada task debugging before we enable the ravenscar-thread layer.
2365
2366 2017-11-21 Joel Brobecker <brobecker@adacore.com>
2367
2368 * ada-lang.h (ada_get_task_info_from_ptid): Add declaration.
2369 * ada-tasks.c (ada_get_task_info_from_ptid): New function.
2370 * ravenscar-thread.c: Add into comment.
2371 (base_magic_null_ptid): Delete.
2372 (base_ptid): Change documentation.
2373 (ravenscar_active_task): Renames ravenscar_running_thread.
2374 All callers updated throughout.
2375 (is_ravenscar_task, ravenscar_get_thread_base_cpu): New function.
2376 (ravenscar_task_is_currently_active): Likewise.
2377 (get_base_thread_from_ravenscar_task): Ditto.
2378 (ravenscar_update_inferior_ptid): Adjust to handle multiple CPUs.
2379 (ravenscar_runtime_initialized): Likewise.
2380 (get_running_thread_id): Add new parameter "cpu". Adjust
2381 implementation to handle this new parameter.
2382 (ravenscar_fetch_registers): Small adjustment to use
2383 is_ravenscar_task and ravenscar_task_is_currently_active in
2384 order to decide whether to use the target beneath or this
2385 module's arch_ops.
2386 (ravenscar_store_registers, ravenscar_prepare_to_store): Likewise.
2387 (ravenscar_stopped_by_sw_breakpoint): Use
2388 get_base_thread_from_ravenscar_task to get the underlying
2389 thread, rather than using base_ptid.
2390 (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
2391 (ravenscar_stopped_data_address, ravenscar_core_of_thread):
2392 Likewise.
2393 (ravenscar_inferior_created): Do not set base_magic_null_ptid.
2394
2395 2017-11-21 Joel Brobecker <brobecker@adacore.com>
2396
2397 * ada-lang.h (struct ada_task_info) <base_cpu>: New field.
2398 * ada-lang.c (struct atcb_fieldno) <base_cpu>: New field.
2399 (get_tcb_types_info): Set fieldnos.base_cpu.
2400 (read_atcb): Set task_info->base_cpu.
2401 (info_task): Print "Base CPU" info if set by runtime.
2402
2403 2017-11-21 Joel Brobecker <brobecker@adacore.com>
2404
2405 * ravenscar-thread.c (ravenscar_stopped_by_sw_breakpoint)
2406 (ravenscar_stopped_by_hw_breakpoint, ravenscar_stopped_by_watchpoint)
2407 (ravenscar_stopped_data_address, ravenscar_core_of_thread):
2408 New functions.
2409 (init_ravenscar_thread_ops): Set the to_stopped_by_sw_breakpoint,
2410 to_stopped_by_hw_breakpoint, to_stopped_by_watchpoint,
2411 to_stopped_data_address and to_core_of_thread fields of
2412 ravenscar_ops.
2413
2414 2017-11-21 Ulrich Weigand <uweigand@de.ibm.com>
2415
2416 * ppc-tdep.h (enum powerpc_long_double_abi): New data type.
2417 (struct gdbarch_tdep): New member long_double_abi.
2418 * rs6000-tdep.c (rs6000_gdbarch_init): Initialize long_double_abi
2419 member of tdep struct based on Tag_GNU_Power_ABI_FP attribute.
2420 * ppc-linux-tdep.c (ppc_linux_init_abi): Install long double data
2421 format depending on long_double_abi tdep member.
2422 (ppc_floatformat_for_type): Handle __ibm128 type.
2423
2424 2017-11-20 Simon Marchi <simon.marchi@polymtl.ca>
2425
2426 * darwin-nat.c (set_enable_mach_exceptions): Constify parameter.
2427
2428 2017-11-21 Pedro Alves <palves@redhat.com>
2429
2430 * dwarf2read.c (mapped_index::find_name_components_bounds)
2431 <completion mode, upper bound>: Use std::lower_bound instead of
2432 std::upper_bound.
2433 (test_mapped_index_find_name_component_bounds): Remove incorrect
2434 "t1_fund" from expected symbols.
2435
2436 2017-11-21 Pedro Alves <palves@redhat.com>
2437
2438 * dwarf2read.c (mapped_index::name_components_casing): New field.
2439 (mapped_index) <build_name_components,
2440 find_name_components_bounds): Declare new methods.
2441 (mapped_index::find_name_components_bounds)
2442 (mapped_index::build_name_components): New methods, factored out
2443 from dw2_expand_symtabs_matching_symbol.
2444 (check_find_bounds_finds)
2445 (test_mapped_index_find_name_component_bounds): New.
2446 (run_test): Rename to ...
2447 (test_dw2_expand_symtabs_matching_symbol): ... this.
2448 (run_test): Reimplement.
2449
2450 2017-11-21 Pedro Alves <palves@redhat.com>
2451
2452 * cp-name-parser.y (cp_ident_is_alpha, cp_ident_is_alnum): New.
2453 (symbol_end): Use cp_ident_is_alnum.
2454 (yylex): Use cp_ident_is_alpha and cp_ident_is_alnum.
2455 * dwarf2read.c (make_sort_after_prefix_name): New function.
2456 (dw2_expand_symtabs_matching_symbol): Use it.
2457 (test_symbols): Add more symbols.
2458 (run_test): Add tests.
2459
2460 2017-11-17 Tom Tromey <tom@tromey.com>
2461
2462 * symtab.h (enum symbol_subclass_kind): New.
2463 (struct symbol) <is_cplus_template_function, is_rust_vtable>:
2464 Remove.
2465 <subclass>: New member.
2466 (SYMBOL_IS_CPLUS_TEMPLATE_FUNCTION): Update.
2467 * rust-lang.c (rust_get_trait_object_pointer): Update.
2468 * dwarf2read.c (read_func_scope): Update.
2469 (read_variable): Update.
2470
2471 2017-11-17 Tom Tromey <tom@tromey.com>
2472
2473 * dwarf2read.c (read_func_scope): Update.
2474 * symtab.h (struct template_symbol): Derive from symbol.
2475 <base>: Remove.
2476
2477 2017-11-17 Tom Tromey <tom@tromey.com>
2478
2479 * symtab.h (struct symbol) <is_rust_vtable>: New member.
2480 (struct rust_vtable_symbol): New.
2481 (find_symbol_at_address): Declare.
2482 * symtab.c (find_symbol_at_address): New function.
2483 * symfile.h (struct quick_symbol_functions)
2484 <find_compunit_symtab_by_address>: New member.
2485 * symfile-debug.c (debug_qf_find_compunit_symtab_by_address): New
2486 function.
2487 (debug_sym_quick_functions): Link to
2488 debug_qf_find_compunit_symtab_by_address.
2489 * rust-lang.c (rust_get_trait_object_pointer): New function.
2490 (rust_evaluate_subexp) <case UNOP_IND>: New case. Call
2491 rust_get_trait_object_pointer.
2492 * psymtab.c (psym_relocate): Clear psymbol_map.
2493 (psym_fill_psymbol_map, psym_find_compunit_symtab_by_address): New
2494 functions.
2495 (psym_functions): Link to psym_find_compunit_symtab_by_address.
2496 * objfiles.h (struct objfile) <psymbol_map>: New member.
2497 * dwarf2read.c (dwarf2_gdb_index_functions): Update.
2498 (process_die) <DW_TAG_variable>: New case. Call read_variable.
2499 (rust_containing_type, read_variable): New functions.
2500
2501 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2502
2503 * common/gdb_vecs.h (DEF_VEC_I (int)): Remove.
2504
2505 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2506
2507 * common/filestuff.c: Include <algorithm>.
2508 (open_fds): Change type to std::vector<int>.
2509 (do_mark_open_fd): Adjust.
2510 (unmark_fd_no_cloexec): Adjust.
2511 (do_close): Adjust.
2512
2513 2017-11-17 Simon Marchi <simon.marchi@polymtl.ca>
2514
2515 * breakpoint.c (output_thread_groups): Take an std::vector.
2516 (print_one_breakpoint_location): Adjust.
2517
2518 2017-11-17 Joel Brobecker <brobecker@adacore.com>
2519
2520 * ada-lang.c (resolve_subexp): Add handling of OP_VAR_MSYM_VALUE.
2521 (ada_evaluate_subexp_for_cast): New function.
2522 (ada_evaluate_subexp) <UNOP_CAST>: Replace code by call to
2523 ada_evaluate_subexp_for_cast.
2524 (ada_evaluate_subexp) <nosideret>: Replace code by call to
2525 eval_skip_value.
2526 * eval.c (evaluate_var_value): Make non-static.
2527 (evaluate_var_msym_value, eval_skip_value): Likewise.
2528 * value.h (evaluate_var_value, evaluate_var_msym_value)
2529 (eval_skip_value): Declare.
2530
2531 2017-11-16 Joel Brobecker <brobecker@adacore.com>
2532
2533 * ada-lang.c (ada_value_cast): Remove parameter "noside".
2534 Update all callers.
2535
2536 2017-11-16 Pedro Alves <palves@redhat.com>
2537
2538 * python/py-unwind.c (pyuw_sniffer): Translate
2539 PyExc_KeyboardInterrupt to a GDB Quit exception.
2540
2541 2017-11-16 Pedro Alves <palves@redhat.com>
2542
2543 * infrun.c (resume_cleanups): Delete.
2544 (resume): No longer install a resume_cleanups cleanup nor call
2545 QUIT.
2546 (proceed): Pass the terminal to the inferior.
2547 (keep_going_pass_signal): No longer install a resume_cleanups
2548 cleanup.
2549
2550 2017-11-16 Pedro Alves <palves@redhat.com>
2551
2552 * inf-loop.c (inferior_event_handler): Don't swallow the exception
2553 if the prompt is blocked.
2554
2555 2017-11-16 Pedro Alves <palves@redhat.com>
2556
2557 * breakpoint.c (insert_bp_location): Replace bp_err and
2558 bp_err_message locals by a gdb_exception local.
2559
2560 2017-11-16 Pedro Alves <palves@redhat.com>
2561
2562 * inflow.c (scoped_ignore_sigttou): New class.
2563 (child_terminal_ours_1, new_tty): Use it.
2564
2565 2017-11-16 Ulrich Weigand <uweigand@de.ibm.com>
2566
2567 * target-float.c (decimal_from_number): Add byte_order argument and
2568 call match_endianness. Error if unknown floating-point type.
2569 (decimal_to_number): Add byte_order argument and call match_endianness.
2570 (decimal_from_longest): Update call. Do not call match_endianness.
2571 (decimal_from_ulongest): Likewise.
2572 (decimal_binop): Likewise.
2573 (decimal_is_zero): Likewise.
2574 (decimal_compare): Likewise.
2575 (decimal_convert): Likewise.
2576
2577 2017-11-16 Phil Muldoon <pmuldoon@redhat.com>
2578
2579 * python/python.c (gdbpy_rbreak): New function.
2580 * NEWS: Document Python rbreak feature.
2581
2582 2017-11-16 Yao Qi <yao.qi@linaro.org>
2583
2584 * features/tic6x-c62x.xml: Remove.
2585 * features/tic6x-c64x.xml: Remove.
2586 * features/tic6x-c64xp.xml: Remove.
2587
2588 2017-11-15 John Baldwin <jhb@FreeBSD.org>
2589
2590 * symtab.h: Include <array>.
2591
2592 2017-11-15 John Baldwin <jhb@FreeBSD.org>
2593
2594 * bsd-kvm.c (bsd_kvm_cmd): Constify 'arg'.
2595 (bsd_kvm_proc_cmd): Likewise.
2596
2597 2017-11-15 Simon Marchi <simon.marchi@ericsson.com>
2598
2599 * tui/tui-win.c (window_name_completer): Replace VEC with
2600 std::vector.
2601
2602 2017-11-15 Andrew Cagney <cagney@gnu.org>
2603
2604 * MAINTAINERS: Remove no-longer applicable entries.
2605
2606 2017-11-15 Andrew Cagney <cagney@gnu.org>
2607
2608 * MAINTAINERS: Move self to Past Maintainers.
2609
2610 2017-11-15 Yao Qi <yao.qi@linaro.org>
2611
2612 * features/Makefile (XMLTOC): Remove nios2-linux.xml.
2613 * features/nios2-linux.c: Remove.
2614 * nios2-linux-tdep.c (_initialize_nios2_linux_tdep): Don't call
2615 initialize_tdesc_nios2_linux.
2616
2617 2017-11-15 Yao Qi <yao.qi@linaro.org>
2618
2619 * m68hc11-tdep.c (M68HC11_NUM_REGS): Change it to
2620 M68HC11_LAST_HARD_REG + 1.
2621
2622 2017-11-14 Paul Carroll <pcarroll@codesourcery.com>
2623
2624 PR gdb/22388
2625 * remote.c (remote_write_bytes_aux, remote_read_bytes_1,
2626 remote_read_bytes, remote_write_qxfer, remote_xfer_partial):
2627 Return TARGET_XFER_EOF if size of returned data is 0.
2628
2629 2017-11-14 Simon Marchi <simon.marchi@ericsson.com>
2630
2631 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2632 memory-map-selftests.c.
2633 (SUBDIR_UNITTESTS_OBS): Add memory-map-selftests.o.
2634 * memory-map.c (memory_map_start_memory): Fix computation of hi
2635 address.
2636 * unittests/memory-map-selftests.c: New file.
2637
2638 2017-11-09 Joel Brobecker <brobecker@adacore.com>
2639
2640 * ada-lang.c: Fix some typos in the general command documenting
2641 how Ada expressions are being evaluated and how their result
2642 is printed.
2643
2644 2017-11-09 Tom Tromey <tom@tromey.com>
2645
2646 * psymtab.c (psymbol_hash): Do not hash string contents.
2647 (psymbol_compare): Add comment.
2648
2649 2017-11-09 Tom Tromey <tom@tromey.com>
2650
2651 * dictionary.c (dict_hash): Move "TKB" check into the "switch".
2652
2653 2017-11-08 Joel Brobecker <brobecker@adacore.com>
2654
2655 * ada-exp.y (write_var_from_sym): Remove parameter
2656 "orig_left_context". Update all callers.
2657
2658 2017-11-08 Simon Marchi <simon.marchi@ericsson.com>
2659
2660 * tracepoint.h (class collection_list) <stringify>: Return
2661 std::vector<std::string>.
2662 (encode_actions_rsp): Change parameters to
2663 std::vector<std::string> *.
2664 * tracepoint.c (collection_list::stringify): Return
2665 std::vector<std::string> and adjust accordingly.
2666 (encode_actions_rsp): Changee parameters to
2667 std::vector<std::string> and adjust accordingly.
2668 * remote.c (free_actions_list),
2669 free_actions_list_cleanup_wrapper): Remove.
2670 (remote_download_tracepoint): Adjust to std::vector.
2671
2672 2017-11-08 Tom Tromey <tom@tromey.com>
2673
2674 * dwarf2read.c (symbolp): Remove typedef.
2675 (read_func_scope): Use std::vector.
2676 (process_structure_scope): Use std::vector.
2677
2678 2017-11-08 Pedro Alves <palves@redhat.com>
2679
2680 * ada-lang.c (ada_make_symbol_completion_list): Use
2681 completion_skip_symbol.
2682 * symtab.c (symbol_is_function_or_method(minimal_symbol*)): New.
2683 (symbol_is_function_or_method(symbol*)): New.
2684 (add_symtab_completions): Add complete_symbol_mode parameter. Use
2685 completion_skip_symbol.
2686 (default_collect_symbol_completion_matches_break_on): Use
2687 completion_skip_symbol. Pass down mode.
2688 (collect_file_symbol_completion_matches): Pass down mode.
2689 * symtab.h (symbol_is_function_or_method): New declarations.
2690 (completion_skip_symbol): New template function.
2691
2692 2017-11-08 Pedro Alves <palves@redhat.com>
2693
2694 * linespec.c (iterate_over_all_matching_symtabs): Add
2695 search_domain parameter. Pass it down to expand_symtabs_matching.
2696 (decode_objc): Request FUNCTIONS_DOMAIN symbols only.
2697 (lookup_prefix_sym): Adjust by passing ALL_DOMAIN as
2698 search_domain.
2699 (add_all_symbol_names_from_pspace): Add search_domain parameter.
2700 Pass it down.
2701 (find_method, find_function_symbols): Request FUNCTIONS_DOMAIN
2702 symbols.
2703 (add_matching_symbols_to_info): Add search_domain parameter. Pass
2704 it down.
2705
2706 2017-11-08 Pedro Alves <palves@redhat.com>
2707
2708 * ada-lang.c (ada_make_symbol_completion_list): Remove text and
2709 text_len locals and don't pass them down.
2710 * symtab.c (completion_list_add_name): Remove
2711 sym_text/sym_text_len parameters and adjust.
2712 (completion_list_add_symbol, completion_list_add_msymbol)
2713 (completion_list_objc_symbol, completion_list_add_fields)
2714 (add_symtab_completions): Likewise.
2715 (default_collect_symbol_completion_matches_break_on)
2716 (collect_file_symbol_completion_matches): Remove sym_text_len
2717 local and don't pass it down.
2718 * symtab.h (completion_list_add_name): Remove
2719 sym_text/sym_text_len parameters.
2720
2721 2017-11-08 Pedro Alves <palves@redhat.com>
2722
2723 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
2724 unittests/lookup_name_info-selftests.c.
2725 (SUBDIR_UNITTESTS_OBS): Add lookup_name_info-selftests.o.
2726 * cp-support.c: Include "selftest.h".
2727 (cp_remove_params_1): Rename from cp_remove_params. Add
2728 'require_param' parameter, and handle it.
2729 (cp_remove_params): Reimplement.
2730 (cp_remove_params_if_any): New.
2731 (selftests::quote): New.
2732 (selftests::check_remove_params): New.
2733 (selftests::test_cp_remove_params): New.
2734 (_initialize_cp_support): Install
2735 selftests::test_cp_remove_params.
2736 * cp-support.h (cp_remove_params_if_any): Declare.
2737 * dwarf2read.c :Include "selftest.h".
2738 (dw2_expand_symtabs_matching_symbol): Use
2739 lookup_name_info::make_ignore_params.
2740 (selftests::dw2_expand_symtabs_matching::mock_mapped_index)
2741 (selftests::dw2_expand_symtabs_matching::string_or_null)
2742 (selftests::dw2_expand_symtabs_matching::check_match)
2743 (selftests::dw2_expand_symtabs_matching::test_symbols)
2744 (selftests::dw2_expand_symtabs_matching::run_test): New.
2745 (_initialize_dwarf2_read): Register
2746 selftests::dw2_expand_symtabs_matching::run_test.
2747 * psymtab.c (psym_expand_symtabs_matching): Use
2748 lookup_name_info::make_ignore_params.
2749 * symtab.c (demangle_for_lookup_info::demangle_for_lookup_info):
2750 If the lookup name wants to ignore parameters, strip them.
2751 (compare_symbol_name): Remove sym_text/sym_text_len parameters and
2752 code handling '('.
2753 (completion_list_add_name): Don't pass down sym_text/sym_text_len.
2754 (default_collect_symbol_completion_matches_break_on): Don't try to
2755 strip parameters.
2756 * symtab.h (lookup_name_info::lookup_name_info): Add
2757 'ignore_parameters' parameter.
2758 (lookup_name_info::ignore_parameters)
2759 (lookup_name_info::make_ignore_params): New methods.
2760 (lookup_name_info::m_ignore_parameters): New field.
2761 * unittests/lookup_name_info-selftests.c: New file.
2762
2763 2017-11-08 Pedro Alves <palves@redhat.com>
2764
2765 * dwarf2read.c (dw2_expand_marked_cus)
2766 (dw2_expand_symtabs_matching_symbol): Remove forward declarations.
2767 (dw2_expand_symtabs_matching): Move further below.
2768 (dw2_expand_marked_cus): Reindent.
2769
2770 2017-11-08 Pedro Alves <palves@redhat.com>
2771
2772 * dwarf2read.c (byte_swap, MAYBE_SWAP): Move higher up in file.
2773 (struct name_component): New.
2774 (mapped_index::name_components): New field.
2775 (mapped_index::symbol_name_at): New method.
2776 (dwarf2_read_index): Call mapped_index ctor.
2777 (dw2_map_matching_symbols): Add comment about name_components
2778 table.
2779 (dw2_expand_symtabs_matching): Factor part to...
2780 (dw2_expand_symtabs_matching_symbol): ... this new function.
2781 Build name components table, and lookup symbols in it before
2782 calling the name matcher.
2783 (dw2_expand_marked_cus): New, factored out from
2784 dw2_expand_symtabs_matching.
2785 (dwarf2_per_objfile_free): Call the mapped_index's dtor.
2786
2787 2017-11-08 Pedro Alves <palves@redhat.com>
2788
2789 * ada-lang.c (ada_encode): Rename to ..
2790 (ada_encode_1): ... this. Add throw_errors parameter and handle
2791 it.
2792 (ada_encode): Reimplement.
2793 (match_name): Delete, folded into full_name.
2794 (resolve_subexp): No longer pass the encoded name to
2795 ada_lookup_symbol_list.
2796 (should_use_wild_match): Delete.
2797 (name_match_type_from_name): New.
2798 (ada_lookup_simple_minsym): Use lookup_name_info and the
2799 language's symbol_name_matcher_ftype.
2800 (add_symbols_from_enclosing_procs, ada_add_local_symbols)
2801 (ada_add_block_renamings): Adjust to use lookup_name_info.
2802 (ada_lookup_name): New.
2803 (add_nonlocal_symbols, ada_add_all_symbols)
2804 (ada_lookup_symbol_list_worker, ada_lookup_symbol_list)
2805 (ada_iterate_over_symbols): Adjust to use lookup_name_info.
2806 (ada_name_for_lookup): Delete.
2807 (ada_lookup_encoded_symbol): Construct a verbatim name.
2808 (wild_match): Reverse sense of return type. Use bool.
2809 (full_match): Reverse sense of return type. Inline bits of old
2810 match_name here.
2811 (ada_add_block_symbols): Adjust to use lookup_name_info.
2812 (symbol_completion_match): Delete, folded into...
2813 (ada_lookup_name_info::matches): ... .this new method.
2814 (symbol_completion_add): Delete.
2815 (ada_collect_symbol_completion_matches): Add name_match_type
2816 parameter. Adjust to use lookup_name_info and
2817 completion_list_add_name.
2818 (get_var_value, ada_add_global_exceptions): Adjust to use
2819 lookup_name_info.
2820 (ada_get_symbol_name_cmp): Delete.
2821 (do_wild_match, do_full_match): New functions.
2822 (ada_lookup_name_info::ada_lookup_name_info): New method.
2823 (ada_symbol_name_matches, ada_get_symbol_name_matcher): New
2824 functions.
2825 (ada_language_defn): Install ada_get_symbol_name_matcher.
2826 * ada-lex.l (processId): If name starts with '<', copy it
2827 verbatim.
2828 * block.c (block_iter_match_step, block_iter_match_first)
2829 (block_iter_match_next, block_lookup_symbol)
2830 (block_lookup_symbol_primary, block_find_symbol): Adjust to use
2831 lookup_name_info.
2832 * block.h (block_iter_match_first, block_iter_match_next)
2833 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use lookup_name_info.
2834 * c-lang.c (c_language_defn, cplus_language_defn)
2835 (asm_language_defn, minimal_language_defn): Adjust comments to
2836 refer to la_get_symbol_name_matcher.
2837 * completer.c (complete_files_symbols)
2838 (collect_explicit_location_matches, symbol_completer): Pass a
2839 symbol_name_match_type down.
2840 * completer.h (class completion_match, completion_match_result):
2841 New classes.
2842 (completion_tracker::reset_completion_match_result): New method.
2843 (completion_tracker::m_completion_match_result): New field.
2844 * cp-support.c (make_symbol_overload_list_block): Adjust to use
2845 lookup_name_info.
2846 (cp_fq_symbol_name_matches, cp_get_symbol_name_matcher): New
2847 functions.
2848 * cp-support.h (cp_get_symbol_name_matcher): New declaration.
2849 * d-lang.c: Adjust comments to refer to
2850 la_get_symbol_name_matcher.
2851 * dictionary.c (dict_vector) <iter_match_first, iter_match_next>:
2852 Adjust to use lookup_name_info.
2853 (dict_iter_match_first, dict_iter_match_next)
2854 (iter_match_first_hashed, iter_match_next_hashed)
2855 (iter_match_first_linear, iter_match_next_linear): Adjust to work
2856 with a lookup_name_info.
2857 * dictionary.h (dict_iter_match_first, dict_iter_match_next):
2858 Likewise.
2859 * dwarf2read.c (dw2_lookup_symbol): Adjust to use lookup_name_info.
2860 (dw2_map_matching_symbols): Adjust to use symbol_name_match_type.
2861 (gdb_index_symbol_name_matcher): New class.
2862 (dw2_expand_symtabs_matching) Adjust to use lookup_name_info and
2863 gdb_index_symbol_name_matcher. Accept a NULL symbol_matcher.
2864 * f-lang.c (f_collect_symbol_completion_matches): Adjust to work
2865 with a symbol_name_match_type.
2866 (f_language_defn): Adjust comments to refer to
2867 la_get_symbol_name_matcher.
2868 * go-lang.c (go_language_defn): Adjust comments to refer to
2869 la_get_symbol_name_matcher.
2870 * language.c (default_symbol_name_matcher)
2871 (language_get_symbol_name_matcher): New functions.
2872 (unknown_language_defn, auto_language_defn): Adjust comments to
2873 refer to la_get_symbol_name_matcher.
2874 * language.h (symbol_name_cmp_ftype): Delete.
2875 (language_defn) <la_collect_symbol_completion_matches>: Add match
2876 type parameter.
2877 <la_get_symbol_name_cmp>: Delete field.
2878 <la_get_symbol_name_matcher>: New field.
2879 <la_iterate_over_symbols>: Adjust to use lookup_name_info.
2880 (default_symbol_name_matcher, language_get_symbol_name_matcher):
2881 Declare.
2882 * linespec.c (iterate_over_all_matching_symtabs)
2883 (iterate_over_file_blocks): Adjust to use lookup_name_info.
2884 (find_methods): Add language parameter, and use lookup_name_info
2885 and the language's symbol_name_matcher_ftype.
2886 (linespec_complete_function): Adjust.
2887 (lookup_prefix_sym): Use lookup_name_info.
2888 (add_all_symbol_names_from_pspace): Adjust.
2889 (find_superclass_methods): Add language parameter and pass it
2890 down.
2891 (find_method): Pass symbol language down.
2892 (find_linespec_symbols): Don't demangle or Ada encode here.
2893 (search_minsyms_for_name): Add lookup_name_info parameter.
2894 (add_matching_symbols_to_info): Add name_match_type parameter.
2895 Use lookup_name_info.
2896 * m2-lang.c (m2_language_defn): Adjust comments to refer to
2897 la_get_symbol_name_matcher.
2898 * minsyms.c: Include <algorithm>.
2899 (add_minsym_to_demangled_hash_table): Remove table parameter and
2900 add objfile parameter. Use search_name_hash, and add language to
2901 demangled languages vector.
2902 (struct found_minimal_symbols): New struct.
2903 (lookup_minimal_symbol_mangled, lookup_minimal_symbol_demangled):
2904 New functions.
2905 (lookup_minimal_symbol): Adjust to use them. Don't canonicalize
2906 input names here. Use lookup_name_info instead. Lookup up
2907 demangled names once for each language in the demangled names
2908 vector.
2909 (iterate_over_minimal_symbols): Use lookup_name_info. Lookup up
2910 demangled names once for each language in the demangled names
2911 vector.
2912 (build_minimal_symbol_hash_tables): Adjust.
2913 * minsyms.h (iterate_over_minimal_symbols): Adjust to pass down a
2914 lookup_name_info.
2915 * objc-lang.c (objc_language_defn): Adjust comment to refer to
2916 la_get_symbol_name_matcher.
2917 * objfiles.h: Include <vector>.
2918 (objfile_per_bfd_storage) <demangled_hash_languages>: New field.
2919 * opencl-lang.c (opencl_language_defn): Adjust comment to refer to
2920 la_get_symbol_name_matcher.
2921 * p-lang.c (pascal_language_defn): Adjust comment to refer to
2922 la_get_symbol_name_matcher.
2923 * psymtab.c (psym_lookup_symbol): Use lookup_name_info.
2924 (match_partial_symbol): Use symbol_name_match_type,
2925 lookup_name_info and psymbol_name_matches.
2926 (lookup_partial_symbol): Use lookup_name_info.
2927 (map_block): Use symbol_name_match_type and lookup_name_info.
2928 (psym_map_matching_symbols): Use symbol_name_match_type.
2929 (psymbol_name_matches): New.
2930 (recursively_search_psymtabs): Use lookup_name_info and
2931 psymbol_name_matches. Rename 'kind' parameter to 'domain'.
2932 (psym_expand_symtabs_matching): Use lookup_name_info. Rename
2933 'kind' parameter to 'domain'.
2934 * rust-lang.c (rust_language_defn): Adjust comment to refer to
2935 la_get_symbol_name_matcher.
2936 * symfile-debug.c (debug_qf_map_matching_symbols)
2937 (debug_qf_map_matching_symbols): Use symbol_name_match_type.
2938 (debug_qf_expand_symtabs_matching): Use lookup_name_info.
2939 * symfile.c (expand_symtabs_matching): Use lookup_name_info.
2940 * symfile.h (quick_symbol_functions) <map_matching_symbols>:
2941 Adjust to use symbol_name_match_type.
2942 <expand_symtabs_matching>: Adjust to use lookup_name_info.
2943 (expand_symtabs_matching): Adjust to use lookup_name_info.
2944 * symmisc.c (maintenance_expand_symtabs): Use
2945 lookup_name_info::match_any ().
2946 * symtab.c (symbol_matches_search_name): New.
2947 (eq_symbol_entry): Adjust to use lookup_name_info and the
2948 language's matcher.
2949 (demangle_for_lookup_info::demangle_for_lookup_info): New.
2950 (lookup_name_info::match_any): New.
2951 (iterate_over_symbols, search_symbols): Use lookup_name_info.
2952 (compare_symbol_name): Add language, lookup_name_info and
2953 completion_match_result parameters, and use them.
2954 (completion_list_add_name): Make extern. Add language and
2955 lookup_name_info parameters. Use them.
2956 (completion_list_add_symbol, completion_list_add_msymbol)
2957 (completion_list_objc_symbol): Add lookup_name_info parameters and
2958 adjust. Pass down language.
2959 (completion_list_add_fields): Add lookup_name_info parameters and
2960 adjust. Pass down language.
2961 (add_symtab_completions): Add lookup_name_info parameters and
2962 adjust.
2963 (default_collect_symbol_completion_matches_break_on): Add
2964 name_match_type parameter, and use it. Use lookup_name_info.
2965 (default_collect_symbol_completion_matches)
2966 (collect_symbol_completion_matches): Add name_match_type
2967 parameter, and pass it down.
2968 (collect_symbol_completion_matches_type): Adjust.
2969 (collect_file_symbol_completion_matches): Add name_match_type
2970 parameter, and use lookup_name_info.
2971 * symtab.h: Include <string> and "common/gdb_optional.h".
2972 (enum class symbol_name_match_type): New.
2973 (class ada_lookup_name_info): New.
2974 (struct demangle_for_lookup_info): New.
2975 (class lookup_name_info): New.
2976 (symbol_name_matcher_ftype): New.
2977 (SYMBOL_MATCHES_SEARCH_NAME): Use symbol_matches_search_name.
2978 (symbol_matches_search_name): Declare.
2979 (MSYMBOL_MATCHES_SEARCH_NAME): Delete.
2980 (default_collect_symbol_completion_matches)
2981 (collect_symbol_completion_matches)
2982 (collect_file_symbol_completion_matches): Add name_match_type
2983 parameter.
2984 (iterate_over_symbols): Use lookup_name_info.
2985 (completion_list_add_name): Declare.
2986 * utils.c (enum class strncmp_iw_mode): Moved to utils.h.
2987 (strncmp_iw_with_mode): Now extern.
2988 * utils.h (enum class strncmp_iw_mode): Moved from utils.c.
2989 (strncmp_iw_with_mode): Declare.
2990
2991 2017-11-08 Keith Seitz <keiths@redhat.com>
2992 Pedro Alves <palves@redhat.com>
2993
2994 * ada-lang.c (ada_language_defn): Install
2995 default_search_name_hash.
2996 * buildsym.c (struct buildsym_compunit): <language>: New field.
2997 (finish_block_internal): Pass language when creating dictionaries.
2998 (start_buildsym_compunit, start_symtab): New language parameters.
2999 Use them.
3000 (restart_symtab): Pass down compilation unit's language.
3001 * buildsym.h (enum language): Forward declare.
3002 (start_symtab): New 'language' parameter.
3003 * c-lang.c (c_language_defn, cplus_language_defn)
3004 (asm_language_defn, minimal_language_defn): Install
3005 default_search_name_hash.
3006 * coffread.c (coff_start_symtab): Adjust.
3007 * d-lang.c (d_language_defn): Install default_search_name_hash.
3008 * dbxread.c (struct symloc): Add 'pst_language' field.
3009 (PST_LANGUAGE): Define.
3010 (start_psymtab, read_ofile_symtab): Use it.
3011 (process_one_symbol): New 'language' parameter. Pass it down.
3012 * dictionary.c (struct dictionary) <language>: New field.
3013 (DICT_LANGUAGE): Define.
3014 (dict_create_hashed, dict_create_hashed_expandable)
3015 (dict_create_linear, dict_create_linear_expandable): New parameter
3016 'language'. Set the dictionary's language.
3017 (iter_match_first_hashed): Adjust to rename.
3018 (insert_symbol_hashed): Assert we don't see mismatching
3019 languages. Adjust to rename.
3020 (dict_hash): Rename to ...
3021 (default_search_name_hash): ... this and make extern.
3022 * dictionary.h (struct language_defn): Forward declare.
3023 (dict_create_hashed): New parameter 'language'.
3024 * dwarf2read.c (dwarf2_start_symtab): Pass down language.
3025 * f-lang.c (f_language_defn): Install default_search_name_hash.
3026 * go-lang.c (go_language_defn): Install default_search_name_hash.
3027 * jit.c (finalize_symtab): Pass compunit's language to dictionary
3028 creation.
3029 * language.c (unknown_language_defn, auto_language_defn):
3030 * language.h (language_defn::la_search_name_hash): New field.
3031 (default_search_name_hash): Declare.
3032 * m2-lang.c (m2_language_defn): Install default_search_name_hash.
3033 * mdebugread.c (new_block): New parameter 'language'.
3034 * mdebugread.c (parse_symbol): Pass symbol language to block
3035 allocation.
3036 (psymtab_to_symtab_1): Pass down language.
3037 (new_symtab): Pass compunit's language to block allocation.
3038 * objc-lang.c (objc_language_defn): Install
3039 default_search_name_hash.
3040 * opencl-lang.c (opencl_language_defn):
3041 * p-lang.c (pascal_language_defn): Install
3042 default_search_name_hash.
3043 * rust-lang.c (rust_language_defn): Install
3044 default_search_name_hash.
3045 * stabsread.h (enum language): Forward declare.
3046 (process_one_symbol): Add 'language' parameter.
3047 * symtab.c (search_name_hash): New function.
3048 * symtab.h (search_name_hash): Declare.
3049 * xcoffread.c (read_xcoff_symtab): Pass language to start_symtab.
3050
3051 2017-11-08 Pedro Alves <palves@redhat.com>
3052
3053 * cp-name-parser.y (main): Don't initialize extra_chars.
3054
3055 2017-11-07 Tom Tromey <tom@tromey.com>
3056
3057 * event-top.h (command_handler): Constify.
3058 * record-full.c (cmd_record_full_start): Update.
3059 * thread.c (thread_apply_all_command): Update.
3060 * printcmd.c (eval_command): Update.
3061 * mi/mi-main.c (mi_execute_cli_command): Update.
3062 (mi_execute_async_cli_command): Update.
3063 * tui/tui-stack.c (tui_update_command): Update.
3064 * cli/cli-interp.c (safe_execute_command): Constify.
3065 * record.c (record_start): Update.
3066 (record_start, record_stop, cmd_record_start): Update.
3067 * record-btrace.c (cmd_record_btrace_bts_start): Update.
3068 (cmd_record_btrace_pt_start): Update.
3069 (cmd_record_btrace_start): Update.
3070 (cmd_record_btrace_start): Update.
3071 * reverse.c (exec_reverse_once): Update.
3072 * python/python.c (execute_gdb_command): Don't copy the command.
3073 * event-top.c (command_line_handler): Update.
3074 (command_handler): Constify.
3075 * defs.h (deprecated_call_command_hook): Constify.
3076 * cli/cli-script.h (execute_user_command): Constify.
3077 * cli/cli-script.c (execute_user_command): Constify.
3078 (execute_cmd_pre_hook, execute_cmd_post_hook): Constify.
3079 (enum command_control_type): Update.
3080 * main.c (catch_command_errors): Remove non-const overload.
3081 (catch_command_errors_ftype): Remove.
3082 * python/py-cmd.c (cmdpy_function): Constify.
3083 * guile/scm-cmd.c (cmdscm_function): Constify.
3084 * cli/cli-dump.c (call_dump_func): Constify.
3085 * cli/cli-decode.c (do_const_cfunc): Constify.
3086 (do_sfunc): Constify.
3087 (cmd_func): Constify.
3088 * gdbcmd.h (execute_command, execute_command_to_string): Constify.
3089 * top.h (execute_command): Constify.
3090 * top.c (execute_command): Constify.
3091 (execute_command_to_string): Constify.
3092 (deprecated_call_command_hook): Constify.
3093 * command.h (cmd_func): Constify.
3094 * cli/cli-decode.h (struct cmd_list_element) <func>: Constify.
3095
3096 2017-11-07 Tom Tromey <tom@tromey.com>
3097
3098 * ada-lang.c (catch_ada_exception_command): Constify.
3099 (catch_assert_command): Constify.
3100 * break-catch-throw.c (catch_catch_command, catch_throw_command)
3101 (catch_rethrow_command): Constify.
3102 (catch_exception_command_1): Constify.
3103 * breakpoint.h (add_catch_command): Constify.
3104 * break-catch-syscall.c (catch_syscall_command_1): Constify.
3105 (catch_syscall_split_args): Constify.
3106 * break-catch-sig.c (catch_signal_command): Constify.
3107 (catch_signal_split_args): Constify.
3108 * cli/cli-decode.h (struct cmd_list_element) <function>: Use
3109 cmd_const_sfunc_ftype.
3110 * cli/cli-decode.c (add_setshow_cmd_full): Constify.
3111 (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
3112 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
3113 (add_setshow_string_cmd, struct cmd_list_element)
3114 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
3115 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
3116 (add_setshow_zuinteger_unlimited_cmd, add_setshow_zuinteger_cmd):
3117 Constify.
3118 (set_cmd_sfunc): Constify.
3119 (empty_sfunc): Constify.
3120 * command.h (add_setshow_enum_cmd, add_setshow_auto_boolean_cmd)
3121 (add_setshow_boolean_cmd, add_setshow_filename_cmd)
3122 (add_setshow_string_cmd, add_setshow_string_noescape_cmd)
3123 (add_setshow_optional_filename_cmd, add_setshow_integer_cmd)
3124 (add_setshow_uinteger_cmd, add_setshow_zinteger_cmd)
3125 (add_setshow_zuinteger_cmd, add_setshow_zuinteger_unlimited_cmd):
3126 Constify.
3127 (set_cmd_sfunc): Constify.
3128 (cmd_sfunc_ftype): Remove.
3129 * compile/compile.c (set_compile_args): Constify.
3130 * infrun.c (set_disable_randomization): Constify.
3131 * infcmd.c (set_args_command, set_cwd_command): Constify.
3132 * breakpoint.c (set_condition_evaluation_mode): Constify.
3133 (add_catch_command): Constify.
3134 (catch_fork_command_1, catch_exec_command_1)
3135 (catch_load_command_1, catch_unload_command_1): Constify.
3136 (catch_load_or_unload): Constify.
3137 * guile/scm-param.c (pascm_set_func): Constify.
3138 (add_setshow_generic): Constify.
3139 * python/py-param.c (get_set_value): Constify.
3140 * top.h (set_verbose): Constify.
3141 * tui/tui-win.c (tui_set_var_cmd): Constify.
3142 * mi/mi-main.c (set_mi_async_command): Constify.
3143 * cli/cli-logging.c (set_logging_overwrite)
3144 (set_logging_redirect): Constify.
3145 * value.c (set_max_value_size): Constify.
3146 * valprint.c (set_input_radix, set_output_radix): Constify.
3147 * utils.c (set_width_command, set_height_command): Constify.
3148 * typeprint.c (set_print_type_methods, set_print_type_typedefs): Constify.
3149 * tracepoint.c (set_disconnected_tracing)
3150 (set_circular_trace_buffer, set_trace_buffer_size)
3151 (set_trace_user, set_trace_notes, set_trace_stop_notes): Constify.
3152 * top.c (set_history_size_command, set_verbose, set_editing)
3153 (set_gdb_datadir, set_history_filename): Constify.
3154 * target.c (set_targetdebug, maint_set_target_async_command)
3155 (maint_set_target_non_stop_command, set_target_permissions)
3156 (set_write_memory_permission): Constify.
3157 (open_target): Constify.
3158 * target-descriptions.c (set_tdesc_filename_cmd): Constify.
3159 * target-dcache.c (set_stack_cache, set_code_cache): Constify.
3160 * symtab.c (set_symbol_cache_size_handler): Constify.
3161 * symfile.c (set_ext_lang_command): Constify.
3162 * symfile-debug.c (set_debug_symfile): Constify.
3163 * source.c (set_directories_command): Constify.
3164 * solib.c (reload_shared_libraries, gdb_sysroot_changed): Constify.
3165 * serial.c (set_parity): Constify.
3166 * rs6000-tdep.c (powerpc_set_soft_float, powerpc_set_vector_abi): Constify.
3167 * remote.c (set_remote_exec_file, set_remotebreak)
3168 (set_remote_protocol_Z_packet_cmd, set_range_stepping): Constify.
3169 * record.c (set_record_insn_history_size)
3170 (set_record_call_history_size): Constify.
3171 * record-full.c (set_record_full_insn_max_num): Constify.
3172 * proc-api.c (set_procfs_trace_cmd, set_procfs_file_cmd): Constify.
3173 * osabi.c (set_osabi): Constify.
3174 * mips-tdep.c (set_mips64_transfers_32bit_regs)
3175 (reinit_frame_cache_sfunc, mips_abi_update): Constify.
3176 * maint.c (maintenance_set_profile_cmd): Constify.
3177 * linux-thread-db.c (set_libthread_db_search_path): Constify.
3178 * language.c (set_language_command, set_range_command)
3179 (set_case_command): Constify.
3180 * infrun.c (set_non_stop, set_observer_mode)
3181 (set_stop_on_solib_events, set_schedlock_func)
3182 (set_exec_direction_func): Constify.
3183 * infcmd.c (set_inferior_tty_command): Constify.
3184 * disasm.c (set_disassembler_options_sfunc): Constify.
3185 * demangle.c (set_demangling_command): Constify.
3186 * dcache.c (set_dcache_size, set_dcache_line_size): Constify.
3187 * cris-tdep.c (set_cris_version, set_cris_mode)
3188 (set_cris_dwarf2_cfi): Constify.
3189 * corefile.c (set_gnutarget_command): Constify.
3190 * charset.c (set_host_charset_sfunc, set_target_charset_sfunc)
3191 (set_target_wide_charset_sfunc): Constify.
3192 * breakpoint.c (update_dprintf_commands): Constify.
3193 * auto-load.c (set_auto_load_dir, set_auto_load_safe_path): Constify.
3194 * arm-tdep.c (set_fp_model_sfunc, arm_set_abi)
3195 (set_disassembly_style_sfunc): Constify.
3196 * arch-utils.c (set_endian, set_architecture): Constify.
3197 * alpha-tdep.c (reinit_frame_cache_sfunc): Constify.
3198 * agent.c (set_can_use_agent): Constify.
3199
3200 2017-11-07 Tom Tromey <tom@tromey.com>
3201
3202 * go32-nat.c (go32_sysinfo, go32_sldt, go32_sgdt, go32_sidt)
3203 (go32_pde, go32_pte, go32_pte_for_address): Constify.
3204 * gnu-nat.c (_parse_bool_arg, show_thread_default_pause_cmd)
3205 (set_thread_default_pause_cmd, set_thread_default_run_cmd)
3206 (show_thread_default_run_cmd, set_thread_default_detach_sc_cmd)
3207 (parse_int_arg, show_thread_default_detach_sc_cmd)
3208 (set_signals_cmd, show_signals_cmd, set_sig_thread_cmd)
3209 (show_sig_thread_cmd, set_stopped_cmd, show_stopped_cmd)
3210 (set_exceptions_cmd, show_exceptions_cmd, set_task_pause_cmd)
3211 (show_task_pause_cmd, set_task_detach_sc_cmd)
3212 (show_task_detach_sc_cmd, set_task_exc_port_cmd)
3213 (set_noninvasive_cmd, set_thread_pause_cmd)
3214 (show_thread_pause_cmd, set_thread_run_cmd, show_thread_run_cmd)
3215 (set_thread_detach_sc_cmd, show_thread_detach_sc_cmd)
3216 (set_thread_exc_port_cmd, thread_takeover_sc_cmd): Constify.
3217 * windows-nat.c (display_selectors): Constify.
3218 * cli/cli-decode.h (struct cmd_list_element) <function>: Remove
3219 non-const "cfunc".
3220 * cli/cli-decode.c (set_cmd_cfunc): Remove non-const overload.
3221 (cmd_cfunc_eq): Likewise.
3222 (struct cmd_list_element): Likewise.
3223 (do_cfunc): Remove.
3224 (cli_user_command_p): Update.
3225 * command.h (add_cmd): Remove non-const overload.
3226 (cmd_cfunc_ftype): Remove typedef.
3227 (cmd_cfunc_eq): Remove non-const overload.
3228 * value.c (show_values): Constify.
3229 * thread.c (thread_apply_all_command): Constify.
3230 * symfile.c (load_command): Constify.
3231 * source.c (directory_command): Constify.
3232 * maint.c (maintenance_internal_error)
3233 (maintenance_demangler_warning, maintenance_space_display)
3234 (maintenance_print_architecture, maintenance_translate_address)
3235 (maintenance_info_selftests, maintenance_internal_warning):
3236 Constify.
3237 * breakpoint.c (disable_trace_command, enable_trace_command):
3238 Constify.
3239 * auto-load.c (info_auto_load_local_gdbinit, add_auto_load_dir):
3240 Constify.
3241 (add_auto_load_safe_path): Constify.
3242 * guile/scm-auto-load.c (info_auto_load_guile_scripts): Constify.
3243 * top.h (show_commands): Constify.
3244 * linux-thread-db.c (info_auto_load_libthread_db): Constify.
3245 * sparc64-tdep.c (adi_examine_command): Constify.
3246 (adi_assign_command): Constify.
3247
3248 2017-11-07 Tom Tromey <tom@tromey.com>
3249
3250 * frame.h (info_locals_command, info_args_command): Constify.
3251 * auto-load.h (auto_load_info_scripts): Constify.
3252 * inferior.h (registers_info): Constify.
3253 * copying.c: Rebuild.
3254 * copying.awk: Constify generated commands.
3255 * auto-load.c (auto_load_info_scripts)
3256 (info_auto_load_gdb_scripts): Constify.
3257 * cli/cli-decode.c (struct cmd_list_element): Take a
3258 cmd_const_cfunc_ftype.
3259 * command.h (add_info): Take a cmd_const_cfunc_ftype.
3260 * tui/tui-win.c (tui_all_windows_info): Constify.
3261 * python/py-auto-load.c (info_auto_load_python_scripts):
3262 Constify.
3263 * cli/cli-cmds.c (show_command): Remove non-const overload.
3264 * tracepoint.c (info_tvariables_command, info_scope_command):
3265 Constify.
3266 (info_static_tracepoint_markers_command): Constify.
3267 * thread.c (info_threads_command): Constify.
3268 (print_thread_info_1): Constify.
3269 * target.c (info_target_command): Constify.
3270 * symtab.c (info_sources_command, info_functions_command)
3271 (info_types_command): Constify.
3272 (info_variables_command): Remove non-const overload.
3273 * symfile.c (info_ext_lang_command): Constify.
3274 * stack.c (info_frame_command, info_locals_command)
3275 (info_args_command): Constify.
3276 (backtrace_command): Remove non-const overload.
3277 * source.c (info_source_command, info_line_command): Constify.
3278 * solib.c (info_sharedlibrary_command): Constify.
3279 * skip.c (info_skip_command): Constify.
3280 * ser-go32.c (info_serial_command): Constify.
3281 * reverse.c (info_bookmarks_command): Constify.
3282 * printcmd.c (info_symbol_command, info_address_command)
3283 (info_display_command): Constify.
3284 * osdata.c (info_osdata_command): Constify.
3285 * objc-lang.c (info_selectors_command, info_classes_command):
3286 Constify.
3287 * nto-procfs.c (procfs_pidlist, procfs_meminfo): Constify.
3288 * memattr.c (info_mem_command): Constify.
3289 * macrocmd.c (info_macro_command, info_macros_command): Constify.
3290 * linux-fork.c (info_checkpoints_command): Constify.
3291 * infrun.c (info_signals_command): Constify.
3292 * inflow.c (info_terminal_command): Constify.
3293 * inferior.c (info_inferiors_command): Constify.
3294 (print_inferior): Constify.
3295 * infcmd.c (info_program_command, info_all_registers_command)
3296 (info_registers_command, info_vector_command)
3297 (info_float_command): Constify.
3298 (registers_info): Constify.
3299 * gnu-nat.c (info_send_rights_cmd, info_recv_rights_cmd)
3300 (info_port_sets_cmd, info_dead_names_cmd, info_port_rights_cmd):
3301 Constify.
3302 * f-valprint.c (info_common_command): Constify.
3303 * dcache.c (info_dcache_command): Constify.
3304 (dcache_info_1): Constify.
3305 * darwin-nat-info.c (info_mach_tasks_command)
3306 (info_mach_task_command, info_mach_ports_command)
3307 (info_mach_port_command, info_mach_threads_command)
3308 (info_mach_thread_command, info_mach_regions_command)
3309 (info_mach_regions_recurse_command, info_mach_region_command)
3310 (info_mach_exceptions_command): Constify.
3311 (get_task_from_args): Constify.
3312 * cp-support.c (info_vtbl_command): Constify.
3313 * breakpoint.c (info_watchpoints_command)
3314 (info_tracepoints_command): Constify.
3315 (info_breakpoints_command): Remove non-const overload.
3316 * avr-tdep.c (avr_io_reg_read_command): Constify.
3317 * auxv.c (info_auxv_command): Constify.
3318 * ada-tasks.c (info_tasks_command): Constify.
3319 (info_task): Constify.
3320 * ada-lang.c (info_exceptions_command): Constify.
3321
3322 2017-11-07 Tom Tromey <tom@tromey.com>
3323
3324 * solib.h (no_shared_libraries): Constify.
3325 * frame.h (return_command): Constify.
3326 * cli/cli-cmds.h (quit_command): Constify.
3327 * top.h (quit_command, execute_command): Constify.
3328 * target.h (flash_erase_command): Constify.
3329 * inferior.h (set_inferior_args, attach_command): Constify.
3330 * tracepoint.h (start_tracing, stop_tracing): Constify.
3331 * breakpoint.h (break_command, tbreak_command)
3332 (hbreak_command_wrapper, thbreak_command_wrapper)
3333 (rbreak_command_wrapper, watch_command_wrapper)
3334 (awatch_command_wrapper, rwatch_command_wrapper)
3335 (get_tracepoint_by_number): Constify.
3336 * symtab.c (info_variables_command, rbreak_command)
3337 (symtab_symbol_info): Constify.
3338 (info_variables_command): Add non-const overload.
3339 * top.c (dont_repeat_command): Constify.
3340 * breakpoint.c (ignore_command, commands_command)
3341 (condition_command, tbreak_command, hbreak_command)
3342 (thbreak_command, clear_command, break_command)
3343 (info_breakpoints_command, watch_command, rwatch_command)
3344 (awatch_command, trace_command, ftrace_command, strace_command)
3345 (trace_pass_command, break_range_command, dprintf_command)
3346 (agent_printf_command, get_tracepoint_by_number)
3347 (watch_maybe_just_location, trace_pass_command): Constify.
3348 (info_breakpoints_command): Add non-const overload.
3349 * tracefile.c (tsave_command): Constify.
3350 * infcmd.c (attach_command, disconnect_command, signal_command)
3351 (queue_signal_command, stepi_command, nexti_command)
3352 (finish_command, next_command, step_command, until_command)
3353 (advance_command, jump_command, continue_command, run_command)
3354 (start_command, starti_command, interrupt_command)
3355 (run_command_1, set_inferior_args, step_1): Constify.
3356 * inferior.c (add_inferior_command, remove_inferior_command)
3357 (clone_inferior_command): Constify.
3358 * linux-fork.c (checkpoint_command, restart_command): Constify.
3359 * windows-nat.c (signal_event_command): Constify.
3360 * guile/guile.c (guile_repl_command, guile_command): Constify.
3361 * printcmd.c (x_command, display_command, printf_command)
3362 (output_command, set_command, call_command, print_command)
3363 (eval_command): Constify.
3364 (non_const_set_command): Remove.
3365 (_initialize_printcmd): Update.
3366 * source.c (forward_search_command, reverse_search_command):
3367 Constify.
3368 * jit.c (jit_reader_load_command, jit_reader_unload_command):
3369 Constify.
3370 * infrun.c (handle_command): Constify.
3371 * memattr.c (mem_command): Constify.
3372 * stack.c (return_command, up_command, up_silently_command)
3373 (down_command, down_silently_command, frame_command)
3374 (backtrace_command, func_command, backtrace_command_1): Constify.
3375 (backtrace_command): Add non-const overload.
3376 * remote-sim.c (simulator_command): Constify.
3377 * exec.c (set_section_command): Constify.
3378 * tracepoint.c (tdump_command, trace_variable_command)
3379 (tstatus_command, tstop_command, tstart_command)
3380 (end_actions_pseudocommand, while_stepping_pseudocommand)
3381 (collect_pseudocommand, teval_pseudocommand, actions_command)
3382 (start_tracing, stop_tracing): Constify.
3383 * value.c (init_if_undefined_command): Constify.
3384 * tui/tui-stack.c (tui_update_command): Constify.
3385 * tui/tui-win.c (tui_refresh_all_command)
3386 (tui_set_tab_width_command, tui_set_win_height_command)
3387 (tui_set_focus_command, tui_scroll_forward_command)
3388 (tui_scroll_backward_command, tui_scroll_left_command)
3389 (tui_scroll_right_command, parse_scrolling_args, tui_set_focus)
3390 (tui_set_win_height): Constify.
3391 * tui/tui-layout.c (tui_layout_command): Constify.
3392 * procfs.c (proc_trace_syscalls, proc_trace_sysentry_cmd)
3393 (proc_trace_sysexit_cmd, proc_untrace_sysentry_cmd)
3394 (proc_untrace_sysexit_cmd): Constify.
3395 * remote.c (threadlist_test_cmd, threadinfo_test_cmd)
3396 (threadset_test_cmd, threadlist_update_test_cmd)
3397 (threadalive_test): Constify.
3398 * objc-lang.c (print_object_command): Constify.
3399 * command.h (add_com): Constify.
3400 * cli/cli-dump.c (restore_command): Constify.
3401 * cli/cli-cmds.c (pwd_command, echo_command, quit_command)
3402 (help_command, complete_command, shell_command, edit_command)
3403 (list_command, disassemble_command, make_command)
3404 (apropos_command, alias_command): Constify.
3405 * cli/cli-script.c (document_command, define_command)
3406 (while_command, if_command, validate_comname): Constify.
3407 * cli/cli-decode.c (struct cmd_list_element): Change type of
3408 "fun".
3409 * target.c (do_monitor_command, flash_erase_command): Constify.
3410 * regcache.c (reg_flush_command): Constify.
3411 * reverse.c (reverse_step, reverse_next, reverse_stepi)
3412 (reverse_nexti, reverse_continue, reverse_finish)
3413 (save_bookmark_command, goto_bookmark_command)
3414 (exec_reverse_once): Constify.
3415 * python/python.c (python_interactive_command, python_command):
3416 Constify.
3417 * typeprint.c (ptype_command, whatis_command, whatis_exp):
3418 Constify.
3419 * solib.c (sharedlibrary_command, no_shared_libraries): Constify.
3420 * gcore.c (gcore_command): Constify.
3421
3422 2017-11-07 Tom Tromey <tom@tromey.com>
3423
3424 * printcmd.c (x_command): Call set_repeat_arguments.
3425 * cli/cli-cmds.c (list_command): Call set_repeat_arguments.
3426 * top.c (repeat_arguments): New global.
3427 (set_repeat_arguments): New function.
3428 (execute_command): Handle repeat_arguments.
3429 (show_commands): Calls set_repeat_arguments.
3430 * command.h (set_repeat_arguments): Declare.
3431
3432 2017-11-07 Tom Tromey <tom@tromey.com>
3433
3434 * stack.c (backtrace_command): Use std::string.
3435 (backtrace_command_1): Make "count_exp" const.
3436
3437 2017-11-07 Tom Tromey <tom@tromey.com>
3438
3439 * source.c (directory_switch, mod_path, add_path): Constify.
3440 * defs.h (add_path, mod_path, directory_switch): Constify.
3441 * mi/mi-cmd-env.c (env_mod_path): Constify.
3442
3443 2017-11-07 Tom Tromey <tom@tromey.com>
3444
3445 * infcmd.c (strip_bg_char): Return gdb::unique_xmalloc_ptr.
3446 (run_command_1, continue_command, step_1, jump_command)
3447 (signal_command, until_command, advance_command, finish_command)
3448 (attach_command): Update.
3449
3450 2017-11-07 Tom Tromey <tom@tromey.com>
3451
3452 * command.h (set_cmd_cfunc): Don't declare.
3453 * cli/cli-decode.c (set_cmd_cfunc): Now static.
3454
3455 2017-11-07 Tom Tromey <tom@tromey.com>
3456
3457 * stack.c (select_frame_command): Constify.
3458 * cli/cli-decode.c (add_com_suppress_notification): Constify.
3459 * command.h (add_com_suppress_notification): Constify.
3460
3461 2017-11-07 Tom Tromey <tom@tromey.com>
3462
3463 * breakpoint.c (stop_command): Constify.
3464 * cli/cli-decode.c (struct cmd_list_element): Constify.
3465 * command.h (add_abbrev_prefix_cmd): Constify.
3466
3467 2017-11-07 Pedro Alves <palves@redhat.com>
3468
3469 * breakpoint.c (extract_bp_kind): New enum.
3470 (extract_bp_num, extract_bp_or_bp_range): New functions, partially
3471 factored out from ...
3472 (extract_bp_number_and_location): ... here.
3473 * cli/cli-utils.c (get_number_trailer): Handle '-$variable'.
3474
3475 2017-11-07 Pedro Alves <palves@redhat.com>
3476
3477 * breakpoint.c (extract_bp_number_and_location): Change return
3478 type to void. Throw error instead of warning.
3479 (enable_disable_command): Adjust.
3480
3481 2017-11-07 Xavier Roirand <roirand@adacore.com>
3482 Pedro Alves <palves@redhat.com>
3483
3484 * breakpoint.c (map_breakpoint_number_range): New, factored out
3485 from ...
3486 (map_breakpoint_numbers): ... here.
3487 (find_location_by_number): Change parameters from string to
3488 breakpoint number and location.
3489 (extract_bp_number_and_location): New function.
3490 (enable_disable_bp_num_loc)
3491 (enable_disable_breakpoint_location_range)
3492 (enable_disable_command): New functions, factored out ...
3493 (enable_command, disable_command): ... these functions, and
3494 adjusted to support ranges.
3495 * NEWS: Document enable/disable breakpoint location range feature.
3496
3497 2017-11-06 Luis Machado <luis.machado@linaro.org>
3498
3499 * MAINTAINERS (Write After Approval): Update my e-mail address.
3500
3501 2017-11-06 Pedro Alves <palves@redhat.com>
3502
3503 * gnu-nat.c (gnu_terminal_init): Delete.
3504 (gnu_target): Don't install gnu_terminal_init.
3505 * inflow.c (child_terminal_init_with_pgrp): Delete, merged with ...
3506 (child_terminal_init): ... this function.
3507
3508 2017-11-06 Pedro Alves <palves@redhat.com>
3509
3510 * common/common.m4 (GDB_AC_COMMON): No longer check termio.h nor
3511 sgtty.h.
3512 * config.in, configure: Regenerate.
3513
3514 2017-11-06 Pedro Alves <palves@redhat.com>
3515
3516 * event-top.c: Check SIGTSTP instead of STOP_SIGNAL thoughout.
3517 (async_init_signals): Adjust.
3518 (handle_stop_sig): Rename to ...
3519 (handle_sigtstp): ... this.
3520 (async_stop_sig): Rename to ...
3521 (async_sigtstp_handler): ... this, and delete STOP_SIGNAL !=
3522 SIGTSTP path.
3523 * event-top.h: Move signal.h include to the top. Check SIGTSTP
3524 instead of STOP_SIGNAL thoughout.
3525 (handle_stop_sig): Rename to ...
3526 (handle_sigtstp): ... this.
3527 * top.c (command_line_input): Replace STOP_SIGNAL -> SIGTSTP.
3528
3529 2017-11-06 Pedro Alves <palves@redhat.com>
3530
3531 * inflow.c (child_terminal_inferior, child_terminal_ours_1): No
3532 longer set flags twice in row.
3533
3534 2017-11-06 Pedro Alves <palves@redhat.com>
3535
3536 * Makefile.in (SER_HARDWIRE): Update comment.
3537 (HFILES_NO_SRCDIR): Remove gdb_termios.h.
3538 * common/gdb_termios.h: Delete file.
3539 * common/job-control.c: Include termios.h and unistd.h instead of
3540 gdb_termios.h.
3541 (gdb_setpgid): Remove HAVE_TERMIOS || TIOCGPGRP preprocessor
3542 check.
3543 (have_job_control): Check HAVE_TERMIOS_H instead of HAVE_TERMIOS.
3544 Remove sgtty code.
3545 * configure.ac: No longer check for termio.h and sgtty.h.
3546 * configure: Regenerate.
3547 * inflow.c: Include termios.h instead of gdb_termios.h. Replace
3548 PROCESS_GROUP_TYPE checks with HAVE_TERMIOS_H checks throughout.
3549 Replace PROCESS_GROUP_TYPE references with pid_t references
3550 throughout.
3551 (gdb_getpgrp): Delete.
3552 (set_initial_gdb_ttystate): Use tcgetpgrp instead of gdb_getpgrp.
3553 (child_terminal_inferior): Remove comment. Remove sgtty code.
3554 (child_terminal_ours_1): Use tcgetpgrp directly instead of
3555 gdb_getpgrp. Use serial_set_tty_state instead aof
3556 serial_noflush_set_tty_state. Remove sgtty code.
3557 * inflow.h: Include unistd.h instead of gdb_termios.h. Replace
3558 PROCESS_GROUP_TYPE check with HAVE_TERMIOS_H check.
3559 (inferior_process_group): Now returns pid_t.
3560 * ser-base.c (ser_base_noflush_set_tty_state): Delete.
3561 * ser-base.h (ser_base_noflush_set_tty_state): Delete.
3562 * ser-event.c (serial_event_ops): Update.
3563 * ser-go32.c (dos_noflush_set_tty_state): Delete.
3564 (dos_ops): Update.
3565 * ser-mingw.c (hardwire_ops, tty_ops, pipe_ops, tcp_ops): Update.
3566 * ser-pipe.c (pipe_ops): Update.
3567 * ser-tcp.c (tcp_ops): Update.
3568 * ser-unix.c: Include termios.h instead of gdb_termios.h. Remove
3569 HAVE_TERMIOS checks.
3570 [HAVE_TERMIO] (struct hardwire_ttystate): Delete.
3571 [HAVE_SGTTY] (struct hardwire_ttystate): Delete.
3572 (get_tty_state, set_tty_state): Drop termio and sgtty code, and
3573 assume termios.
3574 (hardwire_noflush_set_tty_state): Delete.
3575 (hardwire_print_tty_state, hardwire_drain_output)
3576 (hardwire_flush_output, hardwire_flush_input)
3577 (hardwire_send_break, hardwire_raw, hardwire_setbaudrate)
3578 (hardwire_setstopbits, hardwire_setparity): Drop termio and sgtty
3579 code, and assume termios.
3580 (hardwire_ops): Update.
3581 (_initialize_ser_hardwire): Remove HAVE_TERMIOS check.
3582 * serial.c (serial_noflush_set_tty_state): Delete.
3583 * serial.h (serial_noflush_set_tty_state): Delete.
3584 (serial_ops::noflush_set_tty_state): Delete.
3585
3586 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3587
3588 * Makefile.in (SFILES): Remove doublest.c and dfp.c.
3589 (HFILES_NO_SRCDIR): Remove doublest.h and dfp.h.
3590 (COMMON_OBS): Remove doublest.o and dfp.o.
3591 Do not build target-float.c (instead of doublest.c)
3592 with -Wformat-nonliteral.
3593
3594 * doublest.c: Remove file.
3595 * doublest.h: Remove file.
3596 * dfp.c: Remove file.
3597 * dfp.h: Remove file.
3598
3599 * target-float.c: Do not include "doublest.h" and "dfp.h".
3600 (DOUBLEST): Move here from doublest.h.
3601 (enum float_kind): Likewise.
3602 (FLOATFORMAT_CHAR_BIT): Likewise.
3603 (FLOATFORMAT_LARGEST_BYTES): Likewise.
3604 (floatformat_totalsize_bytes): Move here from doublest.c. Make static.
3605 (floatformat_precision): Likewise.
3606 (floatformat_normalize_byteorder, get_field, put_field): Likewise.
3607 (floatformat_is_negative, floatformat_classify, floatformat_mantissa):
3608 Likewise.
3609 (host_float_format, host_double_format, host_long_double_format):
3610 Likewise.
3611 (floatformat_to_string, floatformat_from_string): Likewise.
3612 (floatformat_to_doublest): Likewise. Also, inline the original
3613 convert_floatformat_to_doublest.
3614 (floatformat_from_doublest): Likewise. Also, inline the original
3615 convert_floatformat_from_doublest.
3616
3617 Include "dpd/decimal128.h", "dpd/decimal64.h", and "dpd/decimal32.h".
3618 (MAX_DECIMAL_STRING): Move here from dfp.c.
3619 (match_endianness): Likewise.
3620 (set_decnumber_context, decimal_check_errors): Likewise.
3621 (decimal_from_number, decimal_to_number): Likewise.
3622 (decimal_to_string, decimal_from_string): Likewise. Make static.
3623 (decimal_from_longest, decimal_from_ulongest): Likewise.
3624 (decimal_to_longest): Likewise.
3625 (decimal_binop, decimal_is_zero, decimal_compare): Likewise.
3626 (decimal_convert): Likewise.
3627
3628 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3629
3630 * doublest.c: Do not include "gdbtypes.h".
3631 (extract_typed_floating): Remove.
3632 (store_typed_floating): Remove.
3633 (convert_typed_floating): Remove.
3634 * doublest.h (struct type): Remove.
3635 (DOUBLEST_PRINT_FORMAT): Remove.
3636 (DOUBLEST_SCAN_FORMAT): Remove.
3637 (extract_typed_floating): Remove.
3638 (store_typed_floating): Remove.
3639 (convert_typed_floating): Remove.
3640
3641 * dfp.c (decimal_from_doublest): Remove.
3642 (decimal_to_doublest): Remove.
3643 * dfp.h: Do not include "doublest.h".
3644 (decimal_from_doublest): Remove.
3645 (decimal_to_doublest): Remove.
3646
3647 * value.c: Do not include "doublest.h" and "dfp.h".
3648 (value_as_double): Remove.
3649 (unpack_double): Remove.
3650 (value_from_double): Remove.
3651 (value_from_decfloat): Remove.
3652 * value.h: Do not include "doublest.h".
3653 (value_as_double): Remove.
3654 (unpack_double): Remove.
3655 (value_from_double): Remove.
3656 (value_from_decfloat): Remove.
3657
3658 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3659
3660 * i386-tdep.c: Include "target-float.h". Do not include "doublest.h".
3661 (i386_extract_return_value): Use target_float_convert.
3662 (i386_store_return_value): Likewise.
3663 * i387-tdep.c (i387_register_to_value): Use target_float_convert.
3664 (i387_value_to_register): Likewise.
3665 * ia64-tdep.c: Include "target-float.h". Do not include "doublest.h".
3666 (ia64_register_to_value): Use target_float_convert.
3667 (ia64_value_to_register): Likewise.
3668 (ia64_extract_return_value): Likewise.
3669 (ia64_store_return_value): Likewise.
3670 (ia64_push_dummy_call): Likewise.
3671 * m68k-tdep.c: Include "target-float.h".
3672 (m68k_register_to_value): Use target_float_convert.
3673 (m68k_value_to_register): Likewise.
3674 (m68k_svr4_extract_return_value): Likewise.
3675 (m68k_svr4_store_return_value): Likewise.
3676 * ppc-sysv-tdep.c: Include "target-float.h".
3677 (ppc_sysv_abi_push_dummy_call): Use target_float_convert.
3678 (do_ppc_sysv_return_value): Likewise.
3679 (ppc64_sysv_abi_push_freg): Likewise.
3680 (ppc64_sysv_abi_return_value_base): Likewise.
3681 * rs6000-aix-tdep.c: Include "target-float.h".
3682 (rs6000_push_dummy_call): Use target_float_convert.
3683 (rs6000_return_value): Likewise.
3684 * rs6000-lynx178-tdep.c: Include "target-float.h".
3685 (rs6000_lynx178_push_dummy_call): Use target_float_convert.
3686 (rs6000_lynx178_return_value): Likewise.
3687 * rs6000-tdep.c: Include "target-float.h". Do not include "doublest.h".
3688 (rs6000_register_to_value): Use target_float_convert.
3689 (rs6000_value_to_register): Likewise.
3690 * arm-tdep.c: Include "target-float.h". Do not include "doublest.h".
3691 (arm_extract_return_value): Use target_float_convert.
3692 (arm_store_return_value): Likewise.
3693 * sh-tdep.c: Include "target-float.h". Do not include "doublest.h".
3694 (sh_register_convert_to_virtual): Use target_float_convert.
3695 (sh_register_convert_to_raw): Likewise.
3696 * sh64-tdep.c: Include "target-float.h".
3697 (sh64_extract_return_value): Use target_float_convert.
3698 (sh64_register_convert_to_virtual): Likewise.
3699 (sh64_register_convert_to_raw): Likewise. Fix argument types.
3700
3701 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3702
3703 * target-float.c (floatformat_to_host_double): New function.
3704 (floatformat_from_host_double): Likewise.
3705 (target_float_to_host_double): Likewise.
3706 (target_float_from_host_double): Likewise.
3707 * target-float.h (target_float_to_host_double): Add prototype.
3708 (target_float_from_host_double): Likewise.
3709
3710 * guile/scm-value.c: Include "target-float.h".
3711 (gdbscm_value_to_real): Use target_float_to_host_double.
3712 Handle integer source values via value_as_long.
3713 * guile/scm-math.c: Include "target-float.h". Do not include
3714 "doublest.h", "dfp.h", and "expression.h".
3715 (vlscm_convert_typed_number): Use target_float_from_host_double.
3716 (vlscm_convert_number): Likewise.
3717
3718 * python/py-value.c (valpy_float): Use target_float_to_host_double.
3719 (convert_value_from_python): Use target_float_from_host_double.
3720
3721 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3722
3723 * ada-lang.c (cast_to_fixed): Reimplement in target arithmetic.
3724 (cast_from_fixed): Likewise.
3725 (ada_scaling_type): New function.
3726 (ada_delta): Return value instead of DOUBLEST. Perform target
3727 arithmetic instead of host arithmetic.
3728 (scaling_factor): Rename to ...
3729 (ada_scaling_factor) ... this. Make non-static. Return value instead
3730 of DOUBLEST. Perform target arithmetic instead of host arithmetic.
3731 (ada_fixed_to_float): Remove.
3732 (ada_float_to_fixed): Remove.
3733 * ada-lang.h (ada_fixed_to_float): Remove.
3734 (ada_float_to_fixed): Remove.
3735 (ada_delta): Return value instead of DOUBLEST.
3736 (ada_scaling_factor): Add prototype.
3737
3738 * ada-typeprint.c: Include "target-float.h".
3739 (print_fixed_point_type): Perform target arithmetic instead of
3740 host arithmetic.
3741 * ada-valprint.c: Include "target-float.h".
3742 (ada_val_print_num): Perform target arithmetic instead of
3743 host arithmetic for fixed-point types.
3744
3745 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3746
3747 * target-float.c: Include <math.h>.
3748 (floatformat_binop): New function.
3749 (floatformat_compare): Likewise.
3750 (target_float_binop): Likewise.
3751 (target_float_compare): Likewise.
3752 * target-float.h: Include "expression.h".
3753 (target_float_binop): Add prototype.
3754 (target_float_compare): Likewise.
3755
3756 * valarith.c: Do not include "doublest.h" and "dfp.h".
3757 Include "common/byte-vector.h".
3758 (value_args_as_decimal): Remove, replace by ...
3759 (value_args_as_target_float): ... this function. Handle both
3760 binary and decimal target floating-point formats.
3761 (scalar_binop): Handle both binary and decimal FP using
3762 value_args_as_target_float and target_float_binop.
3763 (value_equal): Handle both binary and decimal FP using
3764 value_args_as_target_float and target_float_compare.
3765 (value_less): Likewise.
3766 (value_pos): Handle all scalar types as simple copy.
3767 (value_neg): Handle all scalar types via BINOP_SUB from 0.
3768 * dfp.c (decimal_binop): Throw error instead of internal_error
3769 when called with an unsupported operation code.
3770
3771 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3772
3773 * target-float.c (target_float_to_string): New function.
3774 (target_float_from_string): New function.
3775 * target-float.h (target_float_to_string): Add prototype.
3776 (target_float_from_string): Add prototype.
3777
3778 * valprint.c: Include "target-float.h". Do not include
3779 "doublest.h" and "dfp.h".
3780 (print_floating): Use target_float_to_string.
3781 * printcmd.c: Include "target-float.h". Do not include "dfp.h".
3782 (printf_floating): Use target_float_to_string.
3783 * i387-tdep.c: Include "target-float.h". Do not include "doublest.h".
3784 (print_i387_value): Use target_float_to_string.
3785 * mips-tdep.c: Include "target-float.h".
3786 (mips_print_fp_register): Use target_float_to_string.
3787 * sh64-tdep.c: Include "target-float.h".
3788 (sh64_do_fp_register): Use target_float_to_string.
3789
3790 * parse.c: Include "target-float.h". Do not include
3791 "doublest.h" and "dfp.h".
3792 (parse_float): Use target_float_from_string.
3793 * stabsread.c: Include "target-float.h". Do not include "doublest.h".
3794 (define_symbol): Use target_float_from_string.
3795 * gdbarch-selftests.c: Include "target-float.h".
3796 (register_to_value_test): Use target_float_from_string.
3797
3798 2017-11-06 Ulrich Weigand <uweigand@de.ibm.com>
3799
3800 * Makefile.c (SFILES): Add target-float.c.
3801 (HFILES_NO_SRCDIR): Add target-float.h.
3802 (COMMON_OBS): Add target-float.o.
3803 * target-float.h: New file.
3804 * target-float.c: New file.
3805
3806 * doublest.c (floatformat_classify): Fix detection of float_zero.
3807
3808 * gdbtypes.c (is_floating_type): New function.
3809 * gdbtypes.h (is_floating_type): Add prototype.
3810
3811 * value.c: Do not include "floatformat.h".
3812 (unpack_double): Use target_float_is_valid.
3813 (is_floating_value): New function.
3814 * value.h (is_floating_value): Add prototype-
3815
3816 * valarith.c: Include "target-float.h".
3817 (value_logical_not): Use target_float_is_zero.
3818
3819 * python/py-value.c: Include "target-float.h".
3820 (valpy_nonzero): Use target_float_is_zero.
3821
3822 2017-11-04 Tom Tromey <tom@tromey.com>
3823
3824 * h8300-tdep.c (h8300_push_dummy_call): Use std::vector.
3825
3826 2017-11-04 Tom Tromey <tom@tromey.com>
3827
3828 * breakpoint.c (set_momentary_breakpoint): Return
3829 breakpoint_up.
3830 (until_break_command): Update.
3831 (new_until_break_fsm): Change argument types to
3832 breakpoint_up.
3833 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
3834 (do_delete_breakpoint_cleanup, make_cleanup_delete_breakpoint):
3835 Remove.
3836 * infcmd.c (finish_forward): Update.
3837 * breakpoint.h (set_momentary_breakpoint)
3838 (set_momentary_breakpoint_at_pc): Return breakpoint_up.
3839 (make_cleanup_delete_breakpoint): Remove.
3840 (struct breakpoint_deleter): New.
3841 (breakpoint_up): New typedef.
3842 * infrun.c (insert_step_resume_breakpoint_at_sal_1): Update.
3843 (insert_exception_resume_breakpoint): Update.
3844 (insert_exception_resume_from_probe): Update.
3845 (insert_longjmp_resume_breakpoint): Update.
3846 * arm-linux-tdep.c (arm_linux_copy_svc): Update.
3847 * elfread.c (elf_gnu_ifunc_resolver_stop): Update.
3848 * infcall.c (call_function_by_hand_dummy): Update
3849
3850 2017-11-04 Tom Tromey <tom@tromey.com>
3851
3852 * c-typeprint.c (c_type_print_base): Use gdb::unique_xmalloc_ptr.
3853
3854 2017-11-04 Tom Tromey <tom@tromey.com>
3855
3856 * linux-tdep.c (linux_core_info_proc_mappings): Use
3857 gdb::def_vector.
3858 (linux_get_siginfo_data): Return gdb::byte_vector. Remove
3859 "size" argument.
3860 (linux_corefile_thread): Update.
3861 (linux_make_corefile_notes): Remove unused variable.
3862
3863 2017-11-04 Tom Tromey <tom@tromey.com>
3864
3865 * ppc-linux-tdep.c (ppc_linux_get_syscall_number): Use
3866 gdb::byte_vector.
3867
3868 2017-11-04 Tom Tromey <tom@tromey.com>
3869
3870 * objfiles.c (do_free_objfile_cleanup): Remove.
3871 * compile/compile-object-load.c (compile_object_load): Update.
3872 * objfiles.h (make_cleanup_free_objfile): Remove.
3873
3874 2017-11-04 Tom Tromey <tom@tromey.com>
3875
3876 * sparc64-tdep.c (do_examine): Use gdb::def_vector.
3877 (adi_read_versions): Change "tags" to "gdb_byte *".
3878 (adi_print_versions): Likewise.
3879
3880 2017-11-04 Tom Tromey <tom@tromey.com>
3881
3882 * breakpoint.c
3883 (scoped_rbreak_breakpoints::scoped_rbreak_breakpoints): Rename
3884 from start_rbreak_breakpoints.
3885 (scoped_rbreak_breakpoints): Rename from end_rbreak_breakpoints.
3886 * breakpoint.h (class scoped_rbreak_breakpoints): New.
3887 (start_rbreak_breakpoints, end_rbreak_breakpoints): Remove.
3888 * symtab.c (do_end_rbreak_breakpoints): Remove.
3889 (rbreak_command): Use scoped_rbreak_breakpoints, std::string.
3890
3891 2017-11-04 Tom Tromey <tom@tromey.com>
3892
3893 * cp-namespace.c (reset_directive_searched): Remove.
3894 (cp_lookup_symbol_via_imports): Use scoped_restore.
3895 * cp-support.c (reset_directive_searched): Remove.
3896 (make_symbol_overload_list_using): Use scoped_restore.
3897 * d-namespace.c (d_lookup_symbol_imports): Use scoped_restore.
3898 (reset_directive_searched): Remove.
3899
3900 2017-11-04 Tom Tromey <tom@tromey.com>
3901
3902 * symfile.c (find_separate_debug_file_by_debuglink): Use
3903 unique_xmalloc_ptr.
3904
3905 2017-11-04 Tom Tromey <tom@tromey.com>
3906
3907 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
3908 type of "info".
3909 (compute_stack_depth): Likewise.
3910 (do_compile_dwarf_expr_to_c): Use std::vector.
3911
3912 2017-11-04 Tom Tromey <tom@tromey.com>
3913
3914 * compile/compile-object-load.c (link_callbacks_einfo): Use
3915 std::string.
3916
3917 2017-11-04 Tom Tromey <tom@tromey.com>
3918
3919 * dwarf2read.c (process_full_comp_unit, process_full_type_unit):
3920 Use scoped_free_pendings.
3921 * dbxread.c (dbx_symfile_read, dbx_psymtab_to_symtab_1): Use
3922 scoped_free_pendings.
3923 * xcoffread.c (xcoff_psymtab_to_symtab_1): Use scoped_free_pendings.
3924 (xcoff_initial_scan): Likewise.
3925 * buildsym.c (reset_symtab_globals): Update comment.
3926 (scoped_free_pendings): Rename from really_free_pendings.
3927 (prepare_for_building): Update comment.
3928 (buildsym_init): Likewise.
3929 * buildsym.h (class scoped_free_pendings): New class.
3930 (really_free_pendings): Don't declare.
3931
3932 2017-11-03 Ulrich Weigand <uweigand@de.ibm.com>
3933
3934 * doublest.c (convert_doublest_to_floatformat): Fix uninitialized
3935 output when converting a zero value to a special byteorder format.
3936
3937 2017-11-02 Yao Qi <yao.qi@linaro.org>
3938
3939 * frame.c (do_frame_register_read): Remove aspace.
3940 * jit.c (jit_frame_sniffer): Likwise.
3941 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
3942 * regcache.c (regcache::regcache): Pass nullptr.
3943 (regcache_print): Caller updated.
3944 * regcache.h (regcache::regcache): Remove one constructor
3945 parameter aspace.
3946
3947 2017-11-02 Yao Qi <yao.qi@linaro.org>
3948
3949 * regcache.h (regcache) <m_readonly_p>: Change it to const bool.
3950
3951 2017-11-02 Yao Qi <yao.qi@linaro.org>
3952
3953 * breakpoint.c (insert_single_step_breakpoints): Update.
3954 * frame.c (struct frame_info) <aspace>: Add const.
3955 (frame_save_as_regcache): Add const.
3956 (get_frame_address_space): Return const address_space *.
3957 * frame.h (get_frame_address_space): Update declaration.
3958 * infrun.c (struct step_over_info) <aspace>: Add const.
3959 (set_step_over_info): Make aspace const.
3960 (displaced_step_prepare_throw): Change variable const.
3961 (resume): Likewise.
3962 (proceed): Likewise.
3963 (adjust_pc_after_break): Likewise.
3964 (save_waitstatus): Likewise.
3965 (handle_signal_stop): Likewise.
3966 (keep_going_pass_signal): Likewise.
3967 * jit.c (jit_frame_sniffer): Add const.
3968 * mips-tdep.c (mips_single_step_through_delay): Likewise.
3969 * ppc-linux-tdep.c (ppu2spu_sniffer): Likewise.
3970 * record-full.c (record_full_wait_1): Likewise.
3971 * regcache.c (regcache::regcache): Change parameter to const.
3972 * regcache.h (regcache::regcache): Likewise.
3973 (regcache::aspace): Return const address_space *.
3974 (regcache) <m_aspace>: Add const.
3975
3976 2017-11-02 Yao Qi <yao.qi@linaro.org>
3977
3978 * darwin-nat.c (cancel_breakpoint): Use regcache->aspace ().
3979 * frame.c (create_sentinel_frame): Likewise.
3980 * infrun.c (displaced_step_prepare_throw): Likewise.
3981 (resume): Likewise.
3982 (thread_still_needs_step_over_bp): Likewise.
3983 (proceed): Likewise.
3984 (do_target_wait): Likewise.
3985 (adjust_pc_after_break): Likewise.
3986 (handle_syscall_event): Likewise.
3987 (save_waitstatus): Likewise.
3988 (handle_inferior_event_1): Likewise.
3989 (handle_signal_stop): Likewise.
3990 (keep_going_pass_signal): Likewise.
3991 * linux-nat.c (status_callback): Likewise.
3992 (save_stop_reason): Likewise.
3993 (resume_stopped_resumed_lwps): Likewise.
3994 * record-full.c (record_full_exec_insn): Likewise.
3995 (record_full_wait_1): Likewise.
3996 * regcache.c (get_regcache_aspace): Remove.
3997 * regcache.h (get_regcache_aspace): Remove.
3998
3999 2017-11-02 Yao Qi <yao.qi@linaro.org>
4000
4001 * regcache.c (struct regcache_descr) <nr_raw_registers>: Remove.
4002 (init_regcache_descr): Use gdbarch_num_regs.
4003 (regcache::regcache): Likewise.
4004 (regcache::get_register_status): Likewise.
4005 (regcache::assert_raw_regnum): Likewise.
4006 (regcache::cooked_read): Likewise.
4007 (regcache::cooked_read_value): Likewise.
4008 (regcache::cooked_write): Likewise.
4009 (regcache::dump): Likewise.
4010 (regcache::num_raw_registers): New method.
4011 * regcache.h (class regcache) <num_raw_registers>: New.
4012
4013 2017-11-02 Yao Qi <yao.qi@linaro.org>
4014
4015 * regcache.c (regcache::assert_regnum): New method.
4016 (regcache::invalidate): Call assert_regnum.
4017 (regcache::raw_update): Likewise.
4018 (regcache::raw_write): Likewise.
4019 (regcache::raw_read_part): Likewise.
4020 (regcache::raw_write_part): Likewise.
4021 (regcache::raw_supply): Likewise.
4022 (regcache::raw_supply_integer): Likewise.
4023 (regcache::raw_supply_zeroed): Likewise.
4024 (regcache::raw_collect): Likewise.
4025 (regcache::raw_collect_integer): Likewise.
4026 * regcache.h (regcache::assert_regnum): Declare.
4027
4028 2017-11-02 Yao Qi <yao.qi@linaro.org>
4029
4030 * regcache.c (regcache::dump): Remove code.
4031
4032 2017-11-02 Yao Qi <yao.qi@linaro.org>
4033
4034 * regcache.c (struct regcache_descr) <sizeof_raw_register_status>:
4035 Remove.
4036 <sizeof_cooked_register_status>: Remove.
4037 (init_regcache_descr): Update.
4038 (regcache::regcache): Use nr_cooked_registers and nr_raw_registers.
4039 (regcache::save): Likewise.
4040 (regcache::dump): Likewise.
4041
4042 2017-11-01 James Bowman <james.bowman@ftdichip.com>
4043
4044 * ft32-tdep.c (ft32_fetch_instruction): New function.
4045 (ft32_analyze_prologue): Use ft32_fetch_instruction().
4046
4047 2017-10-31 Simon Marchi <simon.marchi@polymtl.ca>
4048
4049 * cli/cli-script.c (execute_control_command): Rename to ...
4050 (execute_control_command_1): ... this.
4051 (execute_control_command): New function.
4052
4053 2017-10-31 Simon Marchi <simon.marchi@ericsson.com>
4054
4055 * tracepoint.c (tfind_command): Remove const_cast.
4056
4057 2017-10-30 Mike Gulick <mgulick@mathworks.com>
4058
4059 * Makefile.in (HFILES_NO_SRCDIR): Remove reference to gdb.h.
4060
4061 2017-10-30 Simon Marchi <simon.marchi@ericsson.com>
4062
4063 * common/common-utils.h (in_inclusive_range): New function.
4064 * arm-tdep.c (arm_record_extension_space): Use
4065 in_inclusive_range.
4066 (thumb_record_ld_st_reg_offset): Use in_inclusive_range.
4067 * cris-tdep.c (cris_spec_reg_applicable): Use
4068 in_inclusive_range.
4069
4070 2017-10-30 Pedro Alves <palves@redhat.com>
4071 Simon Marchi <simon.marchi@ericsson.com>
4072
4073 * remote.c (remote_set_syscall_catchpoint): Build a std::string
4074 instead of a gdb::unique_xmalloc_ptr, using string_appendf.
4075
4076 2017-10-30 Pedro Alves <palves@redhat.com>
4077
4078 * common/common-utils.c (string_appendf, string_vappendf): New
4079 functions.
4080 * common/common-utils.h (string_appendf, string_vappendf): New
4081 declarations.
4082 * unittests/common-utils-selftests.c (string_appendf_func)
4083 (test_appendf_func, string_vappendf_wrapper, string_appendf_tests)
4084 (string_vappendf_tests): New functions.
4085 (_initialize_common_utils_selftests): Register "string_appendf" and
4086 "string_vappendf tests".
4087
4088 2017-10-30 Pedro Alves <palves@redhat.com>
4089
4090 * unittests/common-utils-selftests.c (format_func): New typedef.
4091 (string_printf_tests, string_vprintf_tests): Tests factored out
4092 and merged to ...
4093 (test_format_func): ... this new function.
4094 (string_printf_tests, string_vprintf_tests): Reimplement on top of
4095 test_format_func.
4096
4097 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
4098
4099 * darwin-nat.c: Remove include of gdb.h.
4100
4101 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
4102
4103 * xtensa-xtregs.c: Fix formatting issues.
4104
4105 2017-10-29 Simon Marchi <simon.marchi@ericsson.com>
4106
4107 * xtensa-xtregs.c (xtensa_regtable_t) <name>: Constify.
4108
4109 2017-10-28 Maksim Dzabraev <dzabraew@gmail.com>
4110
4111 PR python/21213
4112 * python/py-infthread.c (thpy_get_inferior): Increment reference
4113 of inferior before returning it.
4114
4115 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
4116
4117 * unittests/common-utils-selftests.c (format): Add
4118 ATTRIBUTE_PRINTF.
4119
4120 2017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
4121
4122 * xml-syscall.c (struct syscall_desc): Add constructor.
4123 <name>: Change type to std::string.
4124 (syscall_desc_up): New typedef.
4125 (syscall_desc_p): Remove typeder.
4126 (DEF_VEC_P(syscall_desc_p)): Remove.
4127 (struct syscall_group_desc): Add constructor.
4128 <name>: Change type to std::string.
4129 <syscalls>: Change type to std::vector.
4130 (syscall_group_desc_up): New typedef.
4131 (syscall_group_desc_p): Remove typedef.
4132 (DEF_VEC_P(syscall_group_desc_p)): Remove.
4133 (struct syscalls_info) <syscalls>: Change type to std::vector of
4134 unique_ptr.
4135 <groups>: Likewise.
4136 <my_gdb_datadir>: Change type to std::string.
4137 (syscalls_info_up): New typedef.
4138 (allocate_syscalls_info): Remove.
4139 (syscalls_info_free_syscalls_desc): Remove.
4140 (syscalls_info_free_syscall_group_desc): Remove.
4141 (free_syscalls_info): Remove.
4142 (make_cleanup_free_syscalls_info): Remove.
4143 (syscall_group_create_syscall_group_desc): Adjust.
4144 (syscall_group_add_syscall): Adjust.
4145 (syscall_create_syscall_desc): Adjust.
4146 (syscall_parse_xml): Adjust, use unique_ptr instead of cleanup.
4147 (init_syscalls_info): Adjust.
4148 (syscall_group_get_group_by_name): Adjust.
4149 (xml_get_syscall_number): Adjust.
4150 (xml_get_syscall_name): Adjust.
4151 (xml_list_of_syscalls): Adjust.
4152 (xml_list_syscalls_by_group): Adjust.
4153 (xml_list_of_groups): Adjust.
4154
4155 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
4156
4157 * probe.h: Don't include gdb_vecs.h.
4158 (DEF_VEC_P (probe_p)): Remove.
4159 (find_probes_in_objfile): Return an std::vector.
4160 * probe.c (find_probes_in_objfile): Likewise.
4161 * breakpoint.c (breakpoint_objfile_data)
4162 <longjmp_probes>: Change type to std::vector.
4163 <exception_probes>: Likewise.
4164 (free_breakpoint_probes): Don't manually free vectors.
4165 (create_longjmp_master_breakpoint): Adjust.
4166 (create_exception_master_breakpoint): Adjust.
4167 * solib-svr4.c (svr4_create_probe_breakpoints): Change
4168 parameter type, adjust.
4169 (svr4_create_solib_event_breakpoints): Adjust.
4170
4171 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
4172
4173 * breakpoint.c (breakpoint_objfile_data): Initialize fields.
4174 (get_breakpoint_objfile_data): Allocate breakpoint_objfile_data
4175 with new.
4176 (free_breakpoint_probes): Rename to ...
4177 (free_breakpoint_objfile_data): ... this, and call delete on
4178 bp_objfile_data..
4179
4180 2017-10-27 Simon Marchi <simon.marchi@polymtl.ca>
4181
4182 * auto-load.c: Don't include gdb_vecs.h, include algorithm.
4183 (loaded_script_ptr): Remove typedef.
4184 (DEF_VEC_P (loaded_script_ptr)): Remove.
4185 (struct collect_matching_scripts_data): Add constructor.
4186 <scripts_p>: Change type to (pointer to) std::vector.
4187 (collect_matching_scripts_data): Adjust.
4188 (sort_scripts_by_name): Make suitable for std::sort.
4189 (print_scripts): Don't sort vector, adjust to std::vector.
4190 (auto_load_info_scripts): Sort vectors, adjust to std::vector.
4191
4192 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
4193
4194 * symfile.c (filename_language): Make struct, not typedef. Add
4195 constructor.
4196 <ext>: Change type to std::string.
4197 (DEF_VEC_O (filename_language)): Remove.
4198 (filename_language_table): Change type to std::vector.
4199 (add_filename_language): Adjust.
4200 (set_ext_lang_command): Adjust.
4201 (info_ext_lang_command): Adjust.
4202 (deduce_language_from_filename): Adjust.
4203 (class scoped_restore_filename_language_table): Remove.
4204 (test_filename_language): Use scoped_restore.
4205 (test_set_ext_lang_command): Use scoped_restore, adjust to
4206 std::vector change.
4207
4208 2017-10-27 Simon Marchi <simon.marchi@ericsson.com>
4209
4210 * symfile.c: Include selftest.h.
4211 (class scoped_restore_filename_language_table): New.
4212 (test_filename_language): New test.
4213 (test_set_ext_lang_command): New test.
4214 (_initialize_symfile): Register tests.
4215
4216 2017-10-27 Keith Seitz <keiths@redhat.com>
4217
4218 * breakpoint.c (print_breakpoint_location): Use the symbol saved
4219 in the bp_location, falling back to find_pc_sect_function when
4220 needed.
4221 (add_location_to_breakpoint): Save sal->symbol.
4222 * breakpoint.h (struct bp_location) <symbol>: New field.
4223 * symtab.c (find_function_start_sal): Save the symbol into the SaL.
4224 * symtab.h (struct symtab_and_line) <symbol>: New field.
4225
4226 2017-10-26 Patrick Frants <osscontribute@gmail.com>
4227
4228 PR gdb/13669
4229 * cp-valprint.c (cp_print_value_fields): Use obstack_blank_fast
4230 to rewind obstack.
4231
4232 2017-10-26 Pedro Alves <palves@redhat.com>
4233
4234 * remote.c (remote_async_terminal_ours_p): Delete.
4235 (remote_open_1, remote_terminal_inferior, remote_terminal_ours):
4236 Remove references to 'remote_async_terminal_ours_p'.
4237
4238 2017-10-26 Yao Qi <yao.qi@linaro.org>
4239
4240 * breakpoint.h (regular_breakpoint_inserted_here_p): Remove.
4241
4242 2017-10-26 Yao Qi <yao.qi@linaro.org>
4243
4244 * break-catch-sig.c (signal_catchpoint_breakpoint_hit): Make
4245 aspace const.
4246 * break-catch-syscall.c (breakpoint_hit_catch_syscall):
4247 Likewise.
4248 * breakpoint.c (bpstat_check_location): Remove cast.
4249 (breakpoint_hit_catch_fork): Make aspce const.
4250 (breakpoint_hit_catch_solib): Likewise.
4251 (breakpoint_hit_catch_exec): Likewise.
4252 (breakpoint_hit_ranged_breakpoint): Likewise.
4253 (breakpoint_hit_watchpoint): Likewise.
4254 (base_breakpoint_breakpoint_hit): Likewise.
4255 (bkpt_breakpoint_hit): Likewise.
4256 (dprintf_breakpoint_hit): Likewise.
4257 (tracepoint_breakpoint_hit): Likewise.
4258 * breakpoint.h (breakpoint_ops) <breakpoint_hit>: Likewise.
4259
4260 2017-10-26 Yao Qi <yao.qi@linaro.org>
4261
4262 * breakpoint.c (breakpoint_location_address_match): Change
4263 "struct address_space *" to "const address_space".
4264 (breakpoint_location_address_range_overlap): Likewise.
4265 (breakpoint_here_p): Likewise.
4266 (breakpoint_in_range_p): Likewise.
4267 (moribund_breakpoint_here_p): Likewise.
4268 (bp_location_inserted_here_p): Likewise.
4269 (software_breakpoint_inserted_here_p): Likewise.
4270 (hardware_breakpoint_inserted_here_p): Likewise.
4271 (hardware_watchpoint_inserted_in_range): Likewise.
4272 (bpstat_check_location): Likewise.
4273 (bpstat_stop_status): Likewise.
4274 (breakpoint_address_match): Likewise.
4275 (breakpoint_address_match_range): Likewise.
4276 (breakpoint_location_address_match): Likewise.
4277 (breakpoint_location_address_range_overlap): Likewise.
4278 (insert_single_step_breakpoint): Likewise.
4279 (breakpoint_has_location_inserted_here): Likewise.
4280 (single_step_breakpoint_inserted_here_p): Likewise.
4281 (pc_at_non_inline_function): Likewise.
4282 * breakpoint.h (bpstat_stop_status): Update declaration.
4283 (breakpoint_here_p): Likewise.
4284 (breakpoint_in_range_p): Likewise.
4285 (moribund_breakpoint_here_p): Likewise.
4286 (breakpoint_inserted_here_p): Likewise.
4287 (software_breakpoint_inserted_here_p): Likewise.
4288 (hardware_breakpoint_inserted_here_p): Likewise.
4289 (breakpoint_has_location_inserted_here): Likewise.
4290 (single_step_breakpoint_inserted_here_p): Likewise.
4291 (hardware_watchpoint_inserted_in_range): Likewise.
4292 (breakpoint_address_match): Likewise.
4293 (insert_single_step_breakpoint): Likewise.
4294 (pc_at_non_inline_function): Likewise.
4295 * gdbthread.h (thread_has_single_step_breakpoint_here): Likewise.
4296 * record.c (record_check_stopped_by_breakpoint): Likewise.
4297 * record.h (record_check_stopped_by_breakpoint): Likewise.
4298 * thread.c (thread_has_single_step_breakpoint_here): Likewise.
4299
4300 2017-10-25 Yao Qi <yao.qi@linaro.org>
4301
4302 * aarch32-linux-nat.c (aarch32_gp_regcache_supply): Use
4303 regcache->arch () instead get_regcache_arch.
4304 * aarch64-fbsd-nat.c (aarch64_fbsd_fetch_inferior_registers):
4305 Likewise.
4306 (aarch64_fbsd_store_inferior_registers): Likewise.
4307 * aarch64-linux-nat.c (fetch_gregs_from_thread): Likewise.
4308 (store_gregs_to_thread): Likewise.
4309 (fetch_fpregs_from_thread): Likewise.
4310 (store_fpregs_to_thread): Likewise.
4311 * aarch64-tdep.c (aarch64_extract_return_value): Likewise.
4312 (aarch64_store_return_value): Likewise.
4313 (aarch64_software_single_step): Likewise.
4314 * aix-thread.c (aix_thread_wait): Likewise.
4315 (supply_reg32): Likewise.
4316 (supply_sprs64): Likewise.
4317 (supply_sprs32): Likewise.
4318 (fill_gprs64): Likewise.
4319 (fill_gprs32): Likewise.
4320 (fill_sprs64): Likewise.
4321 (fill_sprs32): Likewise.
4322 (store_regs_user_thread): Likewise.
4323 (store_regs_kernel_thread): Likewise.
4324 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers): Likewise.
4325 (alphabsd_store_inferior_registers): Likewise.
4326 * alpha-tdep.c (alpha_extract_return_value): Likewise.
4327 (alpha_store_return_value): Likewise.
4328 (alpha_deal_with_atomic_sequence): Likewise.
4329 (alpha_next_pc): Likewise.
4330 (alpha_software_single_step): Likewise.
4331 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Likewise.
4332 (amd64bsd_store_inferior_registers): Likewise.
4333 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers):
4334 Likewise.
4335 (amd64_linux_store_inferior_registers): Likewise.
4336 * amd64-nat.c (amd64_supply_native_gregset): Likewise.
4337 (amd64_collect_native_gregset): Likewise.
4338 * amd64-obsd-tdep.c (amd64obsd_supply_uthread): Likewise.
4339 (amd64obsd_collect_uthread): Likewise.
4340 * amd64-tdep.c (amd64_supply_fpregset): Likewise.
4341 (amd64_collect_fpregset): Likewise.
4342 (amd64_supply_fxsave): Likewise.
4343 (amd64_supply_xsave): Likewise.
4344 (amd64_collect_fxsave): Likewise.
4345 (amd64_collect_xsave): Likewise.
4346 * arc-tdep.c (arc_write_pc): Likewise.
4347 * arch-utils.c (default_skip_permanent_breakpoint): Likewise.
4348 * arm-fbsd-nat.c (arm_fbsd_fetch_inferior_registers): Likewise.
4349 (arm_fbsd_store_inferior_registers): Likewise.
4350 * arm-linux-nat.c (fetch_vfp_regs): Likewise.
4351 (store_vfp_regs): Likewise.
4352 (arm_linux_fetch_inferior_registers): Likewise.
4353 (arm_linux_store_inferior_registers): Likewise.
4354 * arm-linux-tdep.c (arm_linux_supply_gregset): Likewise.
4355 (arm_linux_sigreturn_next_pc): Likewise.
4356 (arm_linux_get_next_pcs_syscall_next_pc): Likewise.
4357 * arm-nbsd-nat.c (arm_supply_gregset): Likewise.
4358 (fetch_register): Likewise.
4359 (store_register): Likewise.
4360 * arm-tdep.c (arm_is_thumb): Likewise.
4361 (displaced_in_arm_mode): Likewise.
4362 (bx_write_pc): Likewise.
4363 (arm_get_next_pcs_addr_bits_remove): Likewise.
4364 (arm_software_single_step): Likewise.
4365 (arm_extract_return_value): Likewise.
4366 (arm_store_return_value): Likewise.
4367 (arm_write_pc): Likewise.
4368 * bfin-tdep.c (bfin_extract_return_value): Likewise.
4369 * bsd-uthread.c (bsd_uthread_fetch_registers): Likewise.
4370 (bsd_uthread_store_registers): Likewise.
4371 * core-regset.c (fetch_core_registers): Likewise.
4372 * corelow.c (get_core_registers): Likewise.
4373 * cris-tdep.c (cris_store_return_value): Likewise.
4374 (cris_extract_return_value): Likewise.
4375 (find_step_target): Likewise.
4376 (find_step_target): Likewise.
4377 (cris_software_single_step): Likewise.
4378 * ctf.c (ctf_fetch_registers): Likewise.
4379 * darwin-nat.c (cancel_breakpoint): Likewise.
4380 * fbsd-tdep.c (fbsd_collect_thread_registers): Likewise.
4381 * frv-tdep.c (frv_extract_return_value): Likewise.
4382 * ft32-tdep.c (ft32_store_return_value): Likewise.
4383 (ft32_extract_return_value): Likewise.
4384 * go32-nat.c (fetch_register): Likewise.
4385 (go32_fetch_registers): Likewise.
4386 (go32_store_registers): Likewise.
4387 (store_register): Likewise.
4388 * h8300-tdep.c (h8300_extract_return_value): Likewise.
4389 (h8300_store_return_value): Likewise.
4390 * hppa-linux-nat.c (fetch_register): Likewise.
4391 (store_register): Likewise.
4392 (hppa_linux_fetch_inferior_registers): Likewise.
4393 (hppa_linux_store_inferior_registers): Likewise.
4394 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers): Likewise.
4395 (i386_darwin_store_inferior_registers): Likewise.
4396 * i386-gnu-nat.c (gnu_fetch_registers): Likewise.
4397 (gnu_store_registers): Likewise.
4398 * i386-linux-nat.c (fetch_register): Likewise.
4399 (store_register): Likewise.
4400 (supply_gregset): Likewise.
4401 (fill_gregset): Likewise.
4402 (i386_linux_fetch_inferior_registers): Likewise.
4403 (i386_linux_store_inferior_registers): Likewise.
4404 (i386_linux_resume): Likewise.
4405 * i386-linux-tdep.c (i386_linux_get_syscall_number_from_regcache):
4406 Likewise.
4407 * i386-nto-tdep.c (i386nto_supply_gregset): Likewise.
4408 * i386-obsd-nat.c (i386obsd_supply_pcb): Likewise.
4409 * i386-obsd-tdep.c (i386obsd_supply_uthread): Likewise.
4410 (i386obsd_collect_uthread): Likewise.
4411 * i386-tdep.c (i386_mmx_regnum_to_fp_regnum): Likewise.
4412 (i386_supply_gregset): Likewise.
4413 (i386_collect_gregset): Likewise.
4414 (i386_supply_fpregset): Likewise.
4415 (i386_collect_fpregset): Likewise.
4416 (i386_mpx_bd_base): Likewise.
4417 * i386-v4-nat.c (supply_fpregset): Likewise.
4418 (fill_fpregset): Likewise.
4419 * i387-tdep.c (i387_supply_fsave): Likewise.
4420 (i387_collect_fsave): Likewise.
4421 (i387_supply_fxsave): Likewise.
4422 (i387_collect_fxsave): Likewise.
4423 (i387_supply_xsave): Likewise.
4424 (i387_collect_xsave): Likewise.
4425 * ia64-linux-nat.c (ia64_linux_fetch_registers): Likewise.
4426 (ia64_linux_store_registers): Likewise.
4427 * ia64-tdep.c (ia64_access_rse_reg): Likewise.
4428 (ia64_extract_return_value): Likewise.
4429 (ia64_store_return_value): Likewise.
4430 (find_func_descr): Likewise.
4431 * inf-child.c (inf_child_fetch_inferior_registers): Likewise.
4432 * inf-ptrace.c (inf_ptrace_fetch_registers): Likewise.
4433 (inf_ptrace_store_registers): Likewise.
4434 * infrun.c (use_displaced_stepping): Likewise.
4435 (displaced_step_prepare_throw): Likewise.
4436 (resume): Likewise.
4437 (proceed): Likewise.
4438 (do_target_wait): Likewise.
4439 (adjust_pc_after_break): Likewise.
4440 (handle_inferior_event_1): Likewise.
4441 (handle_signal_stop): Likewise.
4442 (save_infcall_suspend_state): Likewise.
4443 (restore_infcall_suspend_state): Likewise.
4444 * iq2000-tdep.c (iq2000_extract_return_value): Likewise.
4445 * jit.c (jit_frame_prev_register): Likewise.
4446 * linux-nat.c (save_stop_reason): Likewise.
4447 (linux_nat_wait_1): Likewise.
4448 (resume_stopped_resumed_lwps): Likewise.
4449 * linux-record.c (record_linux_sockaddr): Likewise.
4450 (record_linux_msghdr): Likewise.
4451 (record_linux_system_call): Likewise.
4452 * linux-tdep.c (linux_collect_thread_registers): Likewise.
4453 * lm32-tdep.c (lm32_extract_return_value): Likewise.
4454 (lm32_store_return_value): Likewise.
4455 * m32c-tdep.c (m32c_read_flg): Likewise.
4456 (m32c_pseudo_register_read): Likewise.
4457 (m32c_pseudo_register_write): Likewise.
4458 * m32r-linux-tdep.c (m32r_linux_supply_gregset): Likewise.
4459 (m32r_linux_collect_gregset): Likewise.
4460 * m32r-tdep.c (m32r_store_return_value): Likewise.
4461 (m32r_extract_return_value): Likewise.
4462 * m68k-bsd-nat.c (m68kbsd_supply_fpregset): Likewise.
4463 (m68kbsd_collect_fpregset): Likewise.
4464 * m68k-bsd-tdep.c (m68kbsd_supply_fpregset): Likewise.
4465 * m68k-linux-nat.c (fetch_register): Likewise.
4466 (old_fetch_inferior_registers): Likewise.
4467 (old_store_inferior_registers): Likewise.
4468 (store_regs): Likewise.
4469 * m68k-tdep.c (m68k_svr4_extract_return_value): Likewise.
4470 (m68k_svr4_store_return_value): Likewise.
4471 * m88k-tdep.c (m88k_store_arguments): Likewise.
4472 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Likewise.
4473 (mi_cmd_data_write_register_values): Likewise.
4474 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers): Likewise.
4475 (mips_fbsd_store_inferior_registers): Likewise.
4476 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Likewise.
4477 (mips_fbsd_supply_gregs): Likewise.
4478 (mips_fbsd_collect_fpregs): Likewise.
4479 (mips_fbsd_collect_gregs): Likewise.
4480 (mips_fbsd_supply_fpregset): Likewise.
4481 (mips_fbsd_collect_fpregset): Likewise.
4482 (mips_fbsd_supply_gregset): Likewise.
4483 (mips_fbsd_collect_gregset): Likewise.
4484 * mips-linux-nat.c (supply_gregset): Likewise.
4485 (fill_gregset): Likewise.
4486 (supply_fpregset): Likewise.
4487 (fill_fpregset): Likewise.
4488 * mips-linux-tdep.c (mips_supply_gregset): Likewise.
4489 (mips_fill_gregset): Likewise.
4490 (mips_supply_fpregset): Likewise.
4491 (mips_fill_fpregset): Likewise.
4492 (mips64_supply_gregset): Likewise.
4493 (micromips_linux_sigframe_validate): Likewise.
4494 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers): Likewise.
4495 (mipsnbsd_fetch_inferior_registers): Likewise.
4496 (mipsnbsd_store_inferior_registers): Likewise.
4497 * mips-nbsd-tdep.c (mipsnbsd_supply_fpregset): Likewise.
4498 (mipsnbsd_supply_gregset): Likewise.
4499 (mipsnbsd_iterate_over_regset_sections): Likewise.
4500 (mipsnbsd_supply_reg): Likewise.
4501 (mipsnbsd_supply_fpreg): Likewise.
4502 * mips-tdep.c (mips_in_frame_stub): Likewise.
4503 (mips_dummy_id): Likewise.
4504 (is_octeon_bbit_op): Likewise.
4505 (micromips_bc1_pc): Likewise.
4506 (extended_mips16_next_pc): Likewise.
4507 (mips16_next_pc): Likewise.
4508 (deal_with_atomic_sequence): Likewise.
4509 * moxie-tdep.c (moxie_process_readu): Likewise.
4510 * nios2-tdep.c (nios2_get_next_pc): Likewise.
4511 * nto-procfs.c (procfs_store_registers): Likewise.
4512 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers): Likewise.
4513 (ppcfbsd_store_inferior_registers): Likewise.
4514 * ppc-linux-nat.c (fetch_vsx_register): Likewise.
4515 (fetch_altivec_register): Likewise.
4516 (get_spe_registers): Likewise.
4517 (fetch_spe_register): Likewise.
4518 (fetch_altivec_registers): Likewise.
4519 (fetch_all_gp_regs): Likewise.
4520 (fetch_all_fp_regs): Likewise.
4521 (store_vsx_register): Likewise.
4522 (store_altivec_register): Likewise.
4523 (set_spe_registers): Likewise.
4524 (store_spe_register): Likewise.
4525 (store_altivec_registers): Likewise.
4526 (store_all_gp_regs): Likewise.
4527 (store_all_fp_regs): Likewise.
4528 * ppc-linux-tdep.c (ppc_linux_supply_gregset): Likewise.
4529 (ppc_linux_collect_gregset): Likewise.
4530 (ppc_canonicalize_syscall): Likewise.
4531 (ppc_linux_record_signal): Likewise.
4532 (ppu2spu_prev_register): Likewise.
4533 * ppc-nbsd-nat.c (ppcnbsd_supply_pcb): Likewise.
4534 * ppc-obsd-nat.c (ppcobsd_fetch_registers): Likewise.
4535 (ppcobsd_store_registers): Likewise.
4536 * ppc-ravenscar-thread.c (ppc_ravenscar_generic_fetch_registers):
4537 Likewise.
4538 (ppc_ravenscar_generic_store_registers): Likewise.
4539 * procfs.c (procfs_fetch_registers): Likewise.
4540 (procfs_store_registers): Likewise.
4541 * ravenscar-thread.c (ravenscar_fetch_registers): Likewise.
4542 (ravenscar_store_registers): Likewise.
4543 (ravenscar_prepare_to_store): Likewise.
4544 * record-btrace.c (record_btrace_fetch_registers): Likewise.
4545 * record-full.c (record_full_wait_1): Likewise.
4546 (record_full_registers_change): Likewise.
4547 (record_full_store_registers): Likewise.
4548 (record_full_core_fetch_registers): Likewise.
4549 (record_full_save): Likewise.
4550 (record_full_goto_insn): Likewise.
4551 * regcache.c (regcache_register_size): Likewise.
4552 (get_regcache_arch): Remove.
4553 (regcache_read_pc): Likewise.
4554 * regcache.h (get_regcache_arch): Remove.
4555 * remote-sim.c (gdbsim_fetch_register): Likewise.
4556 (gdbsim_store_register): Likewise.
4557 * remote.c (fetch_register_using_p): Likewise.
4558 (send_g_packet): Likewise.
4559 (remote_prepare_to_store): Likewise.
4560 (store_registers_using_G): Likewise.
4561 * reverse.c (save_bookmark_command): Likewise.
4562 (goto_bookmark_command): Likewise.
4563 * rs6000-aix-tdep.c (branch_dest): Likewise.
4564 * rs6000-nat.c (rs6000_ptrace64): Likewise.
4565 (fetch_register): Likewise.
4566 * rs6000-tdep.c (ppc_supply_reg): Likewise.
4567 (ppc_collect_reg): Likewise.
4568 (ppc_collect_gregset): Likewise.
4569 (ppc_collect_fpregset): Likewise.
4570 (ppc_collect_vsxregset): Likewise.
4571 (ppc_collect_vrregset): Likewise.
4572 (ppc_displaced_step_hw_singlestep): Likewise.
4573 (rs6000_pseudo_register_read): Likewise.
4574 (rs6000_pseudo_register_write): Likewise.
4575 * s390-linux-nat.c (supply_gregset): Likewise.
4576 (fill_gregset): Likewise.
4577 (s390_linux_fetch_inferior_registers): Likewise.
4578 * s390-linux-tdep.c (s390_write_pc): Likewise.
4579 (s390_software_single_step): Likewise.
4580 (s390_all_but_pc_registers_record): Likewise.
4581 (s390_linux_syscall_record): Likewise.
4582 * sentinel-frame.c (sentinel_frame_prev_arch): Likewise.
4583 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers): Likewise.
4584 (shnbsd_store_inferior_registers): Likewise.
4585 * sh-tdep.c (sh_extract_return_value_nofpu): Likewise.
4586 (sh_extract_return_value_fpu): Likewise.
4587 (sh_store_return_value_nofpu): Likewise.
4588 (sh_corefile_supply_regset): Likewise.
4589 (sh_corefile_collect_regset): Likewise.
4590 * sh64-tdep.c (sh64_extract_return_value): Likewise.
4591 (sh64_store_return_value): Likewise.
4592 * sparc-linux-tdep.c (sparc32_linux_collect_core_fpregset): Likewise.
4593 * sparc-nat.c (sparc_fetch_inferior_registers): Likewise.
4594 (sparc_store_inferior_registers): Likewise.
4595 * sparc-ravenscar-thread.c (register_in_thread_descriptor_p): Likewise.
4596 (sparc_ravenscar_prepare_to_store): Likewise.
4597 * sparc-tdep.c (sparc32_store_arguments): Likewise.
4598 (sparc_analyze_control_transfer): Likewise.
4599 (sparc_step_trap): Likewise.
4600 (sparc_software_single_step): Likewise.
4601 (sparc32_gdbarch_init): Likewise.
4602 (sparc_supply_rwindow): Likewise.
4603 (sparc_collect_rwindow): Likewise.
4604 * sparc64-linux-tdep.c (sparc64_linux_collect_core_fpregset): Likewise.
4605 * sparc64-nbsd-nat.c (sparc64nbsd_supply_gregset): Likewise.
4606 (sparc64nbsd_collect_gregset): Likewise.
4607 (sparc64nbsd_supply_fpregset): Likewise.
4608 (sparc64nbsd_collect_fpregset): Likewise.
4609 * sparc64-tdep.c (sparc64_store_arguments): Likewise.
4610 (sparc64_supply_gregset): Likewise.
4611 (sparc64_collect_gregset): Likewise.
4612 (sparc64_supply_fpregset): Likewise.
4613 (sparc64_collect_fpregset): Likewise.
4614 * spu-linux-nat.c (spu_fetch_inferior_registers): Likewise.
4615 * spu-tdep.c (spu_unwind_sp): Likewise.
4616 (spu2ppu_prev_register): Likewise.
4617 (spu_memory_remove_breakpoint): Likewise.
4618 * stack.c (return_command): Likewise.
4619 * tic6x-tdep.c (tic6x_extract_signed_field): Likewise.
4620 * tracefile-tfile.c (tfile_fetch_registers): Likewise.
4621 * tracefile.c (trace_save_ctf): Likewise.
4622 * windows-nat.c (do_windows_fetch_inferior_registers): Likewise.
4623 (do_windows_store_inferior_registers): Likewise.
4624 (windows_resume): Likewise.
4625 * xtensa-linux-nat.c (fill_gregset): Likewise.
4626 (supply_gregset_reg): Likewise.
4627 * xtensa-tdep.c (xtensa_register_write_masked): Likewise.
4628 (xtensa_register_read_masked): Likewise.
4629 (xtensa_supply_gregset): Likewise.
4630 (xtensa_extract_return_value): Likewise.
4631 (xtensa_store_return_value): Likewise.
4632
4633 2017-10-25 Ulrich Weigand <uweigand@de.ibm.com>
4634
4635 * doublest.c (floatformat_from_string): New function.
4636 * doublest.h (floatformat_from_string): Add prototype.
4637
4638 * std-operator.def (OP_DOUBLE, OP_DECFLOAT): Remove, replace by ...
4639 (OP_FLOAT): ... this.
4640 * expression.h: Do not include "doublest.h".
4641 (union exp_element): Replace doubleconst and decfloatconst by
4642 new element floatconst.
4643 * ada-lang.c (resolve_subexp): Handle OP_FLOAT instead of OP_DOUBLE.
4644 (ada_evaluate_subexp): Likewise.
4645 * eval.c (evaluate_subexp_standard): Handle OP_FLOAT instead of
4646 OP_DOUBLE and OP_DECFLOAT.
4647 * expprint.c (print_subexp_standard): Likewise.
4648 (dump_subexp_body_standard): Likewise.
4649 * breakpoint.c (watchpoint_exp_is_const): Likewise.
4650
4651 * parse.c: Include "dfp.h".
4652 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
4653 (write_exp_elt_floatcst): New function.
4654 (operator_length_standard): Handle OP_FLOAT instead of OP_DOUBLE
4655 and OP_DECFLOAT.
4656 (operator_check_standard): Likewise.
4657 (parse_float): Do not accept suffix. Take type as input. Return bool.
4658 Return target format buffer instead of host DOUBLEST.
4659 Use floatformat_from_string and decimal_from_string to parse
4660 either binary or decimal floating-point types.
4661 (parse_c_float): Remove.
4662 * parser-defs.h: Do not include "doublest.h".
4663 (write_exp_elt_dblcst, write_exp_elt_decfloatcst): Remove.
4664 (write_exp_elt_floatcst): Add prototype.
4665 (parse_float): Update prototype.
4666 (parse_c_float): Remove.
4667
4668 * c-exp.y: Do not include "dfp.h".
4669 (typed_val_float): Use byte buffer instead of DOUBLEST.
4670 (typed_val_decfloat): Remove.
4671 (DECFLOAT): Remove.
4672 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4673 (parse_number): Update to new parse_float interface.
4674 Parse suffixes and determine type before calling parse_float.
4675 Handle decimal and binary FP types the same way.
4676
4677 * d-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
4678 (FLOAT_LITERAL): Use OP_FLOAT and write_exp_elt_floatcst.
4679 (parse_number): Update to new parse_float interface.
4680 Parse suffixes and determine type before calling parse_float.
4681
4682 * f-exp.y: Replace dval by typed_val_float.
4683 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4684 (parse_number): Use parse_float instead of atof.
4685
4686 * go-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
4687 (parse_go_float): Remove.
4688 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4689 (parse_number): Call parse_float instead of parse_go_float.
4690 Parse suffixes and determine type before calling parse_float.
4691
4692 * p-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
4693 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4694 (parse_number): Update to new parse_float interface.
4695 Parse suffixes and determine type before calling parse_float.
4696
4697 * m2-exp.y: Replace dval by byte buffer val.
4698 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4699 (parse_number): Call parse_float instead of atof.
4700
4701 * rust-exp.y (typed_val_float): Use byte buffer instead of DOUBLEST.
4702 (lex_number): Call parse_float instead of strtod.
4703 (ast_dliteral): Use OP_FLOAT instead of OP_DOUBLE.
4704 (convert_ast_to_expression): Handle OP_FLOAT instead of OP_DOUBLE.
4705 Use write_exp_elt_floatcst.
4706 (unit_testing): Remove static variable.
4707 (rust_type): Do not check unit_testing.
4708 (rust_lex_tests): Do not set uint_testing. Set up dummy rust_parser.
4709
4710 * ada-exp.y (type_float, type_double): Remove.
4711 (typed_val_float): Use byte buffer instead of DOUBLEST.
4712 (FLOAT): Use OP_FLOAT and write_exp_elt_floatcst.
4713 * ada-lex.l (processReal): Use parse_float instead of sscanf.
4714
4715 2017-10-25 Alan Hayward <alan.hayward@arm.com>
4716
4717 * aarch64-tdep.h (enum aarch64_regnum): Remove.
4718 * arch/aarch64.h: New file.
4719
4720 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
4721
4722 * dfp.h (decimal_from_string): Use const reference for argument.
4723 * dfp.c (decimal_from_string): Likewise.
4724
4725 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
4726
4727 * i387-tdep.c (print_i387_value): Use floatformat_to_string.
4728 * sh64-tdep.c (sh64_do_fp_register): Likewise.
4729 * mips-tdep.c (mips_print_fp_register): Likewise.
4730
4731 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
4732
4733 * common/format.h (enum argclass): Replace decfloat_arg by
4734 dec32float_arg, dec64float_arg, and dec128float_arg.
4735 * common/format.c (parse_format_string): Update to return
4736 new decimal float argument classes.
4737
4738 * printcmd.c (printf_decfloat): Rename to ...
4739 (printf_floating): ... this. Add argclass argument, and use it
4740 instead of parsing the format string again. Add support for
4741 binary floating-point values, using floatformat_to_string.
4742 Convert value to the target format if it doesn't already match.
4743 (ui_printf): Call printf_floating instead of printf_decfloat,
4744 also for double_arg / long_double_arg. Pass argclass.
4745
4746 * dfp.c (decimal_to_string): Add format string argument.
4747 * dfp.h (decimal_to_string): Likewise.
4748
4749 * doublest.c (floatformat_to_string): Add format string argument.
4750 * doublest.h (floatformat_to_string): Likewise.
4751
4752 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
4753
4754 * doublest.c (floatformat_precision): New routine.
4755 (floatformat_to_string): Likewise.
4756 * doublest.c (floatformat_to_string): Add prototype.
4757
4758 * printcmd.c (print_scalar_formatted): Only call print_floating
4759 on floating-point types.
4760 * valprint.c: Do not include "floatformat.h".
4761 (generic_val_print_decfloat): Remove.
4762 (generic_val_print): Call generic_val_print_float for both
4763 TYPE_CODE_FLT and TYPE_CODE_DECFLOAT.
4764 (print_floating): Use floatformat_to_string. Handle decimal float.
4765 (print_decimal_floating): Remove, merge into floatformat_to_string.
4766 * value.h (print_decimal_floating): Remove.
4767
4768 * Makefile.in: Do not build doublest.c with -Wformat-nonliteral.
4769
4770 2017-10-24 Ulrich Weigand <uweigand@de.ibm.com>
4771
4772 * buildsym.c (end_symtab_get_static_block): Use std::stable_sort.
4773
4774 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
4775
4776 * memattr.h: Don't include vec.h.
4777 (struct mem_attrib): Initialize fields.
4778 <unknown>: New static method.
4779 (struct mem_region): Add constructors, operator<, initialize
4780 fields.
4781 * memattr.c: Include algorithm.
4782 (default_mem_attrib, unknown_mem_attrib): Remove.
4783 (user_mem_region_list): New global.
4784 (target_mem_region_list, mem_region_list): Change type to
4785 std::vector<mem_region>.
4786 (mem_use_target): Now a function.
4787 (target_mem_regions_valid): Change type to bool.
4788 (mem_region_lessthan, mem_region_cmp, mem_region_init): Remove.
4789 (require_user_regions): Adjust.
4790 (require_target_regions): Adjust.
4791 (create_mem_region): Adjust.
4792 (lookup_mem_region): Adjust.
4793 (invalidate_target_mem_regions): Adjust.
4794 (mem_clear): Rename to...
4795 (user_mem_clear): ... this, and adjust.
4796 (mem_command): Adjust.
4797 (info_mem_command): Adjust.
4798 (mem_enable, enable_mem_command, mem_disable,
4799 disable_mem_command): Adjust.
4800 (mem_delete): Adjust.
4801 (delete_mem_command): Adjust.
4802 * memory-map.h (parse_memory_map): Return an std::vector.
4803 * memory-map.c (parse_memory_map): Likewise.
4804 (struct memory_map_parsing_data): Add constructor.
4805 <memory_map>: Point to std::vector.
4806 (memory_map_start_memory): Adjust.
4807 (memory_map_end_memory): Adjust.
4808 (memory_map_end_property): Adjust.
4809 (clear_result): Remove.
4810 * remote.c (remote_memory_map): Return an std::vector.
4811 * target-debug.h (target_debug_print_VEC_mem_region_s__p):
4812 Remove.
4813 (target_debug_print_mem_region_vector): New.
4814 * target-delegates.c: Regenerate.
4815 * target.h (mem_region_vector): New typedef.
4816 (to_memory_map): Return mem_region_vector.
4817 (target_memory_map): Return an std::vector.
4818 * target.c (target_memory_map): Return an std::vector.
4819 (flash_erase_command): Adjust.
4820
4821 2017-10-21 Simon Marchi <simon.marchi@ericsson.com>
4822
4823 * memory-map.c (struct memory_map_parsing_data) <property_name>:
4824 Change type to std::string.
4825 (memory_map_start_property): Adjust.
4826 (memory_map_end_property): Adjust.
4827
4828 2017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
4829
4830 * infrun.h: Include common/byte-vector.h.
4831 (struct displaced_step_closure): New struct.
4832 (struct buf_displaced_step_closure): New struct.
4833 * infrun.c (displaced_step_closure::~displaced_step_closure):
4834 Provide default implementation.
4835 (displaced_step_clear): Deallocate step closure with delete.
4836 * aarch64-tdep.c (displaced_step_closure): Rename to ...
4837 (aarch64_displaced_step_closure): ... this, extend
4838 displaced_step_closure.
4839 (aarch64_displaced_step_data) <dsc>: Change type to
4840 aarch64_displaced_step_closure.
4841 (aarch64_displaced_step_copy_insn): Adjust to type change, use
4842 unique_ptr.
4843 (aarch64_displaced_step_fixup): Add cast for displaced step
4844 closure.
4845 * amd64-tdep.c (displaced_step_closure): Rename to ...
4846 (amd64_displaced_step_closure): ... this, extend
4847 displaced_step_closure.
4848 <insn_buf>: Change type to std::vector<gdb_byte>.
4849 <max_len>: Remove.
4850 (fixup_riprel): Change type of DSC parameter, adjust to type
4851 change of insn_buf.
4852 (fixup_displaced_copy): Change type of DSC parameter.
4853 (amd64_displaced_step_copy_insn): Instantiate
4854 amd64_displaced_step_closure.
4855 (amd64_displaced_step_fixup): Add cast for closure type, adjust
4856 to type change of insn_buf.
4857 * arm-linux-tdep.c (arm_linux_cleanup_svc): Change type of
4858 parameter DSC.
4859 (arm_linux_copy_svc): Likewise.
4860 (cleanup_kernel_helper_return): Likewise.
4861 (arm_catch_kernel_helper_return): Likewise.
4862 (arm_linux_displaced_step_copy_insn): Instantiate
4863 arm_displaced_step_closure.
4864 * arm-tdep.c (arm_pc_is_thumb): Add cast for closure.
4865 (displaced_read_reg): Change type of parameter DSC.
4866 (branch_write_pc): Likewise.
4867 (load_write_pc): Likewise.
4868 (alu_write_pc): Likewise.
4869 (displaced_write_reg): Likewise.
4870 (arm_copy_unmodified): Likewise.
4871 (thumb_copy_unmodified_32bit): Likewise.
4872 (thumb_copy_unmodified_16bit): Likewise.
4873 (cleanup_preload): Likewise.
4874 (install_preload): Likewise.
4875 (arm_copy_preload): Likewise.
4876 (thumb2_copy_preload): Likewise.
4877 (install_preload_reg): Likewise.
4878 (arm_copy_preload_reg): Likewise.
4879 (cleanup_copro_load_store): Likewise.
4880 (install_copro_load_store): Likewise.
4881 (arm_copy_copro_load_store) Likewise.
4882 (thumb2_copy_copro_load_store): Likewise.
4883 (cleanup_branch): Likewise.
4884 (install_b_bl_blx): Likewise.
4885 (arm_copy_b_bl_blx): Likewise.
4886 (thumb2_copy_b_bl_blx): Likewise.
4887 (thumb_copy_b): Likewise.
4888 (install_bx_blx_reg): Likewise.
4889 (arm_copy_bx_blx_reg): Likewise.
4890 (thumb_copy_bx_blx_reg): Likewise.
4891 (cleanup_alu_imm): Likewise.
4892 (arm_copy_alu_imm): Likewise.
4893 (thumb2_copy_alu_imm): Likewise.
4894 (cleanup_alu_reg): Likewise.
4895 (install_alu_reg): Likewise.
4896 (arm_copy_alu_reg): Likewise.
4897 (thumb_copy_alu_reg): Likewise.
4898 (cleanup_alu_shifted_reg): Likewise.
4899 (install_alu_shifted_reg): Likewise.
4900 (arm_copy_alu_shifted_reg): Likewise.
4901 (cleanup_load): Likewise.
4902 (cleanup_store): Likewise.
4903 (arm_copy_extra_ld_st): Likewise.
4904 (install_load_store): Likewise.
4905 (thumb2_copy_load_literal): Likewise.
4906 (thumb2_copy_load_reg_imm): Likewise.
4907 (arm_copy_ldr_str_ldrb_strb): Likewise.
4908 (cleanup_block_load_all): Likewise.
4909 (cleanup_block_store_pc): Likewise.
4910 (cleanup_block_load_pc): Likewise.
4911 (arm_copy_block_xfer): Likewise.
4912 (thumb2_copy_block_xfer): Likewise.
4913 (cleanup_svc): Likewise.
4914 (install_svc): Likewise.
4915 (arm_copy_svc): Likewise.
4916 (thumb_copy_svc): Likewise.
4917 (arm_copy_undef): Likewise.
4918 (thumb_32bit_copy_undef): Likewise.
4919 (arm_copy_unpred): Likewise.
4920 (arm_decode_misc_memhint_neon): Likewise.
4921 (arm_decode_unconditional): Likewise.
4922 (arm_decode_miscellaneous): Likewise.
4923 (arm_decode_dp_misc): Likewise.
4924 (arm_decode_ld_st_word_ubyte): Likewise.
4925 (arm_decode_media): Likewise.
4926 (arm_decode_b_bl_ldmstm): Likewise.
4927 (arm_decode_ext_reg_ld_st): Likewise.
4928 (thumb2_decode_dp_shift_reg): Likewise.
4929 (thumb2_decode_ext_reg_ld_st): Likewise.
4930 (arm_decode_svc_copro): Likewise.
4931 (thumb2_decode_svc_copro): Likewise.
4932 (install_pc_relative): Likewise.
4933 (thumb_copy_pc_relative_16bit): Likewise.
4934 (thumb_decode_pc_relative_16bit): Likewise.
4935 (thumb_copy_pc_relative_32bit): Likewise.
4936 (thumb_copy_16bit_ldr_literal): Likewise.
4937 (thumb_copy_cbnz_cbz): Likewise.
4938 (thumb2_copy_table_branch): Likewise.
4939 (cleanup_pop_pc_16bit_all): Likewise.
4940 (thumb_copy_pop_pc_16bit): Likewise.
4941 (thumb_process_displaced_16bit_insn): Likewise.
4942 (decode_thumb_32bit_ld_mem_hints): Likewise.
4943 (thumb_process_displaced_32bit_insn): Likewise.
4944 (thumb_process_displaced_insn): Likewise.
4945 (arm_process_displaced_insn): Likewise.
4946 (arm_displaced_init_closure): Likewise.
4947 (arm_displaced_step_fixup): Add cast for closure.
4948 * arm-tdep.h: Include infrun.h.
4949 (displaced_step_closure): Rename to ...
4950 (arm_displaced_step_closure): ... this, extend
4951 displaced_step_closure.
4952 <u::svc::copy_svc_os>: Change type of parameter DSC.
4953 <cleanup>: Likewise.
4954 (arm_process_displaced_insn): Likewise.
4955 (arm_displaced_init_closure): Likewise.
4956 (displaced_read_reg): Likewise.
4957 (displaced_write_reg): Likewise.
4958 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
4959 Adjust.
4960 * i386-tdep.h: Include infrun.h.
4961 (i386_displaced_step_closure): New typedef.
4962 * i386-tdep.c (i386_displaced_step_copy_insn): Use
4963 i386_displaced_step_closure.
4964 (i386_displaced_step_fixup): Adjust.
4965 * rs6000-tdep.c (ppc_displaced_step_closure): New typedef.
4966 (ppc_displaced_step_copy_insn): Use ppc_displaced_step_closure
4967 and unique_ptr.
4968 (ppc_displaced_step_fixup): Adjust.
4969 * s390-linux-tdep.c (s390_displaced_step_closure): New typedef.
4970 (s390_displaced_step_copy_insn): Use s390_displaced_step_closure
4971 and unique_ptr.
4972 (s390_displaced_step_fixup): Adjust.
4973
4974 2017-10-21 Simon Marchi <simon.marchi@polymtl.ca>
4975
4976 * interps.h (interp_resume, interp_suspend, interp_set_temp):
4977 Remove declarations.
4978
4979 2017-10-20 Tom Tromey <tom@tromey.com>
4980
4981 * gdb_bfd.c (struct gdb_bfd_data) <included_bfds>: Now a
4982 std::vector.
4983 (gdb_bfd_record_inclusion): Update.
4984 (bfdp): Remove typedef.
4985
4986 2017-10-20 Tom Tromey <tom@tromey.com>
4987
4988 * gdb_bfd.c (gdb_bfd_ref): Use new.
4989 (struct gdb_bfd_data): Add constructor, destructor, and member
4990 initializers.
4991 (gdb_bfd_unref): Use delete.
4992
4993 2017-10-20 Tom Tromey <tom@tromey.com>
4994
4995 * exec.c (exec_file_attach): Use new_bfd_ref.
4996 * symfile-mem.c (symbol_file_add_from_memory): Use new_bfd_ref.
4997 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
4998 (gdb_bfd_openw, gdb_bfd_openr_iovec, gdb_bfd_fdopenr): Use
4999 new_bfd_ref.
5000 * gdb_bfd.h (new_bfd_ref): New function.
5001
5002 2017-10-20 Pedro Alves <palves@redhat.com>
5003
5004 * main.c (captured_command_loop): Add attribute noinline.
5005
5006 2017-10-19 Simon Marchi <simon.marchi@ericsson.com>
5007
5008 * interps.c (struct interp_factory): Add constructor.
5009 (interp_factory_p): Remove typedef.
5010 (DEF_VEC_P(interp_factory_p)): Remove.
5011 (interpreter_factories): Change type to std::vector.
5012 (interp_factory_register): Adjust.
5013 (interp_lookup): Adjust.
5014 (interpreter_completer): Adjust.
5015
5016 2017-10-19 Tom Tromey <tom@tromey.com>
5017
5018 * break-catch-syscall.c (catch_syscall_completer): Use
5019 std::string, gdb::unique_xmalloc_ptr.
5020
5021 2017-10-19 Tom Tromey <tom@tromey.com>
5022
5023 * infcall.c (call_function_by_hand_dummy): Use std::string.
5024
5025 2017-10-19 Tom Tromey <tom@tromey.com>
5026
5027 * mi/mi-main.c (mi_cmd_execute): Update.
5028 * top.h (prepare_execute_command): Return scoped_value_mark.
5029 * value.h (class scoped_value_mark): Use DISABLE_COPY_AND_ASSIGN.
5030 Add move constructor.
5031 * top.c (prepare_execute_command): Return scoped_value_mark.
5032 (execute_command): Update.
5033
5034 2017-10-19 Pedro Alves <palves@redhat.com>
5035
5036 * xml-support.c (xml_fetch_content_from_file): Check fread's
5037 return.
5038
5039 2017-10-19 Pedro Alves <palves@redhat.com>
5040
5041 * ser-base.c (ser_base_read_error_fd): Delete the file handler if
5042 async.
5043 (handle_error_fd): New function.
5044 (ser_base_async): Add/delete an event loop file handler for
5045 error_fd.
5046
5047 2017-10-19 Pedro Alves <palves@redhat.com>
5048
5049 * xml-support.c (xml_fetch_content_from_file): Don't read in
5050 chunks. Instead use fseek to determine the file's size, and read
5051 it in one go.
5052
5053 2017-11-18 Keith Seitz <keiths@redhat.com>
5054
5055 * c-exp.y (oper): Canonicalize conversion operators of user-defined
5056 types.
5057 Add whitespace to front of type name.
5058
5059 2017-10-18 Keith Seitz <keiths@redhat.com>
5060
5061 * dwarf2read.c (dwarf2_add_typedef): Issue a complaint on unhandled
5062 DW_AT_accessibility.
5063
5064 2017-10-18 Yao Qi <yao.qi@linaro.org>
5065
5066 * features/tic6x-c62x-linux.c: Remove.
5067
5068 2017-10-17 Tom Tromey <tom@tromey.com>
5069
5070 * disasm.c (do_mixed_source_and_assembly_deprecated): Use
5071 gdb::optional, ui_out_emit_list, ui_out_emit_tuple.
5072 (do_mixed_source_and_assembly): Likewise.
5073
5074 2017-10-17 Tom Tromey <tom@tromey.com>
5075
5076 * regcache.c (regcache::xfer_part): Remove assertion.
5077
5078 2017-10-17 Pedro Alves <palves@redhat.com>
5079
5080 * xml-support.c (xml_fetch_content_from_file): Call
5081 unique_ptr::release() instead unique_ptr::get() when passing
5082 through xrealloc.
5083
5084 2017-10-17 Yao Qi <yao.qi@linaro.org>
5085
5086 * regcache.c (regcache::xfer_part): Remove parameters read and
5087 write, add parameter is_raw. All callers are updated.
5088
5089 2017-10-16 Keith Seitz <keiths@redhat.com>
5090
5091 * c-typeprint.c (enum access_specifier): Moved here from
5092 c_type_print_base.
5093 (output_access_specifier): New function.
5094 (c_type_print_base): Consider typedefs when assessing
5095 whether access labels are needed.
5096 Use output_access_specifier as needed.
5097 Output access specifier for typedefs, if needed.
5098 * dwarf2read.c (dwarf2_add_typedef): Record DW_AT_accessibility.
5099 * gdbtypes.h (struct typedef_field) <is_protected, is_private>: New
5100 fields.
5101 (TYPE_TYPEDEF_FIELD_PROTECTED, TYPE_TYPEDEF_FIELD_PRIVATE): New
5102 accessor macros.
5103
5104 2017-10-16 Tom Tromey <tom@tromey.com>
5105
5106 * linux-tdep.c (linux_info_proc, linux_find_memory_regions_full)
5107 (linux_fill_prpsinfo, linux_vsyscall_range_raw): Update.
5108 * target.c (target_fileio_read_stralloc): Update.
5109 * sparc64-tdep.c (adi_is_addr_mapped): Update.
5110 * target.h (target_fileio_read_stralloc): Return
5111 unique_xmalloc_ptr.
5112
5113 2017-10-16 Tom Tromey <tom@tromey.com>
5114
5115 * xml-syscall.c (xml_init_syscalls_info): Update.
5116 * xml-support.c (xinclude_start_include): Update.
5117 (xml_fetch_content_from_file): Return unique_xmalloc_ptr.
5118 * xml-support.h (xml_fetch_another): Return unique_xmalloc_ptr.
5119 (xml_fetch_content_from_file): Likewise.
5120 * osdata.c (get_osdata): Update.
5121 * target.h (target_read_stralloc, target_get_osdata): Return
5122 unique_xmalloc_ptr.
5123 * solib-aix.c (solib_aix_get_library_list): Update.
5124 * solib-target.c (solib_target_current_sos): Update.
5125 * solib-svr4.c (svr4_current_sos_via_xfer_libraries): Update.
5126 * xml-tdesc.c (fetch_available_features_from_target): Update.
5127 (target_fetch_description_xml): Update.
5128 (file_read_description_xml): Update.
5129 * remote.c (remote_get_threads_with_qxfer, remote_memory_map)
5130 (remote_traceframe_info, btrace_read_config, remote_read_btrace)
5131 (remote_pid_to_exec_file): Update.
5132 * target.c (target_read_stralloc): Return unique_xmalloc_ptr.
5133 (target_get_osdata): Likewise.
5134
5135 2017-10-16 Tom Tromey <tom@tromey.com>
5136
5137 * remote.c (remote_register_number_and_offset): Use std::vector.
5138 (remote_set_syscall_catchpoint): Use gdb::unique_xmalloc_ptr.
5139 (putpkt_binary): Use gdb::def_vector.
5140 (compare_sections_command): Use gdb::byte_vector.
5141
5142 2017-10-16 Tom Tromey <tom@tromey.com>
5143
5144 * ppc-linux-nat.c (hwdebug_insert_point): Use
5145 gdb::unique_xmalloc_ptr, XDUP.
5146
5147 2017-10-16 Tom Tromey <tom@tromey.com>
5148
5149 * probe.c (parse_probes): Use std::string.
5150 (info_probes_for_ops, enable_probes_command)
5151 (disable_probes_command): Remove cleanups.
5152
5153 2017-10-16 Tom Tromey <tom@tromey.com>
5154
5155 * buildsym.c (block_compar): Remove.
5156 (end_symtab_get_static_block): Use std::vector.
5157
5158 2017-10-16 Simon Marchi <simon.marchi@ericsson.com>
5159
5160 * memrange.h (struct mem_range): Define operator< and operator==.
5161 (mem_range_s): Remove.
5162 (DEF_VEC_O (mem_range_s)): Remove.
5163 (normalize_mem_ranges): Change parameter type to std::vector.
5164 * memrange.c (compare_mem_ranges): Remove.
5165 (normalize_mem_ranges): Change parameter type to std::vector,
5166 adjust to vector change.
5167 * exec.c (section_table_available_memory): Return vector, remove
5168 parameter.
5169 (section_table_read_available_memory): Adjust to std::vector
5170 change.
5171 * remote.c (remote_read_bytes): Adjust to std::vector
5172 change.
5173 * tracepoint.h (traceframe_available_memory): Change parameter
5174 type to std::vector.
5175 * tracepoint.c (traceframe_available_memory): Change parameter
5176 type to std::vector, adjust.
5177 * gdb/mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to
5178 std::vector change.
5179 * gdb/Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
5180 unittests/memrange-selftests.c.
5181 (SUBDIR_UNITTESTS_OBS): Add memrange-selftests.o.
5182 * gdb/unittests/memrange-selftests.c: New file.
5183
5184 2017-10-16 Pedro Alves <palves@redhat.com>
5185
5186 * elfread.c (probe_key_free): Rename range-for variable.
5187 * probe.c (parse_probes_in_pspace, find_probes_in_objfile)
5188 (find_probe_by_pc, collect_probes): Rename range-for variable.
5189
5190 2017-10-16 Yao Qi <yao.qi@linaro.org>
5191
5192 * features/Makefile (XMLTOC): Remove tic6x-*.xml.
5193 * features/tic6x-c62x.c: Remove.
5194 * features/tic6x-c64x-linux.c: Remove.
5195 * features/tic6x-c64x.c: Remove.
5196 * features/tic6x-c64xp-linux.c: Remove.
5197 * features/tic6x-c64xp.c: Remove.
5198 * tic6x-linux-tdep.c (_initialize_tic6x_linux_tdep): Don't call
5199 initialize_tdesc_tic6x_*_linux functions.
5200 * tic6x-tdep.c (_initialize_tic6x_tdep): Don't call
5201 initialize_tdesc_tic6x_* functions.
5202
5203 2017-10-16 Yao Qi <yao.qi@linaro.org>
5204
5205 * features/Makefile (WHICH): Remove tic6x-c64xp, tic6x-c64x
5206 tic6x-c62x.
5207 * regformats/tic6x-c62x.dat: Remove.
5208 * regformats/tic6x-c64x.dat: Remove.
5209 * regformats/tic6x-c64xp.dat: Remove.
5210
5211 2017-10-15 Simon Marchi <simon.marchi@ericsson.com>
5212
5213 * tracepoint.c (parse_traceframe_info): Return a unique_ptr
5214 (the !HAVE_LIBEXPAT version).
5215
5216 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
5217
5218 * nat/linux-osdata.c (struct pid_pgid_entry) <operator<>: Make
5219 const.
5220
5221 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
5222
5223 * target.h: Include tracepoint.h.
5224 (enum trace_find_type): Move to tracepoint.h.
5225 (struct target_ops) <to_traceframe_info>: Return a unique ptr.
5226 * tracepoint.h: Don't include target.h
5227 (enum trace_find_type): Move from target.h.
5228 (parse_traceframe_info): Return a unique ptr.
5229 * tracepoint.c (current_traceframe_info): Change type to unique
5230 ptr.
5231 (free_traceframe_info): Remove.
5232 (clear_traceframe_info): Don't manually free
5233 current_traceframe_info.
5234 (free_result): Remove.
5235 (parse_traceframe_info): Return a unique ptr.
5236 (get_traceframe_info): Adjust to unique ptr.
5237 * ctf.c (ctf_traceframe_info): Return a unique ptr.
5238 * remote.c (remote_traceframe_info): Return a unique ptr.
5239 * tracefile-tfile.c (tfile_traceframe_info): Return a unique
5240 ptr.
5241 * target-debug.h (target_debug_print_traceframe_info_up): New
5242 macro.
5243 * target-delegates.c: Regenerate.
5244
5245 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
5246
5247 * memrange.h (struct mem_range): Add constructors.
5248 * tracepoint.h (struct traceframe_info) <memory>: Change type to
5249 std::vector<mem_range>.
5250 * tracepoint.c (free_traceframe_info): Don't manually free
5251 vector.
5252 (traceframe_info_start_memory): Adjust to vector change.
5253 (traceframe_available_memory): Likewise.
5254 * tracefile-tfile.c (build_traceframe_info): Likewise.
5255 * ctf.c (ctf_traceframe_info): Likewise.
5256
5257 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
5258
5259 * tracepoint.h (struct traceframe_info) <tvars>: Change type to
5260 std::vector<int>.
5261 * tracepoint.c (free_traceframe_info): Deallocate with delete.
5262 (traceframe_info_start_tvar): Adjust to vector change.
5263 (parse_traceframe_info): Allocate with new.
5264 * ctf.c (ctf_traceframe_info): Allocate with new, adjust to
5265 vector change.
5266 * tracefile-tfile.c (build_traceframe_info): Adjust to vector
5267 change.
5268 tfile_traceframe_info): Allocate with new.
5269 * mi/mi-main.c (mi_cmd_trace_frame_collected): Adjust to vector
5270 change.
5271
5272 2017-10-14 Simon Marchi <simon.marchi@polymtl.ca>
5273
5274 * tracepoint.c (traceframe_info): Rename to...
5275 (current_traceframe_info): ...this.
5276 (clear_traceframe_info): Adjust.
5277 (get_traceframe_info): Adjust.
5278
5279 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
5280
5281 * nat/linux-osdata.c: Include algorithm.
5282 (compare_processes): Remove.
5283 (struct pid_pgid_entry): New struct.
5284 (linux_xfer_osdata_processgroups): Use std::vector instead of
5285 XNEWVEC.
5286
5287 2017-10-14 Simon Marchi <simon.marchi@ericsson.com>
5288
5289 * objfiles.h: Don't include symfile.h.
5290 (struct partial_symbol): Remove forward-declaration.
5291 (struct objfile) <global_psymbols, static_psymbols>: Change type
5292 to std::vector<partial_symbol *>.
5293 * objfiles.c (objfile::objfile): Don't memset those fields.
5294 (objfile::~objfile): Don't free those fields.
5295 * psympriv.h (struct psymbol_allocation_list): Remove
5296 forward-declaration.
5297 (add_psymbol_to_list): Change psymbol_allocation_list parameter
5298 to std::vector.
5299 (start_psymtab_common): Change parameters to std::vector.
5300 * psymtab.c: Include algorithm.
5301 (require_partial_symbols): Call shrink_to_fit.
5302 (find_pc_sect_psymbol): Adjust to vector change.
5303 (match_partial_symbol): Likewise.
5304 (lookup_partial_symbol): Likewise.
5305 (psym_relocate): Likewise.
5306 (dump_psymtab): Likewise.
5307 (recursively_search_psymtabs): Likewise.
5308 (compare_psymbols): Remove.
5309 (sort_pst_symbols): Adjust to vector change.
5310 (start_psymtab_common): Likewise.
5311 (end_psymtab_common): Likewise.
5312 (psymbol_bcache_full): De-constify return value.
5313 (add_psymbol_to_bcache): Likewise.
5314 (extend_psymbol_list): Remove.
5315 (append_psymbol_to_list): Adjust to vector change.
5316 (add_psymbol_to_list): Likewise.
5317 (init_psymbol_list): Likewise.
5318 (maintenance_info_psymtabs): Likewise.
5319 (maintenance_check_psymtabs): Likewise.
5320 * symfile.h (struct psymbol_allocation_list): Remove.
5321 * symfile.c (reread_symbols): Adjust to vector change.
5322 * dbxread.c (start_psymtab): Change type of parameters.
5323 (dbx_symfile_read): Adjust to vector change.
5324 (read_dbx_symtab): Likewise.
5325 (start_psymtab): Change type of parameters.
5326 * dwarf2read.c (dwarf2_build_psymtabs): Adjust to vector change.
5327 (create_partial_symtab): Likewise.
5328 (add_partial_symbol): Likewise.
5329 (write_one_signatured_type): Likewise.
5330 (recursively_write_psymbols): Likewise.
5331 * mdebugread.c (parse_partial_symbols): Likewise.
5332 * xcoffread.c (xcoff_start_psymtab): Change type of parameters.
5333 (scan_xcoff_symtab): Adjust to vector change.
5334 (xcoff_initial_scan): Likewise.
5335
5336 2017-10-13 Simon Marchi <simon.marchi@ericsson.com>
5337
5338 * ada-typeprint.c (print_dynamic_range_bound): Use std::string.
5339
5340 2017-10-13 Yao Qi <yao.qi@linaro.org>
5341
5342 * features/Makefile: Remove tic6x-*-expedite, add tic6x-expedite.
5343 Remove s390x-*-expedite, add s390x-expedite.
5344
5345 2017-10-13 Yao Qi <yao.qi@linaro.org>
5346
5347 * features/s390-gs-linux64.c: Regenerated.
5348 * features/s390x-gs-linux64.c: Regenerated.
5349
5350 2017-10-13 Tom Tromey <tom@tromey.com>
5351
5352 * compile/compile-object-run.c (do_module_cleanup): Use delete.
5353 * solib.c (update_solib_list, reload_shared_libraries_1): Use
5354 delete.
5355 * symfile.c (symbol_file_add_with_addrs): Use new.
5356 (symbol_file_add_separate): Update comment.
5357 (syms_from_objfile_1, remove_symbol_file_command): Use delete.
5358 * jit.c (jit_object_close_impl): Use new.
5359 (jit_unregister_code): Use delete.
5360 * objfiles.c (objfile::objfile): Rename from allocate_objfile.
5361 (~objfile): Rename from free_objfile.
5362 (free_objfile_separate_debug, do_free_objfile_cleanup)
5363 (free_all_objfiles, objfile_purge_solibs): Use delete.
5364 * objfiles.h (struct objfile): Add constructor and destructor.
5365 Use DISABLE_COPY_AND_ASSIGN. Add initializers to data members.
5366 (allocate_objfile, free_objfile): Don't declare.
5367 (struct objstats): Add initializers.
5368
5369 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
5370
5371 * arch-utils.h (simple_displaced_step_copy_insn): Remove.
5372 * arch-utils.c (simple_displaced_step_copy_insn): Remove.
5373 * gdbarch.sh (displaced_step_copy_insn): Adjust comment.
5374 * gdbarch.h: Regenerate.
5375 * i386-linux-tdep.c (i386_linux_displaced_step_copy_insn):
5376 Adjust comment.
5377 * i386-tdep.c (i386_displaced_step_copy_insn): Adjust comment.
5378 (i386_displaced_step_fixup): Adjust comment.
5379 * rs6000-tdep.c (ppc_displaced_step_copy_insn): Adjust comment.
5380
5381 2017-10-12 Tom Tromey <tom@tromey.com>
5382
5383 * prologue-value.h (pv_area::store_would_trash): Return bool.
5384 (pv_area::find_reg): Likewise.
5385 * prologue-value.c (pv_area::store_would_trash): Return bool.
5386 (pv_area::find_reg): Likewise.
5387
5388 2017-10-12 Tom Tromey <tom@tromey.com>
5389
5390 * s390-linux-tdep.c (s390_store, s390_load)
5391 (s390_check_for_saved, s390_analyze_prologue): Update.
5392 * rx-tdep.c (check_for_saved, rx_analyze_prologue): Update.
5393 * rl78-tdep.c (rl78_analyze_prologue, check_for_saved): Update.
5394 * prologue-value.h (class pv_area): Move from prologue-value.c.
5395 Change names of members. Add constructor, destructor, member
5396 functions.
5397 (make_pv_area, free_pv_area, make_cleanup_free_pv_area)
5398 (pv_area_store, pv_area_fetch, pv_area_store_would_trash)
5399 (pv_area_fetch, pv_area_scan): Don't declare.
5400 * prologue-value.c (struct pv_area::area_entry): Now member of
5401 pv_area.
5402 (struct pv_area): Move to prologue-value.h.
5403 (pv_area::pv_area): Rename from make_pv_area.
5404 (pv_area::~pv_area): Rename from free_pv_area.
5405 (do_free_pv_area_cleanup, make_cleanup_free_pv_area): Remove.
5406 (clear_entries, find_entry, overlaps, store_would_trash, store)
5407 (fetch, find_reg, scan): Now member of pv_area.
5408 Remove "area" argument. Update.
5409 * msp430-tdep.c (check_for_saved, msp430_analyze_prologue):
5410 Update.
5411 * mn10300-tdep.c (push_reg, check_for_saved)
5412 (mn10300_analyze_prologue): Update.
5413 * mep-tdep.c (is_arg_spill, check_for_saved)
5414 (mep_analyze_prologue): Update.
5415 * m32c-tdep.c (m32c_pv_push, m32c_srcdest_fetch)
5416 (m32c_srcdest_store, m32c_pv_enter, m32c_is_arg_spill)
5417 (m32c_is_struct_return, m32c_analyze_prologue): Update.
5418 * arm-tdep.c (thumb_analyze_prologue, arm_analyze_prologue):
5419 Update.
5420 * arc-tdep.c (arc_is_in_prologue, arc_analyze_prologue): Update.
5421 * aarch64-tdep.c (aarch64_analyze_prologue): Update.
5422
5423 2017-10-12 Simon Marchi <simon.marchi@ericsson.com>
5424
5425 * linux-nat.h (linux_nat_set_delete_thread): New declaration.
5426 * linux-nat.c (linux_nat_delete_thread): New variable.
5427 (lwp_free): Invoke linux_nat_delete_thread if set.
5428 (linux_nat_set_delete_thread): New function.
5429 * aarch64-linux-nat.c (_initialize_aarch64_linux_nat): Assign
5430 thread delete callback.
5431 * arm-linux-nat.c (arm_linux_delete_thread): New function.
5432 (_initialize_arm_linux_nat): Assign thread delete callback.
5433 * s390-linux-nat.c (s390_delete_thread): New function.
5434 (_initialize_s390_nat): Assign thread delete callback.
5435 * x86-linux-nat.c (x86_linux_add_target): Likewise.
5436 * nat/aarch64-linux.c (aarch64_linux_delete_thread): New
5437 function.
5438 * nat/aarch64-linux.h (aarch64_linux_delete_thread): New
5439 declaration.
5440 * nat/x86-linux.c (x86_linux_delete_thread): New function.
5441 * nat/x86-linux.h (x86_linux_delete_thread): New declaration.
5442
5443 2017-10-09 Tom Tromey <tom@tromey.com>
5444
5445 * tui/tui-win.c (tui_set_win_height, parse_scrolling_args): Use
5446 std::string.
5447 * tui/tui-layout.c (enum tui_status): Use std::string.
5448
5449 2017-10-11 Tom Tromey <tom@tromey.com>
5450
5451 * gdbthread.h (thread_command): Constify.
5452 * inferior.h (detach_command): Constify.
5453 * top.h (set_history, show_history): Constify.
5454 * arm-tdep.c (set_arm_command, show_arm_command): Constify.
5455 * serial.c (serial_set_cmd, serial_show_cmd): Constify.
5456 * bsd-kvm.c (bsd_kvm_cmd): Constify.
5457 * printcmd.c (set_command): Constify.
5458 (non_const_set_command): New function.
5459 * dcache.c (set_dcache_command, show_dcache_command): Constify.
5460 * breakpoint.c (enable_command, disable_command, delete_command)
5461 (catch_command, tcatch_command, set_breakpoint_cmd)
5462 (show_breakpoint_cmd): Constify.
5463 * macrocmd.c (macro_command): Constify.
5464 * infcmd.c (unset_command, kill_command, detach_command)
5465 (info_proc_cmd): Constify.
5466 * i386-tdep.c (set_mpx_cmd, show_mpx_cmd): Constify.
5467 * auto-load.c (show_auto_load_cmd, set_auto_load_cmd)
5468 (info_auto_load_cmd): Constify.
5469 * target-descriptions.c (set_tdesc_cmd, show_tdesc_cmd)
5470 (unset_tdesc_cmd): Constify.
5471 * ada-lang.c (set_ada_command, show_ada_command)
5472 (maint_set_ada_cmd, maint_show_ada_cmd): Constify.
5473 * guile/guile.c (set_guile_command, show_guile_command)
5474 (info_guile_command): Constify.
5475 * tui/tui-win.c (tui_command, set_tui_cmd, show_tui_cmd):
5476 Constify.
5477 * skip.c (skip_command): Constify.
5478 * compile/compile.c (_initialize_compile): Constify.
5479 * dwarf2read.c (set_dwarf_cmd, show_dwarf_cmd): Constify.
5480 * btrace.c (maint_btrace_cmd, maint_btrace_set_cmd)
5481 (maint_btrace_show_cmd, maint_btrace_pt_set_cmd)
5482 (maint_btrace_pt_show_cmd): Constify.
5483 * remote.c (set_remote_cmd, show_remote_cmd, remote_command):
5484 Constify.
5485 * python/python.c (user_show_python, user_set_python): Constify.
5486 * mips-tdep.c (set_mips_command, show_mips_command)
5487 (set_mipsfpu_command): Constify.
5488 * record-btrace.c (cmd_record_btrace_start)
5489 (cmd_set_record_btrace, cmd_show_record_btrace)
5490 (cmd_set_record_btrace_bts, cmd_show_record_btrace_bts)
5491 (cmd_set_record_btrace_pt, cmd_show_record_btrace_pt): Constify.
5492 * rs6000-tdep.c (set_powerpc_command, show_powerpc_command):
5493 Constify.
5494 * symfile.c (overlay_command): Constify.
5495 * spu-tdep.c (set_spu_command, show_spu_command): Constify.
5496 * cli/cli-logging.c (set_logging_command, show_logging_command):
5497 Constify.
5498 * cli/cli-dump.c (dump_command, append_command)
5499 (srec_dump_command, ihex_dump_command, verilog_dump_command)
5500 (tekhex_dump_command, binary_dump_command)
5501 (binary_append_command): Constify.
5502 * cli/cli-decode.c (struct cmd_list_element): Change type of
5503 "fun".
5504 * cli/cli-cmds.c (info_command, show_command, set_debug)
5505 (show_debug): Constify.
5506 (show_command): Add non-const overload.
5507 * top.c (set_history, show_history): Constify.
5508 * sh-tdep.c (set_sh_command, show_sh_command): Constify.
5509 * command.h (add_prefix_cmd): Accept a cmd_const_cfunc_ftype.
5510 * target.c (target_command): Constify.
5511 * sparc64-tdep.c (info_adi_command): Constify.
5512 * record-full.c (cmd_record_full_start): Constify.
5513 (set_record_full_command): Constify. Fix typo.
5514 (show_record_full_command): Constify.
5515 * thread.c (thread_command, thread_apply_command): Constify.
5516 * memattr.c (dummy_cmd): Constify.
5517 * value.c (function_command): Constify.
5518 * frame.c (set_backtrace_cmd, show_backtrace_cmd): Constify.
5519 * probe.c (info_probes_command): Constify.
5520 * ser-tcp.c (set_tcp_cmd, show_tcp_cmd): Constify.
5521 * gnu-nat.c (set_task_cmd, show_task_cmd, set_thread_cmd)
5522 (show_thread_cmd, set_thread_default_cmd)
5523 (show_thread_default_cmd): Constify.
5524 (check_empty): Constify.
5525 * tracepoint.c (tfind_command): Constify.
5526 * cp-support.c (maint_cplus_command): Constify.
5527 * windows-tdep.c (info_w32_command): Constify.
5528 * record.c (cmd_record_start, set_record_command)
5529 (show_record_command, info_record_command, cmd_record_goto):
5530 Constify.
5531 * ravenscar-thread.c (set_ravenscar_command)
5532 (show_ravenscar_command): Constify.
5533 * utils.c (set_internal_problem_cmd, show_internal_problem_cmd):
5534 Constify.
5535 (add_internal_problem_command): Remove casts.
5536 * arc-tdep.c (maintenance_print_arc_command): Constify.
5537 * valprint.c (set_print, show_print, set_print_raw)
5538 (show_print_raw): Constify.
5539 * maint.c (maintenance_command, maintenance_info_command)
5540 (maintenance_print_command, maintenance_set_cmd)
5541 (maintenance_show_cmd, set_per_command_cmd)
5542 (show_per_command_cmd, maintenance_check_command): Constify.
5543 * language.c (set_check, show_check): Constify.
5544 * typeprint.c (show_print_type, set_print_type): Constify.
5545 * go32-nat.c (go32_info_dos_command): Constify.
5546
5547 2017-10-11 Tom Tromey <tom@tromey.com>
5548
5549 * breakpoint.c (prepare_re_set_context): Remove.
5550 (breakpoint_re_set_one): Update. Don't use cleanups.
5551 (breakpoint_re_set): Use scoped_restore, std::string, and
5552 scoped_restore_current_language.
5553
5554 2017-10-11 Tom Tromey <tom@tromey.com>
5555
5556 * breakpoint.c (commands_command_1): Use std::string.
5557 (cleanup_executing_breakpoints): Remove.
5558 (bpstat_do_actions_1): Use scoped_restore.
5559 (bpstat_check_watchpoint): Use std::string.
5560 (decode_static_tracepoint_spec): Likewise.
5561 (break_range_command): Likewise.
5562 (watch_command_1): Likewise.
5563 (compare_breakpoints): Change argument types.
5564 (clear_command): Use std::vector.
5565 (cleanup_executing_breakpoints): Remove.
5566 (update_global_location_list): Use unique_xmalloc_ptr.
5567 (strace_command): Remove unused declaration.
5568
5569 2017-10-11 John Baldwin <jhb@FreeBSD.org>
5570
5571 * Makefile.in (ALLDEPFILES): Add arm-fbsd-nat.c.
5572 * NEWS: Mention new FreeBSD/arm native configuration.
5573 * configure.host: Add arm*-*-freebsd*.
5574 * configure.nat: Likewise.
5575 * arm-fbsd-nat.c: New file.
5576
5577 2017-10-11 John Baldwin <jhb@FreeBSD.org>
5578
5579 * Makefile.in (ALL_TARGET_OBS): Add arm-fbsd-tdep.o.
5580 (ALLDEPFILES): Add arm-fbsd-tdep.c.
5581 * NEWS: Mention new FreeBSD/arm target.
5582 * configure.tgt: Add arm*-*-freebsd*.
5583 * arm-fbsd-tdep.c: New file.
5584 * arm-fbsd-tdep.h: New file.
5585
5586 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
5587
5588 * linux-tdep.c (linux_make_corefile_notes): Remove call to
5589 `gdbarch_elfcore_write_linux_prpsinfo'.
5590 * gdbarch.sh (elfcore_write_linux_prpsinfo): Remove architecture
5591 method.
5592 (elf_internal_linux_prpsinfo): Remove declaration.
5593 * gdbarch.h: Regenerate.
5594 * gdbarch.c: Regenerate.
5595
5596 2017-10-11 Maciej W. Rozycki <macro@imgtec.com>
5597
5598 * ppc-linux-tdep.c (ppc_linux_init_abi): Remove call to
5599 `set_gdbarch_elfcore_write_linux_prpsinfo'.
5600
5601 2017-10-11 Pedro Alves <palves@redhat.com>
5602
5603 * breakpoint.c (reattach_breakpoints): Delete.
5604 * breakpoint.h (reattach_breakpoints): Delete.
5605
5606 2017-10-11 Simon Marchi <simon.marchi@ericsson.com>
5607
5608 * symfile.c (registered_sym_fns): Make struct, not typedef.
5609 (DEF_VEC_O (registered_sym_fns)): Remove.
5610 (symtab_fns): Change type to std::vector.
5611 (add_symtab_fns): Adjust.
5612 (find_sym_fns): Adjust.
5613
5614 2017-10-11 Anton Kolesov <Anton.Kolesov@synopsys.com>
5615
5616 * arc-tdep.c (arc_gdbarch_init): Pass proper cpu value to disassembler.
5617 * arc-tdep.h (arc_arch_is_em): New function.
5618 (arc_arch_is_hs): Likewise.
5619
5620 2017-10-11 Egeyar Bagcioglu <egeyar.bagcioglu@oracle.com>
5621
5622 * macrotab.h (macro_lookup_inclusion): Remove unnecessary
5623 parentheses in the declaration.
5624 (macro_lookup_inclusion): Likewise.
5625 (macro_lookup_definition): Likewise.
5626 * p-lang.h (pascal_builtin_types): Likewise.
5627 * tui/tui-data.c (tui_win_list): Likewise.
5628 * tui/tui-data.h (tui_win_list): Likewise.
5629 * utils.h (make_cleanup_free_section_addr_info): Likewise.
5630
5631 2017-10-11 Mark Rages <markrages@gmail.com>
5632
5633 * target-memory.c (block_boundaries): Fix for block address not
5634 aligned on block size.
5635
5636 2017-10-10 Pedro Alves <palves@redhat.com>
5637 Tom Tromey <tom@tromey.com>
5638
5639 * breakpoint.c (struct captured_breakpoint_query_args)
5640 (do_captured_breakpoint_query, gdb_breakpoint_query): Delete.
5641 (print_breakpoint): New.
5642 * breakpoint.h (print_breakpoint): Declare.
5643 * common/common-exceptions.h (enum return_reason): Remove
5644 references to catch_exceptions.
5645 * exceptions.c (catch_exceptions, catch_exceptions_with_msg):
5646 Delete.
5647 * exceptions.h (catch_exceptions_ftype, catch_exceptions)
5648 (catch_exception_ftype, catch_exceptions_with_msg): Delete.
5649 * gdb.h: Delete.
5650 * gdbthread.h (thread_select): Declare.
5651 * mi/mi-cmd-break.c: Don't include gdb.h.
5652 (breakpoint_notify): Use print_breakpoint.
5653 * mi/mi-cmd-catch.c: Don't include gdb.h.
5654 * mi/mi-interp.c: Don't include gdb.h.
5655 (mi_print_breakpoint_for_event): New.
5656 (mi_breakpoint_created, mi_breakpoint_modified): Use
5657 mi_print_breakpoint_for_event.
5658 * mi/mi-main.c: Don't include gdb.h.
5659 (mi_cmd_thread_select): Parse the global thread ID here. Use
5660 thread_select instead of gdb_thread_select.
5661 (mi_cmd_thread_list_ids): Output "thread-ids" tuple here instead
5662 of using gdb_list_thread_ids.
5663 * remote-fileio.c (do_remote_fileio_request): Change type. Reply
5664 FILEIO_ENOSYS here.
5665 (remote_fileio_request): Use TRY/CATCH instead of
5666 catch_exceptions.
5667 * symfile-mem.c (struct symbol_file_add_from_memory_args)
5668 (symbol_file_add_from_memory_wrapper): Delete.
5669 (add_vsyscall_page): Use TRY/CATCH instead of catch_exceptions.
5670 * thread.c: Don't include gdb.h.
5671 (do_captured_list_thread_ids, gdb_list_thread_ids): Delete.
5672 (thread_alive): Use thread_select.
5673 (do_captured_thread_select): Delete, parts salvaged as ...
5674 (thread_select): ... this new function.
5675 (gdb_thread_select): Delete.
5676
5677 2017-10-10 Pedro Alves <palves@redhat.com>
5678 Tom Tromey <tom@tromey.com>
5679
5680 * breakpoint.c (breakpoint_cond_eval): Change return type to bool
5681 and reverse logic.
5682 (WP_DELETED, WP_VALUE_CHANGED, WP_VALUE_NOT_CHANGED, WP_IGNORE):
5683 No longer macros. Instead ...
5684 (enum wp_check_result): They're now values of this new
5685 enumeration.
5686 (watchpoint_check): Change return type to wp_check_result and
5687 parameter type to bpstat.
5688 (bpstat_check_watchpoint): Use TRY/CATCH instead of catch_errors.
5689 (bpstat_check_breakpoint_conditions): Use TRY/CATCH instead of
5690 catch_errors. Reverse logic of watchpoint_check call.
5691 (breakpoint_re_set_one): Now returns void and takes a breakpoint
5692 pointer as parameter.
5693 (breakpoint_re_set): Use TRY/CATCH instead of catch_errors.
5694 * common/common-exceptions.c (throw_exception_sjlj): Update
5695 comments to avoid mentioning catch_errors.
5696 * exceptions.c (catch_errors): Delete.
5697 * exceptions.h: Update comments to avoid mentioning catch_errors.
5698 (catch_errors_ftype, catch_errors): Delete.
5699 * infrun.c (normal_stop): Use TRY/CATCH instead of catch_errors.
5700 (hook_stop_stub): Delete.
5701 (restore_selected_frame): Change return type to void, and
5702 parameter type to const frame_id &.
5703 (restore_infcall_control_state): Use TRY/CATCH instead of
5704 catch_errors.
5705 * main.c (captured_command_loop): Return void and remove
5706 parameter. Remove references to catch_errors.
5707 (captured_main): Use TRY/CATCH instead of catch_errors.
5708 * objc-lang.c (objc_submethod_helper_data)
5709 (find_objc_msgcall_submethod_helper): Delete.
5710 (find_objc_msgcall_submethod): Use TRY/CATCH instead of
5711 catch_errors.
5712 * record-full.c (record_full_message): Return void.
5713 (record_full_message_args, record_full_message_wrapper): Delete.
5714 (record_full_message_wrapper_safe): Return bool and use TRY/CATCH
5715 instead of catch_errors.
5716 * solib-aix.c (solib_aix_open_symbol_file_object): Change
5717 parameter type to int.
5718 * solib-darwin.c (open_symbol_file_object): Ditto.
5719 * solib-dsbt.c (open_symbol_file_object): Ditto.
5720 * solib-frv.c (open_symbol_file_object): Ditto.
5721 * solib-svr4.c (open_symbol_file_object): Ditto.
5722 * solib-target.c (solib_target_open_symbol_file_object): Ditto.
5723 * solib.c (update_solib_list): Use TRY/CATCH instead of
5724 catch_errors.
5725 * solist.h (struct target_so_ops) <open_symbol_file_object>:
5726 Change type.
5727 * symmisc.c (struct print_symbol_args): Remove.
5728 (dump_symtab_1): Use TRY/CATCH instead of catch_errors.
5729 (print_symbol): Change type.
5730 * windows-nat.c (handle_load_dll, handle_unload_dll): Return void
5731 and remove parameters.
5732 (catch_errors): New.
5733 (get_windows_debug_event): Adjust.
5734
5735 2017-10-09 Tom Tromey <tom@tromey.com>
5736
5737 * mi/mi-main.c (free_splay_tree): Remove.
5738 (list_available_thread_groups): Use splay_tree_up.
5739 * common/gdb_splay_tree.h: New file.
5740
5741 2017-10-09 Tom Tromey <tom@tromey.com>
5742
5743 * mi/mi-main.c (do_nothing): Remove.
5744 (list_available_thread_groups): Update.
5745
5746 2017-10-09 Pedro Alves <palves@redhat.com>
5747
5748 * infrun.c (handle_inferior_event_1) <TARGET_WAITKIND_EXECD>: Skip
5749 reading registers when switching context.
5750
5751 2017-10-09 John Baldwin <jhb@FreeBSD.org>
5752
5753 * fbsd-nat.c (fbsd_siginfo_size): Use gdbarch_long_bit.
5754 (fbsd_convert_siginfo): Likewise.
5755 * fbsd-tdep.c (fbsd_core_xfer_siginfo): Likewise.
5756
5757 2017-10-09 Simon Marchi <simon.marchi@polymtl.ca>
5758
5759 * configure.ac (try_guile_versions): Remove guile-2.2.
5760 * configure: Regenerate.
5761
5762 2017-10-09 Tom Tromey <tom@tromey.com>
5763
5764 * Makefile.in (COMPILE.post, POSTCOMPILE): Restore $(basename).
5765 (COMPILE.pre): Use $(CXX).
5766
5767 2017-10-09 Pedro Alves <palves@redhat.com>
5768
5769 * cp-support.c (cp_remove_params): Return a gdb::unique_xmalloc_ptr.
5770 Use bool.
5771 (overload_list_add_symbol): Adjust to use gdb::unique_xmalloc_ptr.
5772 * cp-support.h (cp_remove_params): Now returns a
5773 gdb::unique_xmalloc_ptr.
5774 * dwarf2read.c (find_slot_in_mapped_hash): Now returns bool.
5775 Adjust to cp_remove_params returning a gdb::unique_xmalloc_ptr.
5776 * psymtab.c (psymtab_search_name): Adjust to cp_remove_params
5777 returning a gdb::unique_xmalloc_ptr.
5778 (lookup_partial_symbol): Adjust to use gdb::unique_xmalloc_ptr.
5779 * stack.c (find_frame_funname): Adjust to cp_remove_params
5780 returning a gdb::unique_xmalloc_ptr.
5781
5782 2017-10-08 Tom Tromey <tom@tromey.com>
5783
5784 * dwarf2read.c (dwarf2_get_dwz_file): Use
5785 gdb::unique_xmalloc_ptr.
5786 (find_slot_in_mapped_hash): Likewise.
5787 (dwarf2_physname): Likewise.
5788 (create_dwo_unit_in_dwp_v1): Use std::string.
5789 (create_dwo_unit_in_dwp_v2): Likewise.
5790 (lookup_dwo_cutu): Likewise.
5791 (inherit_abstract_dies): Use std::vector.
5792 (read_array_type): Likewise.
5793 (dwarf_decode_macros): Remove unused declaration.
5794 (unsigned_int_compar): Remove.
5795 (dwarf2_build_psymtabs_hard): Use scoped_restore.
5796 (psymtabs_addrmap_cleanup): Remove.
5797
5798 2017-10-08 Tom Tromey <tom@tromey.com>
5799
5800 * frame-unwind.c (frame_unwind_try_unwinder): Update.
5801 * frame.h (frame_cleanup_after_sniffer): Declare.
5802 (frame_prepare_for_sniffer): Return void.
5803 * frame.c (frame_cleanup_after_sniffer): No longer static. Change
5804 type of argument.
5805 (frame_prepare_for_sniffer): Return void.
5806
5807 2017-10-08 Tom Tromey <tom@tromey.com>
5808
5809 * utils.h (make_cleanup_value_free): Remove.
5810 * utils.c (do_value_free, struct cleanup): Remove.
5811 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full) <DWARF_VALUE_STACK>:
5812 Use gdb_value_up.
5813 * value.h (struct value_deleter): New.
5814 (gdb_value_up): New typedef.
5815
5816 2017-10-08 Tom Tromey <tom@tromey.com>
5817
5818 * symtab.c (free_search_symbols, do_free_search_symbols_cleanup)
5819 (make_cleanup_free_search_symbols): Remove.
5820 (search_symbols): Return std::vector.
5821 (symbol_search::compare_search_syms): Now member of
5822 symbol_search. Change arguments.
5823 (sort_search_symbols_remove_dups): Change arguments. Rewrite.
5824 (symtab_symbol_info, rbreak_command): Update.
5825 * symtab.h (struct symbol_search) <next>: Remove.
5826 Add constructors.
5827 (symbol_search::operator<): New function.
5828 (symbol_search::operator==): New function.
5829 (search_symbols): Remove std::vector.
5830 (free_search_symbols, make_cleanup_free_search_symbols): Remove.
5831 (symbol_search::compare_search_syms): Declare.
5832
5833 2017-10-06 Yao Qi <yao.qi@linaro.org>
5834
5835 * Makefile.in (ALL_64_TARGET_OBS): Replace aarch64-insn.o with
5836 arch/aarch64-insn.o.
5837 Remove one rule.
5838 * configure.tgt: Replace aarch64-insn.o with arch/aarch64-insn.o.
5839
5840 2017-10-06 Yao Qi <yao.qi@linaro.org>
5841
5842 * Makefile.in (ALL_TARGET_OBS): Replace arm.o, arm-get-next-pcs.o,
5843 and arm-linux.o with arch/arm.o, arch/arm-get-next-pcs.o and
5844 arch/arm-linux.o respectively.
5845 * configure.tgt: Likewise.
5846
5847 2017-10-06 Yao Qi <yao.qi@linaro.org>
5848
5849 * Makefile.in (ALL_TARGET_OBS): Rename i386.o to arch/i386.o.
5850 * configure.tgt (i386_tobjs): Replace i386.o with arch/i386.o.
5851
5852 2017-10-06 Pedro Alves <palves@redhat.com>
5853
5854 * windows-nat.c: Include <algorithm>.
5855
5856 2017-10-06 Yao Qi <yao.qi@linaro.org>
5857
5858 * configure.tgt (i386_tobjs): New variable.
5859 (amd64_tobjs): New variable.
5860 Set $cpu_obs and $os_obs.
5861
5862 2017-10-06 Yao Qi <yao.qi@linaro.org>
5863
5864 * Makefile.in (CONFIG_SRC_SUBDIR): New.
5865 (ALL_64_TARGET_OBS): Replace amd64.o with arch/amd64.o.
5866 (clean): Remove object files and dependency files.
5867 (distclean): Remove the directory.
5868 * configure.ac: Invoke AC_CONFIG_COMMANDS.
5869 * configure: Re-generated.
5870 * configure.tgt: Replace amd64.o with arch/amd64.o.
5871
5872 2017-10-05 Jose E. Marchesi <jose.marchesi@oracle.com>
5873
5874 PR build/22188
5875 * arm-tdep.c (arm_decode_misc_memhint_neon): Fix decoding of CPS
5876 and SETEND.
5877
5878 2017-10-05 Pedro Alves <palves@redhat.com>
5879
5880 * linux-nat.c (linux_child_follow_fork): When following the parent
5881 and detaching the child, consult the parent thread's architecture
5882 instead of the child's.
5883
5884 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
5885
5886 * ax.h: Do not include "doublest.h".
5887 (union agent_val): Remove.
5888
5889 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
5890
5891 * dfp.h (MAX_DECIMAL_STRING): Move to dfp.c.
5892 (decimal_to_string): Return std::string object.
5893 (decimal_from_string): Accept std::string object. Return bool.
5894 (decimal_from_integral, decimal_from_doublest): Remove.
5895 (decimal_from_longest): Add prototype.
5896 (decimal_from_ulongest): Likewise.
5897 (decimal_to_longest): Likewise.
5898 (decimal_from_doublest): Likewise.
5899 * dfp.c: Do not include "gdbtypes.h" or "value.h".
5900 (MAX_DECIMAL_STRING): Move here.
5901 (decimal_to_string): Return std::string object.
5902 (decimal_from_string): Accept std::string object. Return bool.
5903 (decimal_from_integral): Remove, replace by ...
5904 (decimal_from_longest, decimal_from_ulongest): ... these new functions.
5905 (decimal_to_longest): New function.
5906 (decimal_from_floating): Remove, replace by ...
5907 (decimal_from_doublest): ... this new function.
5908 (decimal_to_doublest): Update to new decimal_to_string interface.
5909
5910 * value.c (unpack_long): Use decimal_to_longest.
5911 * valops.c (value_cast): Use decimal_from_doublest instead of
5912 decimal_from_floating. Use decimal_from_[u]longest isntead of
5913 decimal_from_integral.
5914 * valarith.c (value_args_as_decimal): Likewise.
5915 * valprint.c (print_decimal_floating): Update to new
5916 decimal_to_string interface.
5917 * printcmd.c (printf_decfloat): Likewise.
5918 * c-exp.y (parse_number): Update to new decimal_from_string interface.
5919
5920 2017-10-05 Ulrich Weigand <uweigand@de.ibm.com>
5921
5922 * doublest.h: Do not include "floatformat.h". Remove stale comments.
5923 * gdbtypes.c: Include "floatformat.h".
5924 * value.c: Likewise.
5925 * m68k-tdep.c: Likewise.
5926
5927 * findvar.c: Do not include "floatformat.h".
5928 * amd64-darwin-tdep.c: Likewise.
5929 * arm-linux-tdep.c: Likewise.
5930 * i386-darwin-tdep.c: Likewise.
5931 * i387-tdep.c: Likewise.
5932 * m68k-linux-tdep.c: Likewise.
5933 * mep-tdep.c: Likewise.
5934 * mips-tdep.c: Likewise.
5935 * nios2-tdep.c: Likewise.
5936 * s390-linux-tdep.c: Likewise.
5937 * sparc-obsd-tdep.c: Likewise.
5938 * sparc-tdep.c: Likewise.
5939 * sparc64-tdep.c: Likewise.
5940 * spu-tdep.c: Likewise.
5941 * tic6x-tdep.c: Likewise.
5942 * tilegx-tdep.c: Likewise.
5943 * vax-tdep.c: Likewise.
5944 * xstormy16-tdep.c: Likewise.
5945 * xtensa-tdep.c: Likewise.
5946
5947 * top.c: Do not include "doublest.h".
5948 * aarch64-tdep.c: Likewise.
5949 * alpha-tdep.c: Likewise.
5950 * arm-linux-tdep.c: Likewise.
5951 * m68k-linux-tdep.c: Likewise.
5952 * tilegx-tdep.c: Likewise.
5953 * xstormy16-tdep.c: Likewise.
5954
5955 2017-10-05 John Baldwin <jhb@FreeBSD.org>
5956
5957 * mips-fbsd-tdep.c (MIPS_INST_ADDIU_A0_SP_N32): Define.
5958 (mipsn32_fbsd_sigframe): Define.
5959 (mips_fbsd_init_abi): Install mipsn32_fbsd_sigframe unwinder
5960 for FreeBSD/mipsn32.
5961
5962 2017-10-05 John Baldwin <jhb@FreeBSD.org>
5963
5964 * fbsd-tdep.c (fbsd_print_auxv_entry): Handle AT_EHDRFLAGS and
5965 AT_HWCAP.
5966
5967 2017-10-05 Tristan Gingold <tgingold@free.fr>
5968
5969 * MAINTAINERS (Misc): Update my email address.
5970
5971 2017-10-04 Pedro Alves <palves@redhat.com>
5972
5973 * remote.c (get_remote_arch_state): New 'gdbarch' parameter. Use
5974 it instead of target_gdbarch.
5975 (get_remote_state, get_remote_packet_size): Adjust
5976 get_remote_arch_state calls, passing down target_gdbarch
5977 explicitly.
5978 (packet_reg_from_regnum, packet_reg_from_pnum): New parameter
5979 'gdbarch' and use it instead of target_gdbarch.
5980 (get_memory_packet_size): Adjust get_remote_arch_state calls,
5981 passing down target_gdbarch explicitly.
5982 (struct stop_reply) <arch>: New field.
5983 (remote_parse_stop_reply): Use the stopped thread's architecture,
5984 not the current inferior's. Save the architecture in the
5985 stop_reply.
5986 (process_stop_reply): Use the stop reply's architecture.
5987 (process_g_packet, remote_fetch_registers)
5988 (remote_prepare_to_store, store_registers_using_G)
5989 (remote_store_registers): Adjust get_remote_arch_state calls,
5990 using the regcache's architecture.
5991 (remote_get_trace_status): Adjust get_remote_arch_state calls,
5992 passing down target_gdbarch explicitly.
5993 * spu-multiarch.c (spu_thread_architecture): Defer to the target
5994 beneath instead of calling target_gdbarch.
5995 * target.c (default_thread_architecture): Use the specified
5996 inferior's architecture, instead of the current inferior's
5997 architecture (via target_gdbarch).
5998
5999 2017-10-04 Pedro Alves <palves@redhat.com>
6000
6001 * regcache.c (get_thread_arch_regcache): Remove null_ptid special
6002 case.
6003 (regcache_print): Handle !target_has_registers here instead.
6004
6005 2017-10-04 Pedro Alves <palves@redhat.com>
6006
6007 * frame.c (create_test_frame): Delete.
6008 * frame.h (create_test_frame): Delete.
6009 * gdbarch-selftests.c: Include gdbthread.h and target.h.
6010 (class regcache_test): Delete.
6011 (test_target_has_registers, test_target_has_stack)
6012 (test_target_has_memory, test_target_prepare_to_store)
6013 (test_target_store_registers): New functions.
6014 (test_target_ops): New class.
6015 (register_to_value_test): Error out if there's already a
6016 process_stratum (or higher) target pushed. Create a fuller mock
6017 environment, with mock target_ops, inferior, address space, thread
6018 and inferior_ptid.
6019 * progspace.c (struct address_space): Move to ...
6020 * progspace.h (struct address_space): ... here.
6021 * regcache.h (regcache::~regcache, regcache::raw_write)
6022 [GDB_SELF_TEST]: No longer virtual.
6023
6024 2017-10-04 Simon Marchi <simon.marchi@ericsson.com>
6025
6026 * mi/mi-main.c (list_available_thread_groups): Reverse filter logic.
6027
6028 2017-10-04 Pedro Alves <palves@redhat.com>
6029
6030 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Move code
6031 out of 'between TRY and CATCH'.
6032
6033 2017-10-04 Pedro Alves <palves@redhat.com>
6034
6035 * cli/cli-cmds.c (complete_command): Add missing END_CATCH.
6036 * common/common-exceptions.h (TRY): Open an outermost scope.
6037 Expand intro comment.
6038 (CATCH): Reindent.
6039 (END_CATCH): Close the outermost scope.
6040 * completer.c (complete_line_internal): Add missing END_CATCH.
6041
6042 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
6043
6044 * NEWS (Changes since GDB 8.0): Add entry about new
6045 'set-cwd-on-gdbserver' feature.
6046 (New remote packets): Add entry for QSetWorkingDir.
6047 * common/common-inferior.h (set_inferior_cwd): New prototype.
6048 * infcmd.c (set_inferior_cwd): Remove "static".
6049 (show_cwd_command): Expand text to include remote debugging.
6050 * remote.c: Add PACKET_QSetWorkingDir.
6051 (remote_protocol_features) <QSetWorkingDir>: New entry for
6052 PACKET_QSetWorkingDir.
6053 (extended_remote_set_inferior_cwd): New function.
6054 (extended_remote_create_inferior): Call
6055 "extended_remote_set_inferior_cwd".
6056 (_initialize_remote): Call "add_packet_config_cmd" for
6057 QSetWorkingDir.
6058
6059 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
6060
6061 * NEWS (New commands): Mention "set/show cwd".
6062 * cli/cli-cmds.c (_initialize_cli_cmds): Mention "set cwd" on
6063 "cd" command's help text.
6064 * common/common-inferior.h (get_inferior_cwd): New prototype.
6065 * infcmd.c (inferior_cwd_scratch): New global variable.
6066 (set_inferior_cwd): New function.
6067 (get_inferior_cwd): Likewise.
6068 (set_cwd_command): Likewise.
6069 (show_cwd_command): Likewise.
6070 (_initialize_infcmd): Add "set/show cwd" commands.
6071 * inferior.h (class inferior) <cwd>: New field.
6072 * nat/fork-inferior.c: Include "gdb_tilde_expand.h".
6073 (fork_inferior): Change inferior's cwd before its execution.
6074 * windows-nat.c (windows_create_inferior): Pass inferior's cwd
6075 to CreateProcess.
6076
6077 2017-10-04 Sergio Durigan Junior <sergiodj@redhat.com>
6078
6079 * Makefile.in (SFILES): Add gdb_tilde_expand.c.
6080 (HFILES_NO_SRCDIR): Add gdb_tilde_expand.h.
6081 (COMMON_OBS): Add gdb_tilde_expand.o.
6082 * common/gdb_tilde_expand.c: New file.
6083 * common/gdb_tilde_expand.h: Likewise.
6084
6085 2017-10-03 Maciej W. Rozycki <macro@imgtec.com>
6086
6087 * gdbarch.sh (objfile): Remove duplicate declaration.
6088 * gdbarch.h: Regenerate.
6089
6090 2017-10-03 Tom Tromey <tom@tromey.com>
6091
6092 * utils.c (internal_vproblem): Use string_vprintf.
6093
6094 2017-10-03 Tom Tromey <tom@tromey.com>
6095
6096 * printcmd.c (info_symbol_command): Use std::string.
6097
6098 2017-10-03 Tom Tromey <tom@tromey.com>
6099
6100 * top.c (gdb_safe_append_history): Use std::string.
6101
6102 2017-10-03 Tom Tromey <tom@tromey.com>
6103
6104 * event-top.c (stdin_event_handler): Update.
6105 * main.c (captured_main_1): Update.
6106 * top.h (make_delete_ui_cleanup): Remove.
6107 (struct ui): Add constructor and destructor.
6108 (new_ui, delete_ui): Remove.
6109 * top.c (make_delete_ui_cleanup): Remove.
6110 (new_ui_command): Use std::unique_ptr.
6111 (delete_ui_cleanup): Remove.
6112 (ui::ui): Rename from new_ui. Update.
6113 (free_ui): Remove.
6114 (ui::~ui): Rename from delete_ui. Update.
6115
6116 2017-10-03 Tom Tromey <tom@tromey.com>
6117
6118 * symfile.c (load_progress): Use gdb::byte_vector.
6119
6120 2017-10-03 Tom Tromey <tom@tromey.com>
6121
6122 * mi/mi-main.c (mi_cmd_trace_frame_collected): Remove unused
6123 declaration.
6124 * printcmd.c (x_command): Remove unused declaration.
6125 * symfile.c (symbol_file_command): Remove unused declaration.
6126
6127 2017-10-03 Tom Tromey <tom@tromey.com>
6128
6129 * utils.c (internal_vproblem): Use std::string.
6130 (defaulted_query): Likewise.
6131
6132 2017-10-03 Tom Tromey <tom@tromey.com>
6133
6134 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Update.
6135 * top.c (execute_command_to_string): Update.
6136 * utils.c (make_cleanup_restore_page_info): Remove.
6137 (do_restore_page_info_cleanup): Remove.
6138 (set_batch_flag_and_restore_page_info):
6139 New.
6140 (make_cleanup_restore_page_info): Remove.
6141 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
6142 (~set_batch_flag_and_restore_page_info): New
6143 (make_cleanup_restore_uinteger): Remove.
6144 (make_cleanup_restore_integer): Remove.
6145 (struct restore_integer_closure): Remove.
6146 (restore_integer): Remove.
6147 * utils.h (struct set_batch_flag_and_restore_page_info): New
6148 class.
6149 (set_batch_flag_and_make_cleanup_restore_page_info): Remove.
6150 (make_cleanup_restore_page_info): Remove.
6151 (make_cleanup_restore_uinteger) Remove.
6152 (make_cleanup_restore_integer) Remove.
6153
6154 2017-10-03 Tom Tromey <tom@tromey.com>
6155
6156 * record-full.h (record_full_gdb_operation_disable_set): Return
6157 scoped_restore_tmpl<int>.
6158 * infrun.c (adjust_pc_after_break): Update.
6159 (handle_signal_stop): Update.
6160 * record-full.c (record_full_gdb_operation_disable_set): Return
6161 scoped_restore_tmpl<int>.
6162 (record_full_wait_1, record_full_insert_breakpoint)
6163 (record_full_remove_breakpoint, record_full_save)
6164 (record_full_goto_insn): Update.
6165
6166 2017-10-02 Tom Tromey <tom@tromey.com>
6167
6168 PR rust/22236:
6169 * rust-lang.c (rust_val_print_str): New function.
6170 (val_print_struct): Call it.
6171 (rust_subscript): Preserve name of slice type.
6172
6173 2017-10-02 Tom Tromey <tom@tromey.com>
6174
6175 * rust-lang.c (rust_subscript): Handle slices in
6176 EVAL_AVOID_SIDE_EFFECTS case.
6177
6178 2017-10-02 Tom Tromey <tom@tromey.com>
6179
6180 * rust-lang.c (rust_slice_type_p): Recognize &str as a slice type.
6181
6182 2017-10-02 Tom Tromey <tom@tromey.com>
6183
6184 * rust-lang.h (rust_slice_type): Add "extern".
6185
6186 2017-10-02 Tom Tromey <tom@tromey.com>
6187 Pedro Alves <palves@redhat.com>
6188
6189 * ada-lang.h (ada_exc_info::operator<): Make const.
6190 (ada_exc_info::operator==): Make const.
6191 * ada-lang.c (ada_exc_info::operator<, ada_exc_info::operator==):
6192 Make const.
6193
6194 2017-09-29 Tom Tromey <tom@tromey.com>
6195
6196 * target.c (read_whatever_is_readable): Change type of "result".
6197 Update.
6198 (free_memory_read_result_vector): Remove.
6199 (read_memory_robust): Change return type. Update.
6200 * mi/mi-main.c (mi_cmd_data_read_memory_bytes): Update. Use
6201 bin2hex, std::string.
6202 * target.h (memory_read_result_s): Remove typedef.
6203 (free_memory_read_result_vector): Remove.
6204 (read_memory_robust): Return std::vector.
6205
6206 2017-09-29 Tom Tromey <tom@tromey.com>
6207
6208 * mi/mi-main.c (captured_mi_execute_command): Use scope_restore.
6209
6210 2017-09-29 Tom Tromey <tom@tromey.com>
6211
6212 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Update.
6213 * ada-lang.h (struct ada_exc_info): Remove typedef. Declare
6214 operator< and operator==.
6215 (ada_exceptions_list): Return a std::vector.
6216 * ada-lang.c (ada_exc_info::operator<): Rename from
6217 compare_ada_exception_info.
6218 (ada_exc_info::operator==): New.
6219 (sort_remove_dups_ada_exceptions_list): Change type of
6220 "exceptions".
6221 (ada_add_standard_exceptions, ada_add_exceptions_from_frame)
6222 (ada_add_global_exceptions): Likewise.
6223 (ada_exceptions_list_1): Return a std::vector.
6224 (ada_exceptions_list): Likewise.
6225
6226 2017-09-29 Tom Tromey <tom@tromey.com>
6227
6228 * mi/mi-main.c (struct print_one_inferior_data) <inferiors>: Now a
6229 'std::set *'.
6230 (print_one_inferior): Update.
6231 (free_vector_of_ints): Remove.
6232 (list_available_thread_groups): Change "ids" to std::set.
6233 (mi_cmd_list_thread_groups): Update.
6234 (struct collect_cores_data) <core>: Now a std::set.
6235 (collect_cores): Update.
6236 (unique): Remove.
6237 (print_one_inferior): Update.
6238
6239 2017-09-29 Tom Tromey <tom@tromey.com>
6240
6241 * mi/mi-main.c (mi_execute_cli_command): Use std::string.
6242 (mi_execute_async_cli_command): Likewise.
6243 (mi_cmd_trace_frame_collected): Use field_fmt.
6244
6245 2017-09-29 Tom Tromey <tom@tromey.com>
6246
6247 * mi/mi-main.c (mi_cmd_data_write_memory_bytes): Use
6248 gdb::byte_vector.
6249
6250 2017-09-29 Tom Tromey <tom@tromey.com>
6251
6252 * mi/mi-parse.c (mi_parse): Remove unused declaration.
6253
6254 2017-09-29 Tom Tromey <tom@tromey.com>
6255
6256 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Don't copy "oarg".
6257
6258 2017-09-29 Tom Tromey <tom@tromey.com>
6259
6260 * varobj.h (varobj_gen_name): Return std::string.
6261 * varobj.c (varobj_gen_name): Return std::string.
6262 * mi/mi-cmd-var.c (mi_cmd_var_create): Use std::string.
6263 (mi_cmd_var_delete): Don't copy "name".
6264
6265 2017-09-29 Tom Tromey <tom@tromey.com>
6266
6267 * mi/mi-cmd-break.c (mi_argv_to_format): Return std::string.
6268 (mi_cmd_break_insert_1): Update.
6269
6270 2017-09-29 Tom Tromey <tom@tromey.com>
6271
6272 * target.h (make_scoped_defer_target_commit_resume): Update.
6273 * target.c (make_scoped_defer_target_commit_resume): Rename from
6274 make_cleanup_defer_target_commit_resume. Return a
6275 scoped_restore.
6276 * infrun.c (proceed): Use make_scoped_defer_target_commit_resume.
6277
6278 2017-09-29 Tom Tromey <tom@tromey.com>
6279
6280 * main.c (captured_main_1): Remove unused declaration.
6281 * spu-multiarch.c (parse_spufs_run): Remove unused declaration.
6282
6283 2017-09-29 Tom Tromey <tom@tromey.com>
6284
6285 * symtab.c (search_symbols): Remove unused outer cleanup.
6286 (make_source_files_completion_list): Remove unused declaration.
6287
6288 2017-09-29 Tom Tromey <tom@tromey.com>
6289
6290 * mt-tdep.c (mt_push_dummy_call): Use gdb::byte_vector.
6291
6292 2017-09-29 Tom Tromey <tom@tromey.com>
6293
6294 * xstormy16-tdep.c (xstormy16_push_dummy_call): Use
6295 gdb::byte_vector.
6296
6297 2017-09-29 Tom Tromey <tom@tromey.com>
6298
6299 * complaints.c (vcomplaint): Use std::string.
6300
6301 2017-09-29 Tom Tromey <tom@tromey.com>
6302
6303 * tracepoint.c (trace_variable_command): Use std::string.
6304 (encode_actions_1): Remove unused declarations.
6305 (create_tsv_from_upload): Use std::string.
6306
6307 2017-09-29 Tom Tromey <tom@tromey.com>
6308
6309 * cp-support.c (gdb_demangle): Use std::string.
6310
6311 2017-09-29 Tom Tromey <tom@tromey.com>
6312
6313 * stack.c (parse_frame_specification): Use std::string
6314 (info_frame_command): Use gdb::unique_xmalloc_ptr.
6315
6316 2017-09-29 Tom Tromey <tom@tromey.com>
6317
6318 * tilegx-tdep.c (tilegx_push_dummy_call): Use gdb::byte_vector.
6319
6320 2017-09-29 Tom Tromey <tom@tromey.com>
6321
6322 * utils.c (vfprintf_maybe_filtered): Use std::string.
6323 (vfprintf_unfiltered): Likewise.
6324
6325 2017-09-29 Tom Tromey <tom@tromey.com>
6326
6327 * event-top.c (top_level_prompt): Return std::string.
6328 (display_gdb_prompt): Update.
6329
6330 2017-09-29 Tom Tromey <tom@tromey.com>
6331
6332 * unittests/common-utils-selftests.c (format): New function.
6333 (string_vprintf_tests): New function.
6334 (_initialize_common_utils_selftests): Register new tests.
6335 * common/common-utils.c (string_vprintf): New function.
6336 * common/common-utils.h (string_vprintf): Declare.
6337
6338 2017-09-29 Pedro Alves <palves@redhat.com>
6339
6340 * common/rsp-low.c (unpack_varlen_hex): Constify.
6341 * common/rsp-low.h (unpack_varlen_hex): Constify.
6342 * linux-nat.c (linux_child_static_tracepoint_markers_by_strid):
6343 Constify.
6344 * remote.c (remote_set_permissions, read_ptid)
6345 (remote_current_thread, remote_get_threads_with_qthreadinfo)
6346 (remote_static_tracepoint_marker_at)
6347 (remote_static_tracepoint_markers_by_strid)
6348 (stop_reply_extract_thread, remote_parse_stop_reply): Constify.
6349 * tracepoint.c (parse_trace_status, parse_tracepoint_status)
6350 (parse_tracepoint_definition, parse_tsv_definition)
6351 (parse_static_tracepoint_marker_definition): Constify.
6352 * tracepoint.h (parse_static_tracepoint_marker_definition)
6353 (parse_trace_status, parse_tracepoint_status)
6354 (parse_tracepoint_definition, parse_tsv_definition): Constify.
6355
6356 2017-09-29 Pedro Alves <palves@redhat.com>
6357
6358 * remote.c (target_buf, target_buf_size): Delete.
6359 (remote_get_noisy_reply): Remove buf_p and sizeof_buf parameters.
6360 Use the connection's packet buffer instead.
6361 All callers adjusted.
6362 (_initialize_remote): Remove references to target_buf and
6363 target_buf_size.
6364
6365 2017-09-28 Pedro Alves <palves@redhat.com>
6366
6367 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
6368 unittests/common-utils-selftests.c.
6369 (SUBDIR_UNITTESTS_OBS): Add common-utils-selftests.o.
6370 (COMMON_OBS): Remove utils-selftests.o.
6371 * utils-selftests.c: Move to ...
6372 * unittests/common-utils-selftests.c: ... here and rename self
6373 test to "string_printf".
6374
6375 2017-09-28 Alexander Shaposhnikov <alexander.v.shaposhnikov@gmail.com> (tiny patch)
6376
6377 * dwarf2read.c (open_and_init_dwp_file): Protect against dwp_file
6378 having NULL cus or tus.
6379
6380 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
6381
6382 * arm-tdep.c: (convert_from_extended): Remove.
6383 (convert_to_extended): Likewise.
6384 (arm_extract_return_value): Use convert_typed_floating.
6385 (arm_store_return_value): Likewise.
6386
6387 * sh-tdep.h (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
6388 * sh-tdep.c: Do not include "floatformat.h".
6389 (sh_littlebyte_bigword_type): New function.
6390 (sh_register_convert_to_virtual): Use convert_typed_floating.
6391 (sh_register_convert_to_raw): Likewise.
6392 * sh64-tdep.c: (struct gdbarch_tdep): Add sh_littlebyte_bigword_type.
6393 (sh64_littlebyte_bigword_type): New function.
6394 (sh64_extract_return_value): Use convert_typed_floating.
6395 (sh64_register_convert_to_virtual): Likewise.
6396 (sh64_register_convert_to_raw): Likewise.
6397
6398 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
6399
6400 * doublest.h (floatformat_from_type): Move to gdbtypes.h.
6401 * doublest.c (floatformat_from_type): Move to gdbtypes.c.
6402
6403 * gdbtypes.h (union type_specific): Make field floatformat hold
6404 just a single struct floatformat, not an array.
6405 (floatformat_from_type): Move here.
6406 * gdbtypes.c (floatformat_from_type): Move here. Update to
6407 changed TYPE_FLOATFORMAT definition.
6408 (verify_floatformat): Update to changed TYPE_FLOATFORMAT.
6409 (recursive_dump_type): Likewise.
6410 (init_float_type): Install correct floatformat for byte order.
6411 (arch_float_type): Likewise.
6412
6413 2017-09-27 Ulrich Weigand <uweigand@de.ibm.com>
6414
6415 * gdbtypes.c (init_type): Change incoming argument from
6416 length-in-bytes to length-in-bits. Assert length is a
6417 multiple of TARGET_CHAR_BITS.
6418 (arch_type, arch_flags_type): Likewise.
6419 (init_integer_type): Update call to init_type.
6420 (init_character_type): Likewise.
6421 (init_boolean_type): Likewise.
6422 (init_float_type): Likewise.
6423 (init_decfloat_type): Likewise.
6424 (init_complex_type): Likewise.
6425 (init_pointer_type): Likewise.
6426 (objfile_type): Likewise.
6427 (arch_integer_type): Update call to arch_type.
6428 (arch_character_type): Likewise.
6429 (arch_boolean_type): Likewise.
6430 (arch_float_type): Likewise.
6431 (arch_decfloat_type): Likewise.
6432 (arch_complex_type): Likewise.
6433 (arch_pointer_type): Likewise.
6434 (gdbtypes_post_init): Likewise.
6435
6436 * dwarf2read.c (dwarf2_init_float_type): Update call to init_type.
6437 (read_base_type): Likewise.
6438 * mdebugread.c (basic_type): Likewise.
6439 * stabsread.c (dbx_init_float_type): Likewise.
6440 (rs6000_builtin_type): Likewise.
6441 (read_range_type): Likewise. Also, fix call to init_integer_type
6442 with erroneous length argument.
6443
6444 * ada-lang.c (ada_language_arch_info): Update call to arch_type.
6445 * d-lang.c (build_d_types): Likewise.
6446 * f-lang.c (build_fortran_types): Likewise.
6447 * go-lang.c (build_go_types): Likewise.
6448 * opencl-lang.c (build_opencl_types): Likewise.
6449 * jit.c (finalize_symtab): Likewise.
6450 * gnu-v3-abi.c (build_gdb_vtable_type): Likewise.
6451 (build_std_type_info_type): Likewise.
6452 * target-descriptions.c (tdesc_gdb_type): Likewise. Also,
6453 update call to arch_flags_type.
6454
6455 * linux-tdep.c (linux_get_siginfo_type_with_fields): Update call to
6456 arch_type.
6457 * fbsd-tdep.c (fbsd_get_siginfo_type): Likewise.
6458 * windows-tdep.c (windows_get_tlb_type): Likewise.
6459
6460 * avr-tdep.c (avr_gdbarch_init): Update call to arch_type.
6461 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
6462 * m32c-tdep.c (make_types): Likewise.
6463 * rl78-tdep.c (rl78_gdbarch_init): Likewise.
6464 (rl78_psw_type): Update call to arch_flags_type.
6465 * m68k-tdep.c (m68k_ps_type): Update call to arch_flags_type.
6466 * rx-tdep.c (rx_psw_type): Likewise.
6467 (rx_fpsw_type): Likewise.
6468 * sparc-tdep.c (sparc_psr_type): Likewise.
6469 (sparc_fsr_type): Likewise.
6470 * sparc64-tdep.c (sparc64_pstate_type): Likewise.
6471 (sparc64_ccr_type): Likewise.
6472 (sparc64_fsr_type): Likewise.
6473 (sparc64_fprs_type): Likewise.
6474
6475 2017-09-27 Tom Tromey <tom@tromey.com>
6476
6477 * findcmd.c (find_command): Constify.
6478
6479 2017-09-27 Tom Tromey <tom@tromey.com>
6480
6481 * ada-tasks.c (task_command_1, task_command): Constify.
6482
6483 2017-09-27 Tom Tromey <tom@tromey.com>
6484
6485 * symtab.c (maintenance_print_symbol_cache)
6486 (maintenance_flush_symbol_cache)
6487 (maintenance_print_symbol_cache_statistics): Constify.
6488
6489 2017-09-27 Tom Tromey <tom@tromey.com>
6490
6491 * inferior.c (detach_inferior_command, kill_inferior_command)
6492 (inferior_command): Constify.
6493
6494 2017-09-27 Tom Tromey <tom@tromey.com>
6495
6496 * regcache.c (regcache_print, maintenance_print_registers)
6497 (maintenance_print_raw_registers)
6498 (maintenance_print_cooked_registers)
6499 (maintenance_print_register_groups)
6500 (maintenance_print_remote_registers): Constify.
6501
6502 2017-09-27 Tom Tromey <tom@tromey.com>
6503
6504 * printcmd.c (map_display_numbers, undisplay_command)
6505 (enable_disable_display_command, enable_display_command)
6506 (disable_display_command): Constify.
6507
6508 2017-09-27 Tom Tromey <tom@tromey.com>
6509
6510 * breakpoint.h (delete_command): Don't declare.
6511 * breakpoint.c (delete_command, enable_once_command)
6512 (enable_count_command, enable_delete_command, breakpoint_1)
6513 (maintenance_info_breakpoints, stopin_command, stopat_command)
6514 (delete_command, delete_trace_command, save_breakpoints)
6515 (save_breakpoints_command, save_tracepoints_command): Constify.
6516
6517 2017-09-27 Tom Tromey <tom@tromey.com>
6518
6519 * macrocmd.c (macro_expand_command, macro_expand_once_command)
6520 (skip_ws, extract_identifier, macro_define_command)
6521 (macro_undef_command, macro_list_command): Constify.
6522
6523 2017-09-27 Tom Tromey <tom@tromey.com>
6524
6525 * infcmd.c (environment_info, set_environment_command)
6526 (unset_environment_command, path_info, info_proc_cmd_1)
6527 (info_proc_cmd_mappings, info_proc_cmd_stat)
6528 (info_proc_cmd_status, info_proc_cmd_cwd, info_proc_cmd_cmdline)
6529 (info_proc_cmd_exe, info_proc_cmd_all): Constify.
6530
6531 2017-09-27 Tom Tromey <tom@tromey.com>
6532
6533 * i386-tdep.c (i386_mpx_info_bounds, i386_mpx_set_bounds):
6534 Constify.
6535
6536 2017-09-27 Tom Tromey <tom@tromey.com>
6537
6538 * symfile-mem.c (add_symbol_file_from_memory_command): Constify.
6539
6540 2017-09-27 Tom Tromey <tom@tromey.com>
6541
6542 * demangle.c (demangle_command): Constify.
6543
6544 2017-09-27 Tom Tromey <tom@tromey.com>
6545
6546 * progspace.c (maintenance_info_program_spaces_command):
6547 Constify.
6548
6549 2017-09-27 Tom Tromey <tom@tromey.com>
6550
6551 * compile/compile.c (check_raw_argument, compile_file_command)
6552 (compile_code_command, compile_print_command): Constify.
6553
6554 2017-09-27 Tom Tromey <tom@tromey.com>
6555
6556 * reggroups.c (maintenance_print_reggroups): Constify.
6557
6558 2017-09-27 Tom Tromey <tom@tromey.com>
6559
6560 * dwarf2read.c (save_gdb_index_command): Constify.
6561
6562 2017-09-27 Tom Tromey <tom@tromey.com>
6563
6564 * stap-probe.c (info_probes_stap_command): Constify.
6565
6566 2017-09-27 Tom Tromey <tom@tromey.com>
6567
6568 * fork-child.c (unset_exec_wrapper_command): Constify.
6569
6570 2017-09-27 Tom Tromey <tom@tromey.com>
6571
6572 * btrace.c (get_uint, get_context_size, no_chunk)
6573 (maint_btrace_packet_history_cmd)
6574 (maint_btrace_clear_packet_history_cmd, maint_btrace_clear_cmd)
6575 (maint_info_btrace_cmd): Constify.
6576
6577 2017-09-27 Tom Tromey <tom@tromey.com>
6578
6579 * reverse.c (delete_bookmark_command): Constify.
6580
6581 2017-09-27 Tom Tromey <tom@tromey.com>
6582
6583 * remote.c (set_memory_packet_size)
6584 (set_memory_write_packet_size, show_memory_write_packet_size)
6585 (set_memory_read_packet_size, show_memory_read_packet_size)
6586 (compare_sections_command, packet_command, remote_put_command)
6587 (remote_get_command, remote_delete_command): Constify.
6588
6589 2017-09-27 Tom Tromey <tom@tromey.com>
6590
6591 * mips-tdep.c (show_mipsfpu_command, set_mipsfpu_single_command)
6592 (set_mipsfpu_double_command, set_mipsfpu_none_command)
6593 (set_mipsfpu_auto_command): Constify.
6594
6595 2017-09-27 Tom Tromey <tom@tromey.com>
6596
6597 * cli/cli-cmds.h (cd_command): Constify.
6598 * cli/cli-cmds.c (cd_command): Constify.
6599
6600 2017-09-27 Tom Tromey <tom@tromey.com>
6601
6602 * thread.c (thread_name_command, thread_find_command): Constify.
6603
6604 2017-09-27 Tom Tromey <tom@tromey.com>
6605
6606 * probe.c (enable_probes_command, disable_probes_command):
6607 Constify.
6608
6609 2017-09-27 Tom Tromey <tom@tromey.com>
6610
6611 * symfile.c (symbol_file_command): Constify.
6612 * gdbcore.h (deprecated_file_changed_hook): Constify.
6613 * exec.c (deprecated_file_changed_hook, exec_file_command)
6614 (file_command): Constify.
6615 * defs.h (symbol_file_command): Constify.
6616
6617 2017-09-27 Tom Tromey <tom@tromey.com>
6618
6619 * remote-fileio.c (set_system_call_allowed)
6620 (show_system_call_allowed): Constify.
6621
6622 2017-09-27 Tom Tromey <tom@tromey.com>
6623
6624 * tracepoint.c (delete_trace_variable_command)
6625 (tfind_end_command, tfind_start_command, tfind_pc_command)
6626 (tfind_tracepoint_command, tfind_line_command)
6627 (tfind_range_command, tfind_outside_command): Constify.
6628
6629 2017-09-27 Tom Tromey <tom@tromey.com>
6630
6631 * ax-gdb.c (maint_agent_printf_command, agent_command)
6632 (agent_eval_command): Constify.
6633
6634 2017-09-27 Tom Tromey <tom@tromey.com>
6635
6636 * tracepoint.c (info_scope_command): Constify.
6637 * python/python.c (gdbpy_decode_line): Constify.
6638 * python/py-breakpoint.c (bppy_init): Constify.
6639 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Constify.
6640 * location.h: (new_linespec_location)
6641 (string_to_event_location_basic, string_to_event_location):
6642 Constify.
6643 * location.c (new_linespec_location)
6644 (string_to_event_location_basic, string_to_event_location):
6645 Constify.
6646 * linespec.h (decode_line_with_current_source)
6647 (decode_line_with_last_displayed, linespec_lex_to_end): Constify.
6648 * linespec.c (linespec_lex_to_end)
6649 (decode_line_with_current_source)
6650 (decode_line_with_last_displayed): Constify.
6651 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x):
6652 Constify.
6653 * cli/cli-cmds.c (edit_command, list_command): Constify.
6654 * breakpoint.h (until_break_command, watch_command_wrapper)
6655 (awatch_command_wrapper, rwatch_command_wrapper)
6656 (init_ada_exception_breakpoint): Constify.
6657 * breakpoint.c (break_command_1, dprintf_command)
6658 (break_range_command, watch_command_wrapper)
6659 (rwatch_command_wrapper, awatch_command_wrapper)
6660 (until_break_command, init_ada_exception_breakpoint)
6661 (strace_marker_create_sals_from_location, trace_command)
6662 (ftrace_command, strace_command, struct tracepoint): Constify.
6663 * ax-gdb.c (agent_command_1): Constify.
6664 * ada-lang.c (ada_exception_sal): Constify.
6665
6666 2017-09-27 Tom Tromey <tom@tromey.com>
6667
6668 * record.c (cmd_record_delete, cmd_record_stop, cmd_record_save)
6669 (cmd_record_goto_begin, cmd_record_goto_end, get_insn_number)
6670 (get_context_size, no_chunk, get_insn_history_modifiers)
6671 (cmd_record_insn_history, get_call_history_modifiers)
6672 (cmd_record_call_history): Constify.
6673
6674 2017-09-27 Tom Tromey <tom@tromey.com>
6675
6676 * source.c (show_substitute_path_command)
6677 (unset_substitute_path_command, set_substitute_path_command):
6678 Constify.
6679
6680 2017-09-27 Tom Tromey <tom@tromey.com>
6681
6682 * typeprint.c (maintenance_print_type): Constify.
6683 * maint.c (maintenance_dump_me, maintenance_demangle)
6684 (maintenance_time_display, maintenance_info_sections)
6685 (maintenance_print_statistics, maintenance_deprecate)
6686 (maintenance_undeprecate): Constify.
6687 (maintenance_do_deprecate): Constify. Use std::string.
6688 (maintenance_selftest): Constify.
6689 * gdbtypes.h (maintenance_print_type): Constify.
6690
6691 2017-09-27 Tom Tromey <tom@tromey.com>
6692
6693 * hppa-tdep.c (unwind_command): Constify.
6694
6695 2017-09-27 Tom Tromey <tom@tromey.com>
6696
6697 * target-descriptions.c (unset_tdesc_filename_cmd)
6698 (maint_print_c_tdesc_cmd, maintenance_check_xml_descriptions):
6699 Constify.
6700
6701 2017-09-27 Tom Tromey <tom@tromey.com>
6702
6703 * dummy-frame.c (maintenance_print_dummy_frames): Constify.
6704
6705 2017-09-27 Tom Tromey <tom@tromey.com>
6706
6707 * tui/tui.c (tui_enable_command, tui_disable_command): Constify.
6708
6709 2017-09-27 Tom Tromey <tom@tromey.com>
6710
6711 * tui/tui-regs.c (tui_reg_command): Constify.
6712
6713 2017-09-27 Tom Tromey <tom@tromey.com>
6714
6715 * skip.c (skip_file_command, skip_function_command)
6716 (skip_enable_command, skip_disable_command, skip_delete_command):
6717 Constify.
6718
6719 2017-09-27 Tom Tromey <tom@tromey.com>
6720
6721 * record-btrace.c (cmd_record_btrace_bts_start)
6722 (cmd_record_btrace_pt_start): Constify.
6723
6724 2017-09-27 Tom Tromey <tom@tromey.com>
6725
6726 * symmisc.c (maintenance_print_symbols)
6727 (maintenance_print_msymbols, maintenance_print_objfiles)
6728 (maintenance_info_symtabs, maintenance_check_symtabs)
6729 (maintenance_expand_symtabs, maintenance_info_line_tables):
6730 Constify.
6731
6732 2017-09-27 Tom Tromey <tom@tromey.com>
6733
6734 * top.c (new_ui_command): Constify.
6735
6736 2017-09-27 Tom Tromey <tom@tromey.com>
6737
6738 * symfile.c (add_symbol_file_command)
6739 (remove_symbol_file_command, list_overlays_command)
6740 (map_overlay_command, unmap_overlay_command)
6741 (overlay_auto_command, overlay_manual_command)
6742 (overlay_off_command, overlay_load_command): Constify.
6743
6744 2017-09-27 Tom Tromey <tom@tromey.com>
6745
6746 * spu-tdep.c (info_spu_event_command, info_spu_signal_command)
6747 (info_spu_mailbox_command, info_spu_dma_command)
6748 (info_spu_proxydma_command): Constify.
6749
6750 2017-09-27 Tom Tromey <tom@tromey.com>
6751
6752 * cli/cli-logging.c (set_logging_on, set_logging_off): Constify.
6753
6754 2017-09-27 Tom Tromey <tom@tromey.com>
6755
6756 * cli/cli-script.c (user_defined_command): Constify.
6757
6758 2017-09-27 Tom Tromey <tom@tromey.com>
6759
6760 * cli/cli-dump.c (dump_memory_command, dump_value_command)
6761 (dump_srec_memory, dump_srec_value, dump_ihex_memory)
6762 (dump_ihex_value, dump_verilog_memory, dump_verilog_value)
6763 (dump_tekhex_memory, dump_tekhex_value, dump_binary_memory)
6764 (dump_binary_value, append_binary_memory, append_binary_value):
6765 Constify.
6766 (struct dump_context) <func>: Constify.
6767 (add_dump_command): Update.
6768
6769 2017-09-27 Tom Tromey <tom@tromey.com>
6770
6771 * cli/cli-cmds.c (show_version, show_configuration)
6772 (source_command, show_user): Constify.
6773
6774 2017-09-27 Tom Tromey <tom@tromey.com>
6775
6776 * target.c (maintenance_print_target_stack): Constify.
6777
6778 2017-09-27 Tom Tromey <tom@tromey.com>
6779
6780 * interps.c (interpreter_exec_cmd): Constify.
6781
6782 2017-09-27 Tom Tromey <tom@tromey.com>
6783
6784 * record-full.c (cmd_record_full_restore): Constify.
6785
6786 2017-09-27 Tom Tromey <tom@tromey.com>
6787
6788 * memattr.c (enable_mem_command, disable_mem_command)
6789 (delete_mem_command): Constify.
6790
6791 2017-09-27 Tom Tromey <tom@tromey.com>
6792
6793 * value.c (show_convenience): Constify.
6794
6795 2017-09-27 Tom Tromey <tom@tromey.com>
6796
6797 * gdbcore.h (core_file_command): Update.
6798 * corefile.c (core_file_command): Constify.
6799
6800 2017-09-27 Tom Tromey <tom@tromey.com>
6801
6802 * user-regs.c (maintenance_print_user_registers): Constify.
6803
6804 2017-09-27 Tom Tromey <tom@tromey.com>
6805
6806 * cp-namespace.c (maintenance_cplus_namespace): Constify.
6807
6808 2017-09-27 Tom Tromey <tom@tromey.com>
6809
6810 * cp-support.c (first_component_command): Constify.
6811
6812 2017-09-27 Tom Tromey <tom@tromey.com>
6813
6814 * psymtab.c (maintenance_print_psymbols)
6815 (maintenance_info_psymtabs, maintenance_check_psymtabs):
6816 Constify.
6817
6818 2017-09-27 Tom Tromey <tom@tromey.com>
6819
6820 * windows-tdep.c (display_tib): Constify.
6821
6822 2017-09-27 Tom Tromey <tom@tromey.com>
6823
6824 * linux-fork.c (delete_checkpoint_command)
6825 (detach_checkpoint_command): Constify.
6826
6827 2017-09-27 Tom Tromey <tom@tromey.com>
6828
6829 * cp-abi.c (set_cp_abi_cmd, show_cp_abi_cmd): Constify.
6830
6831 2017-09-27 Tom Tromey <tom@tromey.com>
6832
6833 * arc-tdep.c (dump_arc_instruction_command): Constify.
6834
6835 2017-09-27 Tom Tromey <tom@tromey.com>
6836
6837 * valprint.c (set_radix, show_radix): Constify.
6838
6839 2017-09-27 Tom Tromey <tom@tromey.com>
6840
6841 * dtrace-probe.c (info_probes_dtrace_command): Constify.
6842
6843 2017-09-27 Tom Tromey <tom@tromey.com>
6844
6845 * command.h (not_just_help_class_command): Update.
6846 * cli/cli-decode.h (not_just_help_class_command): Update.
6847 * cli/cli-decode.c (not_just_help_class_command): Constify.
6848
6849 2017-09-27 Tom Tromey <tom@tromey.com>
6850
6851 * gdb_bfd.c (maintenance_info_bfds): Constify.
6852
6853 2017-09-27 Tom Tromey <tom@tromey.com>
6854
6855 * cli/cli-decode.c (add_cmd, set_cmd_cfunc): New function
6856 overloads.
6857 (do_add_cmd): Rename from add_cmd. Don't call set_cmd_cfunc.
6858 (do_const_cfunc): New function.
6859 (cmd_cfunc_eq): New overload.
6860 (cli_user_command_p): Check do_const_cfunc.
6861 * cli/cli-decode.h (struct cmd_list_element) <function>: New field
6862 const_cfunc.
6863 * command.h (add_cmd): Add const overload and no-function
6864 overload.
6865 (set_cmd_cfunc): Add const overload.
6866 (cmd_const_cfunc_ftype): Declare.
6867 (cmd_cfunc_eq): Add const overload.
6868 * breakpoint.c, cli-cmds.c, cli-dump.c, guile/scm-cmd.c,
6869 python/py-cmd.c, target.c, tracepoint.c: Use no-function add_cmd
6870 overload.
6871
6872 2017-09-27 Tom Tromey <tom@tromey.com>
6873
6874 * macroexp.c (get_next_token_for_substitution): New function.
6875 (substitute_args): Call it. Check for __VA_OPT__.
6876
6877 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
6878 Pedro Alves <palves@redhat.com>
6879
6880 * dwarf2read.c (dwarf2_cu): Remove field producer_is_icc and add
6881 producer_is_icc_lt_14.
6882 (producer_is_icc_lt_14): New function.
6883 (check_producer): Add code for checking version of ICC.
6884 (producer_is_icc): Move to producer.c.
6885 (read_structure_type): Restrict ICC workaround to ICC<14.
6886 * producer.c: Include selftest.h.
6887 (producer_is_icc, producer_parsing_tests, _initialize_producer):
6888 New functions.
6889 * producer.h (producer_is_icc): New declaration.
6890
6891 2017-09-26 Walfred Tedeschi <walfred.tedeschi@intel.com>
6892
6893 * Makefile.in (SFILES): Add producer.c.
6894 (COMMON_OBS): Add producer.o
6895 * amd64-tdep.c (producer.h): Add new include.
6896 * dwarf2read.c (producer.h): Add new include.
6897 * producer.c: New file.
6898 * producer.h: New file.
6899 * utils.c (producer_is_gcc, producer_is_gcc_ge_4): Move to
6900 producer.c.
6901 * utils.h (producer_is_gcc, producer_is_gcc_ge_4): Move to
6902 producer.h.
6903
6904 2017-09-26 Matthias Klose <doko@ubuntu.com>
6905
6906 * configure.ac: Search ncursesw before ncurses.
6907 Check ncursesw/ncurses.h before ncurses/ncurses.h.
6908 * gdb_curses.h: Include <ncursesw/ncurses.h>
6909 * config.in, configure: Regenerate.
6910
6911 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6912
6913 PR gdb/22185
6914 * configure.host <*-*-solaris2.[01], *-*-solaris2.[2-9]*>: Mark as
6915 obsolete.
6916 Use gdb_host sol2 for i[34567]86-*-solaris2*, x86_64-*-solaris2*.
6917 Remove i386sol2 support.
6918 * configure.nat <i386sol2>: Remove.
6919 <sol2-64>: Fold into ...
6920 <sol2>: ... this.
6921 Move common settings to default section.
6922 Add sol-thread.o.
6923 * configure.tgt <i[34567]86-*-solaris2.1[0-9]*,
6924 x86_64-*-solaris2.1[0-9]*>: Rename to ...
6925 <i[34567]86-*-solaris2*, x86_64-*-solaris2*>: ... this.
6926 <i[34567]86-*-solaris*>: Remove.
6927 <sparc-*-solaris2.[0-6], sparc-*-solaris2.[0-6].*>: Remove.
6928
6929 * configure.ac: Remove wctype in libw check.
6930 (_MSE_INT_H): Don't define on Solaris 7-9.
6931 <solaris*>: Remove libthread_db.so.1 check.
6932 * configure: Regenerate.
6933 * config.in: Regenerate.
6934
6935 * proc-service.c: Remove PROC_SERVICE_IS_OLD handling.
6936 (gdb_ps_prochandle_t, gdb_ps_read_buf_t, gdb_ps_write_buf_t)
6937 (gdb_ps_size_t): Remove.
6938 Use base types in users.
6939 * sol-thread.c: Likewise, also for gdb_ps_addr_t.
6940
6941 * NEWS (Changes since GDB 8.0): Document Solaris 2.0-9 removal.
6942
6943 2017-09-26 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
6944
6945 PR build/22206
6946 * sparc64-tdep.c (adi_tag_fd): Print pid as long.
6947 (adi_is_addr_mapped): Likewise.
6948 (PSR_ICC): Don't redefine.
6949 (PSR_IMPL): Likewise.
6950
6951 2017-09-25 Tom Tromey <tom@tromey.com>
6952
6953 * regcache.c (regcache::dump): Use string_printf.
6954
6955 2017-09-25 Tom Tromey <tom@tromey.com>
6956
6957 * regcache.c (class regcache_invalidator): New.
6958 (struct register_to_invalidate): Remove.
6959 (make_cleanup_regcache_invalidate): Remove.
6960 (regcache::raw_write): Use regcache_invalidator.
6961
6962 2017-09-25 Tom Tromey <tom@tromey.com>
6963
6964 * spu-tdep.c (spu2ppu_sniffer): Update.
6965 * regcache.h (make_cleanup_regcache_xfree): Don't declare.
6966 * regcache.c (do_regcache_xfree, make_cleanup_regcache_xfree):
6967 Remove.
6968 * ppc-linux-tdep.c (ppu2spu_sniffer): Update.
6969 * mi/mi-main.c (mi_cmd_data_list_changed_registers): Update.
6970 * frame.h (frame_save_as_regcache): Return std::unique_ptr.
6971 * frame.c (frame_save_as_regcache): Return std::unique_ptr.
6972 (frame_pop): Update.
6973
6974 2017-09-25 Tom Tromey <tom@tromey.com>
6975
6976 * spu-tdep.c (spu2ppu_dealloc_cache): Use delete.
6977 * regcache.h (regcache_xfree): Don't declare.
6978 * regcache.c (regcache_xfree): Remove.
6979 (do_regcache_xfree): Use delete.
6980 * ppc-linux-tdep.c (ppu2spu_dealloc_cache): Use delete.
6981 * linux-fork.c (free_fork): Use delete.
6982 (fork_save_infrun_state): Likewise.
6983 * jit.c (jit_dealloc_cache): Use delete.
6984 * infrun.c (discard_infcall_suspend_state): Use delete.
6985
6986 2017-09-25 Tom Tromey <tom@tromey.com>
6987
6988 * regcache.h (regcache_xmalloc): Don't declare.
6989 (regcache_raw_set_cached_value): Update comment.
6990 * regcache.c (regcache_xmalloc): Remove.
6991 * ppc-linux-tdep.c (ppu2spu_sniffer): Use new.
6992 * jit.c (jit_frame_sniffer): Use new.
6993 * frame.c (frame_save_as_regcache): Use new.
6994
6995 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
6996
6997 * NEWS: Advertise support for guarded-storage registers on IBM z.
6998
6999 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
7000
7001 * s390-linux-nat.c (have_regset_gs): New static variable.
7002 (s390_linux_fetch_inferior_registers): Handle guarded-storage
7003 control block and guarded-storage broadcast control regsets.
7004 (s390_read_description): Detect whether the target has
7005 guarded-storage support, return appropriate tdesc.
7006 * s390-linux-tdep.c (features/s390-gs-linux64.c): New include.
7007 (features/s390x-gs-linux64.c): Likewise.
7008 (struct gdbarch_tdep) <have_gs>: New field.
7009 (s390_regmap_gs, s390_regmap_gsbc, s390_gs_regset)
7010 (s390_gsbc_regset): New variables.
7011 (s390_iterate_over_regset_sections): Iterate over s390_gs_regset
7012 and s390_gsbc_regset, if applicable.
7013 (s390_core_read_description): Check whether core file was from a
7014 target with guarded-storage support; include appropriate regsets.
7015 (s390_gdbarch_init): Add registers for guarded-storage support.
7016 (_initialize_s390_tdep): Initialize new target descriptions that
7017 include registers for guarded-storage support.
7018 * s390-linux-tdep.h (HWCAP_S390_GS, S390_GSD_REGNUM)
7019 (S390_GSSM_REGNUM, S390_GSEPLA_REGNUM)
7020 (S390_BC_GSD_REGNUM, S390_BC_GSSM_REGNUM): New defines.
7021 (S390_NUM_REGS): Adjust macro definition.
7022 (s390_gs_regset, s390_gsbc_regset, tdesc_s390_gs_linux64)
7023 (tdesc_s390x_gs_linux64): New declarations.
7024
7025 2017-09-25 Andreas Arnez <arnez@linux.vnet.ibm.com>
7026
7027 * features/s390-gs-linux64.xml: New file.
7028 * features/s390-gs.xml: New file.
7029 * features/s390-gsbc.xml: New file.
7030 * features/s390x-gs-linux64.xml: New file.
7031 * features/Makefile (WHICH): Add s390-gs-linux64 and
7032 s390x-gs-linux64.
7033 (s390-gs-linux64-expedite, s390x-gs-linux64-expedite): New macros.
7034 (XMLTOC): Add s390-gs-linux64.xml and s390x-linux64.xml.
7035 * features/s390-gs-linux64.c: New generated file.
7036 * features/s390x-gs-linux64.c: New file.
7037 * regformats/s390-gs-linux64.dat: New file.
7038 * regformats/s390x-gs-linux64.dat: New file.
7039
7040 2017-09-23 Tom Tromey <tom@tromey.com>
7041
7042 * defs.h (make_cleanup_override_quit_handler): Don't declare.
7043
7044 2017-09-22 Tom Tromey <tom@tromey.com>
7045
7046 * utils.c (class scoped_input_handler) <m_quit_handler>: Change
7047 type to scoped_restore_tmpl.
7048 <scoped_input_handler>: Initialize m_quit_handler directly.
7049
7050 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
7051
7052 * cli/cli-cmds.c (pwd_command): Use "getcwd (NULL, 0)".
7053 (cd_command): Likewise. Free "current_directory" before
7054 assigning to it.
7055 * main.c (captured_main_1): Use "getcwd (NULL, 0)".
7056 * mi/mi-cmd-env.c (mi_cmd_env_pwd): Likewise.
7057 * top.c (gdb_dirbuf): Remove global declaration.
7058 * top.h (gdb_dirbuf): Likewise.
7059
7060 2017-09-22 Sergio Durigan Junior <sergiodj@redhat.com>
7061
7062 * gnulib/aclocal.m4: Regenerate.
7063 * gnulib/config.in: Regenerate.
7064 * gnulib/configure: Regenerate.
7065 * gnulib/import/Makefile.am: Regenerate.
7066 * gnulib/import/Makefile.in: Regenerate.
7067 * gnulib/import/assure.h: New file.
7068 * gnulib/import/at-func.c: Likewise
7069 * gnulib/import/chdir-long.c: New file.
7070 * gnulib/import/chdir-long.h: New file.
7071 * gnulib/import/cloexec.c: New file.
7072 * gnulib/import/cloexec.h: New file.
7073 * gnulib/import/close.c: New file.
7074 * gnulib/import/closedir.c: New file.
7075 * gnulib/import/dirent-private.h: New file.
7076 * gnulib/import/dup-safer.c: New file.
7077 * gnulib/import/dup.c: New file.
7078 * gnulib/import/dup2.c: New file.
7079 * gnulib/import/error.c: New file.
7080 * gnulib/import/error.h: New file.
7081 * gnulib/import/exitfail.c: New file.
7082 * gnulib/import/exitfail.h: New file.
7083 * gnulib/import/fchdir.c: New file.
7084 * gnulib/import/fcntl.c: New file.
7085 * gnulib/import/fcntl.in.h: New file.
7086 * gnulib/import/fd-hook.c: New file.
7087 * gnulib/import/fd-hook.h: New file.
7088 * gnulib/import/fd-safer.c: New file.
7089 * gnulib/import/fdopendir.c: New file.
7090 * gnulib/import/filename.h: New file.
7091 * gnulib/import/filenamecat-lgpl.c: New file.
7092 * gnulib/import/filenamecat.h: New file.
7093 * gnulib/import/fstat.c: New file.
7094 * gnulib/import/fstatat.c: New file.
7095 * gnulib/import/getcwd-lgpl.c: New file.
7096 * gnulib/import/getcwd.c: New file.
7097 * gnulib/import/getdtablesize.c: New file.
7098 * gnulib/import/getlogin_r.c: New file.
7099 * gnulib/import/getprogname.c: New file.
7100 * gnulib/import/getprogname.h: New file.
7101 * gnulib/import/gettext.h: New file.
7102 * gnulib/import/glob-libc.h: New file.
7103 * gnulib/import/glob.c: New file.
7104 * gnulib/import/glob.in.h: New file.
7105 * gnulib/import/intprops.h: New file.
7106 * gnulib/import/m4/chdir-long.m4: New file.
7107 * gnulib/import/m4/close.m4: New file.
7108 * gnulib/import/m4/closedir.m4: New file.
7109 * gnulib/import/m4/d-ino.m4: New file.
7110 * gnulib/import/m4/d-type.m4: New file.
7111 * gnulib/import/m4/dup.m4: New file.
7112 * gnulib/import/m4/dup2.m4: New file.
7113 * gnulib/import/m4/error.m4: New file.
7114 * gnulib/import/m4/fchdir.m4: New file.
7115 * gnulib/import/m4/fcntl.m4: New file.
7116 * gnulib/import/m4/fcntl_h.m4: New file.
7117 * gnulib/import/m4/fdopendir.m4: New file.
7118 * gnulib/import/m4/filenamecat.m4: New file.
7119 * gnulib/import/m4/fstat.m4: New file.
7120 * gnulib/import/m4/fstatat.m4: New file.
7121 * gnulib/import/m4/getcwd-abort-bug.m4: New file.
7122 * gnulib/import/m4/getcwd-path-max.m4: New file.
7123 * gnulib/import/m4/getcwd.m4: New file.
7124 * gnulib/import/m4/getdtablesize.m4: New file.
7125 * gnulib/import/m4/getlogin_r.m4: New file.
7126 * gnulib/import/m4/getprogname.m4: New file.
7127 * gnulib/import/m4/glob.m4: New file.
7128 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
7129 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
7130 * gnulib/import/m4/mempcpy.m4: New file.
7131 * gnulib/import/m4/memrchr.m4: New file.
7132 * gnulib/import/m4/mode_t.m4: New file.
7133 * gnulib/import/m4/msvc-inval.m4: New file.
7134 * gnulib/import/m4/msvc-nothrow.m4: New file.
7135 * gnulib/import/m4/open.m4: New file.
7136 * gnulib/import/m4/openat.m4: New file.
7137 * gnulib/import/m4/opendir.m4: New file.
7138 * gnulib/import/m4/readdir.m4: New file.
7139 * gnulib/import/m4/realloc.m4: New file.
7140 * gnulib/import/m4/rewinddir.m4: New file.
7141 * gnulib/import/m4/save-cwd.m4: New file.
7142 * gnulib/import/m4/strdup.m4: New file.
7143 * gnulib/import/m4/strerror.m4: New file.
7144 * gnulib/import/m4/unistd-safer.m4: New file.
7145 * gnulib/import/mempcpy.c: New file.
7146 * gnulib/import/memrchr.c: New file.
7147 * gnulib/import/msvc-inval.c: New file.
7148 * gnulib/import/msvc-inval.h: New file.
7149 * gnulib/import/msvc-nothrow.c: New file.
7150 * gnulib/import/msvc-nothrow.h: New file.
7151 * gnulib/import/open.c: New file.
7152 * gnulib/import/openat-die.c: New file.
7153 * gnulib/import/openat-priv.h: New file.
7154 * gnulib/import/openat-proc.c: New file.
7155 * gnulib/import/openat.c: New file.
7156 * gnulib/import/openat.h: New file.
7157 * gnulib/import/opendir.c: New file.
7158 * gnulib/import/pipe-safer.c: New file.
7159 * gnulib/import/readdir.c: New file.
7160 * gnulib/import/realloc.c: New file.
7161 * gnulib/import/rewinddir.c: New file.
7162 * gnulib/import/save-cwd.c: New file.
7163 * gnulib/import/save-cwd.h: New file.
7164 * gnulib/import/strdup.c: New file.
7165 * gnulib/import/strerror-override.c: New file.
7166 * gnulib/import/strerror-override.h: New file.
7167 * gnulib/import/strerror.c: New file.
7168 * gnulib/import/unistd--.h: New file.
7169 * gnulib/import/unistd-safer.h: New file.
7170 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add
7171 "getcwd" and "glob".
7172 * ser-tcp.c: Undefine "close" before redefining it.
7173
7174 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
7175
7176 * guile/scm-value.c (gdbscm_value_address): Initialize address,
7177 get rid of res_val.
7178
7179 2017-09-22 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
7180
7181 * configure.nat <i386sol2,i386>: Add fork-inferior.o to NATDEPFILES.
7182 <sol2,sparc>: Likewise.
7183 <sol2-64,i386>: Likewise.
7184
7185 * warning.m4 (AM_GDB_WARNINGS): Disable -Wunknown-pragmas,
7186 -Wdeprecated-declarations on *-*-solaris*.
7187 * configure: Regenerate.
7188
7189 * procfs.c: Include "nat/inferior.h".
7190 (procfs_info_proc): Fix typo.
7191
7192 2017-09-21 Kevin Buettner <kevinb@redhat.com>
7193
7194 * remote.c (vector): Include.
7195 (struct private_thread_info): Add field, thread_handle.
7196 (free_private_thread_info): Deallocate storage associated with
7197 thread handle.
7198 (get_private_info_thread): Initialize `thread_handle' field.
7199 (struct thread_item): Add field, thread_handle.
7200 (clear_threads_listing_context): Deallocate storage associated
7201 with thread handle.
7202 (start_thread): Add support for "handle" attribute.
7203 (thread_attributes): Add "handle".
7204 (remote_get_threads_with_qthreadinfo): Initialize thread_handle
7205 field.
7206 (remote_update_thread_list): Update thread_handle.
7207 (remote_thread_handle_to_thread_info): New function.
7208 (init_remote_ops): Initialize to_thread_handle_to_thread_info.
7209
7210 2017-09-21 Kevin Buettner <kevinb@redhat.com>
7211
7212 * python/py-inferior.c (gdbpy_thread_from_thread_handle): New
7213 function.
7214 (inferior_object_methods): Add gdbpy_thread_from_thread_handle.
7215 * python/python-internal.h (thread_object_type): Declare.
7216
7217 2017-09-21 Kevin Buettner <kevinb@redhat.com>
7218
7219 * target.h (struct target_ops): Add to_thread_handle_to_thread_info.
7220 (target_thread_handle_to_thread_info): Declare.
7221 * target.c (target_thread_handle_to_thread_info): New function.
7222 * target-delegates.c: Regenerate.
7223 * gdbthread.h (find_thread_by_handle): Declare.
7224 * thread.c (find_thread_by_handle): New function.
7225 * linux-thread-db.c (thread_db_thread_handle_to_thread_info): New
7226 function.
7227 (init_thread_db_ops): Register thread_db_thread_handle_to_thread_info.
7228
7229 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
7230
7231 * nat/linux-waitpid.c (linux_debug): Add ATTRIBUTE_PRINTF.
7232
7233 2017-09-21 Simon Marchi <simon.marchi@ericsson.com>
7234
7235 * microblaze-tdep.c (microblaze_debug): Add ATTRIBUTE_PRINTF.
7236
7237 2017-09-21 Yao Qi <yao.qi@linaro.org>
7238
7239 * configure.tgt (aarch64*-*-freebsd*): Add fbsd-tdep.o solib-svr4.o
7240 to gdb_target_obs.
7241
7242 2017-09-20 Tom Tromey <tom@tromey.com>
7243
7244 * breakpoint.c (struct counted_command_line): Remove.
7245 (breakpoint_commands): Update.
7246 (alloc_counted_command_line, incref_counted_command_line)
7247 (decref_counted_command_line, do_cleanup_counted_command_line)
7248 (make_cleanup_decref_counted_command_line): Remove.
7249 (breakpoint_set_commands, commands_command_1, ~bpstats, bpstats)
7250 (bpstat_clear_actions, bpstat_do_actions_1, watchpoint_check)
7251 (bpstat_stop_status, print_one_breakpoint_location, ~breakpoint)
7252 (save_breakpoints): Update.
7253 * breakpoint.h (counted_command_line): Now a typedef to
7254 shared_ptr.
7255 (struct breakpoint) <commands>: Now a counted_command_line.
7256 (struct bpstats) <command>: Likewise.
7257
7258 2017-09-20 Tom Tromey <tom@tromey.com>
7259
7260 * breakpoint.c (struct commands_info, do_map_commands_command):
7261 Remove.
7262 (commands_command_1): Update.
7263 (iterate_over_related_breakpoints): Take a function_view.
7264 (do_delete_breakpoint, do_map_delete_breakpoint): Remove.
7265 (delete_command): Update.
7266 (map_breakpoint_numbers): Take a function_view.
7267 (do_disable_breakpoint, do_map_delete_breakpoint): Remove.
7268 (disable_command): Update.
7269 (do_enable_breakpoint, do_map_enable_breakpoint): Remove.
7270 (enable_command): Update.
7271 (struct disp_data, do_enable_breakpoint_disp)
7272 (do_map_enable_once_breakpoint, do_map_enable_count_breakpoint)
7273 (do_map_enable_delete_breakpoint): Remove.
7274 (enable_once_command, enable_count_command, enable_delete_command)
7275 (delete_trace_variable_command): Update.
7276
7277 2017-09-20 Tom Tromey <tom@tromey.com>
7278
7279 * breakpoint.c (~bpstats): Rename from bpstat_free. Update.
7280 (bpstat_clear): Use delete.
7281 (bpstats): New constructors.
7282 (bpstat_copy, bpstat_stop_status): Use new.
7283 (dprintf_after_condition_true): Update.
7284 * breakpoint.h (bpstats::bpstats): Add constructors.
7285 (bpstats::~bpstats): Add destructor.
7286
7287 2017-09-20 Pedro Alves <palves@redhat.com>
7288
7289 * eval.c (make_params): Delete, refactored as ...
7290 (class fake_method): ... this new type's ctor.
7291 (fake_method::~fake_method): New.
7292 (evaluate_subexp_standard): Use 'fake_method'.
7293
7294 2017-09-20 Tom Tromey <tom@tromey.com>
7295
7296 * windows-nat.c (get_windows_debug_event, windows_wait)
7297 (do_initial_windows_stuff, windows_attach): Update.
7298 * utils.c (vwarning, internal_vproblem): Update.
7299 (ui_unregister_input_event_handler_cleanup)
7300 (prepare_to_handle_input): Remove.
7301 (class scoped_input_handler): New.
7302 (defaulted_query, prompt_for_continue): Update.
7303 * tui/tui-hooks.c (tui_refresh_frame_and_register_information):
7304 Update.
7305 * top.c (undo_terminal_modifications_before_exit): Update.
7306 * target/target.h (target_terminal_init, target_terminal_inferior)
7307 (target_terminal_ours): Don't declare.
7308 (class target_terminal): New.
7309 * target.h (target_terminal_is_inferior, target_terminal_is_ours)
7310 (target_terminal_ours_for_output)
7311 (make_cleanup_restore_target_terminal): Don't declare.
7312 (target_terminal_info): Remove.
7313 * target.c (enum terminal_state, terminal_state): Remove.
7314 (target_terminal::terminal_state): Define.
7315 (target_terminal::init): Rename from target_terminal_init.
7316 (target_terminal::inferior): Rename from
7317 target_terminal_inferior.
7318 (target_terminal::ours): Rename from target_terminal_ours.
7319 (target_terminal::ours_for_output): Rename from
7320 target_terminal_ours_for_output.
7321 (target_terminal::info): New method.
7322 (cleanup_restore_target_terminal)
7323 (make_cleanup_restore_target_terminal): Remove.
7324 * solib.c (handle_solib_event): Update.
7325 * remote.c (remote_serial_quit_handler): Update.
7326 (remote_terminal_inferior, remote_wait_as): Update.
7327 * record-full.c (record_full_wait_1): Update.
7328 * nto-procfs.c (procfs_create_inferior): Update.
7329 * nat/fork-inferior.c (startup_inferior): Update.
7330 * mi/mi-interp.c (mi_new_thread, mi_thread_exit)
7331 (mi_record_changed, mi_inferior_added, mi_inferior_appeared)
7332 (mi_inferior_exit, mi_inferior_removed, mi_traceframe_changed)
7333 (mi_tsv_created, mi_tsv_deleted, mi_tsv_modified)
7334 (mi_breakpoint_created, mi_breakpoint_deleted)
7335 (mi_breakpoint_modified, mi_on_resume, mi_solib_loaded)
7336 (mi_solib_unloaded, mi_command_param_changed, mi_memory_changed)
7337 (mi_user_selected_context_changed, report_initial_inferior):
7338 Update.
7339 * linux-nat.c (linux_nat_attach, linux_nat_terminal_ours)
7340 (linux_nat_terminal_inferior): Update.
7341 * infrun.c (follow_fork_inferior)
7342 (handle_vfork_child_exec_or_exit, do_target_resume)
7343 (check_curr_ui_sync_execution_done, handle_inferior_event_1)
7344 (handle_signal_stop, maybe_remove_breakpoints, normal_stop):
7345 Update.
7346 * inflow.c (child_terminal_init, info_terminal_command): Update.
7347 * infcmd.c (post_create_inferior, continue_1, prepare_one_step)
7348 (attach_command): Update.
7349 * infcall.c (call_thread_fsm_should_stop): Update.
7350 * gnu-nat.c (gnu_attach): Update.
7351 * extension.c (struct active_ext_lang_state)
7352 (restore_active_ext_lang): Update.
7353 * exceptions.c (print_flush): Update.
7354 * event-top.c (async_enable_stdin, default_quit_handler): Update.
7355 (struct quit_handler_cleanup_data, restore_quit_handler)
7356 (restore_quit_handler_dtor, make_cleanup_override_quit_handler):
7357 Remove.
7358 * cp-support.c (gdb_demangle): Update.
7359 * breakpoint.c (update_inserted_breakpoint_locations)
7360 (insert_breakpoint_locations, handle_jit_event)
7361 (disable_breakpoints_in_unloaded_shlib): Update.
7362 * annotate.c (annotate_breakpoints_invalid)
7363 (annotate_frames_invalid): Update.
7364
7365 2017-09-20 Tom Tromey <tom@tromey.com>
7366
7367 * main.c (catch_command_errors): Rename from
7368 catch_command_errors_const.
7369 (captured_main_1): Update.
7370
7371 2017-09-20 Pedro Alves <palves@redhat.com>
7372
7373 * cli/cli-cmds.c (list_command): Use print_sal_location.
7374 (print_sal_location): New function.
7375 (ambiguous_line_spec): Use print_sal_location.
7376 * linespec.c (symbol_to_sal): Record the symbol in the sal.
7377 * symtab.c (find_function_start_sal): Likewise.
7378 * symtab.h (symtab_and_line::symbol): New field.
7379
7380 2017-09-20 Pedro Alves <palves@redhat.com>
7381
7382 * linespec.c (minsym_found): Handle non-text minsyms.
7383 (symbol_to_sal): Record a sal.pc for non-block, non-label symbols.
7384
7385 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7386
7387 * features/Makefile (i386-avx-mpx-avx512-pku.dat): Add missing
7388 backslash.
7389
7390 2017-09-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
7391
7392 * gdb.arch/i386-avx512.c (move_zmm_data_to_reg): Use
7393 vmovups instead vmovaps.
7394 (move_zmm_data_to_memory): Use vmovups instead vmovaps.
7395
7396 2017-09-19 John Baldwin <jhb@FreeBSD.org>
7397
7398 * NEWS (Changes since GDB 8.0): Add starti.
7399 * infcmd.c (enum run_break): New.
7400 (run_command_1): Queue pending event for RUN_STOP_AT_FIRST_INSN
7401 case.
7402 (run_command): Use enum run_how.
7403 (start_command): Likewise.
7404 (starti_command): New function.
7405 (RUN_ARGS_HELP): New macro.
7406 (_initialize_infcmd): Use RUN_ARGS_HELP for run and start
7407 commands. Add starti command.
7408
7409 2017-09-19 Yao Qi <yao.qi@linaro.org>
7410
7411 * Makefile.in (monitor.o): Remove the rule.
7412
7413 2017-09-19 Yao Qi <yao.qi@linaro.org>
7414
7415 * annotate.h (struct annotate_arg_emitter): Use
7416 DISABLE_COPY_AND_ASSIGN.
7417 * common/refcounted-object.h (refcounted_object): Likewise.
7418 * completer.h (struct completion_result): Likewise.
7419 * dwarf2read.c (struct dwarf2_per_objfile): Likewise.
7420 * filename-seen-cache.h (filename_seen_cache): Likewise.
7421 * gdbcore.h (thread_section_name): Likewise.
7422 * gdb_regex.h (compiled_regex): Likewise.
7423 * gdbthread.h (scoped_restore_current_thread): Likewise.
7424 * inferior.h (scoped_restore_current_inferior): Likewise.
7425 * jit.c (jit_reader): Likewise.
7426 * linespec.h (struct linespec_result): Likewise.
7427 * mi/mi-parse.h (struct mi_parse): Likewise.
7428 * nat/fork-inferior.c (execv_argv): Likewise.
7429 * progspace.h (scoped_restore_current_program_space): Likewise.
7430 * python/python-internal.h (class gdbpy_enter): Likewise.
7431 * regcache.h (regcache): Likewise.
7432 * target-descriptions.c (struct tdesc_reg): Likewise.
7433 (struct tdesc_type): Likewise.
7434 (struct tdesc_feature): Likewise.
7435 * ui-out.h (ui_out_emit_type): Likewise.
7436
7437 2017-09-18 Simon Marchi <simon.marchi@ericsson.com>
7438
7439 * dwarf2expr.c (dwarf_expr_context::execute_stack_op): Remove
7440 label abort_expression.
7441
7442 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
7443
7444 * common/buffer.c (buffer_xml_printf): Adjust.
7445 * common/xml-utils.c (xml_escape_text): Change return type to
7446 std::string, update code accordingly.
7447 * common/xml-utils.h (xml_escape_text): Change return type to
7448 std::string.
7449 * rs6000-aix-tdep.c (rs6000_aix_shared_library_to_xml): Adjust.
7450 * windows-tdep.c (windows_xfer_shared_library): Adjust.
7451 * unittests/xml-utils-selftests.c (test_xml_escape_text):
7452 Adjust.
7453
7454 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
7455
7456 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add new source file.
7457 (SUBDIR_UNITTESTS_OBS): Add new object file.
7458 * unittests/xml-utils-selftests.c: New file.
7459
7460 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
7461
7462 * common/selftest.h (selftest): New struct/interface.
7463 (register_test): Add name parameter, add new overload.
7464 (run_tests): Add filter parameter.
7465 (for_each_selftest_ftype): New typedef.
7466 (for_each_selftest): New declaration.
7467 * common/selftest.c (tests): Change type to
7468 map<string, unique_ptr<selftest>>.
7469 (simple_selftest): New struct.
7470 (register_test): New function.
7471 (register_test): Add name parameter and use it.
7472 (run_tests): Add filter parameter and use it. Add prints.
7473 Adjust to vector -> map change.
7474 * aarch64-tdep.c (_initialize_aarch64_tdep): Add names when
7475 registering selftests.
7476 * arm-tdep.c (_initialize_arm_tdep): Likewise.
7477 * disasm-selftests.c (_initialize_disasm_selftests): Likewise.
7478 * dwarf2-frame.c (_initialize_dwarf2_frame): Likewise.
7479 * dwarf2loc.c (_initialize_dwarf2loc): Likewise.
7480 * findvar.c (_initialize_findvar): Likewise.
7481 * gdbarch-selftests.c (_initialize_gdbarch_selftests): Likewise.
7482 * maint.c (maintenance_selftest): Update call to run_tests.
7483 (maintenance_info_selftests): New function.
7484 (_initialize_maint_cmds): Register "maintenance info selftests"
7485 command. Update "maintenance selftest" doc.
7486 * regcache.c (_initialize_regcache): Add names when registering
7487 selftests.
7488 * rust-exp.y (_initialize_rust_exp): Likewise.
7489 * selftest-arch.c (gdbarch_selftest): New struct.
7490 (gdbarch_tests): Remove.
7491 (register_test_foreach_arch): Add name parameter. Call
7492 register_test.
7493 (tests_with_arch): Remove, move most content to
7494 gdbarch_selftest::operator().
7495 (_initialize_selftests_foreach_arch): Remove.
7496 * selftest-arch.h (register_test_foreach_arch): Add name
7497 parameter.
7498 (run_tests_with_arch): New declaration.
7499 * utils-selftests.c (_initialize_utils_selftests): Add names
7500 when registering selftests.
7501 * utils.c (_initialize_utils): Likewise.
7502 * unittests/array-view-selftests.c
7503 (_initialize_array_view_selftests): Likewise.
7504 * unittests/environ-selftests.c (_initialize_environ_selftests):
7505 Likewise.
7506 * unittests/function-view-selftests.c
7507 (_initialize_function_view_selftests): Likewise.
7508 * unittests/offset-type-selftests.c
7509 (_initialize_offset_type_selftests): Likewise.
7510 * unittests/optional-selftests.c
7511 (_initialize_optional_selftests): Likewise.
7512 * unittests/scoped_restore-selftests.c
7513 (_initialize_scoped_restore_selftests): Likewise.
7514 * NEWS: Document "maintenance selftest" and "maint info
7515 selftests".
7516
7517 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
7518
7519 * mi/mi-main.c (mi_load_progress): Restore current_uiout using a
7520 scoped_restore.
7521
7522 2017-09-16 Simon Marchi <simon.marchi@ericsson.com>
7523
7524 * mi/mi-main.c (mi_load_progress): Make uiout variable
7525 a unique_ptr.
7526
7527 2017-09-15 Pedro Alves <palves@redhat.com>
7528
7529 * compile/compile-c-types.c (convert_enum, convert_int)
7530 (convert_float): Adjust to refer to int_type_v0 and float_type_v0.
7531
7532 2017-09-15 Simon Marchi <simon.marchi@ericsson.com>
7533
7534 * dwarf2read.c (copy_string): Remove.
7535 (parse_macro_definition): Replace copy_string with savestring.
7536
7537 2017-09-15 Yao Qi <yao.qi@linaro.org>
7538
7539 * configure.tgt (i[34567]86-*-darwin*): Append amd64.o to
7540 gdb_target_obs.
7541 (i[34567]86-*-solaris2.1[0-9]* | x86_64-*-solaris2.1[0-9]*):
7542 Likewise.
7543 (i[34567]86-*-linux*): Likewise.
7544
7545 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
7546
7547 * dwarf2expr.h (dwarf_stack_value): Add constructor.
7548 (dwarf_expr_context) <~dwarf_expr_context>: Define as default.
7549 <stack>: Change type to std::vector.
7550 <stack_len, stack_allocated>: Remove.
7551 <grow_stack>: Remove.
7552 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
7553 (dwarf_expr_context::~dwarf_expr_context): Remove.
7554 (dwarf_expr_context::grow_stack): Remove.
7555 (dwarf_expr_context::push): Adjust.
7556 (dwarf_expr_context::pop): Adjust.
7557 (dwarf_expr_context::fetch): Adjust.
7558 (dwarf_expr_context::fetch_in_stack_memory): Adjust.
7559 (dwarf_expr_context::stack_empty_p): Adjust.
7560 (dwarf_expr_context::execute_stack_op): Adjust.
7561
7562 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
7563
7564 * dwarf2expr.h (dwarf_expr_context) <stack_empty_p>: Change
7565 return type to bool.
7566 * dwarf2expr.c (dwarf_expr_context::stack_empty_p): Likewise.
7567
7568 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
7569
7570 * dwarf2expr.h (dwarf_expr_piece) <v.mem.in_stack_memory>:
7571 Change type to bool.
7572 (dwarf_stack_value) <in_stack_memory>: Likewise.
7573 (dwarf_expr_context) <push_address>: Change parameter type to
7574 bool.
7575 <fetch_in_stack_memory>: Change return type to bool.
7576 <push>: Change parameter type to bool.
7577 * dwarf2expr.c (dwarf_expr_context::push): Change parameter type
7578 to bool.
7579 (dwarf_expr_context::push_address): Likewise.
7580 (dwarf_expr_context::fetch_in_stack_memory): Change return type
7581 to bool.
7582 (dwarf_expr_context::execute_stack_op): Adjust.
7583 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Adjust.
7584
7585 2017-09-14 Simon Marchi <simon.marchi@ericsson.com>
7586
7587 * dwarf2expr.h (struct dwarf_expr_piece): Move up.
7588 (struct dwarf_expr_context) <n_pieces>: Remove.
7589 <pieces>: Change type to std::vector.
7590 * dwarf2expr.c (dwarf_expr_context::dwarf_expr_context): Adjust.
7591 (dwarf_expr_context::~dwarf_expr_context): Don't manually free
7592 pieces.
7593 (dwarf_expr_context::add_piece): Adjust.
7594 * dwarf2loc.c (struct piece_closure): Initialize fields.
7595 <n_pieces>: Remove.
7596 <pieces>: Change type to std::vector.
7597 (allocate_piece_closure): Adjust, change parameter to
7598 std::vector rvalue and std::move it to piece_closure.
7599 (rw_pieced_value): Adjust.
7600 (check_pieced_synthetic_pointer): Adjust.
7601 (indirect_synthetic_pointer): Adjust.
7602 (coerce_pieced_ref): Adjust.
7603 (free_pieced_value_closure): Adjust. Use delete to free
7604 piece_closure.
7605 (dwarf2_evaluate_loc_desc_full): Adjust. std::move ctx.pieces
7606 to allocate_piece_closure.
7607 (dwarf2_loc_desc_get_symbol_read_needs): Adjust.
7608
7609 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
7610
7611 * probe.h (probe_ops_cp): Remove typedef.
7612 (DEF_VEC_P (probe_ops_cp)): Remove.
7613 (all_probe_ops): Change type to std::vector.
7614 * probe.c (info_probes_for_ops): Adjust to vector change.
7615 (probe_linespec_to_ops): Likewise.
7616 (all_probe_ops): Change type to std::vector.
7617 (_initialize_probe): Adjust to vector change.
7618 * dtrace-probe.c (_initialize_dtrace_probe): Likewise.
7619 * elfread.c (elf_get_probes): Likewise.
7620 * stap-probe.c (_initialize_stap_probe): Likewise.
7621
7622 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
7623
7624 * probe.h (struct bound_probe): Define constructors.
7625 * probe.c (bound_probe_s): Remove typedef.
7626 (DEF_VEC_O (bound_probe_s)): Remove VEC.
7627 (collect_probes): Change return type to std::vector, remove
7628 cleanup.
7629 (compare_probes): Return bool, change parameter type. Change
7630 semantic to "less than".
7631 (gen_ui_out_table_header_info): Change parameter to std::vector
7632 and update.
7633 (exists_probe_with_pops): Likewise.
7634 (info_probes_for_ops): Update to std::vector change.
7635 (enable_probes_command): Likewise.
7636 (disable_probes_command): Likewise.
7637
7638 2017-09-12 Simon Marchi <simon.marchi@ericsson.com>
7639
7640 * probe.h (struct probe_ops) <get_probes>: Change parameter from
7641 vec to std::vector.
7642 * probe.c (parse_probes_in_pspace): Update.
7643 (find_probes_in_objfile): Update.
7644 (find_probe_by_pc): Update.
7645 (collect_probes): Update.
7646 (probe_any_get_probes): Update.
7647 * symfile.h (struct sym_probe_fns) <sym_get_probes> Change
7648 return type to reference to std::vector.
7649 * dtrace-probe.c (dtrace_process_dof_probe): Change parameter to
7650 std::vector and update.
7651 (dtrace_process_dof): Likewise.
7652 (dtrace_get_probes): Likewise.
7653 * elfread.c (elf_get_probes): Change return type to std::vector,
7654 store an std::vector in bfd_data.
7655 (probe_key_free): Update to std::vector.
7656 * stap-probe.c (handle_stap_probe): Change parameter to
7657 std::vector and update.
7658 (stap_get_probes): Likewise.
7659 * symfile-debug.c (debug_sym_get_probes): Change return type to
7660 std::vector and update.
7661
7662 2017-09-11 Tom Tromey <tom@tromey.com>
7663
7664 * breakpoint.c (program_breakpoint_here_p): Update.
7665 * target.c (make_scoped_restore_show_memory_breakpoints): Rename
7666 from make_show_memory_breakpoints_cleanup. Return a
7667 scoped_restore_tmpl<int>.
7668 (restore_show_memory_breakpoints): Remove.
7669 * ppc-linux-tdep.c (ppc_linux_memory_remove_breakpoint): Update.
7670 * mem-break.c (memory_validate_breakpoint): Update.
7671 * ia64-tdep.c (ia64_memory_insert_breakpoint): Update.
7672 (ia64_memory_remove_breakpoint): Update.
7673 (ia64_breakpoint_from_pc): Update.
7674 * target.h (make_scoped_restore_show_memory_breakpoints): Rename
7675 from make_show_memory_breakpoints_cleanup.
7676
7677 2017-09-11 Tom Tromey <tom@tromey.com>
7678
7679 * d-namespace.c (d_lookup_symbol): Use std::string.
7680 (find_symbol_in_baseclass): Likewise.
7681
7682 2017-09-11 Tom Tromey <tom@tromey.com>
7683
7684 * ctf.c (ctf_start): Use std::string.
7685
7686 2017-09-11 Tom Tromey <tom@tromey.com>
7687
7688 * ada-lang.c (is_known_support_routine): Update.
7689 (ada_unhandled_exception_name_addr_from_raise): Update.
7690 * guile/scm-frame.c (gdbscm_frame_name): Update.
7691 * python/py-frame.c (frapy_name): Update.
7692 (frapy_function): Update.
7693 * stack.h (find_frame_funname): Update.
7694 * stack.c (find_frame_funname): Return unique_xmalloc_ptr.
7695 (print_frame): Update.
7696
7697 2017-09-11 Tom Tromey <tom@tromey.com>
7698
7699 * findcmd.c (put_bits): Take a gdb::byte_vector.
7700 (parse_find_args): Return gdb::byte_vector. "args" now const.
7701 Remove "pattern_bufp" and "pattern_lenp" parameters. Remove
7702 cleanups.
7703 (find_command): Update.
7704
7705 2017-09-11 Tom Tromey <tom@tromey.com>
7706
7707 * cli/cli-script.c (class scoped_restore_hook_in): New.
7708 (clear_hook_in_cleanup): Remove.
7709 (execute_cmd_pre_hook, execute_cmd_post_hook): Use
7710 scoped_restore_hook_in.
7711
7712 2017-09-11 Tom Tromey <tom@tromey.com>
7713
7714 * cli/cli-script.c (restore_interp): Remove.
7715 (read_command_lines): Use scoped_restore_interp.
7716 * interps.c (scoped_restore_interp::set_temp): Rename from
7717 interp_set_temp.
7718 * interps.h (class scoped_restore_interp): New.
7719 (interp_set_temp): Remove.
7720
7721 2017-09-11 Tom Tromey <tom@tromey.com>
7722
7723 * mi/mi-cmd-catch.c (mi_cmd_catch_assert)
7724 (mi_cmd_catch_exception, mi_catch_load_unload): Update.
7725 * mi/mi-cmd-break.c (setup_breakpoint_reporting): Return a
7726 scoped_restore.
7727 (mi_cmd_break_insert_1): Update.
7728 * mi/mi-cmd-break.h (setup_breakpoint_reporting): Return a
7729 scoped_restore.
7730
7731 2017-09-11 Tom Tromey <tom@tromey.com>
7732
7733 * demangle.c (demangle_command): Update.
7734 * breakpoint.c (disable_command): Update.
7735 (enable_command): Update.
7736 (find_location_by_number): Make "number" const. Use
7737 get_number_trailer.
7738 * cli/cli-utils.c (extract_arg): Return std::string.
7739 * probe.c (parse_probe_linespec): Update. Change types.
7740 (collect_probes): Take string arguments.
7741 (parse_probe_linespec): Likewise.
7742 (info_probes_for_ops): Update.
7743 (enable_probes_command): Update.
7744 (disable_probes_command): Update.
7745 * break-catch-sig.c (catch_signal_split_args): Update.
7746 * mi/mi-parse.c (mi_parse): Update.
7747
7748 2017-09-11 Tom Tromey <tom@tromey.com>
7749
7750 * language.h (language_enum): Make argument const.
7751 * language.c (language_enum): Make argument const.
7752
7753 2017-09-11 Tom Tromey <tom@tromey.com>
7754
7755 * common/common-utils.h (skip_to_space): Remove macro, redeclare
7756 as function.
7757 (skip_to_space): Rename from skip_to_space_const.
7758 * common/common-utils.c (skip_to_space): New function.
7759 (skip_to_space): Rename from skip_to_space_const.
7760 * cli/cli-utils.h (get_number): Rename from get_number_const.
7761 (extract_arg): Rename from extract_arg_const.
7762 * cli/cli-utils.c (get_number): Rename from get_number_const.
7763 (extract_arg): Rename from extract_arg_const.
7764 (number_or_range_parser::get_number): Use ::get_number.
7765 * aarch64-linux-tdep.c, ada-lang.c, arm-linux-tdep.c, ax-gdb.c,
7766 break-catch-throw.c, breakpoint.c, cli/cli-cmds.c, cli/cli-dump.c,
7767 cli/cli-script.c, cli/cli-setshow.c, compile/compile.c,
7768 completer.c, demangle.c, disasm.c, findcmd.c, linespec.c,
7769 linux-tdep.c, linux-thread-db.c, location.c, mi/mi-parse.c,
7770 minsyms.c, nat/linux-procfs.c, printcmd.c, probe.c,
7771 python/py-breakpoint.c, record.c, rust-exp.y, serial.c, stack.c,
7772 stap-probe.c, tid-parse.c, tracepoint.c: Update all callers.
7773
7774 2017-09-11 Tom Tromey <tom@tromey.com>
7775
7776 * python/python.c (do_start_initialization): Use
7777 py-event-types.def to initialize types.
7778 Define all object type structures.
7779 * python/python-internal.h: Don't declare event initialization
7780 functions.
7781 * python/py-threadevent.c (thread_event_object_type): Don't
7782 define.
7783 * python/py-stopevent.c (stop_event_object_type): Don't define.
7784 * python/py-signalevent.c (signal_event_object_type): Don't
7785 declare or define.
7786 * python/py-newobjfileevent.c (new_objfile_event_object_type)
7787 (clear_objfiles_event_object_type): Don't declare or define.
7788 * python/py-infevents.c (inferior_call_pre_event_object_type)
7789 (inferior_call_post_event_object_type)
7790 (register_changed_event_object_type)
7791 (memory_changed_event_object_type): Don't declare or define.
7792 * python/py-inferior.c (new_thread_event_object_type)
7793 (new_inferior_event_object_type)
7794 (inferior_deleted_event_object_type): Don't declare or define.
7795 * python/py-exitedevent.c (exited_event_object_type): Don't
7796 declare or define.
7797 * python/py-evts.c (gdbpy_initialize_py_events): Use
7798 py-all-events.def.
7799 * python/py-events.h (thread_event_object_type): Don't declare.
7800 (events_object): Use py-all-events.def.
7801 * python/py-event.h (GDBPY_NEW_EVENT_TYPE): Remove. Use
7802 py-event-types.def.
7803 * python/py-event-types.def: New file.
7804 * python/py-continueevent.c (create_continue_event_object): Don't
7805 declare or define.
7806 * python/py-bpevent.c (breakpoint_event_object_type): Don't
7807 declare or define.
7808 * python/py-all-events.def: New file.
7809
7810 2017-09-11 Tom Tromey <tom@tromey.com>
7811
7812 * python/py-threadevent.c (create_thread_event_object): Return
7813 gdbpy_ref.
7814 * python/py-stopevent.h (create_stop_event_object)
7815 (create_breakpoint_event_object, create_signal_event_object):
7816 Update.
7817 * python/py-stopevent.c (create_stop_event_object): Return
7818 gdbpy_ref.
7819 (emit_stop_event): Update.
7820 * python/py-signalevent.c (create_signal_event_object): Return
7821 gdbpy_ref.
7822 * python/py-infevents.c (create_inferior_call_event_object):
7823 Update.
7824 * python/py-event.h (create_event_object)
7825 (create_thread_event_object): Update.
7826 * python/py-event.c (create_event_object): Return gdbpy_ref.
7827 * python/py-continueevent.c: Return gdbpy_ref.
7828 * python/py-bpevent.c (create_breakpoint_event_object): Return
7829 gdbpy_ref.
7830
7831 2017-09-11 Tom Tromey <tom@tromey.com>
7832
7833 PR python/15622:
7834 * NEWS: Add entry.
7835 * python/python.c (do_start_initialization): Initialize new event
7836 types.
7837 * python/python-internal.h (gdbpy_initialize_new_inferior_event)
7838 (gdbpy_initialize_inferior_deleted_event)
7839 (gdbpy_initialize_new_thread_event): Declare.
7840 * python/py-threadevent.c (create_thread_event_object): Add option
7841 "thread" parameter.
7842 * python/py-inferior.c (new_thread_event_object_type)
7843 (new_inferior_event_object_type)
7844 (inferior_deleted_event_object_type): Declare.
7845 (python_new_inferior, python_inferior_deleted): New functions.
7846 (add_thread_object): Emit new_thread event.
7847 (gdbpy_initialize_inferior): Attach new functions to corresponding
7848 observers.
7849 (new_thread, new_inferior, inferior_deleted): Define new event
7850 types.
7851 * python/py-evts.c (gdbpy_initialize_py_events): Add new
7852 registries.
7853 * python/py-events.h (events_object) <new_inferior,
7854 inferior_deleted, new_thread>: New fields.
7855 * python/py-event.h (create_thread_event_breakpoint): Add optional
7856 "thread" parameter.
7857
7858 2017-09-10 Andrew Burgess <andrew.burgess@embecosm.com>
7859
7860 * utils.c (abort_with_message): Don't compare gdb_stderr to NULL,
7861 check current_ui instead.
7862 (internal_vproblem): Likewise.
7863
7864 2017-09-09 Simon Marchi <simon.marchi@ericsson.com>
7865
7866 * thread.c (print_thread_info_1): Remove unnecessary calls to
7867 uiout->is_mi_like_p.
7868
7869 2017-09-09 Tom Tromey <tom@tromey.com>
7870
7871 * namespace.h (add_using_directive): Update.
7872 * namespace.c (add_using_directive): Change type of excludes to
7873 std::vector.
7874 * dwarf2read.c (read_import_statement): Use std::vector.
7875 (read_namespace): Update.
7876 * cp-namespace.c (cp_scan_for_anonymous_namespaces): Update.
7877
7878 2017-09-09 Tom Tromey <tom@tromey.com>
7879
7880 * linespec.c (create_sals_line_offset): Use gdb::def_vector.
7881
7882 2017-09-09 Tom Tromey <tom@tromey.com>
7883
7884 * p-valprint.c (pascal_object_print_value): Use gdb::byte_vector.
7885
7886 2017-09-09 Tom Tromey <tom@tromey.com>
7887
7888 * stack.c (func_command): Use gdb::def_vector.
7889
7890 2017-09-09 Tom Tromey <tom@tromey.com>
7891
7892 * mi/mi-cmd-var.c (mi_cmd_var_list_children): Use gdb::optional,
7893 ui_out_emit_list, ui_out_emit_tuple.
7894 (mi_cmd_var_update): Likewise.
7895
7896 2017-09-09 Tom Tromey <tom@tromey.com>
7897
7898 * mi/mi-interp.c (mi_user_selected_context_changed): Use
7899 ui_out_redirect_pop.
7900 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
7901 ui_out_redirect_pop.
7902 * utils.c (do_ui_out_redirect_pop)
7903 (make_cleanup_ui_out_redirect_pop): Remove.
7904 * top.c (execute_command_to_string): Use ui_out_redirect_pop.
7905 * utils.h (make_cleanup_ui_out_redirect_pop): Remove.
7906 * ui-out.h (ui_out_redirect_pop): New class.
7907
7908 2017-09-09 Tom Tromey <tom@tromey.com>
7909
7910 * mi/mi-main.c (output_cores): Use ui_out_emit_list.
7911 (list_available_thread_groups, mi_cmd_list_thread_groups)
7912 (mi_cmd_data_list_changed_registers, mi_cmd_data_read_memory)
7913 (mi_cmd_data_read_memory_bytes, mi_cmd_trace_frame_collected):
7914 Likewise.
7915
7916 2017-09-09 Tom Tromey <tom@tromey.com>
7917
7918 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn): Use
7919 ui_out_emit_tuple.
7920
7921 2017-09-09 Tom Tromey <tom@tromey.com>
7922
7923 * target.c (flash_erase_command): Use ui_out_emit_tuple.
7924 * stack.c (print_frame): Use ui_out_emit_tuple.
7925 * spu-tdep.c (info_spu_event_command): Use ui_out_emit_tuple.
7926 (info_spu_mailbox_command, info_spu_dma_command)
7927 (info_spu_proxydma_command): Likewise.
7928 * mi/mi-main.c (mi_cmd_trace_frame_collected): Use
7929 ui_out_emit_tuple, gdb::byte_vector, bin2hex.
7930 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
7931 ui_out_emit_tuple.
7932 * breakpoint.c (print_it_watchpoint): Use ui_out_emit_tuple.
7933
7934 2017-09-09 Tom Tromey <tom@tromey.com>
7935
7936 * ui-out.h (make_cleanup_ui_out_table_begin_end): Remove.
7937 (class ui_out_emit_table): Update comment.
7938 * ui-out.c (do_cleanup_table_end)
7939 (make_cleanup_ui_out_table_begin_end): Remove.
7940 * spu-tdep.c (info_spu_mailbox_list): Use ui_out_emit_table.
7941 (info_spu_dma_cmdlist): Likewise.
7942 * probe.c (info_probes_for_ops): Use ui_out_emit_table.
7943 * darwin-nat-info.c (darwin_debug_regions_recurse): Use
7944 ui_out_emit_table.
7945
7946 2017-09-09 Tom Tromey <tom@tromey.com>
7947
7948 * thread.c (print_thread_info_1): Use ui_out_emit_table,
7949 ui_out_emit_list, gdb::optional.
7950
7951 2017-09-09 John Baldwin <jhb@FreeBSD.org>
7952
7953 * aarch64-linux-nat.c: Remove _initialize_aarch64_linux_nat
7954 prototype.
7955 * aarch64-linux-tdep.c: Remove _initialize_aarch64_linux_tdep
7956 prototype.
7957 * aarch64-newlib-tdep.c: Remove _initialize_aarch64_newlib_tdep
7958 prototype.
7959 * aarch64-tdep.c: Remove _initialize_aarch64_tdep prototype.
7960 * ada-exp.y: Remove _initialize_ada_exp prototype.
7961 * ada-lang.c: Remove _initialize_ada_language prototype.
7962 * ada-tasks.c: Remove _initialize_tasks prototype.
7963 * addrmap.c: Remove _initialize_addrmap prototype.
7964 * agent.c: Remove _initialize_agent prototype.
7965 * aix-thread.c: Remove _initialize_aix_thread prototype.
7966 * alpha-bsd-nat.c: Remove _initialize_alphabsd_nat prototype.
7967 * alpha-linux-nat.c: Remove _initialize_alpha_linux_nat prototype.
7968 * alpha-linux-tdep.c: Remove _initialize_alpha_linux_tdep
7969 prototype.
7970 * alpha-nbsd-tdep.c: Remove _initialize_alphanbsd_tdep prototype.
7971 * alpha-obsd-tdep.c: Remove _initialize_alphaobsd_tdep prototype.
7972 * alpha-tdep.c: Remove _initialize_alpha_tdep prototype.
7973 * amd64-darwin-tdep.c: Remove _initialize_amd64_darwin_tdep
7974 prototype.
7975 * amd64-dicos-tdep.c: Remove _initialize_amd64_dicos_tdep
7976 prototype.
7977 * amd64-fbsd-nat.c: Remove _initialize_amd64fbsd_nat prototype.
7978 * amd64-fbsd-tdep.c: Remove _initialize_amd64fbsd_tdep prototype.
7979 * amd64-linux-nat.c: Remove _initialize_amd64_linux_nat prototype.
7980 * amd64-linux-tdep.c: Remove _initialize_amd64_linux_tdep
7981 prototype.
7982 * amd64-nbsd-nat.c: Remove _initialize_amd64nbsd_nat prototype.
7983 * amd64-nbsd-tdep.c: Remove _initialize_amd64nbsd_tdep prototype.
7984 * amd64-obsd-nat.c: Remove _initialize_amd64obsd_nat prototype.
7985 * amd64-obsd-tdep.c: Remove _initialize_amd64obsd_tdep prototype.
7986 * amd64-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
7987 * amd64-tdep.c: Remove _initialize_amd64_tdep prototype.
7988 * amd64-windows-nat.c: Remove _initialize_amd64_windows_nat
7989 prototype.
7990 * amd64-windows-tdep.c: Remove _initialize_amd64_windows_tdep
7991 prototype.
7992 * annotate.c: Remove _initialize_annotate prototype.
7993 * arc-newlib-tdep.c: Remove _initialize_arc_newlib_tdep prototype.
7994 * arc-tdep.c: Remove _initialize_arc_tdep prototype.
7995 * arch-utils.c: Remove _initialize_gdbarch_utils prototype.
7996 * arm-linux-nat.c: Remove _initialize_arm_linux_nat prototype.
7997 * arm-linux-tdep.c: Remove _initialize_arm_linux_tdep prototype.
7998 * arm-nbsd-tdep.c: Remove _initialize_arm_netbsd_tdep prototype.
7999 * arm-obsd-tdep.c: Remove _initialize_armobsd_tdep prototype.
8000 * arm-symbian-tdep.c: Remove _initialize_arm_symbian_tdep
8001 prototype.
8002 * arm-tdep.c: Remove _initialize_arm_tdep prototype.
8003 * arm-wince-tdep.c: Remove _initialize_arm_wince_tdep prototype.
8004 * auto-load.c: Remove _initialize_auto_load prototype.
8005 * auxv.c: Remove _initialize_auxv prototype.
8006 * avr-tdep.c: Remove _initialize_avr_tdep prototype.
8007 * ax-gdb.c: Remove _initialize_ax_gdb prototype.
8008 * bfin-linux-tdep.c: Remove _initialize_bfin_linux_tdep prototype.
8009 * bfin-tdep.c: Remove _initialize_bfin_tdep prototype.
8010 * break-catch-sig.c: Remove _initialize_break_catch_sig prototype.
8011 * break-catch-syscall.c: Remove _initialize_break_catch_syscall
8012 prototype.
8013 * break-catch-throw.c: Remove _initialize_break_catch_throw
8014 prototype.
8015 * breakpoint.c: Remove _initialize_breakpoint prototype.
8016 * bsd-uthread.c: Remove _initialize_bsd_uthread prototype.
8017 * btrace.c: Remove _initialize_btrace prototype.
8018 * charset.c: Remove _initialize_charset prototype.
8019 * cli/cli-cmds.c: Remove _initialize_cli_cmds prototype.
8020 * cli/cli-dump.c: Remove _initialize_cli_dump prototype.
8021 * cli/cli-interp.c: Remove _initialize_cli_interp prototype.
8022 * cli/cli-logging.c: Remove _initialize_cli_logging prototype.
8023 * cli/cli-script.c: Remove _initialize_cli_script prototype.
8024 * coff-pe-read.c: Remove _initialize_coff_pe_read prototype.
8025 * coffread.c: Remove _initialize_coffread prototype.
8026 * compile/compile.c: Remove _initialize_compile prototype.
8027 * complaints.c: Remove _initialize_complaints prototype.
8028 * completer.c: Remove _initialize_completer prototype.
8029 * copying.awk: Remove _initialize_copying prototype.
8030 * copying.c: Regenerate.
8031 * core-regset.c: Remove _initialize_core_regset prototype.
8032 * corefile.c: Remove _initialize_core prototype.
8033 * corelow.c: Remove _initialize_corelow prototype.
8034 * cp-abi.c: Remove _initialize_cp_abi prototype.
8035 * cp-namespace.c: Remove _initialize_cp_namespace prototype.
8036 * cp-support.c: Remove _initialize_cp_support prototype.
8037 * cp-valprint.c: Remove _initialize_cp_valprint prototype.
8038 * cris-linux-tdep.c: Remove _initialize_cris_linux_tdep prototype.
8039 * cris-tdep.c: Remove _initialize_cris_tdep prototype.
8040 * ctf.c: Remove _initialize_ctf prototype.
8041 * d-lang.c: Remove _initialize_d_language prototype.
8042 * darwin-nat-info.c: Remove _initialize_darwin_info_commands
8043 prototype.
8044 * darwin-nat.c: Remove _initialize_darwin_inferior prototype.
8045 * dbxread.c: Remove _initialize_dbxread prototype.
8046 * dcache.c: Remove _initialize_dcache prototype.
8047 * demangle.c: Remove _initialize_demangler prototype.
8048 * disasm-selftests.c: Remove _initialize_disasm_selftests
8049 prototype.
8050 * disasm.c: Remove _initialize_disasm prototype.
8051 * dtrace-probe.c: Remove _initialize_dtrace_probe prototype.
8052 * dummy-frame.c: Remove _initialize_dummy_frame prototype.
8053 * dwarf2-frame-tailcall.c: Remove _initialize_tailcall_frame
8054 prototype.
8055 * dwarf2-frame.c: Remove _initialize_dwarf2_frame prototype.
8056 * dwarf2expr.c: Remove _initialize_dwarf2expr prototype.
8057 * dwarf2loc.c: Remove _initialize_dwarf2loc prototype.
8058 * dwarf2read.c: Remove _initialize_dwarf2_read prototype.
8059 * elfread.c: Remove _initialize_elfread prototype.
8060 * exec.c: Remove _initialize_exec prototype.
8061 * extension.c: Remove _initialize_extension prototype.
8062 * f-lang.c: Remove _initialize_f_language prototype.
8063 * f-valprint.c: Remove _initialize_f_valprint prototype.
8064 * fbsd-nat.c: Remove _initialize_fbsd_nat prototype.
8065 * fbsd-tdep.c: Remove _initialize_fbsd_tdep prototype.
8066 * filesystem.c: Remove _initialize_filesystem prototype.
8067 * findcmd.c: Remove _initialize_mem_search prototype.
8068 * fork-child.c: Remove _initialize_fork_child prototype.
8069 * frame-base.c: Remove _initialize_frame_base prototype.
8070 * frame-unwind.c: Remove _initialize_frame_unwind prototype.
8071 * frame.c: Remove _initialize_frame prototype.
8072 * frv-linux-tdep.c: Remove _initialize_frv_linux_tdep prototype.
8073 * frv-tdep.c: Remove _initialize_frv_tdep prototype.
8074 * ft32-tdep.c: Remove _initialize_ft32_tdep prototype.
8075 * gcore.c: Remove _initialize_gcore prototype.
8076 * gdb_bfd.c: Remove _initialize_gdb_bfd prototype.
8077 * gdbarch.c: Regenerate.
8078 * gdbarch.sh: Remove _initialize_gdbarch prototype.
8079 * gdbtypes.c: Remove _initialize_gdbtypes prototype.
8080 * gnu-nat.c: Remove _initialize_gnu_nat prototype.
8081 * gnu-v2-abi.c: Remove _initialize_gnu_v2_abi prototype.
8082 * gnu-v3-abi.c: Remove _initialize_gnu_v3_abi prototype.
8083 * go-lang.c: Remove _initialize_go_language prototype.
8084 * go32-nat.c: Remove _initialize_go32_nat prototype.
8085 * guile/guile.c: Remove _initialize_guile prototype.
8086 * h8300-tdep.c: Remove _initialize_h8300_tdep prototype.
8087 * hppa-linux-nat.c: Remove _initialize_hppa_linux_nat prototype.
8088 * hppa-linux-tdep.c: Remove _initialize_hppa_linux_tdep prototype.
8089 * hppa-nbsd-nat.c: Remove _initialize_hppanbsd_nat prototype.
8090 * hppa-nbsd-tdep.c: Remove _initialize_hppanbsd_tdep prototype.
8091 * hppa-obsd-nat.c: Remove _initialize_hppaobsd_nat prototype.
8092 * hppa-obsd-tdep.c: Remove _initialize_hppaobsd_tdep prototype.
8093 * hppa-tdep.c: Remove _initialize_hppa_tdep prototype.
8094 * i386-bsd-nat.c: Remove _initialize_i386bsd_nat prototype.
8095 * i386-cygwin-tdep.c: Remove _initialize_i386_cygwin_tdep
8096 prototype.
8097 * i386-darwin-tdep.c: Remove _initialize_i386_darwin_tdep
8098 prototype.
8099 * i386-dicos-tdep.c: Remove _initialize_i386_dicos_tdep prototype.
8100 * i386-fbsd-nat.c: Remove _initialize_i386fbsd_nat prototype.
8101 * i386-fbsd-tdep.c: Remove _initialize_i386fbsd_tdep prototype.
8102 * i386-gnu-nat.c: Remove _initialize_i386gnu_nat prototype.
8103 * i386-gnu-tdep.c: Remove _initialize_i386gnu_tdep prototype.
8104 * i386-linux-nat.c: Remove _initialize_i386_linux_nat prototype.
8105 * i386-linux-tdep.c: Remove _initialize_i386_linux_tdep prototype.
8106 * i386-nbsd-nat.c: Remove _initialize_i386nbsd_nat prototype.
8107 * i386-nbsd-tdep.c: Remove _initialize_i386nbsd_tdep prototype.
8108 * i386-nto-tdep.c: Remove _initialize_i386nto_tdep prototype.
8109 * i386-obsd-nat.c: Remove _initialize_i386obsd_nat prototype.
8110 * i386-obsd-tdep.c: Remove _initialize_i386obsd_tdep prototype.
8111 * i386-sol2-nat.c: Remove _initialize_amd64_sol2_nat prototype.
8112 * i386-sol2-tdep.c: Remove _initialize_amd64_sol2_tdep prototype.
8113 * i386-tdep.c: Remove _initialize_i386_tdep prototype.
8114 * i386-windows-nat.c: Remove _initialize_i386_windows_nat
8115 prototype.
8116 * ia64-libunwind-tdep.c: Remove _initialize_libunwind_frame
8117 prototype.
8118 * ia64-linux-nat.c: Remove _initialize_ia64_linux_nat prototype.
8119 * ia64-linux-tdep.c: Remove _initialize_ia64_linux_tdep prototype.
8120 * ia64-tdep.c: Remove _initialize_ia64_tdep prototype.
8121 * ia64-vms-tdep.c: Remove _initialize_ia64_vms_tdep prototype.
8122 * infcall.c: Remove _initialize_infcall prototype.
8123 * infcmd.c: Remove _initialize_infcmd prototype.
8124 * inferior.c: Remove _initialize_inferiors prototype.
8125 * inflow.c: Remove _initialize_inflow prototype.
8126 * infrun.c: Remove _initialize_infrun prototype.
8127 * interps.c: Remove _initialize_interpreter prototype.
8128 * iq2000-tdep.c: Remove _initialize_iq2000_tdep prototype.
8129 * jit.c: Remove _initialize_jit prototype.
8130 * language.c: Remove _initialize_language prototype.
8131 * linux-fork.c: Remove _initialize_linux_fork prototype.
8132 * linux-nat.c: Remove _initialize_linux_nat prototype.
8133 * linux-tdep.c: Remove _initialize_linux_tdep prototype.
8134 * linux-thread-db.c: Remove _initialize_thread_db prototype.
8135 * lm32-tdep.c: Remove _initialize_lm32_tdep prototype.
8136 * m2-lang.c: Remove _initialize_m2_language prototype.
8137 * m32c-tdep.c: Remove _initialize_m32c_tdep prototype.
8138 * m32r-linux-nat.c: Remove _initialize_m32r_linux_nat prototype.
8139 * m32r-linux-tdep.c: Remove _initialize_m32r_linux_tdep prototype.
8140 * m32r-tdep.c: Remove _initialize_m32r_tdep prototype.
8141 * m68hc11-tdep.c: Remove _initialize_m68hc11_tdep prototype.
8142 * m68k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
8143 * m68k-bsd-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
8144 * m68k-linux-nat.c: Remove _initialize_m68k_linux_tdep prototype.
8145 * m68k-linux-tdep.c: Remove _initialize_m68k_linux_tdep prototype.
8146 * m68k-tdep.c: Remove _initialize_m68k_tdep prototype.
8147 * m88k-bsd-nat.c: Remove _initialize_m68kbsd_nat prototype.
8148 * m88k-tdep.c: Remove _initialize_m68kbsd_tdep prototype.
8149 * machoread.c: Remove _initialize_machoread prototype.
8150 * macrocmd.c: Remove _initialize_macrocmd prototype.
8151 * macroscope.c: Remove _initialize_macroscope prototype.
8152 * maint.c: Remove _initialize_maint_cmds prototype.
8153 * mdebugread.c: Remove _initialize_mdebugread prototype.
8154 * memattr.c: Remove _initialize_mem prototype.
8155 * mep-tdep.c: Remove _initialize_mep_tdep prototype.
8156 * mi/mi-cmd-env.c: Remove _initialize_mi_cmd_env prototype.
8157 * mi/mi-cmds.c: Remove _initialize_mi_cmds prototype.
8158 * mi/mi-interp.c: Remove _initialize_mi_interp prototype.
8159 * mi/mi-main.c: Remove _initialize_mi_main prototype.
8160 * microblaze-linux-tdep.c: Remove
8161 _initialize_microblaze_linux_tdep prototype.
8162 * microblaze-tdep.c: Remove _initialize_microblaze_tdep prototype.
8163 * mips-fbsd-nat.c: Remove _initialize_mips_fbsd_nat prototype.
8164 * mips-fbsd-tdep.c: Remove _initialize_mips_fbsd_tdep prototype.
8165 * mips-linux-nat.c: Remove _initialize_mips_linux_nat prototype.
8166 * mips-linux-tdep.c: Remove _initialize_mips_linux_tdep prototype.
8167 * mips-nbsd-nat.c: Remove _initialize_mipsnbsd_nat prototype.
8168 * mips-nbsd-tdep.c: Remove _initialize_mipsnbsd_tdep prototype.
8169 * mips-sde-tdep.c: Remove _initialize_mips_sde_tdep prototype.
8170 * mips-tdep.c: Remove _initialize_mips_tdep prototype.
8171 * mips64-obsd-nat.c: Remove _initialize_mips64obsd_nat prototype.
8172 * mips64-obsd-tdep.c: Remove _initialize_mips64obsd_tdep
8173 prototype.
8174 * mipsread.c: Remove _initialize_mipsread prototype.
8175 * mn10300-linux-tdep.c: Remove _initialize_mn10300_linux_tdep
8176 prototype.
8177 * mn10300-tdep.c: Remove _initialize_mn10300_tdep prototype.
8178 * moxie-tdep.c: Remove _initialize_moxie_tdep prototype.
8179 * msp430-tdep.c: Remove _initialize_msp430_tdep prototype.
8180 * mt-tdep.c: Remove _initialize_mt_tdep prototype.
8181 * nds32-tdep.c: Remove _initialize_nds32_tdep prototype.
8182 * nios2-linux-tdep.c: Remove _initialize_nios2_linux_tdep
8183 prototype.
8184 * nios2-tdep.c: Remove _initialize_nios2_tdep prototype.
8185 * nto-procfs.c: Remove _initialize_procfs prototype.
8186 * nto-tdep.c: Remove _initialize_nto_tdep prototype.
8187 * objc-lang.c: Remove _initialize_objc_language prototype.
8188 * objfiles.c: Remove _initialize_objfiles prototype.
8189 * observer.c: Remove observer_test_first_notification_function,
8190 observer_test_second_notification_function,
8191 observer_test_third_notification_function, and
8192 _initialize_observer prototypes.
8193 * opencl-lang.c: Remove _initialize_opencl_language prototypes.
8194 * osabi.c: Remove _initialize_gdb_osabi prototype.
8195 * osdata.c: Remove _initialize_osdata prototype.
8196 * p-valprint.c: Remove _initialize_pascal_valprint prototype.
8197 * parse.c: Remove _initialize_parse prototype.
8198 * ppc-fbsd-nat.c: Remove _initialize_ppcfbsd_nat prototype.
8199 * ppc-fbsd-tdep.c: Remove _initialize_ppcfbsd_tdep prototype.
8200 * ppc-linux-nat.c: Remove _initialize_ppc_linux_nat prototype.
8201 * ppc-linux-tdep.c: Remove _initialize_ppc_linux_tdep prototype.
8202 * ppc-nbsd-nat.c: Remove _initialize_ppcnbsd_nat prototype.
8203 * ppc-nbsd-tdep.c: Remove _initialize_ppcnbsd_tdep prototype.
8204 * ppc-obsd-nat.c: Remove _initialize_ppcobsd_nat prototype.
8205 * ppc-obsd-tdep.c: Remove _initialize_ppcobsd_tdep prototype.
8206 * printcmd.c: Remove _initialize_printcmd prototype.
8207 * probe.c: Remove _initialize_probe prototype.
8208 * proc-api.c: Remove _initialize_proc_api prototype.
8209 * proc-events.c: Remove _initialize_proc_events prototype.
8210 * proc-service.c: Remove _initialize_proc_service prototype.
8211 * procfs.c: Remove _initialize_procfs prototype.
8212 * psymtab.c: Remove _initialize_psymtab prototype.
8213 * python/python.c: Remove _initialize_python prototype.
8214 * ravenscar-thread.c: Remove _initialize_ravenscar prototype.
8215 * record-btrace.c: Remove _initialize_record_btrace prototype.
8216 * record-full.c: Remove _initialize_record_full prototype.
8217 * record.c: Remove _initialize_record prototype.
8218 * regcache.c: Remove _initialize_regcache prototype.
8219 * reggroups.c: Remove _initialize_reggroup prototype.
8220 * remote-notif.c: Remove _initialize_notif prototype.
8221 * remote-sim.c: Remove _initialize_remote_sim prototype.
8222 * remote.c: Remove _initialize_remote prototype.
8223 * reverse.c: Remove _initialize_reverse prototype.
8224 * rl78-tdep.c: Remove _initialize_rl78_tdep prototype.
8225 * rs6000-aix-tdep.c: Remove _initialize_rs6000_aix_tdep prototype.
8226 * rs6000-lynx178-tdep.c: Remove _initialize_rs6000_lynx178_tdep
8227 prototype.
8228 * rs6000-nat.c: Remove _initialize_rs6000_nat prototype.
8229 * rs6000-tdep.c: Remove _initialize_rs6000_tdep prototype.
8230 * rust-exp.y: Remove _initialize_rust_exp prototype.
8231 * rx-tdep.c: Remove _initialize_rx_tdep prototype.
8232 * s390-linux-nat.c: Remove _initialize_s390_nat prototype.
8233 * s390-linux-tdep.c: Remove _initialize_s390_tdep prototype.
8234 * score-tdep.c: Remove _initialize_score_tdep prototype.
8235 * selftest-arch.c: Remove _initialize_selftests_foreach_arch
8236 prototype.
8237 * ser-go32.c: Remove _initialize_ser_dos prototype.
8238 * ser-mingw.c: Remove _initialize_ser_windows prototype.
8239 * ser-pipe.c: Remove _initialize_ser_pipe prototype.
8240 * ser-tcp.c: Remove _initialize_ser_tcp prototype.
8241 * ser-unix.c: Remove _initialize_ser_hardwire prototype.
8242 * serial.c: Remove _initialize_serial prototype.
8243 * sh-linux-tdep.c: Remove _initialize_sh_linux_tdep prototype.
8244 * sh-nbsd-nat.c: Remove _initialize_shnbsd_nat prototype.
8245 * sh-nbsd-tdep.c: Remove _initialize_shnbsd_tdep prototype.
8246 * sh-tdep.c: Remove _initialize_sh_tdep prototype.
8247 * skip.c: Remove _initialize_step_skip prototype.
8248 * sol-thread.c: Remove _initialize_sol_thread prototype.
8249 * solib-aix.c: Remove _initialize_solib_aix prototype.
8250 * solib-darwin.c: Remove _initialize_darwin_solib prototype.
8251 * solib-dsbt.c: Remove _initialize_dsbt_solib prototype.
8252 * solib-frv.c: Remove _initialize_frv_solib prototype.
8253 * solib-spu.c: Remove _initialize_spu_solib prototype.
8254 * solib-svr4.c: Remove _initialize_svr4_solib prototype.
8255 * solib-target.c: Remove _initialize_solib_target prototype.
8256 * solib.c: Remove _initialize_solib prototype.
8257 * source.c: Remove _initialize_source prototype.
8258 * sparc-linux-nat.c: Remove _initialize_sparc_linux_nat prototype.
8259 * sparc-linux-tdep.c: Remove _initialize_sparc_linux_tdep
8260 prototype.
8261 * sparc-nat.c: Remove _initialize_sparc_nat prototype.
8262 * sparc-nbsd-nat.c: Remove _initialize_sparcnbsd_nat prototype.
8263 * sparc-nbsd-tdep.c: Remove _initialize_sparcnbsd_tdep prototype.
8264 * sparc-obsd-tdep.c: Remove _initialize_sparc32obsd_tdep
8265 prototype.
8266 * sparc-sol2-nat.c: Remove _initialize_sparc_sol2_nat prototype.
8267 * sparc-sol2-tdep.c: Remove _initialize_sparc_sol2_tdep prototype.
8268 * sparc-tdep.c: Remove _initialize_sparc_tdep prototype.
8269 * sparc64-fbsd-nat.c: Remove _initialize_sparc64fbsd_nat
8270 prototype.
8271 * sparc64-fbsd-tdep.c: Remove _initialize_sparc64fbsd_tdep
8272 prototype.
8273 * sparc64-linux-nat.c: Remove _initialize_sparc64_linux_nat
8274 prototype.
8275 * sparc64-linux-tdep.c: Remove _initialize_sparc64_linux_tdep
8276 prototype.
8277 * sparc64-nat.c: Remove _initialize_sparc64_nat prototype.
8278 * sparc64-nbsd-nat.c: Remove _initialize_sparc64nbsd_nat
8279 prototype.
8280 * sparc64-nbsd-tdep.c: Remove _initialize_sparc64nbsd_tdep
8281 prototype.
8282 * sparc64-obsd-nat.c: Remove _initialize_sparc64obsd_nat
8283 prototype.
8284 * sparc64-obsd-tdep.c: Remove _initialize_sparc64obsd_tdep
8285 prototype.
8286 * sparc64-sol2-tdep.c: Remove _initialize_sparc64_sol2_tdep
8287 prototype.
8288 * spu-linux-nat.c: Remove _initialize_spu_nat prototype.
8289 * spu-multiarch.c: Remove _initialize_spu_multiarch prototype.
8290 * spu-tdep.c: Remove _initialize_spu_tdep prototype.
8291 * stabsread.c: Remove _initialize_stabsread prototype.
8292 * stack.c: Remove _initialize_stack prototype.
8293 * stap-probe.c: Remove _initialize_stap_probe prototype.
8294 * std-regs.c: Remove _initialize_frame_reg prototype.
8295 * symfile-debug.c: Remove _initialize_symfile_debug prototype.
8296 * symfile-mem.c: Remove _initialize_symfile_mem prototype.
8297 * symfile.c: Remove _initialize_symfile prototype.
8298 * symmisc.c: Remove _initialize_symmisc prototype.
8299 * symtab.c: Remove _initialize_symtab prototype.
8300 * target-dcache.c: Remove _initialize_target_dcache prototype.
8301 * target-descriptions.c: Remove _initialize_target_descriptions
8302 prototype.
8303 * thread.c: Remove _initialize_thread prototype.
8304 * tic6x-linux-tdep.c: Remove _initialize_tic6x_linux_tdep
8305 prototype.
8306 * tic6x-tdep.c: Remove _initialize_tic6x_tdep prototype.
8307 * tilegx-linux-nat.c: Remove _initialize_tile_linux_nat prototype.
8308 * tilegx-linux-tdep.c: Remove _initialize_tilegx_linux_tdep
8309 prototype.
8310 * tilegx-tdep.c: Remove _initialize_tilegx_tdep prototype.
8311 * tracefile-tfile.c: Remove _initialize_tracefile_tfile prototype.
8312 * tracefile.c: Remove _initialize_tracefile prototype.
8313 * tracepoint.c: Remove _initialize_tracepoint prototype.
8314 * tui/tui-hooks.c: Remove _initialize_tui_hooks prototype.
8315 * tui/tui-interp.c: Remove _initialize_tui_interp prototype.
8316 * tui/tui-layout.c: Remove _initialize_tui_layout prototype.
8317 * tui/tui-regs.c: Remove _initialize_tui_regs prototype.
8318 * tui/tui-stack.c: Remove _initialize_tui_stack prototype.
8319 * tui/tui-win.c: Remove _initialize_tui_win prototype.
8320 * tui/tui.c: Remove _initialize_tui prototype.
8321 * typeprint.c: Remove _initialize_typeprint prototype.
8322 * user-regs.c: Remove _initialize_user_regs prototype.
8323 * utils.c: Remove _initialize_utils prototype.
8324 * v850-tdep.c: Remove _initialize_v850_tdep prototype.
8325 * valarith.c: Remove _initialize_valarith prototype.
8326 * valops.c: Remove _initialize_valops prototype.
8327 * valprint.c: Remove _initialize_valprint prototype.
8328 * value.c: Remove _initialize_values prototype.
8329 * varobj.c: Remove _initialize_varobj prototype.
8330 * vax-bsd-nat.c: Remove _initialize_vaxbsd_nat prototype.
8331 * vax-nbsd-tdep.c: Remove _initialize_vaxnbsd_tdep prototype.
8332 * vax-tdep.c: Remove _initialize_vax_tdep prototype.
8333 * windows-nat.c: Remove _initialize_windows_nat,
8334 _initialize_check_for_gdb_ini, and _initialize_loadable
8335 prototypes.
8336 * windows-tdep.c: Remove _initialize_windows_tdep prototype.
8337 * xcoffread.c: Remove _initialize_xcoffread prototype.
8338 * xml-support.c: Remove _initialize_xml_support prototype.
8339 * xstormy16-tdep.c: Remove _initialize_xstormy16_tdep prototype.
8340 * xtensa-linux-nat.c: Remove _initialize_xtensa_linux_nat
8341 prototype.
8342 * xtensa-linux-tdep.c: Remove _initialize_xtensa_linux_tdep
8343 prototype.
8344 * xtensa-tdep.c: Remove _initialize_xtensa_tdep prototype.
8345
8346 2017-09-08 Keith Seitz <keiths@redhat.com>
8347
8348 * dwarf2read.c (struct field_info) <fnfields>: Remove unused
8349 field.
8350
8351 2017-09-08 Christoph Weinmann <christoph.t.weinmann@intel.com>
8352
8353 * f-valprint.c (f_val_print): Remove check for one byte
8354 sized integers. Remove printing of character type.
8355
8356 2017-09-08 Frank Penczek <frank.penczek@intel.com>
8357 Christoph Weinmann <christoph.t.weinmann@intel.com>
8358 Bernhard Heckel <bernhard.heckel@intel.com>
8359
8360 * f-typeprint.c (f_type_print_base): Use fprintfi_filtered
8361 to maintain proper indentation when printing pointers/refs.
8362
8363 2017-09-07 Joel Brobecker <brobecker@adacore.com>
8364
8365 GDB 8.0.1 released.
8366
8367 2017-09-07 Joel Brobecker <brobecker@adacore.com>
8368
8369 * NEWS (Changes in GDB 7.11): Remove entry for QStartupWithShell.
8370
8371 2017-09-05 Tom Tromey <tom@tromey.com>
8372
8373 * parse.c (funcall_chain): Now a std::vector.
8374 (start_arglist, end_arglist): Simplify.
8375 (free_funcalls): Remove.
8376 (parse_exp_in_context_1): Remove cleanup.
8377
8378 2017-09-05 Tom Tromey <tom@tromey.com>
8379
8380 * go-exp.y (go_parse): Don't create a cleanup.
8381
8382 2017-09-05 Tom Tromey <tom@tromey.com>
8383
8384 * d-exp.y (PrimaryExpression): Use std::string.
8385 (d_parse): Don't create a cleanup.
8386
8387 2017-09-05 Tom Tromey <tom@tromey.com>
8388
8389 * utils.c (do_clear_parser_state): Remove.
8390 (make_cleanup_clear_parser_state): Remove.
8391 * p-exp.y (pascal_parse): Use scoped_restore.
8392 * m2-exp.y (m2_parse): Use scoped_restore.
8393 * f-exp.y (f_parse): Use scoped_restore.
8394 * d-exp.y (d_parse): Use scoped_restore.
8395 * c-exp.y (c_parse): Use scoped_restore.
8396 * ada-exp.y (ada_parse): Use scoped_restore.
8397 * utils.h (make_cleanup_clear_parser_state): Remove.
8398
8399 2017-09-06 Keith Seitz <keiths@redhat.com>
8400
8401 * dwarf2read.c (dw2_linkage_name_attr): New function.
8402 (dw2_linkage_name): New function.
8403 (dwarf2_compute_name, dwarf2_physname, read_call_site_scope)
8404 (guess_full_die_structure_name, dwarf2_name): Use dw2_linkage_name.
8405 (anonymous_struct_prefix, dwarf2_name): Use dw2_linkage_name_attr.
8406
8407 2017-09-06 Kamil Rytarowski <n54@gmx.com>
8408
8409 * config/djgpp/djconfig.sh: Correct shell portability issue.
8410
8411 2017-09-06 Kamil Rytarowski <n54@gmx.com>
8412
8413 * configure.nat: Define HAVE_NATIVE_GCORE_HOST on NetBSD.
8414
8415 2017-09-06 John Baldwin <jhb@FreeBSD.org>
8416
8417 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
8418 * NEWS: Mention new FreeBSD/mips native configuration.
8419 * configure.host: Add aarch64*-*-freebsd*.
8420 * configure.nat: Likewise.
8421 * aarch64-fbsd-nat.c: New file.
8422
8423 2017-09-06 John Baldwin <jhb@FreeBSD.org>
8424
8425 * Makefile.in (ALL_64_TARGET_OBS): Add aarch64-fbsd-tdep.o.
8426 (ALLDEPFILES): Add aarch64-fbsd-tdep.c.
8427 * NEWS: Mention new FreeBSD/aarch64 target.
8428 * configure.tgt: Add aarch64*-*-freebsd*.
8429 * aarch64-fbsd-tdep.c: New file.
8430 * aarch64-fbsd-tdep.h: New file.
8431
8432 2017-09-06 Kamil Rytarowski <n54@gmx.com>
8433
8434 * MAINTAINERS (Write After Approval): Add Kamil Rytarowski.
8435
8436 2017-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8437
8438 * parse.c (find_minsym_type_and_address): Don't relocate addresses
8439 of TLS symbols.
8440
8441 2017-09-05 Philippe Waroquiers <philippe.waroquiers@skynet.be>
8442
8443 * objfiles.c (get_objfile_bfd_data): Remove useless obstack_init
8444 call.
8445
8446 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
8447
8448 * infrun.c (follow_exec): Call add_thread after
8449 target_find_description.
8450
8451 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
8452
8453 * infrun.c (handle_inferior_event_1): When exec'ing, read
8454 stop_pc after follow_exec.
8455
8456 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
8457
8458 * remote.c (process_g_packet): Update error message.
8459
8460 2017-09-05 Yao Qi <yao.qi@linaro.org>
8461
8462 * configure.tgt (gdb_target_obs): Add i386.o for x86_64-*
8463 targets.
8464
8465 2017-09-05 Pedro Alves <palves@redhat.com>
8466
8467 * eval.c (eval_call, evaluate_funcall): New functions, factored
8468 out from ...
8469 (evaluate_subexp_standard): ... this.
8470
8471 2017-09-05 Yao Qi <yao.qi@linaro.org>
8472
8473 * amd64-tdep.c (amd64_target_description): Create target
8474 descriptions.
8475 (_initialize_amd64_tdep): Don't call functions
8476 initialize_tdesc_amd64_*. Add self tests.
8477 * arch/amd64.c (amd64_create_target_description): Add parameter
8478 is_linux. Call set_tdesc_osabi if is_linux is true.
8479 * arch/amd64.h (amd64_create_target_description): Update the
8480 declaration.
8481 * arch/i386.c (i386_create_target_description): Add parameter
8482 is_linux. Call set_tdesc_osabi if is_linux is true.
8483 * arch/i386.h (i386_create_target_description): Update
8484 declaration.
8485 * configure.tgt: Add i386.o to gdb_target_obs.
8486 * features/Makefile (XMLTOC): Remove i386/*.xml.
8487 * features/i386/amd64-avx-avx512.c: Remove.
8488 * features/i386/amd64-avx-mpx-avx512-pku.c: Remove.
8489 * features/i386/amd64-avx-mpx.c: Remove.
8490 * features/i386/amd64-avx.c: Remove.
8491 * features/i386/amd64-mpx.c: Remove.
8492 * features/i386/amd64.c: Remove.
8493 * features/i386/i386-avx-avx512.c: Remove.
8494 * features/i386/i386-avx-mpx-avx512-pku.c: Remove.
8495 * features/i386/i386-avx-mpx.c: Remove.
8496 * features/i386/i386-avx.c: Remove.
8497 * features/i386/i386-mmx.c: Remove.
8498 * features/i386/i386-mpx.c: Remove.
8499 * features/i386/i386.c: Remove.
8500 * i386-tdep.c: Don't include features/i386/i386*.c., include
8501 target-descriptions.h and arch/i386.h.
8502 (i386_target_description): Create target descriptions.
8503 (i386_gdbarch_init): Don't call initialize_tdesc_i386_*
8504 functions. Do self tests.
8505
8506 2017-09-05 Yao Qi <yao.qi@linaro.org>
8507
8508 * features/Makefile (XMLTOC): Remove i386/amd64XXX-linux.xml.
8509 * features/i386/amd64-avx-avx512-linux.c: Removed.
8510 * features/i386/amd64-avx-linux.c: Removed.
8511 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Removed.
8512 * features/i386/amd64-avx-mpx-linux.c: Removed.
8513 * features/i386/amd64-linux.c: Removed.
8514 * features/i386/amd64-mpx-linux.c: Removed.
8515 * features/i386/x32-avx-avx512-linux.c: Removed.
8516 * features/i386/x32-avx-linux.c: Removed.
8517 * features/i386/x32-linux.c: Removed.
8518
8519 2017-09-05 Yao Qi <yao.qi@linaro.org>
8520
8521 * amd64-linux-tdep.c: Include arch/amd64.h. Don't include
8522 features/i386/*.c.
8523 (amd64_linux_read_description): Call
8524 amd64_create_target_description.
8525 * arch/amd64.c: New file.
8526 * arch/amd64.h: New file.
8527 * configure.tgt (x86_64-*-linux*): Append amd64.o.
8528 * Makefile.in (ALL_64_TARGET_OBS): Append amd64.o.
8529
8530 2017-09-05 Yao Qi <yao.qi@linaro.org>
8531
8532 * amd64-linux-tdep.c: Don't include amd64-XXX-linux and
8533 x32-XXX-linux.c. Include 64bit-XX.c and x32-XX.c.
8534 (amd64_linux_read_description): Create target descriptions.
8535 (_initialize_amd64_linux_tdep): Don't call initialize_tdesc_XXX
8536 functions. Add unit tests.
8537 * features/Makefile (FEATURE_XMLFILES): Append 64bit-XXX.xml and
8538 x32-core.xml.
8539 * features/i386/64bit-avx.c: Generated.
8540 * features/i386/64bit-avx512.c: Generated.
8541 * features/i386/64bit-core.c: Generated.
8542 * features/i386/64bit-linux.c: Generated.
8543 * features/i386/64bit-mpx.c: Generated.
8544 * features/i386/64bit-pkeys.c: Generated.
8545 * features/i386/64bit-segments.c: Generated.
8546 * features/i386/64bit-sse.c: Generated.
8547 * features/i386/x32-core.c: Generated.
8548 * target-descriptions.c (maint_print_c_tdesc_cmd): Print feature
8549 c files for amd64-linux and x32-linux.
8550
8551 2017-09-05 Yao Qi <yao.qi@linaro.org>
8552
8553 * amd64-linux-tdep.c (amd64_linux_read_description): New
8554 function.
8555 (amd64_linux_core_read_description): Call
8556 amd64_linux_read_description.
8557 (amd64_linux_init_abi): Likewise.
8558 (amd64_x32_linux_init_abi): Likewise.
8559 * amd64-linux-tdep.h (amd64_linux_read_description): Declare.
8560 * x86-linux-nat.c (x86_linux_read_description): Call
8561 amd64_linux_read_description.
8562
8563 2017-09-05 Yao Qi <yao.qi@linaro.org>
8564
8565 * amd64-linux-tdep.c (amd64_linux_core_read_description): Update
8566 comments.
8567
8568 2017-09-05 Yao Qi <yao.qi@linaro.org>
8569
8570 * features/Makefile (XMLTOC): Remove i386/i386-XX-linux.xml.
8571 * features/i386/i386-avx-avx512-linux.c: Remove.
8572 * features/i386/i386-avx-linux.c: Remove.
8573 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Remove.
8574 * features/i386/i386-avx-mpx-linux.c: Remove.
8575 * features/i386/i386-linux.c: Remove.
8576 * features/i386/i386-mmx-linux.c: Remove.
8577 * features/i386/i386-mpx-linux.c: Remove.
8578
8579 2017-09-05 Yao Qi <yao.qi@linaro.org>
8580
8581 * Makefile.in (ALL_TARGET_OBS): Add i386.o.
8582 (SFILES): Add arch/i386.c.
8583 (HFILES_NO_SRCDIR): Add arch/i386.h.
8584 * arch/i386.c: New file.
8585 * arch/i386.h: New file.
8586 * arch/tdesc.h (allocate_target_description): Declare.
8587 (set_tdesc_architecture): Declare.
8588 (set_tdesc_osabi): Declare.
8589 * configure.tgt (i[34567]86-*-linux*): Add i386.o.
8590 * i386-linux-tdep.c: Don't include ../features/i386/32bit-XXX.c.
8591 include arch/i386.h.
8592 (i386_linux_read_description): Remove code and call
8593 i386_create_target_description.
8594 (set_tdesc_architecture): New function.
8595 (set_tdesc_osabi): New function.
8596 * target-descriptions.h (allocate_target_description): Remove.
8597
8598 2017-09-05 Yao Qi <yao.qi@linaro.org>
8599
8600 * arch/tdesc.h (tdesc_create_feature): Add an argument xml.
8601 * target-descriptions.c (tdesc_create_feature): Likewise, and
8602 adjust code.
8603 * features/i386/32bit-avx.c: Re-generated.
8604 * features/i386/32bit-avx512.c: Re-generated.
8605 * features/i386/32bit-core.c: Re-generated.
8606 * features/i386/32bit-linux.c: Re-generated.
8607 * features/i386/32bit-mpx.c: Re-generated.
8608 * features/i386/32bit-pkeys.c: Re-generated.
8609 * features/i386/32bit-sse.c: Re-generated.
8610
8611 2017-09-05 Yao Qi <yao.qi@linaro.org>
8612
8613 * regformats/regdef.h (struct reg): Override operator == and !=.
8614
8615 2017-09-05 Yao Qi <yao.qi@linaro.org>
8616
8617 * arch/tdesc.h: New file.
8618 * regformats/regdat.sh: Generate code using tdesc_create_reg.
8619 * target-descriptions.c: Update comments.
8620 * target-descriptions.h: Include "arch/tdesc.h". Remove the
8621 declarations.
8622 * features/i386/32bit-avx.c: Re-generated.
8623 * features/i386/32bit-avx512.c: Re-generated.
8624 * features/i386/32bit-core.c: Re-generated.
8625 * features/i386/32bit-linux.c: Re-generated.
8626 * features/i386/32bit-mpx.c: Re-generated.
8627 * features/i386/32bit-pkeys.c: Re-generated.
8628 * features/i386/32bit-sse.c: Re-generated.
8629
8630 2017-09-05 Yao Qi <yao.qi@linaro.org>
8631
8632 * regformats/regdat.sh: Update generated code.
8633
8634 2017-09-05 Yao Qi <yao.qi@linaro.org>
8635
8636 * regformats/regdat.sh: Adjust code order.
8637
8638 2017-09-05 Simon Marchi <simon.marchi@ericsson.com>
8639
8640 * expprint.c (dump_subexp_body_standard): Use constant format
8641 string in fprintf_filtered call.
8642
8643 2017-09-04 John Baldwin <jhb@FreeBSD.org>
8644
8645 * configure.nat: Add "x86-nat.o x86-dregs.o" for NetBSD/amd64 and
8646 NetBSD/i386.
8647 * x86-bsd-nat.c [!DBREG_DRX && __NetBSD__]: Define DBREG_DRX.
8648
8649 2017-09-04 John Baldwin <jhb@FreeBSD.org>
8650
8651 * bsd-kvm.o: Make <sys/user.h> conditional on HAVE_SYS_USER_H.
8652
8653 2017-09-04 John Baldwin <jhb@FreeBSD.org>
8654
8655 * bsd-kvm.o: Define _KMEMUSER.
8656 * configure.ac: Define _KMEMUSER when checking for "struct lwp".
8657 * configure: Regenerate.
8658
8659 2017-09-04 John Baldwin <jhb@FreeBSD.org>
8660
8661 * amd64-fbsd-nat.c: Add include of "x86-xstate.h".
8662 * i386-fbsd-nat.c: Likewise.
8663
8664 2017-09-04 John Baldwin <jhb@FreeBSD.org>
8665
8666 * unittests/array-view-selftests.c: Add include of <array>.
8667
8668 2017-09-04 John Baldwin <jhb@FreeBSD.org>
8669
8670 * spu-tdep.c (flush_ea_cache): Add missing argument to
8671 call_function_by_hand.
8672
8673 2017-09-04 Pedro Alves <palves@redhat.com>
8674
8675 * NEWS (Safer support for debugging with no debug info): New.
8676
8677 2017-09-04 Pedro Alves <palves@redhat.com>
8678
8679 * c-exp.y (function_method, function_method_void): Add current
8680 instance flags to TYPE_INSTANCE.
8681 * dwarf2read.c (check_modifier): New.
8682 (compute_delayed_physnames): Assert that only C++ adds delayed
8683 physnames. Mark fn_fields as const/volatile depending on
8684 physname.
8685 * eval.c (make_params): New type_instance_flags parameter. Use
8686 it as the new type's instance flags.
8687 (evaluate_subexp_standard) <TYPE_INSTANCE>: Extract the instance
8688 flags element and pass it to make_params.
8689 * expprint.c (print_subexp_standard) <TYPE_INSTANCE>: Handle
8690 instance flags element.
8691 (dump_subexp_body_standard) <TYPE_INSTANCE>: Likewise.
8692 * gdbtypes.h: Include "enum-flags.h".
8693 (type_instance_flags): New enum-flags type.
8694 (TYPE_CONST, TYPE_VOLATILE, TYPE_RESTRICT, TYPE_ATOMIC)
8695 (TYPE_CODE_SPACE, TYPE_DATA_SPACE): Return boolean.
8696 * parse.c (operator_length_standard) <TYPE_INSTANCE>: Adjust.
8697 (follow_type_instance_flags): New function.
8698 (operator_check_standard) <TYPE_INSTANCE>: Adjust.
8699 * parser-defs.h (follow_type_instance_flags): Declare.
8700 * valops.c (value_struct_elt_for_reference): const/volatile must
8701 match too.
8702
8703 2017-09-04 Pedro Alves <palves@redhat.com>
8704
8705 * cp-namespace.c (cp_search_static_and_baseclasses): Handle
8706 function/method scopes; lookup the nested name as a function local
8707 static variable.
8708
8709 2017-09-04 Pedro Alves <palves@redhat.com>
8710
8711 (%type <voidval>): Add function_method.
8712 * c-exp.y (exp): New production for calls with no arguments.
8713 (function_method, function_method_void_or_typelist): New
8714 productions.
8715 (exp): New production for "method()::static_var".
8716 * eval.c (evaluate_subexp_standard): Handle OP_FUNC_STATIC_VAR.
8717 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
8718 Handle OP_FUNC_STATIC_VAR.
8719 * parse.c (operator_length_standard):
8720 Handle OP_FUNC_STATIC_VAR.
8721
8722 2017-09-04 Pedro Alves <palves@redhat.com>
8723
8724 * eval.c (evaluate_subexp_standard): Remove UNOP_MEMVAL_TLS
8725 handling.
8726 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
8727 Ditto.
8728 * parse.c (operator_length_standard, operator_check_standard):
8729 Ditto.
8730 * std-operator.def (UNOP_MEMVAL_TLS): Delete.
8731
8732 2017-09-04 Pedro Alves <palves@redhat.com>
8733
8734 * ax-gdb.c: Include "typeprint.h".
8735 (gen_expr_for_cast): New function.
8736 (gen_expr) <OP_CAST, OP_CAST_TYPE>: Use it.
8737 <OP_VAR_VALUE, OP_MSYM_VAR_VALUE>: Error out if the variable's
8738 type is unknown.
8739 * dwarf2read.c (new_symbol_full): Fallback to int instead of
8740 nodebug_data_symbol.
8741 * eval.c: Include "typeprint.h".
8742 (evaluate_subexp_standard) <OP_VAR_VALUE, OP_VAR_MSYM_VALUE>:
8743 Error out if symbol has unknown type.
8744 <UNOP_CAST, UNOP_CAST_TYPE>: Common bits factored out to
8745 evaluate_subexp_for_cast.
8746 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof): Handle
8747 OP_VAR_MSYM_VALUE.
8748 (evaluate_subexp_for_cast): New function.
8749 * gdbtypes.c (init_nodebug_var_type): New function.
8750 (objfile_type): Use it to initialize types of variables with no
8751 debug info.
8752 * typeprint.c (error_unknown_type): New.
8753 * typeprint.h (error_unknown_type): New declaration.
8754 * compile/compile-c-types.c (convert_type_basic): Handle
8755 TYPE_CODE_ERROR; warn and fallback to int for variables with
8756 unknown type.
8757
8758 2017-09-04 Pedro Alves <palves@redhat.com>
8759
8760 * eval.c (evaluate_var_value): New function, factored out from ...
8761 (evaluate_subexp_standard): ... here.
8762
8763 2017-09-04 Pedro Alves <palves@redhat.com>
8764
8765 * eval.c (evaluate_subexp_standard) <UNOP_COMPLEMENT, UNOP_ADDR>:
8766 Remove useless assignments to 'op'.
8767
8768 2017-09-04 Pedro Alves <palves@redhat.com>
8769
8770 * eval.c (eval_skip_value): New function.
8771 (evaluate_subexp_standard): Use it.
8772
8773 2017-09-04 Pedro Alves <palves@redhat.com>
8774
8775 * eval.c (evaluate_subexp_standard): <OP_FUNCALL>: Extract
8776 function name from symbol/minsym and pass it to
8777 error_call_unknown_return_type.
8778
8779 2017-09-04 Pedro Alves <palves@redhat.com>
8780
8781 * ada-lang.c (resolve_subexp): Handle OP_VAR_MSYM_VALUE.
8782 * ax-gdb.c (gen_msym_var_ref): New function.
8783 (gen_expr): Handle OP_VAR_MSYM_VALUE.
8784 * eval.c (evaluate_var_msym_value): New function.
8785 * eval.c (evaluate_subexp_standard): Handle OP_VAR_MSYM_VALUE.
8786 <OP_FUNCALL>: Extract function name from symbol/minsym and pass it
8787 to call_function_by_hand.
8788 * expprint.c (print_subexp_standard, dump_subexp_body_standard):
8789 Handle OP_VAR_MSYM_VALUE.
8790 (union exp_element) <msymbol>: New field.
8791 * minsyms.h (struct type): Forward declare.
8792 (find_minsym_type_and_address): Declare.
8793 * parse.c (write_exp_elt_msym): New function.
8794 (write_exp_msymbol): Delete, refactored as ...
8795 (find_minsym_type_and_address): ... this new function.
8796 (write_exp_msymbol): Reimplement using OP_VAR_MSYM_VALUE.
8797 (operator_length_standard, operator_check_standard): Handle
8798 OP_VAR_MSYM_VALUE.
8799 * std-operator.def (OP_VAR_MSYM_VALUE): New.
8800
8801 2017-09-04 Pedro Alves <palves@redhat.com>
8802
8803 * ada-lang.c (ada_evaluate_subexp) <TYPE_CODE_FUNC>: Don't handle
8804 TYPE_GNU_IFUNC specially here. Throw error if return type is
8805 unknown.
8806 * ada-typeprint.c (print_func_type): Handle functions with unknown
8807 return type.
8808 * c-typeprint.c (c_type_print_base): Handle functions and methods
8809 with unknown return type.
8810 * compile/compile-c-symbols.c (convert_symbol_bmsym)
8811 <mst_text_gnu_ifunc>: Use nodebug_text_gnu_ifunc_symbol.
8812 * compile/compile-c-types.c: Include "objfiles.h".
8813 (convert_func): For functions with unknown return type, warn and
8814 default to int.
8815 * compile/compile-object-run.c (compile_object_run): Adjust call
8816 to call_function_by_hand_dummy.
8817 * elfread.c (elf_gnu_ifunc_resolve_addr): Adjust call to
8818 call_function_by_hand.
8819 * eval.c (evaluate_subexp_standard): Adjust calls to
8820 call_function_by_hand. Handle functions and methods with unknown
8821 return type. Pass expect_type to call_function_by_hand.
8822 * f-typeprint.c (f_type_print_base): Handle functions with unknown
8823 return type.
8824 * gcore.c (call_target_sbrk): Adjust call to
8825 call_function_by_hand.
8826 * gdbtypes.c (objfile_type): Leave nodebug text symbol with NULL
8827 return type instead of int. Make nodebug_text_gnu_ifunc_symbol be
8828 an integer address type instead of nodebug.
8829 * guile/scm-value.c (gdbscm_value_call): Adjust call to
8830 call_function_by_hand.
8831 * infcall.c (error_call_unknown_return_type): New function.
8832 (call_function_by_hand): New "default_return_type" parameter.
8833 Pass it down.
8834 (call_function_by_hand_dummy): New "default_return_type"
8835 parameter. Use it instead of defaulting to int. If there's no
8836 default and the return type is unknown, throw an error. If
8837 there's a default return type, and the called function has no
8838 debug info, then assume the function is prototyped.
8839 * infcall.h (call_function_by_hand, call_function_by_hand_dummy):
8840 New "default_return_type" parameter.
8841 (error_call_unknown_return_type): New declaration.
8842 * linux-fork.c (call_lseek): Cast return type of lseek.
8843 (inferior_call_waitpid, checkpoint_command): Adjust calls to
8844 call_function_by_hand.
8845 * linux-tdep.c (linux_infcall_mmap, linux_infcall_munmap): Adjust
8846 calls to call_function_by_hand.
8847 * m2-typeprint.c (m2_procedure): Handle functions with unknown
8848 return type.
8849 * objc-lang.c (lookup_objc_class, lookup_child_selector)
8850 (value_nsstring, print_object_command): Adjust calls to
8851 call_function_by_hand.
8852 * p-typeprint.c (pascal_type_print_varspec_prefix): Handle
8853 functions with unknown return type.
8854 (pascal_type_print_func_varspec_suffix): New function.
8855 (pascal_type_print_varspec_suffix) <TYPE_CODE_FUNC,
8856 TYPE_CODE_METHOD>: Use it.
8857 * python/py-value.c (valpy_call): Adjust call to
8858 call_function_by_hand.
8859 * rust-lang.c (rust_evaluate_funcall): Adjust call to
8860 call_function_by_hand.
8861 * valarith.c (value_x_binop, value_x_unop): Adjust calls to
8862 call_function_by_hand.
8863 * valops.c (value_allocate_space_in_inferior): Adjust call to
8864 call_function_by_hand.
8865 * typeprint.c (type_print_unknown_return_type): New function.
8866 * typeprint.h (type_print_unknown_return_type): New declaration.
8867
8868 2017-09-04 Pedro Alves <palves@redhat.com>
8869
8870 * gdbtypes.c (lookup_function_type_with_arguments): Mark function
8871 types with more than one parameter as prototyped.
8872
8873 2017-09-04 Pedro Alves <palves@redhat.com>
8874
8875 * cli/cli-cmds.c (print_disassembly, disassemble_current_function)
8876 (disassemble_command): Use gdb_disassembly_flags instead of bare
8877 int.
8878 * disasm.c (gdb_pretty_print_disassembler::pretty_print_insn)
8879 (dump_insns, do_mixed_source_and_assembly_deprecated)
8880 (do_mixed_source_and_assembly, do_assembly_only, gdb_disassembly):
8881 Use gdb_disassembly_flags instead of bare int.
8882 * disasm.h (DISASSEMBLY_SOURCE_DEPRECATED, DISASSEMBLY_RAW_INSN)
8883 (DISASSEMBLY_OMIT_FNAME, DISASSEMBLY_FILENAME)
8884 (DISASSEMBLY_OMIT_PC, DISASSEMBLY_SOURCE)
8885 (DISASSEMBLY_SPECULATIVE): No longer macros. Instead they're...
8886 (enum gdb_disassembly_flag): ... values of this new enumeration.
8887 (gdb_disassembly_flags): Define.
8888 (gdb_disassembly)
8889 (gdb_pretty_print_disassembler::pretty_print_insn): Use it.
8890 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Use
8891 gdb_disassembly_flags instead of bare int.
8892 * record-btrace.c (btrace_insn_history)
8893 (record_btrace_insn_history, record_btrace_insn_history_range)
8894 (record_btrace_insn_history_from): Use gdb_disassembly_flags
8895 instead of bare int.
8896 * record.c (get_insn_history_modifiers, cmd_record_insn_history):
8897 Use gdb_disassembly_flags instead of bare int.
8898 * target-debug.h (target_debug_print_gdb_disassembly_flags):
8899 Define.
8900 * target-delegates.c: Regenerate.
8901 * target.c (target_insn_history, target_insn_history_from)
8902 (target_insn_history_range): Use gdb_disassembly_flags instead of
8903 bare int.
8904 * target.h: Include "disasm.h".
8905 (struct target_ops) <to_insn_history, to_insn_history_from,
8906 to_insn_history_range>: Use gdb_disassembly_flags instead of bare
8907 int.
8908 (target_insn_history, target_insn_history_from)
8909 (target_insn_history_range): Use gdb_disassembly_flags instead of
8910 bare int.
8911
8912 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
8913
8914 * cli/cli-script.c (build_command_line): For if/while commands,
8915 check whether args is empty.
8916
8917 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
8918
8919 * cli/cli-script.h (enum misc_command_type): Move from defs.h.
8920 (enum command_control_type): Likewise.
8921 (struct command_line): Likewise.
8922 (free_command_lines): Likewise.
8923 (struct command_lines_deleter): Likewise.
8924 (command_line_up): Likewise.
8925 (read_command_lines): Likewise.
8926 (read_command_lines_1): Likewise.
8927 * defs.h (enum misc_command_type): Move to cli/cli-script.h.
8928 (enum command_control_type): Likewise.
8929 (struct command_line): Likewise.
8930 (free_command_lines): Likewise.
8931 (struct command_lines_deleter): Likewise.
8932 (command_line_up): Likewise.
8933 (read_command_lines): Likewise.
8934 (read_command_lines_1): Likewise.
8935 * breakpoint.h: Include cli/cli-script.h.
8936 * extension-priv.h: Likewise.
8937 * gdbcmd.h: Likewise.
8938
8939 2017-09-04 Pedro Alves <palves@redhat.com>
8940
8941 * ada-lang.c (is_known_support_routine): Move sal declaration to
8942 where it is initialized.
8943 * breakpoint.c (create_internal_breakpoint, init_catchpoint)
8944 (parse_breakpoint_sals, decode_static_tracepoint_spec)
8945 (clear_command, update_static_tracepoint): Remove init_sal
8946 references. Move declarations closer to initializations.
8947 * cli/cli-cmds.c (list_command): Move sal declarations closer to
8948 initializations.
8949 * elfread.c (elf_gnu_ifunc_resolver_stop): Remove init_sal
8950 references. Move sal declarations closer to initializations.
8951 * frame.c (find_frame_sal): Return a symtab_and_line via function
8952 return instead of output parameter. Remove init_sal references.
8953 * frame.h (find_frame_sal): Return a symtab_and_line via function
8954 return instead of output parameter.
8955 * guile/scm-frame.c (gdbscm_frame_sal): Adjust.
8956 * guile/scm-symtab.c (stscm_make_sal_smob): Use in-place new
8957 instead of memset.
8958 (gdbscm_find_pc_line): Remove init_sal reference.
8959 * infcall.c (call_function_by_hand_dummy): Remove init_sal
8960 references. Move declarations closer to initializations.
8961 * infcmd.c (set_step_frame): Update. Move declarations closer to
8962 initializations.
8963 (finish_backward): Remove init_sal references. Move declarations
8964 closer to initializations.
8965 * infrun.c (process_event_stop_test, handle_step_into_function)
8966 (insert_hp_step_resume_breakpoint_at_frame)
8967 (insert_step_resume_breakpoint_at_caller): Likewise.
8968 * linespec.c (create_sals_line_offset, decode_digits_ordinary)
8969 (symbol_to_sal): Likewise.
8970 * probe.c (parse_probes_in_pspace): Remove init_sal reference.
8971 * python/py-frame.c (frapy_find_sal): Move sal declaration closer
8972 to its initialization.
8973 * reverse.c (save_bookmark_command): Use new/delete. Remove
8974 init_sal references. Move declarations closer to initializations.
8975 * source.c (get_current_source_symtab_and_line): Remove brace
8976 initialization.
8977 (set_current_source_symtab_and_line): Now takes the sal by const
8978 reference. Remove brace initialization.
8979 (line_info): Remove init_sal reference.
8980 * source.h (set_current_source_symtab_and_line): Now takes a
8981 symtab_and_line via const reference.
8982 * stack.c (set_current_sal_from_frame): Adjust.
8983 (print_frame_info): Adjust.
8984 (get_last_displayed_sal): Return the sal via function return
8985 instead of via output parameter. Simplify.
8986 (frame_info): Adjust.
8987 * stack.h (get_last_displayed_sal): Return the sal via function
8988 return instead of via output parameter.
8989 * symtab.c (init_sal): Delete.
8990 (find_pc_sect_line): Remove init_sal references. Move
8991 declarations closer to initializations.
8992 (find_function_start_sal): Remove init_sal references. Move
8993 declarations closer to initializations.
8994 * symtab.h (struct symtab_and_line): In-class initialize all
8995 fields.
8996 * tracepoint.c (set_traceframe_context)
8997 (print_one_static_tracepoint_marker): Remove init_sal references.
8998 Move declarations closer to initializations.
8999 * tui/tui-disasm.c (tui_show_disassem_and_update_source): Adjust.
9000 * tui/tui-stack.c (tui_show_frame_info): Adjust. Move
9001 declarations closer to initializations.
9002 * tui/tui-winsource.c (tui_update_source_window_as_is): Remove
9003 init_sal references. Adjust.
9004
9005 2017-09-04 Pedro Alves <palves@redhat.com>
9006
9007 * ax-gdb.c (agent_command_1): Use range-for.
9008 * break-catch-throw.c (re_set_exception_catchpoint): Update.
9009 * breakpoint.c: Include "common/array-view.h".
9010 (init_breakpoint_sal, create_breakpoint_sal): Change sals
9011 parameter from struct symtabs_and_lines to
9012 array_view<symtab_and_line>. Adjust. Use range-for. Update.
9013 (breakpoint_sals_to_pc): Change sals parameter from struct
9014 symtabs_and_lines to std::vector reference.
9015 (check_fast_tracepoint_sals): Change sals parameter from struct
9016 symtabs_and_lines to std::array_view. Use range-for.
9017 (decode_static_tracepoint_spec): Return a std::vector instead of
9018 symtabs_and_lines. Update.
9019 (create_breakpoint): Update.
9020 (break_range_command, until_break_command, clear_command): Update.
9021 (base_breakpoint_decode_location, bkpt_decode_location)
9022 (bkpt_probe_create_sals_from_location)
9023 (bkpt_probe_decode_location, tracepoint_decode_location)
9024 (tracepoint_probe_decode_location)
9025 (strace_marker_create_sals_from_location): Return a std::vector
9026 instead of symtabs_and_lines.
9027 (strace_marker_create_breakpoints_sal): Update.
9028 (strace_marker_decode_location): Return a std::vector instead of
9029 symtabs_and_lines. Update.
9030 (update_breakpoint_locations): Change struct symtabs_and_lines
9031 parameters to gdb::array_view. Adjust.
9032 (location_to_sals): Return a std::vector instead of
9033 symtabs_and_lines. Update.
9034 (breakpoint_re_set_default): Use std::vector instead of struct
9035 symtabs_and_lines.
9036 (decode_location_default): Return a std::vector instead of
9037 symtabs_and_lines. Update.
9038 * breakpoint.h: Include "common/array-view.h".
9039 (struct breakpoint_ops) <decode_location>: Now returns a
9040 std::vector instead of returning a symtabs_and_lines via output
9041 parameter.
9042 (update_breakpoint_locations): Change sals parameters to use
9043 gdb::array_view.
9044 * cli/cli-cmds.c (edit_command, list_command): Update to use
9045 std::vector and gdb::array_view.
9046 (ambiguous_line_spec): Adjust to use gdb::array_view and
9047 range-for.
9048 (compare_symtabs): Rename to ...
9049 (cmp_symtabs): ... this. Change parameters to symtab_and_line
9050 const reference and adjust.
9051 (filter_sals): Rewrite using std::vector and standard algorithms.
9052 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Simplify.
9053 (jump_command): Update to use std::vector.
9054 * linespec.c (struct linespec_state) <canonical_names>: Update
9055 comment.
9056 (add_sal_to_sals_basic): Delete.
9057 (add_sal_to_sals, filter_results, convert_results_to_lsals)
9058 (decode_line_2, create_sals_line_offset)
9059 (convert_address_location_to_sals, convert_linespec_to_sals)
9060 (convert_explicit_location_to_sals, parse_linespec)
9061 (event_location_to_sals, decode_line_full, decode_line_1)
9062 (decode_line_with_current_source)
9063 (decode_line_with_last_displayed, decode_objc)
9064 (decode_digits_list_mode, decode_digits_ordinary, minsym_found)
9065 (linespec_result::~linespec_result): Adjust to use std::vector
9066 instead of symtabs_and_lines.
9067 * linespec.h (linespec_sals::sals): Now a std::vector.
9068 (struct linespec_result): Use std::vector, bool, and in-class
9069 initialization.
9070 (decode_line_1, decode_line_with_current_source)
9071 (decode_line_with_last_displayed): Return std::vector.
9072 * macrocmd.c (info_macros_command): Use std::vector.
9073 * mi/mi-main.c (mi_cmd_trace_find): Use std::vector.
9074 * probe.c (parse_probes_in_pspace, parse_probes): Adjust to use
9075 std::vector.
9076 * probe.h (parse_probes): Return a std::vector.
9077 * python/python.c (gdbpy_decode_line): Use std::vector and
9078 gdb::array_view.
9079 * source.c (select_source_symtab, line_info): Use std::vector.
9080 * stack.c (func_command): Use std::vector.
9081 * symtab.h (struct symtabs_and_lines): Delete.
9082 * tracepoint.c (tfind_line_command, scope_info): Use std::vector.
9083
9084 2017-09-04 Pedro Alves <palves@redhat.com>
9085
9086 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
9087 unittests/array-view-selftests.c.
9088 (SUBDIR_UNITTESTS_OBS): Add array-view-selftests.o.
9089 * common/array-view.h: New file.
9090 * unittests/array-view-selftests.c: New file.
9091
9092 2017-09-04 Pedro Alves <palves@redhat.com>
9093
9094 * cli/cli-cmds.c (edit_command): Pass message to
9095 ambiguous_line_spec.
9096 (list_command): Pass message to ambiguous_line_spec. Say
9097 "first"/"last" instead of "start" and "end" to be consistent with
9098 the manual.
9099 (ambiguous_line_spec): Add 'format' and vararg parameters. Use
9100 them to print formatted message.
9101
9102 2017-09-04 Pedro Alves <palves@redhat.com>
9103
9104 * btrace.c (ftrace_add_pt): Pass btrace_insn to
9105 ftrace_update_insns by reference instead of pointer.
9106
9107 2017-09-04 Yao Qi <yao.qi@linaro.org>
9108
9109 * i386-go32-tdep.c: Include x86-xstate.h.
9110 (i386_go32_init_abi): Call i386_target_description.
9111 * i386-tdep.c (i386_target_description): Return tdesc_i386_mmx
9112 if xcr0 is X86_XSTATE_X87_MASK.
9113 * i386-tdep.h (tdesc_i386): Remove the declaration.
9114 (tdesc_i386_mmx): Likewise.
9115
9116 2017-09-04 Yao Qi <yao.qi@linaro.org>
9117
9118 * i386-fbsd-tdep.c (i386fbsd_core_read_xcr0): Return
9119 X86_XSTATE_SSE_MASK instead of 0.
9120
9121 2017-09-04 Yao Qi <yao.qi@linaro.org>
9122
9123 * amd64-fbsd-nat.c (amd64fbsd_read_description): Call
9124 i386_target_description.
9125 * i386-fbsd-nat.c (i386fbsd_read_description): Call
9126 i386_target_description.
9127 * i386-tdep.c (i386_gdbarch_init): Likewise.
9128
9129 2017-09-04 Yao Qi <yao.qi@linaro.org>
9130
9131 * amd64-darwin-tdep.c: Include "x86-xstate.h".
9132 (x86_darwin_init_abi_64): Call amd64_target_description.
9133 * amd64-dicos-tdep.c: Likewise.
9134 * amd64-fbsd-nat.c: Likewise.
9135 * amd64-fbsd-tdep.c: Likewise.
9136 * amd64-nbsd-tdep.c: Likewise.
9137 * amd64-obsd-tdep.c: Likewise.
9138 * amd64-sol2-tdep.c: Likewise.
9139 * amd64-windows-tdep.c: Likewise.
9140 * amd64-tdep.h (tdesc_amd64): Remove the declaration.
9141
9142 2017-09-04 Simon Marchi <simon.marchi@ericsson.com>
9143
9144 * btrace.h (btrace_insn_s, DEF_VEC_O (btrace_insn_s)): Remove.
9145 (btrace_function) <insn>: Change type to use std::vector.
9146 * btrace.c (ftrace_debug, ftrace_call_num_insn,
9147 ftrace_find_call, ftrace_new_gap, ftrace_update_function,
9148 ftrace_update_insns, ftrace_compute_global_level_offset,
9149 btrace_stitch_bts, btrace_clear, btrace_insn_get,
9150 btrace_insn_end, btrace_insn_next, btrace_insn_prev): Adjust to
9151 change to std::vector.
9152 (ftrace_update_insns): Adjust to change to std::vector, change
9153 type of INSN parameter.
9154 (btrace_compute_ftrace_bts): Adjust call to ftrace_update_insns.
9155 * record-btrace.c (btrace_call_history_insn_range,
9156 btrace_compute_src_line_range,
9157 record_btrace_frame_prev_register): Adjust to change to
9158 std::vector.
9159 * python/py-record-btrace.c (recpy_bt_func_instructions): Adjust
9160 to change to std::vector.
9161
9162 2017-09-03 Tom Tromey <tom@tromey.com>
9163
9164 * corefile.c (reopen_exec_file): Use std::string.
9165
9166 2017-09-03 Tom Tromey <tom@tromey.com>
9167
9168 * compile/compile.c (compile_register_name_mangled): Return
9169 std::string.
9170 * compile/compile-loc2c.c (pushf_register_address): Update.
9171 (pushf_register): Update.
9172 * compile/compile-c-types.c (convert_array): Update.
9173 * compile/compile-c-symbols.c (generate_vla_size): Update.
9174 (error_symbol_once): Use a gdb::unique_xmalloc_ptr.
9175 (symbol_substitution_name): Return a gdb::unique_xmalloc_ptr.
9176 (convert_one_symbol): Update.
9177 (generate_c_for_for_one_variable): Update.
9178 * compile/compile-c-support.c (c_get_range_decl_name): Return a
9179 std::string.
9180 (generate_register_struct): Update.
9181 * compile/compile-internal.h (c_get_range_decl_name): Return a
9182 std::string.
9183 (compile_register_name_mangled): Return std::string.
9184
9185 2017-09-03 Tom Tromey <tom@tromey.com>
9186
9187 * utils.c (perror_string): Return a std::string.
9188 (throw_perror_with_name, perror_warning_with_name): Update.
9189
9190 2017-09-03 Tom Tromey <tom@tromey.com>
9191
9192 * demangle.c (demangle_command): Use std::string,
9193 unique_xmalloc_ptr.
9194
9195 2017-09-03 Tom Tromey <tom@tromey.com>
9196
9197 * cli/cli-setshow.c (do_set_command): Use std::string.
9198
9199 2017-09-03 Tom Tromey <tom@tromey.com>
9200
9201 * cli/cli-cmds.c (cd_command): Use gdb::unique_xmalloc_ptr.
9202
9203 2017-09-03 Tom Tromey <tom@tromey.com>
9204
9205 * mi/mi-interp.c (mi_cmd_interpreter_exec): Use std::string.
9206
9207 2017-09-03 Tom Tromey <tom@tromey.com>
9208
9209 * mi/mi-cmd-env.c (env_execute_cli_command): Use
9210 gdb::unique_xmalloc_ptr.
9211
9212 2017-09-03 Tom Tromey <tom@tromey.com>
9213
9214 * thread.c (print_thread_info_1): Use string_printf.
9215 (thread_apply_command, thread_apply_all_command): Use
9216 std::string.
9217
9218 2017-09-03 Tom Tromey <tom@tromey.com>
9219
9220 * valprint.c (val_print_string): Update.
9221 * gdbcore.h (memory_error_message): Return std::string.
9222 * corefile.c (memory_error_message): Return std::string.
9223 (memory_error): Update.
9224 * breakpoint.c (insert_bp_location): Update.
9225
9226 2017-09-03 Simon Marchi <simon.marchi@ericsson.com>
9227
9228 * target/waitstatus.h (target_waitstatus_to_string): Change
9229 return type to std::string.
9230 * target/waitstatus.c (target_waitstatus_to_string): Return
9231 std::string.
9232 * target.h (target_waitstatus_to_string): Remove declaration.
9233 * infrun.c (resume, clear_proceed_status_thread,
9234 print_target_wait_results, do_target_wait, save_waitstatus,
9235 stop_all_threads): Adjust.
9236 * record-btrace.c (record_btrace_wait): Adjust.
9237 * target-debug.h
9238 (target_debug_print_struct_target_waitstatus_p): Adjust.
9239
9240 2017-09-01 Jan Kratochvil <jan.kratochvil@redhat.com>
9241
9242 PR gdb/22046
9243 * nat/linux-procfs.c (parse_proc_status_state): Fix PROC_STATE_STOPPED
9244 detection.
9245
9246 2017-08-31 Sergio Durigan Junior <sergiodj@redhat.com>
9247
9248 * NEWS (Changes since GDB 8.0): Add entry mentioning new support
9249 for setting/unsetting environment variables on the remote target.
9250 (New remote packets): Add entries for QEnvironmentHexEncoded,
9251 QEnvironmentUnset and QEnvironmentReset.
9252 * common/environ.c (gdb_environ::operator=): Extend method to
9253 handle m_user_set_env_list and m_user_unset_env_list.
9254 (gdb_environ::clear): Likewise.
9255 (match_var_in_string): Change type of first parameter from 'char
9256 *' to 'const char *'.
9257 (gdb_environ::set): Extend method to handle
9258 m_user_set_env_list and m_user_unset_env_list.
9259 (gdb_environ::unset): Likewise.
9260 (gdb_environ::clear_user_set_env): New method.
9261 (gdb_environ::user_set_envp): Likewise.
9262 (gdb_environ::user_unset_envp): Likewise.
9263 * common/environ.h (gdb_environ): Handle m_user_set_env_list and
9264 m_user_unset_env_list on move constructor/assignment.
9265 (unset): Add new default parameter 'update_unset_list = true'.
9266 (clear_user_set_env): New method.
9267 (user_set_envp): Likewise.
9268 (user_unset_envp): Likewise.
9269 (m_user_set_env_list): New std::set.
9270 (m_user_unset_env_list): Likewise.
9271 * common/rsp-low.c (hex2str): New function.
9272 (bin2hex): New overload for bin2hex function.
9273 * common/rsp-low.c (hex2str): New prototype.
9274 (str2hex): New overload prototype.
9275 * remote.c: Include "environ.h". Add QEnvironmentHexEncoded,
9276 QEnvironmentUnset and QEnvironmentReset.
9277 (remote_protocol_features): Add QEnvironmentHexEncoded,
9278 QEnvironmentUnset and QEnvironmentReset packets.
9279 (send_environment_packet): New function.
9280 (extended_remote_environment_support): Likewise.
9281 (extended_remote_create_inferior): Call
9282 extended_remote_environment_support.
9283 (_initialize_remote): Add QEnvironmentHexEncoded,
9284 QEnvironmentUnset and QEnvironmentReset packet configs.
9285 * unittests/environ-selftests.c (gdb_selftest_env_var):
9286 New variable.
9287 (test_vector_initialization): New function.
9288 (test_init_from_host_environ): Likewise.
9289 (test_reinit_from_host_environ): Likewise.
9290 (test_set_A_unset_B_unset_A_cannot_find_A_can_find_B):
9291 Likewise.
9292 (test_unset_set_empty_vector): Likewise.
9293 (test_vector_clear): Likewise.
9294 (test_std_move): Likewise.
9295 (test_move_constructor):
9296 (test_self_move): Likewise.
9297 (test_set_unset_reset): Likewise.
9298 (run_tests): Rewrite in terms of the functions above.
9299
9300 2017-08-31 Weimin Pan <weimin.pan@oracle.com>
9301
9302 * sparc64-tdep.c (adi_stat_t): Fix comment formatting.
9303 (adi_available): Use a temp variable of type CORE_ADDR as argument
9304 3 when calling target_auxv_search.
9305 (adi_normalize_address): Use masks and xor operators to calculate
9306 normalized address.
9307 (adi_read_versions, adi_write_versions, adi_print_versions)
9308 (do_examine, do_assign): Use paddress.
9309
9310 2017-08-29 John Baldwin <jhb@FreeBSD.org>
9311
9312 * mips-fbsd-nat.c (getfpregs_supplies): Return true for FIR.
9313 * mips-fbsd-tdep.c (mips_fbsd_supply_fpregs): Split supply of FSR
9314 out of loop and add supply of FIR.
9315 (mips_fbsd_collect_fpregs): Split collect of FSR out of loop and
9316 add collect of FIR.
9317
9318 2017-08-28 Simon Marchi <simon.marchi@ericsson.com>
9319
9320 PR gdb/21827
9321 * cli/cli-script.c (define_command): Don't convert command name
9322 to lower case.
9323
9324 2017-08-25 Joel Brobecker <brobecker@adacore.com>
9325
9326 * ada-lang.c (ada_lookup_struct_elt_type): Remove parameter "dispp".
9327 Update all callers accordingly. Remove all code blocks handling
9328 the case where DISPP is not NULL.
9329
9330 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9331
9332 PR symtab/22003
9333 * dwarf2read.c (dwarf2_const_value_attr, dump_die_shallow)
9334 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
9335 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_implicit_const.
9336
9337 2017-08-24 Jan Kratochvil <jan.kratochvil@redhat.com>
9338
9339 * dwarf2read.c (build_type_psymtabs_reader): New prototype.
9340 (process_psymtab_comp_unit): Accept IS_DEBUG_TYPES.
9341 (read_comp_units_from_section): New parameter abbrev_section, use
9342 read_and_check_comp_unit_head, allocate signatured_type if needed.
9343 (create_all_comp_units): Update read_comp_units_from_section caller.
9344
9345 2017-08-23 Pedro Alves <palves@redhat.com>
9346
9347 PR remote/21852
9348 * remote.c (add_current_inferior_and_thread): Set inferior_ptid
9349 to null_ptid and switch to thread without reading the registers
9350 after adding the inferior.
9351
9352 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
9353
9354 * NEWS (Changes since GDB 8.0): Add set compile-gcc and show
9355 compile-gcc.
9356 * compile/compile.c (compile_gcc, show_compile_gcc): New.
9357 (compile_to_object): Implement compile_gcc.
9358 (_initialize_compile): Install "set compile-gcc". Initialize
9359 compile_gcc.
9360
9361 2017-08-23 Jan Kratochvil <jan.kratochvil@redhat.com>
9362
9363 * compile/compile.c (compile_to_object): Conditionally call
9364 set_verbose. Conditionally call compile or compile_v0.
9365
9366 2017-08-07 Weimin Pan <weimin.pan@oracle.com>
9367
9368 * sparc64-tdep.h: (adi_normalize_address): New export.
9369 * sparc-nat.h: (open_adi_tag_fd): New export.
9370 * sparc64-linux-nat.c: (open_adi_tag_fd): New function.
9371 * sparc64-linux-tdep.c:
9372 (SEGV_ACCADI, SEGV_ADIDERR, SEGV_ADIPERR) New defines.
9373 (sparc64_linux_handle_segmentation_fault): New function.
9374 (sparc64_linux_init_abi): Register
9375 sparc64_linux_handle_segmentation_fault
9376 * sparc64-tdep.c: Include cli-utils.h,gdbcmd.h,auxv.h.
9377 (sparc64_addr_bits_remove): New function.
9378 (sparc64_init_abi): Register sparc64_addr_bits_remove.
9379 (MAX_PROC_NAME_SIZE): New macro.
9380 (AT_ADI_BLKSZ, AT_ADI_NBITS, AT_ADI_UEONADI) New defines.
9381 (sparc64adilist): New variable.
9382 (adi_proc_list): New variable.
9383 (find_adi_info): New function.
9384 (add_adi_info): New function.
9385 (get_adi_info_proc): New function.
9386 (get_adi_info): New function.
9387 (info_adi_command): New function.
9388 (read_maps_entry): New function.
9389 (adi_available): New function.
9390 (adi_normalize_address): New function.
9391 (adi_align_address): New function.
9392 (adi_convert_byte_count): New function.
9393 (adi_tag_fd): New function.
9394 (adi_is_addr_mapped): New function.
9395 (adi_read_versions): New function.
9396 (adi_write_versions): New function.
9397 (adi_print_versions): New function.
9398 (do_examine): New function.
9399 (do_assign): New function.
9400 (adi_examine_command): New function.
9401 (adi_assign_command): New function.
9402 (_initialize_sparc64_adi_tdep): New function.
9403
9404 2017-08-22 Simon Marchi <simon.marchi@ericsson.com>
9405
9406 * breakpoint.c (breakpoints_info): Rename to ...
9407 (info_breakpoints_command): ... this.
9408 (watchpoints_info): Rename to ...
9409 (info_watchpoints_command): ... this.
9410 (tracepoints_info): Rename to ...
9411 (info_tracepoints_command): ... this.
9412 (_initialize_breakpoint): Adjust.
9413 * dcache.c (dcache_info): Rename to ...
9414 (info_display_command): ... this.
9415 (_initialize_dcache): Adjust.
9416 * frame.h (args_info): Rename to ...
9417 (info_args_command): ... this.
9418 (locals_info): Rename to ...
9419 (info_locals_command): ... this.
9420 * infcmd.c (nofp_registers_info): Rename to ...
9421 (info_registers_command): ... this.
9422 (float_info): Rename to ...
9423 (info_float_command): ... this.
9424 (program_info): Rename to ...
9425 (info_program_command): ... this.
9426 (all_registers_info): Rename to ...
9427 (info_all_registers_command): ... this.
9428 (vector_info): Rename to ...
9429 (info_vector_command): ... this.
9430 (float_info): Rename to ...
9431 (info_float_command): ... this.
9432 (_initialize_infcmd): Adjust.
9433 * inferior.h (term_info): Rename to ...
9434 (info_terminal_command): ... this.
9435 * inflow.c (term_info): Rename to ...
9436 (info_terminal_command): ... this.
9437 (_initialize_inflow): Adjust.
9438 * infrun.c (signals_info): Rename to ...
9439 (info_signals_command): ... this.
9440 (_initialize_infrun): Adjust.
9441 * objc-lang.c (classes_info): Rename to ...
9442 (info_classes_command): ... this.
9443 (selectors_info): Rename to ...
9444 (info_selectors_command): ... this.
9445 (_initialize_objc_language): Adjust.
9446 * printcmd.c (sym_info): Rename to ...
9447 (info_symbol_command): ... this.
9448 (address_info): Rename to ...
9449 (info_address_command): ... this.
9450 (display_info): Rename to ...
9451 (info_display_command): ... this.
9452 (_initialize_printcmd): Adjust.
9453 * reverse.c (bookmarks_info): Rename to ...
9454 (info_breakpoints_command): ... this.
9455 (_initialize_reverse): Adjust.
9456 * ser-go32.c (dos_info): Rename to ...
9457 (info_serial_command): ... this.
9458 (_initialize_ser_dos): Adjust.
9459 * skip.c (skip_info): Rename to ...
9460 (info_skip_command): ... this.
9461 (_initialize_step_skip): Adjust.
9462 * source.c (line_info): Rename to ...
9463 (info_line_command): ... this.
9464 (source_info): Rename to ...
9465 (info_source_command)
9466 * stack.c (frame_info): Rename to ...
9467 (info_frame_command): ... this.
9468 (locals_info): Rename to ...
9469 (info_locals_command): ... this.
9470 (args_info): Rename to ...
9471 (info_args_command): ... this.
9472 (_initialize_stack): Adjust.
9473 * symtab.c (sources_info): Rename to ...
9474 (info_sources_command): ... this.
9475 (variables_info): Rename to ...
9476 (info_variables_command): ... this.
9477 (functions_info): Rename to ...
9478 (info_functions_command): ... this.
9479 (types_info): Rename to ...
9480 (info_types_command): ... this.
9481 (_initialize_symtab): Adjust.
9482 * target.c (target_info): Rename to ...
9483 (info_target_command): ... this.
9484 (initialize_targets): Adjust.
9485 * tracepoint.c (tvariables_info): Rename to ...
9486 (info_tvariables_command): ... this.
9487 (scope_info): Rename to ...
9488 (info_scope_command): ... this.
9489 (trace_dump_actions): Adjust.
9490 (_initialize_tracepoint): Adjust.
9491
9492 2017-08-22 Tom Tromey <tom@tromey.com>
9493
9494 * breakpoint.h (install_breakpoint): Update.
9495 * breakpoint.c (add_solib_catchpoint): Update.
9496 (install_breakpoint): Change argument to a std::unique_ptr.
9497 (create_fork_vfork_event_catchpoint): Use std::unique_ptr.
9498 (create_breakpoint_sal, create_breakpoint): Update.
9499 (watch_command_1, catch_exec_command_1)
9500 (strace_marker_create_breakpoints_sal): Use std::unique_ptr.
9501 (add_to_breakpoint_chain): Change argument to a std::unique_ptr.
9502 Return the breakpoint.
9503 (set_raw_breakpoint_without_location, set_raw_breakpoint)
9504 (new_single_step_breakpoint): Update.
9505 * break-catch-throw.c (handle_gnu_v3_exceptions): Use
9506 std::unique_ptr.
9507 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
9508 std::unique_ptr.
9509 * break-catch-sig.c (create_signal_catchpoint): Use
9510 std::unique_ptr.
9511 * ada-lang.c (create_ada_exception_catchpoint): Use
9512 std::unique_ptr.
9513
9514 2017-08-22 Tom Tromey <tom@tromey.com>
9515
9516 * breakpoint.c (add_solib_catchpoint): Use std::unique_ptr.
9517
9518 2017-08-22 Tom Tromey <tom@tromey.com>
9519
9520 * psymtab.c (psymtab_search_name): Return a unique_xmalloc_ptr.
9521 (lookup_partial_symbol): Update.
9522
9523 2017-08-22 Tom Tromey <tom@tromey.com>
9524
9525 * source.h (rewrite_source_path): Return a unique_xmalloc_ptr.
9526 * source.c (rewrite_source_path): Return a unique_xmalloc_ptr.
9527 (find_and_open_source, symtab_to_fullname): Update.
9528 * psymtab.c (psymtab_to_fullname): Update.
9529
9530 2017-08-22 Tom Tromey <tom@tromey.com>
9531
9532 * exec.c (exec_file_attach): Update.
9533 * linux-thread-db.c (try_thread_db_load): Update.
9534 * guile/scm-safe-call.c (gdbscm_safe_source_script): Update.
9535 * utils.c (gdb_realpath): Change return type.
9536 (gdb_realpath_keepfile): Update.
9537 (gdb_realpath_check_trailer, gdb_realpath_tests): New functions.
9538 (_initialize_utils): Register the new self test.
9539 * source.c (openp): Update.
9540 (find_and_open_source): Update.
9541 * nto-tdep.c (nto_find_and_open_solib): Update.
9542 * main.c (set_gdb_data_directory): Update.
9543 (captured_main_1): Update.
9544 * dwarf2read.c (dwarf2_get_dwz_file): Update
9545 (dw2_map_symbol_filenames): Update.
9546 * auto-load.c (auto_load_safe_path_vec_update): Update.
9547 (filename_is_in_auto_load_safe_path_vec): Change type of
9548 "filename_realp".
9549 (auto_load_objfile_script): Update.
9550 (file_is_auto_load_safe): Update. Use std::string.
9551 * utils.h (gdb_realpath): Return a gdb::unique_xmalloc_ptr.
9552
9553 2017-08-22 Tom Tromey <tom@tromey.com>
9554
9555 * utils.c (gdb_realpath_keepfile): Return a
9556 gdb::unique_xmalloc_ptr.
9557 * exec.c (exec_file_attach): Update.
9558 * utils.h (gdb_realpath_keepfile): Return a
9559 gdb::unique_xmalloc_ptr.
9560
9561 2017-08-22 Tom Tromey <tom@tromey.com>
9562
9563 * compile/compile.c (compile_file_command): Use
9564 gdb::unique_xmalloc_ptr, std::string.
9565 * utils.c (gdb_abspath): Change return type.
9566 * source.c (openp): Update.
9567 * objfiles.c (allocate_objfile): Update.
9568 * main.c (set_gdb_data_directory): Update.
9569 * utils.h (gdb_abspath): Return a gdb::unique_xmalloc_ptr.
9570
9571 2017-08-22 Zhouyi Zhou <zhouzhouyi@gmail.com>
9572
9573 * cli-cmds.c (list_commands): List actual code around more than
9574 one location.
9575
9576 2017-08-21 John Baldwin <jhb@FreeBSD.org>
9577
9578 * fbsd-nat.c (fbsd_add_threads): Use array type for `lwps'.
9579
9580 2017-08-21 Pedro Alves <palves@redhat.com>
9581
9582 PR gdb/19487
9583 * c-exp.y (variable production): Handle function aliases.
9584 * minsyms.c (msymbol_is_text): New function.
9585 * minsyms.h (msymbol_is_text): Declare.
9586 * symtab.c (find_function_alias_target): New function.
9587 * symtab.h (find_function_alias_target): Declare.
9588
9589 2017-08-21 Pedro Alves <palves@redhat.com>
9590
9591 * eval.c (evaluate_subexp_standard) <OP_TYPE>: Don't dig past
9592 typedefs.
9593 * typeprint.c (whatis_exp): If handling "whatis", and expression
9594 is OP_TYPE, strip one typedef level. Otherwise don't strip
9595 typedefs here.
9596 * valops.c (value_cast): Save "to" type before resolving
9597 stubs/typedefs. Use that type as resulting value's type.
9598
9599 2017-08-18 Tom Tromey <tom@tromey.com>
9600 Pedro Alves <palves@redhat.com>
9601
9602 * spu-multiarch.c (parse_spufs_run): Use scoped_restore.
9603 * sol-thread.c (sol_thread_resume, sol_thread_wait)
9604 (sol_thread_xfer_partial, rw_common): Use scoped_restore.
9605 * procfs.c (procfs_do_thread_registers): Use scoped_restore.
9606 * proc-service.c (ps_xfer_memory): Use scoped_restore.
9607 * linux-tdep.c (linux_corefile_thread): Remove a cleanup.
9608 (linux_get_siginfo_data): Add "thread" argument. Use
9609 scoped_restore.
9610 * linux-nat.c (linux_child_follow_fork)
9611 (check_stopped_by_watchpoint): Use scoped_restore.
9612 * infrun.c (displaced_step_prepare_throw, write_memory_ptid)
9613 (THREAD_STOPPED_BY, handle_signal_stop): Use scoped_restore.
9614 (restore_inferior_ptid, save_inferior_ptid): Remove.
9615 * btrace.c (btrace_fetch): Use scoped_restore.
9616 * bsd-uthread.c (bsd_uthread_fetch_registers)
9617 (bsd_uthread_store_registers): Use scoped_restore.
9618 * breakpoint.c (reattach_breakpoints, detach_breakpoints): Use
9619 scoped_restore.
9620 * aix-thread.c (aix_thread_resume, aix_thread_wait)
9621 (aix_thread_xfer_partial): Use scoped_restore.
9622 * inferior.h (save_inferior_ptid): Remove.
9623
9624 2017-08-18 Yao Qi <yao.qi@linaro.org>
9625
9626 PR tdep/21818
9627 * arm-tdep.c (gdb_print_insn_arm): Mark
9628 USER_SPECIFIED_MACHINE_TYPE if exec_bfd isn't NULL.
9629
9630 2017-08-18 Yao Qi <yao.qi@linaro.org>
9631
9632 * NEWS: Mention GDBserver's new option "--selftest".
9633 * Makefile.in (SFILES): Remove selftest.c, add common/selftest.c.
9634 * selftest.c: Move it to common/selftest.c.
9635 * selftest.h: Move it to common/selftest.h.
9636 * selftest-arch.c (reset): New function.
9637 (tests_with_arch): Call reset.
9638
9639 2017-08-18 Yao Qi <yao.qi@linaro.org>
9640
9641 * selftest.c (run_tests): Don't call QUIT. Call debug_printf
9642 instead of exception_fprintf and printf_filtered.
9643
9644 2017-08-18 Yao Qi <yao.qi@linaro.org>
9645
9646 * selftest.c (register_self_test): Rename it to
9647 selftests::register_test.
9648 (run_self_tests): selftest::run_tests.
9649 * selftest.h: Update declarations.
9650 * selftest-arch.c (register_self_test_foreach_arch): Rename it to
9651 selftests::register_test_foreach_arch.
9652 * selftest-arch.h: Update declaration.
9653 * aarch64-tdep.c: Update.
9654 * arm-tdep.c: Likewise.
9655 * disasm-selftests.c: Likewise.
9656 * dwarf2loc.c: Likewise.
9657 * dwarf2-frame.c: Likewise.
9658 * findvar.c: Likewise.
9659 * gdbarch-selftests.c: Likewise.
9660 * maint.c (maintenance_selftest): Likewise.
9661 * regcache.c: Likewise.
9662 * rust-exp.y: Likewise.
9663 * selftest-arch.c: Likewise.
9664 * unittests/environ-selftests.c: Likewise.
9665 * unittests/function-view-selftests.c: Likewise.
9666 * unittests/offset-type-selftests.c: Likewise.
9667 * unittests/optional-selftests.c: Likewise.
9668 * unittests/scoped_restore-selftests.c: Likewise.
9669 * utils-selftests.c: Likewise.
9670
9671 2017-08-17 Pedro Alves <palves@redhat.com>
9672
9673 * cli/cli-cmds.c (source_command): Delete 'old_source_verbose'
9674 local.
9675
9676 2017-08-17 Pedro Alves <palves@redhat.com>
9677
9678 * dwarf2read.c (struct dwarf2_cu) <line_header_die_owner>: New
9679 field.
9680 (reset_die_in_process): Delete, replaced by ...
9681 (process_die_scope): ... this new class. Make it responsible for
9682 freeing cu->line_header too.
9683 (process_die): Use process_die_scope.
9684 (handle_DW_AT_stmt_list): Record the line header's owner CU/DIE in
9685 cu->line_header_die_owner. Don't release the line header if it's
9686 owned by the CU.
9687 (setup_type_unit_groups): Make the CU/DIE own the line header.
9688 Don't release the line header here.
9689
9690 2017-08-17 Alex Lindsay <alexlindsay239@gmail.com> (tiny change)
9691
9692 * elfread.c (elf_read_minimal_symbols): xfree synthsyms.
9693
9694 2017-08-17 Ruslan Kabatsayev <b7.10110111@gmail.com>
9695
9696 * NEWS: Mention new shortcuts for nexti and stepi in TUI
9697 Single-Key mode
9698
9699 2017-08-16 Ruslan Kabatsayev <b7.10110111@gmail.com>
9700
9701 * tui/tui.c (tui_commands): Add "nexti" and "stepi" to the Single-Key
9702 mode command list.
9703
9704 2017-08-15 Stafford Horne <shorne@gmail.com>
9705
9706 * MAINTAINERS (Write After Approval): Add Stafford Horne.
9707
9708 2017-08-15 Stafford Horne <shorne@gmail.com>
9709
9710 * xtensa-tdep.c (xtensa_init_reggroups): Use xstrdup for cpname.
9711
9712 2017-08-15 Sergio Durigan Junior <sergiodj@redhat.com>
9713
9714 PR gdb/21954
9715 * infcmd.c (unset_environment_command): Use the 'clear' method on
9716 the environment instead of resetting it.
9717
9718 2017-08-15 John Baldwin <jhb@FreeBSD.org>
9719
9720 * fbsd-nat.c (fbsd_convert_siginfo): Fix compile on big-endian
9721 platforms.
9722
9723 2017-08-14 Tom Tromey <tom@tromey.com>
9724
9725 * valprint.c (print_octal_chars): Use HOST_CHAR_BIT.
9726 (print_binary_chars): Likewise.
9727 (BITS_IN_BYTES): Remove.
9728
9729 2017-08-14 Tom Tromey <tom@tromey.com>
9730
9731 PR gdb/21675
9732 * valprint.c (LOW_ZERO): Change value to 034.
9733 (print_octal_chars): Add static_asserts for octal constants.
9734 * printcmd.c (print_scalar_formatted): Add 'd' case.
9735
9736 2017-08-11 Tom Tromey <tom@tromey.com>
9737
9738 * symfile.c (add_symbol_file_command): Use std::vector.
9739
9740 2017-08-14 Tom Tromey <tom@tromey.com>
9741
9742 * break-catch-throw.c (handle_gnu_v3_exceptions): Use std::move.
9743 * break-catch-syscall.c (create_syscall_event_catchpoint): Use
9744 std::move.
9745 * break-catch-sig.c (create_signal_catchpoint): Use std::move.
9746
9747 2017-08-11 Pedro Alves <palves@redhat.com>
9748
9749 * infrun.c (process_event_stop_test): Adjust
9750 function_name_is_marked_for_skip call.
9751 * skip.c: Include <list>.
9752 (skiplist_entry): Make it a class with private fields, and
9753 getters/setters.
9754 (skiplist_entry_chain): Delete.
9755 (skiplist_entries): New.
9756 (skiplist_entry_count): Delete.
9757 (highest_skiplist_entry_num): New.
9758 (ALL_SKIPLIST_ENTRIES, ALL_SKIPLIST_ENTRIES_SAFE): Delete.
9759 (add_skiplist_entry): Delete.
9760 (skiplist_entry::skiplist_entry): New.
9761 (skiplist_entry::add_entry): New.
9762 (skip_file_command, skip_function): Adjust.
9763 (compile_skip_regexp): Delete.
9764 (skip_command): Don't compile regexp here. Adjust to use
9765 skiplist_entry::add_entry.
9766 (skip_info): Adjust to use range-for and getters.
9767 (skip_enable_command, skip_disable_command): Adjust to use
9768 range-for and setters.
9769 (skip_delete_command): Adjust to use std::list.
9770 (add_skiplist_entry): Delete.
9771 (skip_file_p): Delete, refactored as ...
9772 (skiplist_entry::do_skip_file_p): ... this new method.
9773 (skip_gfile_p): Delete, refactored as ...
9774 (skiplist_entry::do_gskip_file_p): ... this new method.
9775 (skip_function_p, skip_rfunction_p): Delete, refactored as ...
9776 (skiplist_entry::skip_function_p): ... this new method.
9777 (function_name_is_marked_for_skip): Now returns bool, and takes
9778 the function sal by const reference. Adjust to use range-for and
9779 skiplist_entry methods.
9780 (_initialize_step_skip): Remove references to
9781 skiplist_entry_chain, skiplist_entry_count.
9782 * skip.h (function_name_is_marked_for_skip): Now returns bool, and
9783 takes the function sal by const reference.
9784
9785 2017-08-11 Yao Qi <yao.qi@linaro.org>
9786
9787 * dwarf2-frame.c (clear_pointer_cleanup): Remove.
9788 (dwarf2_frame_cache): Remove reset_cache_cleanup.
9789 (dwarf2_frame_cache):
9790 * frame-unwind.c (frame_unwind_try_unwinder): Catch
9791 RETURN_MASK_ALL and set *this_case to NULL.
9792 * frame-unwind.h: Update comments.
9793
9794 2017-08-11 Yao Qi <yao.qi@linaro.org>
9795
9796 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Remove.
9797 (dwarf2_frame_state_copy_regs): Remove.
9798 (dwarf2_frame_state_free_regs): Remove.
9799 (dwarf2_frame_state::~dwarf2_frame_state): Remove.
9800 (dwarf2_restore_rule): Call method .alloc_regs instead of
9801 dwarf2_frame_state_alloc_regs.
9802 (execute_cfa_program): Likewise. Call dwarf2_frame_state_reg_info
9803 constructor. Call std::move.
9804 (dwarf2_fetch_cfa_info): Don't call dwarf2_frame_state_copy_regs.
9805 (dwarf2_frame_cache): Likewise.
9806
9807 [GDB_SELF_TEST]: Include selftest.h and
9808 selftest-arch.h.
9809 [GDB_SELF_TEST] (execute_cfa_program_test): New function.
9810 (_initialize_dwarf2_frame) [GDB_SELF_TEST]: Register
9811 execute_cfa_program_test.
9812
9813 * dwarf2-frame.h (dwarf2_frame_state_reg_info): Add ctor, dtor,
9814 copy ctor, assignment operator, move assignment.
9815 <alloc_regs>: New method.
9816 <swap>: New method.
9817 (struct dwarf2_frame_state): Delete dtor.
9818 (dwarf2_frame_state_alloc_regs): Remove declaration.
9819 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): Don't call
9820 dwarf2_frame_state_alloc_regs, use .alloc_regs instead.
9821
9822 2017-08-11 Yao Qi <yao.qi@linaro.org>
9823
9824 * dwarf2-frame.c (dwarf2_frame_state_free): Remove.
9825 (dwarf2_frame_state::dwarf2_frame_state): New.
9826 (dwarf2_frame_state::~dwarf2_frame_state): New.
9827 (dwarf2_fetch_cfa_info): Update.
9828 (dwarf2_frame_cache): Remove old_chain. Change 'fs' to an object
9829 rather than a pointer. Update code.
9830 * dwarf2-frame.h (struct dwarf2_frame_state): Declare ctor and
9831 dtor.
9832 <data_align, code_align, retaddr_column>: Change them to const.
9833 <armcc_cfa_offsets_sf, armcc_cfa_offsets_reversed>: Change them
9834 to bool.
9835
9836 2017-08-11 Yao Qi <yao.qi@linaro.org>
9837
9838 * dwarf2-frame.h (struct dwarf2_frame_state_reg) <exp_len>: Remove.
9839 <loc.exp>: New field.
9840 * dwarf2-frame.c (execute_cfa_program): Update.
9841 (dwarf2_frame_prev_register): Update.
9842
9843 2017-08-10 Pedro Alves <palves@redhat.com>
9844
9845 * common/gdb_unique_ptr.h (xfree_deleter<T[]>): Define.
9846
9847 2017-08-09 John Baldwin <jhb@FreeBSD.org>
9848
9849 * fbsd-nat.c (struct fbsd_fork_info): Remove.
9850 (fbsd_pending_children): Use std::list.
9851 (fbsd_remember_child): Likewise.
9852 (fbsd_is_child_pending): Likewise.
9853 (fbsd_pending_vfork_done): Use std::forward_list.
9854 (fbsd_add_vfork_done): Likewise.
9855 (fbsd_is_vfork_done_pending): Likewise.
9856 (fbsd_next_vfork_done): Likewise.
9857
9858 2017-08-09 John Baldwin <jhb@FreeBSD.org>
9859
9860 * fbsd-nat.c [HAVE_KINFO_GETVMMAP] (struct free_deleter): New.
9861 (fbsd_find_memory_regions): Use free_deleter with std::unique_ptr.
9862 [!HAVE_KINFO_GETVMMAP] (fbsd_find_memory_regions): Use std::string
9863 for `mapfilename'.
9864 (fbsd_xfer_partial): Use gdb::byte_vector.
9865 (fbsd_add_threads): Use gdb::unique_xmalloc_ptr.
9866
9867 2017-08-09 John Baldwin <jhb@FreeBSD.org>
9868
9869 * fbsd-nat.c: [!HAVE_KINFO_GETVMMAP]: Include <sys/user.h> and
9870 "filestuff.h".
9871 (fbsd_find_memory_regions): Fix `mapfile' initialization.
9872
9873 2017-08-09 Tom Tromey <tom@tromey.com>
9874
9875 * skip.c (skiplist_entry): New constructor.
9876 (skiplist_entry::enabled, skiplist_entry::function_is_regexp)
9877 (skiplist_entry::file_is_glob): Now bool.
9878 (skiplist_entry::file, skiplist_entry::function): Now
9879 std::string.
9880 (make_skip_entry): Return a unique_ptr. Use new.
9881 (free_skiplist_entry, free_skiplist_entry_cleanup)
9882 (make_free_skiplist_entry_cleanup): Remove.
9883 (skip_command, skip_disable_command, add_skiplist_entry)
9884 (skip_form_bytes, compile_skip_regexp, skip_command, skip_info)
9885 (skip_file_p, skip_gfile_p, skip_function_p, skip_rfunction_p)
9886 (function_name_is_marked_for_skip): Update.
9887 (skip_delete_command): Update. Use delete.
9888
9889 2017-08-09 Jiong Wang <jiong.wang@arm.com>
9890
9891 * aarch64-linux-tdep.c: Include "auxv.h" and "elf/common.h".
9892 (aarch64_linux_core_read_description): New function.
9893 (aarch64_linux_init_abi): Register gdbarch_core_read_description.
9894
9895 2017-08-09 Pedro Alves <palves@redhat.com>
9896
9897 * cp-name-parser.y (cp_comp_to_string): Return a
9898 gdb::unique_xmalloc_ptr<char>.
9899 * cp-support.c (replace_typedefs_qualified_name)
9900 (replace_typedefs): Adjust to use gdb::unique_xmalloc_ptr<char>.
9901 (cp_canonicalize_string_full): Use op= instead of explicit
9902 convertion.
9903 (cp_class_name_from_physname, method_name_from_physname)
9904 (cp_func_name, cp_remove_params): Adjust to use
9905 gdb::unique_xmalloc_ptr<char>.
9906 * cp-support.h (cp_comp_to_string): Return a
9907 gdb::unique_xmalloc_ptr<char>.
9908 * python/py-type.c (typy_lookup_type): Adjust to use
9909 gdb::unique_xmalloc_ptr<char>.
9910
9911 2017-08-09 H.J. Lu <hongjiu.lu@intel.com>
9912
9913 * dwarf2read.c (dwarf2_string_attr): Fix a typo.
9914
9915 2017-08-09 Alex Lindsay <alexlindsay239@gmail.com>
9916 Yao Qi <yao.qi@linaro.org>
9917
9918 * cp-support.c (cp_canonicalize_string_full): Use
9919 gdb::unique_xmalloc_ptr<char>.
9920 (cp_canonicalize_string): Likewise.
9921
9922 2017-08-09 Yao Qi <yao.qi@linaro.org>
9923
9924 * features/Makefile (WHICH): Remove i386/ non-linux stuff.
9925 * regformats/i386/amd64-avx-avx512.dat: Remove.
9926 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Remove.
9927 * regformats/i386/amd64-avx-mpx.dat:Remove.
9928 * regformats/i386/amd64-avx.dat: Remove.
9929 * regformats/i386/amd64-mpx.dat: Remove.
9930 * regformats/i386/i386-avx-avx512.dat: Remove.
9931 * regformats/i386/i386-avx-mpx-avx512-pku.dat: Remove.
9932 * regformats/i386/i386-avx-mpx.dat: Remove.
9933 * regformats/i386/i386-mmx.dat: Remove.
9934 * regformats/i386/i386-mpx.dat: Remove.
9935
9936 2017-08-09 Yao Qi <yao.qi@linaro.org>
9937
9938 * amd64-tdep.h (tdesc_x32): Remove the declaration.
9939 * amd64-tdep.c: Don't include features/i386/x32*.c.
9940 (_initialize_amd64_tdep): Don't call initialize_tdesc_x32*
9941 functions.
9942 * features/Makefile (WHICH): Remove i386/x32, i386/x32-avx,
9943 and i386/x32-avx-avx512.
9944 (XMLTOC): Remove i386/x32-avx.xml, i386/x32-avx-avx512.xml,
9945 and i386/x32.xml.
9946 * features/i386/x32-avx-avx512.c: Removed.
9947 * features/i386/x32-avx-avx512.xml: Removed.
9948 * features/i386/x32-avx.c: Removed.
9949 * features/i386/x32-avx.xml: Removed.
9950 * features/i386/x32.c: Removed.
9951 * features/i386/x32.xml: Removed.
9952 * regformats/i386/x32-avx-avx512.dat: Removed.
9953 * regformats/i386/x32-avx.dat: Removed.
9954 * regformats/i386/x32.dat: Removed.
9955
9956 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
9957
9958 PR breakpoints/21886
9959 * mem-break.c (default_memory_insert_breakpoint): Use
9960 `->placed_address' rather than `->reqstd_address' for the
9961 breakpoint location.
9962
9963 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
9964
9965 * arch-utils.c (default_print_insn): Remove arch/mach/endian
9966 assertions.
9967
9968 2017-08-07 Maciej W. Rozycki <macro@imgtec.com>
9969
9970 * gdbarch.sh (gdbarch_info): Replace the `tdep_info' member with
9971 a union of `tdep_info', `tdesc_data' and `id'.
9972 * aarch64-tdep.c (aarch64_gdbarch_init): Use `info.tdesc_data'
9973 rather than `info.tdep_info'.
9974 * amd64-linux-tdep.c (amd64_linux_init_abi): Likewise.
9975 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
9976 * i386-tdep.c (i386_gdbarch_init): Likewise.
9977 * mips-linux-tdep.c (mips_linux_init_abi): Likewise.
9978 * mips-tdep.c (mips_gdbarch_init): Likewise.
9979 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
9980 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
9981 * ppc-linux-tdep.c (ppu2spu_sniffer): Use `info.id' rather than
9982 `info.tdep_info'.
9983 (ppc_linux_init_abi): Use `info.tdesc_data' rather than
9984 `info.tdep_info'.
9985 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
9986 * spu-multiarch.c (spu_gdbarch): Use `info.id' rather than
9987 `info.tdep_info'.
9988 * spu-tdep.c (spu_gdbarch_init): Likewise.
9989 * gdbarch.h: Regenerate.
9990
9991 2017-08-07 Leszek Swirski <leszeks@google.com>
9992
9993 PR symtab/20899
9994 * dwarf2read.c (dwarf2_string_attr): Allow DW_FORM_GNU_strp_alt.
9995
9996 2017-08-07 Simon Marchi <simon.marchi@ericsson.com>
9997
9998 * remote-sim.c (gdbsim_load): Remove char **argv local variable.
9999 (gdbsim_open): Rename gdb_argv args object to argv.
10000
10001 2017-08-05 Tom Tromey <tom@tromey.com>
10002
10003 * compile/compile-object-load.c (compile_object_load): Use
10004 gdb::unique_xmalloc_ptr.
10005 * cli/cli-dump.c (scan_filename): Rename from
10006 scan_filename_with_cleanup. Change return type.
10007 (scan_expression): Rename from scan_expression_with_cleanup.
10008 Change return type.
10009 (dump_memory_to_file, dump_value_to_file, restore_command):
10010 Use gdb::unique_xmalloc_ptr. Update.
10011 * cli/cli-cmds.c (find_and_open_script): Use
10012 gdb::unique_xmalloc_ptr.
10013 * tracefile-tfile.c (tfile_open): Use gdb::unique_xmalloc_ptr.
10014 * symmisc.c (maintenance_print_symbols)
10015 (maintenance_print_msymbols): Use gdb::unique_xmalloc_ptr.
10016 * symfile.c (symfile_bfd_open, generic_load)
10017 (add_symbol_file_command, remove_symbol_file_command): Use
10018 gdb::unique_xmalloc_ptr.
10019 * source.c (openp): Use gdb::unique_xmalloc_ptr.
10020 * psymtab.c (maintenance_print_psymbols): Use
10021 gdb::unique_xmalloc_ptr.
10022 * corelow.c (core_open): Use gdb::unique_xmalloc_ptr.
10023 * breakpoint.c (save_breakpoints): Use gdb::unique_xmalloc_ptr.
10024 * solib.c (solib_map_sections): Use gdb::unique_xmalloc_ptr.
10025 (reload_shared_libraries_1): Likewise.
10026
10027 2017-08-05 Tom Tromey <tom@tromey.com>
10028
10029 * rust-exp.y (rust_op_ptr, set_field): Remove typedefs.
10030 (rust_op_vector, rust_set_vector): New typedefs.
10031 (current_parser): New global.
10032 (work_obstack): Change to pointer type. Update all users.
10033 (rust_ast, pstate): Remove globals.
10034 (struct rust_parser): New.
10035 (%union) <params, field_inits>: Change type.
10036 (start, tuple_expr, unit_expr, struct_expr_list, literal)
10037 (field_expr, expr_list, maybe_expr_list, type_list): Update.
10038 (ast_call_ish, ast_path, ast_function_type, ast_tuple_type)
10039 (convert_params_to_types, convert_params_to_expression): Change
10040 type of "params".
10041 (ast_string): Change type of "fields".
10042 (rust_parse): Make a rust_parser. Remove cleanups.
10043 (rust_lex_tests): Make and install an auto_obstack.
10044
10045 2017-08-04 Yao Qi <yao.qi@linaro.org>
10046
10047 * configure.srv (ipa_x32_linux_regobj): New.
10048 * linux-amd64-ipa.c (get_ipa_tdesc): Use X86_TDESC_AVX_AVX512
10049 instead of X86_TDESC_AVX512.
10050 (initialize_low_tracepoint): Call
10051 init_registers_x32_avx_avx512_linux.
10052
10053 2017-08-04 Yao Qi <yao.qi@linaro.org>
10054
10055 * utils.h (gdb_argv): Add namespace std for nullptr_t.
10056
10057 2017-08-03 Ruslan Kabatsayev <b7.10110111@gmail.com>
10058
10059 * MAINTAINERS (Write After Approval): Add Ruslan Kabatsayev.
10060
10061 2017-08-03 Tom Tromey <tom@tromey.com>
10062
10063 * utils.c (make_cleanup_freeargv, do_freeargv, gdb_buildargv):
10064 Remove.
10065 * utils.h (make_cleanup_freeargv, gdb_buildargv): Remove.
10066
10067 2017-08-03 Tom Tromey <tom@tromey.com>
10068
10069 * python/py-param.c (compute_enum_values): Use gdb_argv.
10070
10071 2017-08-03 Tom Tromey <tom@tromey.com>
10072
10073 * utils.h (struct gdb_argv_deleter): New.
10074 (gdb_argv): New class.
10075 * utils.c (gdb_argv::reset): New method.
10076 * tracepoint.c (delete_trace_variable_command): Use gdb_argv.
10077 * tracefile.c (tsave_command): Use gdb_argv.
10078 * top.c (new_ui_command): Use gdb_argv.
10079 * symmisc.c (maintenance_print_symbols)
10080 (maintenance_print_msymbols, maintenance_expand_symtabs): Use gdb_argv.
10081 * symfile.c (symbol_file_command, generic_load)
10082 (remove_symbol_file_command): Use gdb_argv.
10083 * stack.c (backtrace_command): Use gdb_argv.
10084 * source.c (add_path, show_substitute_path_command)
10085 (unset_substitute_path_command, set_substitute_path_command):
10086 Use gdb_argv.
10087 * skip.c (skip_command): Use gdb_argv. Use gdb_buildargv.
10088 * ser-mingw.c (pipe_windows_open): Use gdb_argv.
10089 * remote.c (extended_remote_run, remote_put_command)
10090 (remote_get_command, remote_delete_command): Use gdb_argv.
10091 * remote-sim.c (gdbsim_load, gdbsim_create_inferior)
10092 (gdbsim_open): Use gdb_argv.
10093 * python/py-cmd.c (gdbpy_string_to_argv): Use gdb_argv.
10094 * psymtab.c (maintenance_print_psymbols): Use gdb_argv.
10095 * procfs.c (procfs_info_proc): Use gdb_argv.
10096 * interps.c (interpreter_exec_cmd): Use gdb_argv.
10097 * infrun.c (handle_command): Use gdb_argv.
10098 * inferior.c (add_inferior_command, clone_inferior_command):
10099 Use gdb_argv.
10100 * guile/scm-string.c (gdbscm_string_to_argv): Use gdb_argv.
10101 * exec.c (exec_file_command): Use gdb_argv.
10102 * cli/cli-cmds.c (alias_command): Use gdb_argv.
10103 * compile/compile.c (build_argc_argv): Use gdb_argv.
10104
10105 2017-08-03 Tom Tromey <tom@tromey.com>
10106
10107 * python/python.c (gdbpy_decode_line): Use unique_xmalloc_ptr.
10108
10109 2017-08-03 Tom Tromey <tom@tromey.com>
10110
10111 * python/python.c (compute_python_string): Return std::string.
10112 (gdbpy_eval_from_control_command): Update.
10113 (do_start_initialization): Use std::string.
10114 * python/py-varobj.c (py_varobj_iter_next): Use string_printf, not
10115 xstrprintf.
10116 * python/py-breakpoint.c (local_setattro): Use string_printf, not
10117 xstrprintf.
10118
10119 2017-08-03 Tom Tromey <tom@tromey.com>
10120
10121 * top.h (do_restore_instream_cleanup): Remove.
10122 * top.c (do_restore_instream_cleanup): Remove.
10123 (read_command_file): Use scoped_restore.
10124 * cli/cli-script.c (execute_user_command): Use scoped_restore.
10125
10126 2017-08-03 Tom Tromey <tom@tromey.com>
10127
10128 * cli/cli-script.c (execute_user_command)
10129 (execute_control_command): Use scoped_restore.
10130
10131 2017-08-03 Tom Tromey <tom@tromey.com>
10132
10133 * cli/cli-script.c (do_restore_user_call_depth): Remove.
10134 (execute_user_command): Remove user_call_depth; use
10135 user_args_stack's size instead.
10136
10137 2017-08-03 Tom Tromey <tom@tromey.com>
10138
10139 * top.h (in_user_command): Remove.
10140 * top.c (in_user_command): Remove.
10141 * cli/cli-script.c (do_restore_user_call_depth)
10142 (execute_user_command): Update.
10143
10144 2017-08-03 Tom Tromey <tom@tromey.com>
10145
10146 * valops.c (search_struct_method): Use gdb::byte_vector.
10147 * valarith.c (value_concat): Use std::vector.
10148 * target.c (memory_xfer_partial): Use gdb::byte_vector.
10149 (simple_search_memory): Likewise.
10150 * printcmd.c (find_string_backward): Use gdb::byte_vector.
10151 * mi/mi-main.c (mi_cmd_data_write_memory): Use gdb::byte_vector.
10152 * gcore.c (gcore_copy_callback): Use gdb::byte_vector.
10153 * elfread.c (elf_rel_plt_read): Use std::string.
10154 * cp-valprint.c (cp_print_value): Use gdb::byte_vector.
10155 * cli/cli-dump.c (restore_section_callback): Use
10156 gdb::byte_vector.
10157
10158 2017-08-03 Tom Tromey <tom@tromey.com>
10159
10160 * jit.c (jit_reader_load_command): Use unique_xmalloc_ptr.
10161
10162 2017-08-03 Tom Tromey <tom@tromey.com>
10163
10164 * tui/tui-regs.c (tui_restore_gdbout): Remove.
10165 (tui_register_format): Use scoped_restore.
10166
10167 2017-08-03 Tom Tromey <tom@tromey.com>
10168
10169 * reverse.c (exec_direction_default): Remove.
10170 (exec_reverse_once): Use scoped_restore.
10171 * remote.c (restore_remote_timeout): Remove.
10172 (remote_flash_erase, remote_flash_write, remote_flash_done)
10173 (readchar, remote_serial_write): Use scoped_restore.
10174 * cli/cli-script.c (struct source_cleanup_lines_args)
10175 (source_cleanup_lines): Remove.
10176 (script_from_file): Use scoped_restore.
10177 * cli/cli-cmds.c (source_verbose_cleanup): Remove.
10178 (source_command): Use scoped_restore.
10179
10180 2017-08-03 Tom Tromey <tom@tromey.com>
10181
10182 * utils.h (make_cleanup_free_so): Remove.
10183 * utils.c (do_free_so, make_cleanup_free_so): Remove.
10184 * solist.h (struct so_deleter): New.
10185 (so_list_up): New typedef.
10186 * solib-svr4.c (svr4_read_so_list): Use so_list_up.
10187
10188 2017-08-03 Tom Tromey <tom@tromey.com>
10189
10190 * utils.h (make_cleanup_restore_current_language): Remove.
10191 * utils.c (do_restore_current_language)
10192 (make_cleanup_restore_current_language): Remove.
10193 * parse.c (parse_exp_in_context_1)
10194 (parse_expression_with_language): Use
10195 scoped_restore_current_language.
10196 * mi/mi-main.c (mi_cmd_execute): Use
10197 scoped_restore_current_language.
10198 * language.h (scoped_restore_current_language): New class.
10199
10200 2017-08-03 Tom Tromey <tom@tromey.com>
10201
10202 * compile/compile.c (cleanup_unlink_file): Remove.
10203 (compile_to_object): Use gdb::unlinker.
10204 (eval_compile_command): Likewise.
10205
10206 2017-08-03 Tom Tromey <tom@tromey.com>
10207
10208 * utils.h (make_cleanup_fclose): Remove.
10209 * utils.c (do_fclose_cleanup, make_cleanup_fclose): Remove.
10210
10211 2017-08-03 Tom Tromey <tom@tromey.com>
10212
10213 * top.c (open_terminal_stream): Return gdb_file_up.
10214 (new_ui_command): Update.
10215
10216 2017-08-03 Tom Tromey <tom@tromey.com>
10217
10218 * source.c (print_source_lines_base, forward_search_command)
10219 (reverse_search_command): Use gdb_file_up.
10220
10221 2017-08-03 Tom Tromey <tom@tromey.com>
10222
10223 * fbsd-nat.c (fbsd_find_memory_regions): Update.
10224
10225 2017-08-03 Tom Tromey <tom@tromey.com>
10226
10227 * cli/cli-cmds.c (find_and_open_script): Change return type.
10228 Remove "streamp" and "full_path" parameters.
10229 (source_script_with_search): Update.
10230 * auto-load.c (source_script_file): Update.
10231 * cli/cli-cmds.h (find_and_open_script): Change type.
10232 (open_script): New struct.
10233
10234 2017-08-03 Tom Tromey <tom@tromey.com>
10235
10236 * xml-support.c (xml_fetch_content_from_file): Update.
10237 * ui-file.c (stdio_file::open): Update.
10238 * tracefile-tfile.c (tfile_start): Update.
10239 * remote.c (remote_file_put, remote_file_get): Update.
10240 * nat/linux-procfs.c (linux_proc_get_int)
10241 (linux_proc_pid_get_state, linux_proc_tid_get_name): Update.
10242 * nat/linux-osdata.c (linux_common_core_of_thread): Update.
10243 (command_from_pid, commandline_from_pid, linux_xfer_osdata_cpus)
10244 (print_sockets, linux_xfer_osdata_shm, linux_xfer_osdata_sem)
10245 (linux_xfer_osdata_msg, linux_xfer_osdata_modules): Update.
10246 * nat/linux-btrace.c (linux_determine_kernel_start): Update.
10247 * linux-nat.c (linux_proc_pending_signals): Update.
10248 * dwarf2read.c (write_psymtabs_to_index): Use gdb_file_up.
10249 (file_closer): Remove.
10250 * compile/compile.c (compile_to_object): Update.
10251 * common/filestuff.h (struct gdb_file_deleter): New.
10252 (gdb_file_up): New typedef.
10253 (gdb_fopen_cloexec): Change return type.
10254 * common/filestuff.c (gdb_fopen_cloexec): Return gdb_file_up.
10255 * cli/cli-dump.c (fopen_with_cleanup): Remove.
10256 (dump_binary_file, restore_binary_file): Update.
10257 * auto-load.c (auto_load_objfile_script_1): Update.
10258
10259 2017-08-03 Tom Tromey <tom@tromey.com>
10260
10261 * tracepoint.c (tvariables_info_1): Use ui_out_emit_table.
10262 (info_static_tracepoint_markers_command): Likewise.
10263 * solib.c (info_sharedlibrary_command): Use ui_out_emit_table.
10264 * skip.c (skip_info): Use ui_out_emit_table.
10265 * progspace.c (print_program_space): Use ui_out_emit_table.
10266 * osdata.c (info_osdata): Use ui_out_emit_table.
10267 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions): Use
10268 ui_out_emit_table.
10269 * linux-thread-db.c (info_auto_load_libthread_db): Use
10270 ui_out_emit_table.
10271 * inferior.c (print_inferior): Use ui_out_emit_table.
10272 * gdb_bfd.c (maintenance_info_bfds): Use ui_out_emit_table.
10273 * breakpoint.c (breakpoint_1): Use ui_out_emit_table.
10274 * auto-load.c (auto_load_info_scripts): Use ui_out_emit_table.
10275 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_table.
10276 * ui-out.h (class ui_out_emit_table): New.
10277
10278 2017-08-02 Maciej W. Rozycki <macro@imgtec.com>
10279
10280 * mips-tdep.c (mips_fpu_type_str): New function.
10281 (mips_dump_tdep): Call it.
10282
10283 2017-08-01 Maciej W. Rozycki <macro@imgtec.com>
10284
10285 * mips-tdep.c (mips_gdbarch_init): Use MIPS_FPU_TYPE to access
10286 `->mips_fpu_type'.
10287
10288 2017-07-31 Xavier Roirand <roirand@adacore.com>
10289
10290 * solib-darwin.c (DYLD_VERSION_MAX): Increase value.
10291
10292 2017-07-27 Xavier Roirand <roirand@adacore.com>
10293
10294 * MAINTAINERS (Write After Approval): Add Xavier Roirand.
10295
10296 2017-07-26 Yao Qi <yao.qi@linaro.org>
10297
10298 * cli/cli-cmds.c (maintenancechecklist): New variable.
10299 * gdbcmd.h (maintenancechecklist): Declare it.
10300 * i386-linux-tdep.c (_initialize_i386_linux_tdep) [GDB_SELF_TEST]:
10301 Call i386_linux_read_description with different masks.
10302 * maint.c (maintenance_check_command): New function.
10303 (_initialize_maint_cmds): Call add_prefix_cmd.
10304 * target-descriptions.c (tdesc_reg): override operator != and ==.
10305 (tdesc_type): Likewise.
10306 (tdesc_feature): Likewise.
10307 (target_desc): Likewise.
10308 [GDB_SELF_TEST] (selftests::record_xml_tdesc): New function.
10309 (maintenance_check_xml_descriptions): New function.
10310 (_initialize_target_descriptions) Add command "xml-descriptions".
10311 * target-descriptions.h (selftests::record_xml_tdesc): Declare.
10312
10313 2017-07-26 Yao Qi <yao.qi@linaro.org>
10314
10315 * i386-linux-tdep.c: Don't include features/i386/i386-*linux.c.
10316 Include features/i386/32bit-*.c.
10317 (i386_linux_read_description): Generate target description if it
10318 doesn't exist.
10319 (_initialize_i386_linux_tdep): Don't call _initialize_tdesc_i386
10320 functions.
10321 * features/i386/32bit-linux.c: Re-generated.
10322 * features/i386/32bit-sse.c: Likewise.
10323 * target-descriptions.c (print_c_feature::visit): Print code to
10324 set register number if needed.
10325 (print_c_feature) <m_next_regnum>: New field.
10326
10327 2017-07-26 Yao Qi <yao.qi@linaro.org>
10328
10329 * features/Makefile (CFILES): Rename with TDESC_CFILES.
10330 (FEATURE_XMLFILES): New.
10331 (FEATURE_CFILES): New.
10332 New rules.
10333 (clean-cfiles): Remove generated c files.
10334 * features/i386/32bit-avx.c: Generated.
10335 * features/i386/32bit-avx512.c: Generated.
10336 * features/i386/32bit-core.c: Generated.
10337 * features/i386/32bit-linux.c: Generated.
10338 * features/i386/32bit-mpx.c: Generated.
10339 * features/i386/32bit-pkeys.c: Generated.
10340 * features/i386/32bit-sse.c: Generated.
10341 * target-descriptions.c: Include algorithm.
10342 (tdesc_element_visitor): Add method visit_end.
10343 (print_c_tdesc): Implement visit_end.
10344 (print_c_tdesc:: m_filename_after_features): Move it to
10345 protected.
10346 (print_c_feature): New class.
10347 (maint_print_c_tdesc_cmd): Use print_c_feature if XML file
10348 name starts with "i386/32bit-".
10349
10350 2017-07-26 Yao Qi <yao.qi@linaro.org>
10351
10352 * target-descriptions.c (tdesc_element_visitor): New class.
10353 (tdesc_element): New class.
10354 (tdesc_reg): Inherit from tdesc_element.
10355 (tdesc_reg::accept): New function.
10356 (tdesc_type): Inherit from tdesc_element.
10357 (tdesc_type::accept): New function.
10358 (tdesc_feature): Inherit from tdesc_element.
10359 (tdesc_feature::accept): New function.
10360 (target_desc): Inherit from tdesc_element.
10361 (target_desc::target_desc): New.
10362 (target_desc::~target_desc): New.
10363 (target_desc::accept): New.
10364 (allocate_target_description): Use new.
10365 (free_target_description): Use delete.
10366 (print_c_tdesc): New class.
10367 (maint_print_c_tdesc_cmd): Adjust.
10368
10369 * features/aarch64.c: Re-generated.
10370 * features/arc-arcompact.c: Re-generated.
10371 * features/arc-v2.c: Re-generated.
10372 * features/arm/arm-with-iwmmxt.c: Re-generated.
10373 * features/arm/arm-with-m.c: Re-generated.
10374 * features/arm/arm-with-m-fpa-layout.c: Re-generated.
10375 * features/arm/arm-with-m-vfp-d16.c: Re-generated.
10376 * features/arm/arm-with-neon.c: Re-generated.
10377 * features/arm/arm-with-vfpv2.c: Re-generated.
10378 * features/arm/arm-with-vfpv3.c: Re-generated.
10379 * features/i386/amd64-avx-avx512.c: Re-generated.
10380 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
10381 * features/i386/amd64-avx.c: Re-generated.
10382 * features/i386/amd64-avx-linux.c: Re-generated.
10383 * features/i386/amd64-avx-mpx-avx512-pku.c: Re-generated.
10384 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
10385 * features/i386/amd64-avx-mpx.c: Re-generated.
10386 * features/i386/amd64-avx-mpx-linux.c: Re-generated.
10387 * features/i386/amd64.c: Re-generated.
10388 * features/i386/amd64-linux.c: Re-generated.
10389 * features/i386/amd64-mpx.c: Re-generated.
10390 * features/i386/amd64-mpx-linux.c: Re-generated.
10391 * features/i386/i386-avx-avx512.c: Re-generated.
10392 * features/i386/i386-avx-avx512-linux.c: Re-generated.
10393 * features/i386/i386-avx.c: Re-generated.
10394 * features/i386/i386-avx-linux.c: Re-generated.
10395 * features/i386/i386-avx-mpx-avx512-pku.c: Re-generated.
10396 * features/i386/i386-avx-mpx-avx512-pku-linux.c: Re-generated.
10397 * features/i386/i386-avx-mpx.c: Re-generated.
10398 * features/i386/i386-avx-mpx-linux.c: Re-generated.
10399 * features/i386/i386.c: Re-generated.
10400 * features/i386/i386-linux.c: Re-generated.
10401 * features/i386/i386-mmx.c: Re-generated.
10402 * features/i386/i386-mmx-linux.c: Re-generated.
10403 * features/i386/i386-mpx.c: Re-generated.
10404 * features/i386/i386-mpx-linux.c: Re-generated.
10405 * features/i386/x32-avx-avx512.c: Re-generated.
10406 * features/i386/x32-avx-avx512-linux.c: Re-generated.
10407 * features/i386/x32-avx.c: Re-generated.
10408 * features/i386/x32-avx-linux.c: Re-generated.
10409 * features/i386/x32.c: Re-generated.
10410 * features/i386/x32-linux.c: Re-generated.
10411 * features/microblaze.c: Re-generated.
10412 * features/microblaze-with-stack-protect.c: Re-generated.
10413 * features/mips64-dsp-linux.c: Re-generated.
10414 * features/mips64-linux.c: Re-generated.
10415 * features/mips-dsp-linux.c: Re-generated.
10416 * features/mips-linux.c: Re-generated.
10417 * features/nds32.c: Re-generated.
10418 * features/nios2.c: Re-generated.
10419 * features/nios2-linux.c: Re-generated.
10420 * features/rs6000/powerpc-32.c: Re-generated.
10421 * features/rs6000/powerpc-32l.c: Re-generated.
10422 * features/rs6000/powerpc-403.c: Re-generated.
10423 * features/rs6000/powerpc-403gc.c : Re-generated.
10424 * features/rs6000/powerpc-405.c: Re-generated.
10425 * features/rs6000/powerpc-505.c: Re-generated.
10426 * features/rs6000/powerpc-601.c: Re-generated.
10427 * features/rs6000/powerpc-602.c: Re-generated.
10428 * features/rs6000/powerpc-603.c: Re-generated.
10429 * features/rs6000/powerpc-604.c: Re-generated.
10430 * features/rs6000/powerpc-64.c: Re-generated.
10431 * features/rs6000/powerpc-64l.c: Re-generated.
10432 * features/rs6000/powerpc-7400.c: Re-generated.
10433 * features/rs6000/powerpc-750.c: Re-generated.
10434 * features/rs6000/powerpc-860.c: Re-generated.
10435 * features/rs6000/powerpc-altivec32.c: Re-generated.
10436 * features/rs6000/powerpc-altivec32l.c: Re-generated.
10437 * features/rs6000/powerpc-altivec64.c: Re-generated.
10438 * features/rs6000/powerpc-altivec64l.c: Re-generated.
10439 * features/rs6000/powerpc-cell32l.c: Re-generated.
10440 * features/rs6000/powerpc-cell64l.c: Re-generated.
10441 * features/rs6000/powerpc-e500.c: Re-generated.
10442 * features/rs6000/powerpc-e500l.c: Re-generated.
10443 * features/rs6000/powerpc-isa205-32l.c: Re-generated.
10444 * features/rs6000/powerpc-isa205-64l.c: Re-generated.
10445 * features/rs6000/powerpc-isa205-altivec32l.c: Re-generated.
10446 * features/rs6000/powerpc-isa205-altivec64l.c: Re-generated.
10447 * features/rs6000/powerpc-isa205-vsx32l.c: Re-generated.
10448 * features/rs6000/powerpc-isa205-vsx64l.c: Re-generated.
10449 * features/rs6000/powerpc-vsx32.c: Re-generated.
10450 * features/rs6000/powerpc-vsx32l.c: Re-generated.
10451 * features/rs6000/powerpc-vsx64.c: Re-generated.
10452 * features/rs6000/powerpc-vsx64l.c: Re-generated.
10453 * features/rs6000/rs6000.c: Re-generated.
10454 * features/s390-linux32.c: Re-generated.
10455 * features/s390-linux32v1.c: Re-generated.
10456 * features/s390-linux32v2.c: Re-generated.
10457 * features/s390-linux64.c: Re-generated.
10458 * features/s390-linux64v1.c: Re-generated.
10459 * features/s390-linux64v2.c: Re-generated.
10460 * features/s390-te-linux64.c: Re-generated.
10461 * features/s390-tevx-linux64.c: Re-generated.
10462 * features/s390-vx-linux64.c: Re-generated.
10463 * features/s390x-linux64.c: Re-generated.
10464 * features/s390x-linux64v1.c: Re-generated.
10465 * features/s390x-linux64v2.c: Re-generated.
10466 * features/s390x-te-linux64.c: Re-generated.
10467 * features/s390x-tevx-linux64.c: Re-generated.
10468 * features/s390x-vx-linux64.c: Re-generated.
10469 * features/sparc/sparc32-solaris.c: Re-generated.
10470 * features/sparc/sparc64-solaris.c: Re-generated.
10471 * features/tic6x-c62x.c: Re-generated.
10472 * features/tic6x-c62x-linux.c: Re-generated.
10473 * features/tic6x-c64x.c: Re-generated.
10474 * features/tic6x-c64x-linux.c: Re-generated.
10475 * features/tic6x-c64xp.c: Re-generated.
10476 * features/tic6x-c64xp-linux.c: Re-generated.
10477
10478 2017-07-26 Yao Qi <yao.qi@linaro.org>
10479
10480 * i386-linux-tdep.c (i386_linux_read_description): New function.
10481 (i386_linux_core_read_description): Call
10482 i386_linux_read_description.
10483 * i386-linux-tdep.h (i386_linux_read_description): Declare.
10484 (tdesc_i386_linux, tdesc_i386_mmx_linux): Remove declarations.
10485 (tdesc_i386_avx_linux, tdesc_i386_mpx_linux): Likewise
10486 (tdesc_i386_avx_mpx_linux, tdesc_i386_avx_avx512_linux): Likewise.
10487 (tdesc_i386_avx_mpx_avx512_pku_linux): Likewise.
10488 * x86-linux-nat.c (x86_linux_read_description): Call
10489 i386_linux_read_description.
10490
10491 2017-07-26 Yao Qi <yao.qi@linaro.org>
10492
10493 * NEWS: Mention it.
10494 * features/Makefile (%.c: %.xml): Pass the xml file name to
10495 command "maint print c-tdesc".
10496 * target-descriptions.c (maint_print_c_tdesc_cmd): Get file
10497 name from 'arg'.
10498
10499 2017-07-26 Yao Qi <yao.qi@linaro.org>
10500
10501 * target-descriptions.c (target_desc): Add ctor and dtor. Do
10502 in-class initialization.
10503 (tdesc_create_feature): Call new instead of XCNEW.
10504 (free_target_description): Ue delete.
10505
10506 2017-07-25 John Baldwin <jhb@FreeBSD.org>
10507
10508 * configure.nat: Add "-lkvm" for NetBSD/sparc64 and fix typo.
10509
10510 2017-07-25 Yao Qi <yao.qi@linaro.org>
10511
10512 * amd64-tdep.c (amd64_init_abi): Make argument default_tdesc
10513 constant.
10514 (amd64_x32_init_abi): Likewise.
10515 * amd64-tdep.h (amd64_init_abi): Update declaration.
10516 (amd64_x32_init_abi): Likewise.
10517
10518 2017-07-25 Yao Qi <yao.qi@linaro.org>
10519
10520 PR tdep/21717
10521 * arm-linux-nat.c (arm_linux_fetch_inferior_registers): Update
10522 condition for FPSCR.
10523 (arm_linux_store_inferior_registers): Likewise.
10524
10525 2017-07-22 Tom Tromey <tom@tromey.com>
10526
10527 * break-catch-syscall.c (struct catch_syscall_inferior_data)
10528 <syscalls_counts>: Now a std::vector.
10529 (get_catch_syscall_inferior_data): Use "new".
10530 (catch_syscall_inferior_data_cleanup): Use "delete".
10531 (insert_catch_syscall, remove_catch_syscall)
10532 (clear_syscall_counts): Update.
10533
10534 2017-07-22 Tom Tromey <tom@tromey.com>
10535
10536 * break-catch-syscall.c (syscall_catchpoint)
10537 <syscalls_to_be_caught>: Now a std::vector<int>
10538 (~syscall_catchpoint): Remove.
10539 (insert_catch_syscall, remove_catch_syscall)
10540 (breakpoint_hit_catch_syscall, print_one_catch_syscall)
10541 (print_mention_catch_syscall, print_recreate_catch_syscall):
10542 Update.
10543 (create_syscall_event_catchpoint): Change type of "filter"
10544 parameter.
10545 (catch_syscall_split_args): Return a std::vector.
10546 (catch_syscall_command_1, catching_syscall_number_1): Update.
10547
10548 2017-07-22 Tom Tromey <tom@tromey.com>
10549
10550 * break-catch-throw.c (struct exception_catchpoint)
10551 <exception_rx>: Now a std::string.
10552 (~exception_catchpoint): Remove.
10553 (print_one_detail_exception_catchpoint): Update.
10554 (handle_gnu_v3_exceptions): Change type of except_rx.
10555 (extract_exception_regexp): Return a std::string.
10556 (catch_exception_command_1): Update.
10557
10558 2017-07-22 Tom Tromey <tom@tromey.com>
10559
10560 * break-catch-sig.c (gdb_signal_type): Remove typedef.
10561 (struct signal_catchpoint) <signals_to_be_caught>: Now a
10562 std::vector.
10563 <catch_all>: Now a bool.
10564 (~signal_catchpoint): Remove.
10565 (signal_catchpoint_insert_location)
10566 (signal_catchpoint_remove_location)
10567 (signal_catchpoint_breakpoint_hit, signal_catchpoint_print_one)
10568 (signal_catchpoint_print_mention)
10569 (signal_catchpoint_print_recreate)
10570 (signal_catchpoint_explains_signal): Update.
10571 (create_signal_catchpoint): Change type of "filter" and
10572 "catch_all".
10573 (catch_signal_split_args): Return a std::vector. Change type of
10574 "catch_all".
10575 (catch_signal_command): Update.
10576
10577 2017-07-20 Pedro Alves <palves@redhat.com>
10578
10579 * ada-lang.c (ada_language_defn): Make extern.
10580 (_initialize_ada_language): Remove add_language call.
10581 * c-lang.c (c_language_defn, cplus_language_defn)
10582 (asm_language_defn, minimal_language_defn): Make extern.
10583 (_initialize_c_language): Delete.
10584 * completer.c (compare_cstrings): Delete, moved to utils.h.
10585 * d-lang.c (d_language_defn): Make extern.
10586 (_initialize_d_language): Remove add_language calls.
10587 * defs.h (enum language): Add comment.
10588 * f-lang.c (f_language_defn): Make extern.
10589 (_initialize_f_language): Remove add_language call.
10590 * go-lang.c (go_language_defn): Make extern.
10591 (_initialize_go_language): Remove add_language call.
10592 * language.c: Include <algorithm>.
10593 (languages): Redefine as const array.
10594 (languages_size, languages_allocsize, DEFAULT_ALLOCSIZE): Delete.
10595 (set_language_command): Handle "local". Use for-range loop.
10596 (set_language): Remove loop.
10597 (language_enum): Rewrite.
10598 (language_def, language_str): Remove loops.
10599 (add_language): Delete.
10600 (add_set_language_command): New, based on add_languages.
10601 (skip_language_trampoline): Adjust.
10602 (local_language_defn): Delete.
10603 (language_gdbarch_post_init): Adjust.
10604 (_initialize_language): Remove add_language calls. Call
10605 add_set_language_command.
10606 * language.h (add_language): Delete.
10607 (auto_language_defn)
10608 (unknown_language_defn, minimal_language_defn, ada_language_defn)
10609 (asm_language_defn, c_language_defn, cplus_language_defn)
10610 (d_language_defn, f_language_defn, go_language_defn)
10611 (m2_language_defn, objc_language_defn, opencl_language_defn)
10612 (pascal_language_defn, rust_language_defn): Declare.
10613 * m2-lang.c (m2_language_defn): Make extern.
10614 (_initialize_m2_language): Remove add_language call.
10615 * objc-lang.c (objc_language_defn): Make extern.
10616 (_initialize_objc_language): Remove add_language call.
10617 * opencl-lang.c (opencl_language_defn): Make extern.
10618 (_initialize_opencl_language): Remove add_language call.
10619 * p-lang.c (pascal_language_defn): Make extern.
10620 (_initialize_pascal_language): Delete.
10621 * rust-lang.c (rust_language_defn): Make extern.
10622 (_initialize_rust_language): Delete.
10623 * utils.h (compare_cstrings): New static inline function.
10624
10625 2017-07-20 Pedro Alves <palves@redhat.com>
10626
10627 * ada-lang.c (ada_to_fixed_type_1): Adjust.
10628 (get_var_value): Constify parameters.
10629 (get_int_var_value): Change prototype.
10630 (to_fixed_range_type): Adjust.
10631 * ada-lang.h (get_int_var_value): Change prototype.
10632
10633 2017-07-20 Pedro Alves <palves@redhat.com>
10634
10635 * dwarf2read.c (dw2_lookup_symbol): Use
10636 SYMBOL_MATCHES_SEARCH_NAME.
10637 * psymtab.c (psym_lookup_symbol): Use SYMBOL_MATCHES_SEARCH_NAME.
10638
10639 2017-07-20 Pedro Alves <palves@redhat.com>
10640
10641 * block.c (block_iter_name_step, block_iter_name_first)
10642 (block_iter_name_next): Delete.
10643 (block_lookup_symbol_primary): Adjust to use
10644 dict_iter_match_first/dict_iter_match_next.
10645 * block.h (block_iter_name_first, block_iter_name_next): Delete
10646 declarations.
10647 (ALL_BLOCK_SYMBOLS_WITH_NAME): Adjust to use
10648 dict_iter_match_first/dict_iter_match_next.
10649
10650 2017-07-20 Pedro Alves <palves@redhat.com>
10651
10652 * cp-support.c (cp_find_first_component_aux): Add missing case for
10653 end of string.
10654
10655 2017-07-18 David Blaikie <dblaikie@gmail.com>
10656
10657 * dwarf2read.c (create_cus_hash_table): Re-add lost initialization
10658 of dwo_cu's dwo_file.
10659
10660 2017-07-18 Yao Qi <yao.qi@linaro.org>
10661
10662 * remote.c (store_registers_using_G): Remove one line comment.
10663
10664 2017-07-18 Yao Qi <yao.qi@linaro.org>
10665
10666 * regcache.c (regcache_cpy): Simplify it.
10667 (regcache::cpy_no_passthrough): Remove it.
10668 * regcache.h (cpy_no_passthrough): Remove it.
10669 (regcache_dup, regcache_cpy): Update comments.
10670
10671 2017-07-18 Pedro Alves <palves@redhat.com>
10672
10673 * remote-sim.c (sim_command_completer): Adjust to work with a
10674 completion_tracker instead of a VEC.
10675
10676 2017-07-17 Pedro Alves <palves@redhat.com>
10677
10678 * completer.c (complete_source_filenames): New function.
10679 (complete_address_and_linespec_locations): New function.
10680 (location_completer): Use complete_address_and_linespec_locations.
10681 (completion_tracker::build_completion_result): Honor the tracker's
10682 request to suppress append.
10683 * completer.h (completion_tracker::suppress_append_ws)
10684 (completion_tracker::set_suppress_append_ws): New methods.
10685 (completion_tracker::m_suppress_append_ws): New field.
10686 (complete_source_filenames): New declaration.
10687 * linespec.c (linespec_complete_what): New.
10688 (struct ls_parser) <complete_what, completion_word,
10689 completion_quote_char, completion_quote_end, completion_tracker>:
10690 New fields.
10691 (string_find_incomplete_keyword_at_end): New.
10692 (linespec_lexer_lex_string): Record quote char. If in completion
10693 mode, don't throw.
10694 (linespec_lexer_consume_token): Advance the completion word point.
10695 (linespec_lexer_peek_token): Save/restore completion info.
10696 (save_stream_and_consume_token): New.
10697 (set_completion_after_number): New.
10698 (linespec_parse_basic): Set what to complete next depending on
10699 token. Handle function and label completions specially.
10700 (parse_linespec): Disable objc shortcut in completion mode. Set
10701 what to complete next depending on token type. Skip keyword if in
10702 completion mode.
10703 (complete_linespec_component, linespec_complete): New.
10704 * linespec.h (linespec_complete): Declare.
10705
10706 2017-07-17 Pedro Alves <palves@redhat.com>
10707
10708 * linespec.c (linespec_lexer_lex_string, find_toplevel_char):
10709 Handle 'operator<' / 'operator<<'.
10710
10711 2017-07-17 Pedro Alves <palves@redhat.com>
10712
10713 * completer.c (collect_explicit_location_matches): Handle
10714 MATCH_LABEL.
10715 (convert_explicit_location_to_linespec): New, factored out from
10716 ...
10717 (convert_explicit_location_to_sals): ... this.
10718 (complete_label): New.
10719 (linespec_complete_label, find_label_symbols_in_block): New.
10720 (find_label_symbols): Add completion_mode parameter and adjust to
10721 call find_label_symbols_in_block.
10722 * linespec.h (linespec_complete_label): Declare.
10723
10724 2017-07-17 Pedro Alves <palves@redhat.com>
10725
10726 * ada-lang.c (ada_collect_symbol_completion_matches): Add
10727 complete_symbol_mode parameter.
10728 * cli/cli-cmds.c (complete_command): Get the completion result out
10729 of the handle_brkchars tracker if used a custom word point.
10730 * completer.c: Include "linespec.h".
10731 (enum explicit_location_match_type) <MATCH_LINE>: New enumerator.
10732 (advance_to_expression_complete_word_point): New.
10733 (completion_tracker::completes_to_completion_word): New.
10734 (complete_files_symbols): Pass down
10735 complete_symbol_mode::EXPRESSION.
10736 (explicit_options, probe_options): New.
10737 (collect_explicit_location_matches): Complete on the
10738 explictit_loc->foo instead of word. Use
10739 linespec_complete_function. Handle MATCH_LINE. Handle offering
10740 keyword and options completions.
10741 (backup_text_ptr): Delete.
10742 (skip_keyword): New.
10743 (complete_explicit_location): Remove 'word' parameter. Add
10744 language, quoted_arg_start and quoted_arg_end parameters.
10745 Rewrite, parsing left to right.
10746 (location_completer): Rewrite.
10747 (location_completer_handle_brkchars): New function.
10748 (symbol_completer): Pass down complete_symbol_mode::EXPRESSION.
10749 (enum complete_line_internal_reason): Adjust comments.
10750 (completion_tracker::discard_completions): New.
10751 (completer_handle_brkchars_func_for_completer): Handle
10752 location_completer.
10753 (gdb_custom_word_point_brkchars)
10754 (gdb_org_rl_basic_quote_characters): New.
10755 (gdb_completion_word_break_characters_throw)
10756 (completion_find_completion_word): Handle trackers that use a
10757 custom word point.
10758 (completion_tracker::advance_custom_word_point_by): New.
10759 (completion_tracker::build_completion_result): Don't rely on
10760 readline appending the quote char.
10761 (gdb_rl_attempted_completion_function_throw): Handle trackers that
10762 use a custom word point.
10763 (gdb_rl_attempted_completion_function): Restore
10764 rl_basic_quote_characters.
10765 * completer.h (class completion_tracker): Extend intro comment.
10766 (completion_tracker::set_quote_char)
10767 (completion_tracker::quote_char)
10768 (completion_tracker::set_use_custom_word_point)
10769 (completion_tracker::use_custom_word_point)
10770 (completion_tracker::custom_word_point)
10771 (completion_tracker::set_custom_word_point)
10772 (completion_tracker::advance_custom_word_point_by)
10773 (completion_tracker::completes_to_completion_word)
10774 (completion_tracker::discard_completions): New methods.
10775 (completion_tracker::m_quote_char)
10776 (completion_tracker::m_use_custom_word_point)
10777 (completion_tracker::m_custom_word_point): New fields.
10778 (advance_to_expression_complete_word_point): Declare.
10779 * f-lang.c (f_collect_symbol_completion_matches): Add
10780 complete_symbol_mode parameter.
10781 * language.h (struct language_defn)
10782 <la_collect_symbol_completion_matches>: Add complete_symbol_mode
10783 parameter.
10784 * linespec.c (linespec_keywords): Add NULL terminator. Make extern.
10785 (linespec_complete_function): New function.
10786 (linespec_lexer_lex_keyword): Adjust.
10787 * linespec.h (linespec_keywords, linespec_complete_function): New
10788 declarations.
10789 * location.c (find_end_quote): New function.
10790 (explicit_location_lex_one): Add explicit_completion_info
10791 parameter. Save quoting info. Don't throw if being called for
10792 completion. Don't handle Ada operators here.
10793 (is_cp_operator, skip_op_false_positives, first_of)
10794 (explicit_location_lex_one_function): New function.
10795 (string_to_explicit_location): Replace 'dont_throw' parameter with
10796 an explicit_completion_info pointer parameter. Handle it. Don't
10797 use explicit_location_lex_one to lex function names. Use
10798 explicit_location_lex_one_function instead.
10799 * location.h (struct explicit_completion_info): New.
10800 (string_to_explicit_location): Replace 'dont_throw' parameter with
10801 an explicit_completion_info pointer parameter.
10802 * symtab.c (default_collect_symbol_completion_matches_break_on):
10803 Add complete_symbol_mode parameter. Handle LINESPEC mode.
10804 (default_collect_symbol_completion_matches)
10805 (collect_symbol_completion_matches): Add complete_symbol_mode
10806 parameter.
10807 (collect_symbol_completion_matches_type): Pass down
10808 complete_symbol_mode::EXPRESSION.
10809 (collect_file_symbol_completion_matches): Add complete_symbol_mode
10810 parameter. Handle LINESPEC mode.
10811 * symtab.h (complete_symbol_mode): New.
10812 (default_collect_symbol_completion_matches_break_on)
10813 (default_collect_symbol_completion_matches)
10814 (collect_symbol_completion_matches)
10815 (collect_file_symbol_completion_matches): Add complete_symbol_mode
10816 parameter.
10817
10818 2017-07-17 Pedro Alves <palves@redhat.com>
10819
10820 * utils.c (enum class strncmp_iw_mode): New.
10821 (strcmp_iw): Rename to ...
10822 (strncmp_iw_with_mode): ... this. Add string2_len and mode
10823 parameters. Handle them.
10824 (strncmp_iw): New.
10825 (strcmp_iw): Reimplement as wrapper around strncmp_iw_with_mode.
10826 * utils.h (strncmp_iw): Declare.
10827 (strcmp_iw): Move describing comments here.
10828
10829 2017-07-17 Pedro Alves <palves@redhat.com>
10830
10831 * c-exp.y (operator_stoken): Use CP_OPERATOR_LEN and
10832 CP_OPERATOR_STR.
10833 * c-typeprint.c (is_type_conversion_operator): Use
10834 CP_OPERATOR_STR.
10835 * cp-support.c (LENGTH_OF_OPERATOR): Delete.
10836 (cp_find_first_component_aux): Use CP_OPERATOR_STR and
10837 CP_OPERATOR_LEN.
10838 * cp-support.h (CP_OPERATOR_STR, CP_OPERATOR_LEN): New.
10839 * gnu-v2-abi.c (gnuv2_is_operator_name): Use CP_OPERATOR_STR.
10840 * gnu-v3-abi.c (gnuv3_is_operator_name): Use CP_OPERATOR_STR.
10841 * linespec.c (linespec_lexer_lex_string): Use CP_OPERATOR_LEN and
10842 CP_OPERATOR_STR.
10843 * location.c: Include "cp-support.h".
10844 (explicit_location_lex_one): Use CP_OPERATOR_LEN and
10845 CP_OPERATOR_STR.
10846 * symtab.c (operator_chars): Use CP_OPERATOR_STR and
10847 CP_OPERATOR_LEN.
10848
10849 2017-07-17 Pedro Alves <palves@redhat.com>
10850
10851 * cli/cli-cmds.c (complete_command): Use a completion tracker
10852 along with completion_find_completion_word for handle_brkchars
10853 phase.
10854 * completer.c (RL_QF_SINGLE_QUOTE, RL_QF_DOUBLE_QUOTE)
10855 (RL_QF_BACKSLASH, RL_QF_OTHER_QUOTE): New.
10856 (struct gdb_rl_completion_word_info): New.
10857 (gdb_rl_find_completion_word): New.
10858 (completion_find_completion_word): New.
10859 * completer.h (completion_find_completion_word): Declare.
10860
10861 2017-07-17 Pedro Alves <palves@redhat.com>
10862
10863 * ada-lang.c (symbol_completion_match): Adjust comments.
10864 (symbol_completion_add): Replace vector parameter with
10865 completion_tracker parameter. Use it.
10866 (ada_make_symbol_completion_list): Rename to...
10867 (ada_collect_symbol_completion_matches): ... this. Add
10868 completion_tracker parameter and use it.
10869 (ada_language_defn): Adjust.
10870 * break-catch-syscall.c (catch_syscall_completer): Adjust
10871 prototype and work with completion_tracker instead of VEC.
10872 * breakpoint.c (condition_completer): Adjust prototype and work
10873 with completion_tracker instead of VEC.
10874 * c-lang.c (c_language_defn, cplus_language_defn)
10875 (asm_language_defn, minimal_language_defn): Adjust to renames.
10876 * cli/cli-cmds.c (complete_command): Rework using
10877 completion_tracker. Catch exceptions when completing.
10878 * cli/cli-decode.c (integer_unlimited_completer)
10879 (complete_on_cmdlist, complete_on_enum): Adjust prototype and work
10880 with completion_tracker instead of VEC.
10881 * command.h (struct completion_tracker): Forward declare.
10882 (completer_ftype, completer_handle_brkchars_ftype): Change
10883 types.
10884 (complete_on_cmdlist, complete_on_enum): Adjust.
10885 * completer.c: Include <algorithm>.
10886 (struct gdb_completer_state): New.
10887 (current_completion): New global.
10888 (readline_line_completion_function): Delete.
10889 (noop_completer, filename_completer)
10890 (filename_completer_handle_brkchars, complete_files_symbols)
10891 (linespec_location_completer): Adjust to work with a
10892 completion_tracker instead of a VEC.
10893 (string_or_empty): New.
10894 (collect_explicit_location_matches): Adjust to work with a
10895 completion_tracker instead of a VEC.
10896 (explicit_location_completer): Rename to ...
10897 (complete_explicit_location): ... this and adjust to work with a
10898 completion_tracker instead of a VEC.
10899 (location_completer): Adjust to work with a completion_tracker
10900 instead of a VEC.
10901 (add_struct_fields): Adjust to work with a completion_list instead
10902 of VEC.
10903 (expression_completer): Rename to ...
10904 (complete_expression): ... this and adjust to work with a
10905 completion_tracker instead of a VEC. Use complete_files_symbols.
10906 (expression_completer): Reimplement on top of complete_expression.
10907 (symbol_completer): Adjust to work with a completion_tracker
10908 instead of a VEC.
10909 (enum complete_line_internal_reason): Add describing comments.
10910 (complete_line_internal_normal_command): Adjust to work with a
10911 completion_tracker instead of a VEC.
10912 (complete_line_internal): Rename to ...
10913 (complete_line_internal_1): ... this and adjust to work with a
10914 completion_tracker instead of a VEC. Assert TEXT is NULL in the
10915 handle_brkchars phase.
10916 (new_completion_tracker): Delete.
10917 (complete_line_internal): Reimplement as TRY/CATCH wrapper around
10918 complete_line_internal_1.
10919 (free_completion_tracker): Delete.
10920 (INITIAL_COMPLETION_HTAB_SIZE): New.
10921 (completion_tracker::completion_tracker)
10922 (completion_tracker::~completion_tracker): New.
10923 (maybe_add_completion): Delete.
10924 (completion_tracker::maybe_add_completion)
10925 (completion_tracker::add_completion)
10926 (completion_tracker::add_completions): New.
10927 (throw_max_completions_reached_error): Delete.
10928 (complete_line): Adjust to work with a completion_tracker instead
10929 of a VEC. Don't create a completion_tracker_t or check for max
10930 completions here.
10931 (command_completer, command_completer_handle_brkchars)
10932 (signal_completer, reg_or_group_completer_1)
10933 (reg_or_group_completer, default_completer_handle_brkchars):
10934 Adjust to work with a completion_tracker.
10935 (gdb_completion_word_break_characters_throw): New.
10936 (gdb_completion_word_break_characters): Reimplement.
10937 (line_completion_function): Delete.
10938 (completion_tracker::recompute_lowest_common_denominator)
10939 (expand_preserving_ws)
10940 (completion_tracker::build_completion_result)
10941 (completion_result::completion_result)
10942 (completion_result::completion_result)
10943 (completion_result::~completion_result)
10944 (completion_result::completion_result)
10945 (completion_result::release_match_list, compare_cstrings)
10946 (completion_result::sort_match_list)
10947 (completion_result::reset_match_list)
10948 (gdb_rl_attempted_completion_function_throw)
10949 (gdb_rl_attempted_completion_function): New.
10950 * completer.h (completion_list, struct completion_result)
10951 (class completion_tracker): New.
10952 (complete_line): Add completion_tracker parameter.
10953 (readline_line_completion_function): Delete.
10954 (gdb_rl_attempted_completion_function): New.
10955 (noop_completer, filename_completer, expression_completer)
10956 (location_completer, symbol_completer, command_completer)
10957 (signal_completer, reg_or_group_completer): Update prototypes.
10958 (completion_tracker_t, new_completion_tracker)
10959 (make_cleanup_free_completion_tracker): Delete.
10960 (enum maybe_add_completion_enum): Delete.
10961 (maybe_add_completion): Delete.
10962 (throw_max_completions_reached_error): Delete.
10963 * corefile.c (complete_set_gnutarget): Adjust to work with a
10964 completion_tracker instead of a VEC.
10965 * cp-abi.c (cp_abi_completer): Adjust to work with a
10966 completion_tracker instead of a VEC.
10967 * d-lang.c (d_language_defn): Adjust.
10968 * disasm.c (disassembler_options_completer): Adjust to work with a
10969 completion_tracker instead of a VEC.
10970 * f-lang.c (f_make_symbol_completion_list): Rename to ...
10971 (f_collect_symbol_completion_matches): ... this. Adjust to work
10972 with a completion_tracker instead of a VEC.
10973 (f_language_defn): Adjust.
10974 * go-lang.c (go_language_defn): Adjust.
10975 * guile/scm-cmd.c (cmdscm_add_completion, cmdscm_completer):
10976 Adjust to work with a completion_tracker instead of a VEC.
10977 * infrun.c (handle_completer): Likewise.
10978 * interps.c (interpreter_completer): Likewise.
10979 * interps.h (interpreter_completer): Likewise.
10980 * language.c (unknown_language_defn, auto_language_defn)
10981 (local_language_defn): Adjust.
10982 * language.h (language_defn::la_make_symbol_completion_list):
10983 Rename to ...
10984 (language_defn::la_collect_symbol_completion_matches): ... this
10985 and adjust to work with a completion_tracker instead of a VEC.
10986 * m2-lang.c (m2_language_defn): Adjust.
10987 * objc-lang.c (objc_language_defn): Adjust.
10988 * opencl-lang.c (opencl_language_defn): Adjust.
10989 * p-lang.c (pascal_language_defn): Adjust.
10990 * python/py-cmd.c (cmdpy_completer_helper): Handle NULL word.
10991 (cmdpy_completer_handle_brkchars, cmdpy_completer): Adjust to work
10992 with a completion_tracker.
10993 * rust-lang.c (rust_language_defn): Adjust.
10994 * symtab.c (free_completion_list, do_free_completion_list)
10995 (return_val, completion_tracker): Delete.
10996 (completion_list_add_name, completion_list_add_symbol)
10997 (completion_list_add_msymbol, completion_list_objc_symbol)
10998 (completion_list_add_fields, add_symtab_completions): Add
10999 completion_tracker parameter and use it.
11000 (default_make_symbol_completion_list_break_on_1): Rename to...
11001 (default_collect_symbol_completion_matches_break_on): ... this.
11002 Add completion_tracker parameter and use it instead of allocating
11003 a completion tracker here.
11004 (default_make_symbol_completion_list_break_on): Delete old
11005 implementation.
11006 (default_make_symbol_completion_list): Delete.
11007 (default_collect_symbol_completion_matches): New.
11008 (make_symbol_completion_list): Delete.
11009 (collect_symbol_completion_matches): New.
11010 (make_symbol_completion_type): Rename to ...
11011 (collect_symbol_completion_matches_type): ... this. Add
11012 completion_tracker parameter and use it instead of VEC.
11013 (make_file_symbol_completion_list_1): Rename to...
11014 (collect_file_symbol_completion_matches): ... this. Add
11015 completion_tracker parameter and use it instead of VEC.
11016 (make_file_symbol_completion_list): Delete.
11017 (add_filename_to_list): Use completion_list instead of a VEC.
11018 (add_partial_filename_data::list): Now a completion_list.
11019 (make_source_files_completion_list): Work with a completion_list
11020 instead of a VEC.
11021 * symtab.h: Include "completer.h".
11022 (default_make_symbol_completion_list_break_on)
11023 (default_make_symbol_completion_list, make_symbol_completion_list)
11024 (make_symbol_completion_type, make_file_symbol_completion_list)
11025 (make_source_files_completion_list): Delete.
11026 (default_collect_symbol_completion_matches_break_on)
11027 (default_collect_symbol_completion_matches)
11028 (collect_symbol_completion_matches)
11029 (collect_symbol_completion_matches_type)
11030 (collect_file_symbol_completion_matches)
11031 (make_source_files_completion_list): New.
11032 * top.c (init_main): Don't install a rl_completion_entry_function
11033 hook. Install a rl_attempted_completion_function hook instead.
11034 * tui/tui-layout.c (layout_completer): Adjust to work with a
11035 completion_tracker.
11036 * tui/tui-regs.c (tui_reggroup_completer):
11037 * tui/tui-win.c (window_name_completer, focus_completer)
11038 (winheight_completer): Adjust to work with a completion_tracker.
11039 * value.c: Include "completer.h".
11040 (complete_internalvar): Adjust to work with a completion_tracker.
11041 * value.h (complete_internalvar): Likewise.
11042
11043 2017-07-17 Pedro Alves <palves@redhat.com>
11044
11045 * cli/cli-decode.c (set_cmd_completer_handle_brkchars): Adjust to
11046 renames.
11047 * cli/cli-decode.h (struct cmd_list_element) <completer>: Move
11048 comments to completer_ftype's declaration.
11049 <completer_handle_brkchars>: Change type to
11050 completer_handle_brkchars_ftype.
11051 * command.h (completer_ftype): Add describing comment and give
11052 names to parameters.
11053 (completer_ftype_void): Rename to ...
11054 (completer_handle_brkchars_ftype) ... this. Add describing comment.
11055 (set_cmd_completer_handle_brkchars): Adjust.
11056 * completer.c (filename_completer_handle_brkchars): New function.
11057 (complete_line_internal_normal_command): New function, factored
11058 out from ...
11059 (complete_line_internal): ... here.
11060 (command_completer_handle_brkchars)
11061 (default_completer_handle_brkchars)
11062 (completer_handle_brkchars_func_for_completer): New functions.
11063 * completer.h (set_gdb_completion_word_break_characters): Delete
11064 declaration.
11065 (completer_handle_brkchars_func_for_completer): New declaration.
11066 * python/py-cmd.c (cmdpy_completer_handle_brkchars): Adjust to use
11067 completer_handle_brkchars_func_for_completer.
11068
11069 2017-07-17 Pedro Alves <palves@redhat.com>
11070
11071 * completer.c (symbol_completer): New function, based on
11072 make_symbol_completion_list_fn.
11073 * completer.h (symbol_completer): New declaration.
11074 * guile/scm-cmd.c (cmdscm_completers): Adjust.
11075 * python/py-cmd.c (completers): Adjust.
11076 * symtab.c (make_symbol_completion_list_fn): Delete.
11077 * symtab.h (make_symbol_completion_list_fn): Delete.
11078 * cli/cli-decode.c (add_cmd): Adjust.
11079
11080 2017-07-17 Pedro Alves <palves@redhat.com>
11081
11082 * Makefile.in (COMMON_OBS): Add filename-seen-cache.o.
11083 * dwarf2read.c: Include "filename-seen-cache.h".
11084 * dwarf2read.c (dwarf2_per_objfile) <filenames_cache>: New field.
11085 (dw2_map_symbol_filenames): Build and use a filenames_seen_cache.
11086 * filename-seen-cache.c: New file.
11087 * filename-seen-cache.h: New file.
11088 * symtab.c: Include "filename-seen-cache.h".
11089 (struct filename_seen_cache, INITIAL_FILENAME_SEEN_CACHE_SIZE)
11090 (create_filename_seen_cache, clear_filename_seen_cache)
11091 (delete_filename_seen_cache, filename_seen): Delete, parts moved
11092 to filename-seen-cache.h/filename-seen-cache.c.
11093 (output_source_filename, sources_info)
11094 (maybe_add_partial_symtab_filename)
11095 (make_source_files_completion_list): Adjust to use
11096 filename_seen_cache.
11097
11098 2017-07-17 Pedro Alves <palves@redhat.com>
11099
11100 * dwarf2read.c (dwarf2_per_objfile): In-class initialize all
11101 fields.
11102 (dwarf2_per_objfile::dwarf2_per_objfile(objfile*, const
11103 dwarf2_debug_sections*)): New.
11104 (dwarf2_per_objfile::dwarf2_per_objfile(const
11105 dwarf2_per_objfile&)): Declare as deleted.
11106 (dwarf2_per_objfile::operator=): Declare as deleted.
11107 (dwarf2_per_objfile::dwarf2_per_objfile)
11108 (dwarf2_per_objfile::~dwarf2_per_objfile)
11109 (dwarf2_per_objfile::free_cached_comp_units): New.
11110 (dwarf2_has_info): dwarf2_per_objfile initialization code moved to
11111 ctor. Call dwarf2_per_objfile's ctor manually.
11112 (dwarf2_locate_sections): Deleted/refactored as ...
11113 (dwarf2_per_objfile::locate_sections): ... this new method.
11114 (free_cached_comp_units): Defer to
11115 dwarf2_per_objfile::free_cached_comp_units.
11116 (dwarf2_free_objfile): Call dwarf2_per_objfile's dtor manually.
11117
11118 2017-07-14 Tom Tromey <tom@tromey.com>
11119
11120 PR rust/21764:
11121 * rust-exp.y (convert_ast_to_expression): Add "want_type"
11122 parameter.
11123 <UNOP_SIZEOF>: Split into separate case.
11124 <UNOP_VAR_VALUE>: Handle want_type. Add error case.
11125
11126 2017-07-14 Tom Tromey <tom@tromey.com>
11127
11128 PR rust/21763:
11129 * symtab.c (symbol_matches_domain): Add language_rust to special
11130 case.
11131 * rust-exp.y (convert_ast_to_expression) <OP_VAR_VALUE>: Don't
11132 treat LOC_TYPEDEF symbols as variables.
11133
11134 2017-07-14 Pedro Alves <palves@redhat.com>
11135
11136 * symtab.c (make_file_symbol_completion_list_1): Iterate over
11137 symtabs matching all symtabs with SRCFILE as file name instead of
11138 only considering the first hit, with lookup_symtab.
11139
11140 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
11141
11142 * ax-gdb.c (gen_aggregate_elt_ref): Remove operand_name and
11143 operator_name parameters.
11144 (gen_expr): Update function call.
11145
11146 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
11147
11148 * dwarf2loc.h (dwarf2_compile_expr_to_ax): Remove gdbarch
11149 parameter.
11150 * symtab.h (struct symbol_computed_ops::tracepoint_var_ref):
11151 Likewise.
11152 * dwarf2loc.c (dwarf2_compile_expr_to_ax): Remove gdbarch
11153 parameter, use agent_expr::gdbarch instead, update function
11154 calls.
11155 (locexpr_tracepoint_var_ref): Likewise.
11156 (loclist_tracepoint_var_ref): Likewise.
11157 * ax-gdb.c (gen_trace_static_fields): Likewise.
11158 (gen_traced_pop): Likewise.
11159 (gen_frame_args_address): Likewise.
11160 (gen_frame_locals_address): Likewise.
11161 (gen_var_ref): Likewise.
11162 (gen_struct_ref_recursive): Likewise.
11163 (gen_static_field): Likewise.
11164 (gen_maybe_namespace_elt): Likewise.
11165 (gen_expr): Likewise.
11166 (gen_trace_for_var): Likewise.
11167 (gen_trace_for_expr): Likewise.
11168 (gen_trace_for_return_address): Likewise.
11169
11170 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
11171
11172 * ax-gdb.c (gen_deref, gen_address_of): Remove unused ax
11173 parameter.
11174 (gen_struct_ref, gen_expr, gen_expr_binop_rest): Update call.
11175
11176 2017-07-14 Simon Marchi <simon.marchi@ericsson.com>
11177
11178 * ax-gdb.c (gen_usual_unary): Remove exp parameter, get gdbarch
11179 from ax, update calls.
11180 (gen_usual_arithmetic): Likewise.
11181 (gen_integral_promotions): Likewise.
11182 (gen_bitfield_ref): Likewise.
11183 (gen_primitive_field): Likewise.
11184 (gen_struct_ref_recursive): Likewise.
11185 (gen_struct_ref): Likewise.
11186 (gen_maybe_namespace_elt): Likewise.
11187 (gen_struct_elt_for_reference): Likewise.
11188 (gen_namespace_elt): Likewise.
11189 (gen_aggregate_elt_ref): Likewise.
11190 (gen_expr): Get gdbarch from ax, update calls.
11191 (gen_expr_binop_rest): Likewise.
11192
11193 2017-07-13 Pedro Alves <palves@redhat.com>
11194
11195 * amd64-darwin-tdep.c (x86_darwin_init_abi_64): Pass tdesc_amd64
11196 as default tdesc.
11197 * amd64-dicos-tdep.c (amd64_dicos_init_abi):
11198 * amd64-fbsd-tdep.c (amd64fbsd_init_abi):
11199 * amd64-linux-tdep.c (amd64_linux_init_abi): Pass
11200 tdesc_amd64_linux as default tdesc. Get final tdesc from the
11201 tdep.
11202 (amd64_x32_linux_init_abi): Pass tdesc_x32_linux as default tdesc.
11203 Get final tdesc from the tdep.
11204 * amd64-nbsd-tdep.c (amd64nbsd_init_abi): Pass tdesc_amd64 as
11205 default tdesc.
11206 * amd64-obsd-tdep.c (amd64obsd_init_abi): Likewise.
11207 * amd64-sol2-tdep.c (amd64_sol2_init_abi): Likewise.
11208 * amd64-tdep.c (amd64_init_abi): Add 'default_tdesc' parameter.
11209 Use it as default tdesc.
11210 (amd64_x32_init_abi): Add 'default_tdesc' parameter, and pass it
11211 down to amd_init_abi. No longer handle fallback tdesc here.
11212 * amd64-tdep.h (tdesc_x32): Declare.
11213 (amd64_init_abi, amd64_x32_init_abi): Add 'default_tdesc'
11214 parameter.
11215 * amd64-windows-tdep.c (amd64_windows_init_abi): Pass tdesc_amd64
11216 as default tdesc.
11217
11218 2017-07-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11219
11220 * s390-linux-tdep.c (s390_process_record): Add support for
11221 instructions new in arch12.
11222
11223 2017-07-11 John Baldwin <jhb@FreeBSD.org>
11224
11225 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers): Use
11226 PT_GETFSBASE and PT_GETGSBASE.
11227 (amd64bsd_store_inferior_registers): Use PT_SETFSBASE and
11228 PT_SETGSBASE.
11229
11230 2017-07-11 John Baldwin <jhb@FreeBSD.org>
11231
11232 * features/Makefile (amd64.dat, amd64-avx.dat, amd64-mpx.dat)
11233 (amd64-avx-mpx.dat, amd64-avx-avx512.dat)
11234 (amd64-avx-mpx-avx512-pku.dat): Add i386/64bit-segments.xml in
11235 those rules.
11236 * features/i386/amd64-avx-avx512.xml: Add 64bit-segments.xml.
11237 * features/i386/amd64-avx-mpx-avx512-pku.xml: Add 64bit-segments.xml.
11238 * features/i386/amd64-avx-mpx.xml: Add 64bit-segments.xml.
11239 * features/i386/amd64-avx.xml: Add 64bit-segments.xml.
11240 * features/i386/amd64-mpx.xml: Add 64bit-segments.xml.
11241 * features/i386/amd64.xml: Add 64bit-segments.xml.
11242 * features/i386/amd64-avx-avx512.c: Regenerated.
11243 * features/i386/amd64-avx-mpx-avx512-pku.c: Regenerated.
11244 * features/i386/amd64-avx-mpx.c: Regenerated.
11245 * features/i386/amd64-avx.c: Regenerated.
11246 * features/i386/amd64-mpx.c: Regenerated.
11247 * features/i386/amd64.c: Regenerated.
11248 * regformats/i386/amd64-avx-avx512.dat: Regenerated.
11249 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
11250 * regformats/i386/amd64-avx-mpx.dat: Regenerated.
11251 * regformats/i386/amd64-avx.dat: Regenerated.
11252 * regformats/i386/amd64-mpx.dat: Regenerated.
11253 * regformats/i386/amd64.dat: Regenerated.
11254
11255 2017-07-10 Yao Qi <yao.qi@linaro.org>
11256
11257 * features/i386/amd64-avx-avx512-linux.c: Re-generated.
11258 * features/i386/amd64-avx-mpx-avx512-pku-linux.c: Re-generated.
11259
11260 2017-07-10 Anton Kolesov <Anton.Kolesov@synopsys.com>
11261
11262 * gnulib/update-gnulib.sh (IMPORTED_GNULIB_MODULES): Add setenv and
11263 unsetenv.
11264 * gnulib/aclocal.m4: Regenerate.
11265 * gnulib/config.in: Regenerate.
11266 * gnulib/configure: Regenerate.
11267 * gnulib/import/Makefile.am: Regenerate.
11268 * gnulib/import/Makefile.in: Regenerate.
11269 * gnulib/import/m4/gnulib-cache.m4: Regenerate.
11270 * gnulib/import/m4/gnulib-comp.m4: Regenerate.
11271 * gnulib/import/m4/environ.m4: New file.
11272 * gnulib/import/m4/setenv.m4: New file.
11273 * gnulib/import/setenv.c: New file.
11274 * gnulib/import/unsetenv.c: New file.
11275
11276 2017-07-09 Simon Marchi <simon.marchi@ericsson.com>
11277
11278 * compile/compile-loc2c.c (do_compile_dwarf_expr_to_c): Read
11279 address when op is DW_OP_addr.
11280
11281 2017-07-09 Tom Tromey <tom@tromey.com>
11282
11283 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Reverse size
11284 check and apply to outer type.
11285
11286 2017-07-07 John Baldwin <jhb@FreeBSD.org>
11287
11288 * fbsd-tdep.c (LWPINFO_OFFSET, LWPINFO_PL_FLAGS)
11289 (LWPINFO64_PL_SIGINFO, LWPINFO32_PL_SIGINFO, PL_FLAG_SI)
11290 (SIZE64_SIGINFO_T, SIZE32_SIGINFO_T, fbsd_core_xfer_siginfo): New.
11291 (fbsd_init_abi): Install gdbarch "core_xfer_siginfo" method.
11292
11293 2017-07-07 John Baldwin <jhb@FreeBSD.org>
11294
11295 * fbsd-tdep.c (fbsd_core_thread_name): Use thread_section_name.
11296
11297 2017-07-07 John Baldwin <jhb@FreeBSD.org>
11298
11299 * corelow.c (get_core_siginfo): Remove.
11300 (core_xfer_partial): Use the gdbarch "core_xfer_siginfo" method
11301 instead of get_core_siginfo.
11302 * gdbarch.sh (core_xfer_siginfo): New gdbarch callback.
11303 * gdbarch.h: Re-generate.
11304 * gdbarch.c: Re-generate.
11305 * linux-tdep.c (linux_core_xfer_siginfo): New.
11306 (linux_init_abi): Install gdbarch "core_xfer_siginfo" method.
11307
11308 2017-07-07 John Baldwin <jhb@FreeBSD.org>
11309
11310 * corelow.c (thread_section_name): Move to ...
11311 * gdbcore.h (thread_section_name): ... here.
11312
11313 2017-07-07 John Baldwin <jhb@FreeBSD.org>
11314
11315 * fbsd-nat.c [PT_LWPINFO && __LP64__] (union sigval32)
11316 (struct siginfo32): New.
11317 [PT_LWPINFO] (fbsd_siginfo_size, fbsd_convert_siginfo): New.
11318 (fbsd_xfer_partial) [PT_LWPINFO]: Handle TARGET_OBJECT_SIGNAL_INFO
11319 via ptrace(PT_LWPINFO).
11320
11321 2017-07-07 John Baldwin <jhb@FreeBSD.org>
11322
11323 * fbsd-tdep.c (fbsd_gdbarch_data_handle, struct fbsd_gdbarch_data)
11324 (init_fbsd_gdbarch_data, get_fbsd_gdbarch_data)
11325 (fbsd_get_siginfo_type): New.
11326 (fbsd_init_abi): Install gdbarch "get_siginfo_type" method.
11327 (_initialize_fbsd_tdep): New.
11328
11329 2017-07-06 David Blaikie <dblaikie@gmail.com>
11330
11331 * dwarf2read.c (struct dwo_file): Use a htab of dwo_unit* (rather than
11332 a singular dwo_unit*) to support multiple CUs in the same way that
11333 multiple TUs are supported.
11334 (create_cus_hash_table): Replace create_dwo_cu with a function for
11335 parsing multiple CUs from a DWO file.
11336 (open_and_init_dwo_file): Use create_cus_hash_table rather than
11337 create_dwo_cu.
11338 (lookup_dwo_cutu): Lookup CU in the hash table in the dwo_file with
11339 htab_find, rather than comparing the signature to a singleton CU in
11340 the dwo_file.
11341
11342 2017-07-06 Pedro Alves <palves@redhat.com>
11343
11344 * python/py-unwind.c (pyuw_dealloc_cache): Fix for loop condition.
11345
11346 2017-07-04 Pedro Alves <palves@redhat.com>
11347
11348 * gdbtypes.c (recursive_dump_type): Don't reference TYPE_STATIC.
11349 * gdbtypes.h (TYPE_STATIC): Delete.
11350 (struct fn_field) <is_public, is_abstract, is_static, is_final,
11351 is_synchronized, is_native>: Delete.
11352 <dummy>: Bump.
11353 (TYPE_FN_FIELD_PUBLIC, TYPE_FN_FIELD_STATIC, TYPE_FN_FIELD_FINAL)
11354 (TYPE_FN_FIELD_SYNCHRONIZED, TYPE_FN_FIELD_NATIVE)
11355 (TYPE_FN_FIELD_ABSTRACT): Delete.
11356
11357 2017-07-03 Simon Marchi <simon.marchi@ericsson.com>
11358
11359 * buffer.h (buffer_finish): Fix spelling mistakes.
11360
11361 2017-07-01 Eli Zaretskii <eliz@gnu.org>
11362
11363 * .dir-locals.el: Automatically switch to C-style comments in
11364 versions of Emacs that support the feature.
11365
11366 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
11367 Pedro Alves <palves@redhat.com>
11368
11369 PR cli/21688
11370 * cli/cli-script.c (command_name_equals_not_inline): Remove function.
11371 (process_next_line): New variable 'inline_cmd'.
11372 Adjust 'if' clauses for "python", "compile" and "guile" to use
11373 'command_name_equals' and check for '!inline_cmd'.
11374
11375 2017-06-30 Sergio Durigan Junior <sergiodj@redhat.com>
11376
11377 PR cli/21688
11378 * cli/cli-script.c (command_name_equals_not_inline): New function.
11379 (process_next_line): Adjust 'if' clauses for "python", "compile"
11380 and "guile" to use command_name_equals_not_inline.
11381
11382 2017-06-29 Pedro Alves <palves@redhat.com>
11383
11384 * completer.c (expression_completer): Call
11385 linespec_location_completer instead of location_completer.
11386
11387 2017-06-29 Pedro Alves <palves@redhat.com>
11388
11389 * completer.c (expression_completer): Remove code that recomputes
11390 'text' from 'word'.
11391
11392 2017-06-29 Yao Qi <yao.qi@linaro.org>
11393
11394 * regformats/regdat.sh: Generate code with
11395 "ifndef IN_PROCESS_AGENT".
11396
11397 2017-06-28 Pedro Alves <palves@redhat.com>
11398
11399 * command.h: Include "common/scoped_restore.h".
11400
11401 2017-06-28 Yao Qi <yao.qi@linaro.org>
11402
11403 * mi/mi-cmd-break.c (mi_argv_to_format): Use obstack_grow_str
11404 instead of obstack_grow.
11405
11406 2017-06-28 Doug Gilmore <Doug.Gilmore@imgtec.com>
11407
11408 PR gdb/21337
11409 * symfile.c (reread_symbols): Call objfiles_changed just before
11410 read_symbols.
11411
11412 2017-06-27 Pedro Alves <palves@redhat.com>
11413
11414 * symtab.c (COMPLETION_LIST_ADD_SYMBOL)
11415 (MCOMPLETION_LIST_ADD_SYMBOL): Delete macros, replace with ...
11416 (completion_list_add_symbol, completion_list_add_msymbol):
11417 ... these new functions.
11418 (add_symtab_completions)
11419 (default_make_symbol_completion_list_break_on_1): Adjust.
11420
11421 2017-06-27 Pedro Alves <palves@redhat.com>
11422
11423 * objfiles.c (get_objfile_bfd_data): Call bfd_alloc instead of
11424 bfd_zalloc. Call objfile_per_bfd_storage's ctor.
11425 (free_objfile_per_bfd_storage): Call objfile_per_bfd_storage's
11426 dtor.
11427 * objfiles.h (objfile_per_bfd_storage): Add ctor. Make
11428 'storage_obstack' field an auto_obstack. In-class initialize all
11429 non-bitfield fields. Make minsyms_read bool.
11430 * symfile.c (read_symbols): Adjust.
11431
11432 2017-06-27 Alan Hayward <alan.hayward@arm.com>
11433
11434 * remote-sim.c (gdbsim_fetch_register): Use byte_vector.
11435 (gdbsim_store_register): Likewise.
11436
11437 2017-06-27 Pedro Alves <palves@redhat.com>
11438
11439 * c-exp.y (name_obstack): Now an auto_obstack.
11440 (yylex): Use auto_obstack::clear.
11441 (c_parse): Use auto_obstack::clear instead of reinitializing and
11442 freeing the obstack.
11443 * c-lang.c (evaluate_subexp_c): Use auto_obstack.
11444 * d-exp.y (name_obstack): Now an auto_obstack.
11445 (yylex): Use auto_obstack::clear.
11446 (d_parse): Use auto_obstack::clear instead of reinitializing and
11447 freeing the obstack.
11448 * dwarf2loc.c (fetch_const_value_from_synthetic_pointer): Use
11449 auto_obstack.
11450 * dwarf2read.c (create_addrmap_from_index)
11451 (dwarf2_build_psymtabs_hard)
11452 (update_enumeration_type_from_children): Likewise.
11453 * gdb_obstack.h (auto_obstack): New type.
11454 * go-exp.y (name_obstack): Now an auto_obstack.
11455 (build_packaged_name): Use auto_obstack::clear.
11456 (go_parse): Use auto_obstack::clear instead of reinitializing and
11457 freeing the obstack.
11458 * linux-tdep.c (linux_make_mappings_corefile_notes): Use
11459 auto_obstack.
11460 * printcmd.c (printf_wide_c_string, ui_printf): Use auto_obstack.
11461 * rust-exp.y (work_obstack): Now an auto_obstack.
11462 (rust_parse, rust_lex_tests): Use auto_obstack::clear instead of
11463 reinitializing and freeing the obstack.
11464 * utils.c (do_obstack_free, make_cleanup_obstack_free): Delete.
11465 (host_char_to_target): Use auto_obstack.
11466 * utils.h (make_cleanup_obstack_free): Delete declaration.
11467 * valprint.c (generic_emit_char, generic_printstr): Use
11468 auto_obstack.
11469
11470 2017-06-27 Simon Marchi <simon.marchi@ericsson.com>
11471
11472 * darwin-nat.c (darwin_check_new_threads): Don't handle dummy
11473 thread.
11474 (darwin_init_thread_list): Don't update dummy thread.
11475 (darwin_create_inferior, darwin_attach): Don't add a dummy thread.
11476
11477 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
11478
11479 * record-full.c (netorder16): Remove.
11480
11481 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
11482
11483 * common/diagnostics.h: Define macros for GCC.
11484 (DIAGNOSTIC_IGNORE_UNUSED_FUNCTION): New macro.
11485 * common/vec.h: Include diagnostics.h.
11486 (DIAGNOSTIC_IGNORE_UNUSED_VEC_FUNCTION): New macro.
11487 (DEF_VEC_I, DEF_VEC_P, DEF_VEC_O): Ignore -Wunused-function
11488 warning.
11489
11490 2017-06-26 Simon Marchi <simon.marchi@ericsson.com>
11491
11492 * common/diagnostics.h (DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER):
11493 New macro.
11494 * ada-lex.l: Ignore deprecated register warnings.
11495
11496 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
11497
11498 * main.c (get_init_files): Replace "SYSTEM_GDBINIT +
11499 datadir_len" with "&SYSTEM_GDBINIT[datadir_len]".
11500
11501 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
11502
11503 * dtrace-probe.c (dtrace_process_dof_probe): Put semi-colon on
11504 its own line.
11505
11506 2017-06-25 Simon Marchi <simon.marchi@ericsson.com>
11507
11508 * nat/x86-dregs.c (x86_show_dr): Print registers one per line.
11509
11510 2017-06-23 Alan Hayward <alan.hayward@arm.com>
11511
11512 * xtensa-tdep.c (XTENSA_MAX_REGISTER_SIZE): Add.
11513 (xtensa_register_write_masked): Use XTENSA_MAX_REGISTER_SIZE.
11514 (xtensa_register_read_masked): Likewise.
11515
11516 2017-06-22 Sergio Durigan Junior <sergiodj@redhat.com>
11517
11518 * common/environ.c (gdb_environ::unset): Update comment.
11519
11520 2017-06-22 Alan Hayward <alan.hayward@arm.com>
11521
11522 * python/py-unwind.c (pyuw_sniffer): Allocate space for
11523 registers.
11524
11525 2017-06-22 Alan Hayward <alan.hayward@arm.com>
11526
11527 * record-full.c (record_full_exec_insn): Use byte_vector.
11528
11529 2017-06-22 Yao Qi <yao.qi@linaro.org>
11530
11531 * regformats/i386/amd64-avx-mpx-avx512-pku-linux.dat: Regenerated.
11532 * regformats/i386/amd64-avx-mpx-avx512-pku.dat: Regenerated.
11533
11534 2017-06-22 Alan Hayward <alan.hayward@arm.com>
11535
11536 * remote.c (cached_reg): Move from here...
11537 * regcache.h (cached_reg): ...to here.
11538 * python/py-unwind.c (struct reg_info): Remove.
11539 (cached_frame_info): Use cached_reg_t.
11540 (pyuw_prev_register): Likewise.
11541 (pyuw_sniffer): Use cached_reg_t and allocate registers.
11542 (pyuw_dealloc_cache): Free all registers.
11543
11544 2017-06-22 Pedro Alves <palves@redhat.com>
11545 Simon Marchi <simon.marchi@ericsson.com>
11546
11547 * unittests/environ-selftests.c (run_tests): Ignore -Wself-move
11548 warning.
11549 * common/diagnostics.h: New file.
11550
11551 2017-06-22 Pedro Alves <palves@redhat.com>
11552
11553 * common/agent.h: Add include guards.
11554
11555 2017-06-21 Simon Marchi <simon.marchi@ericsson.com>
11556
11557 * target.h (struct target_ops) <to_xfer_partial>: Update doc to
11558 talk about addressable units instead of bytes.
11559
11560 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
11561
11562 * common/environ.c (gdb_environ::unset): Use '::iterator' instead
11563 of '::const_iterator'.
11564
11565 2017-06-20 Sergio Durigan Junior <sergiodj@redhat.com>
11566
11567 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
11568 'unittests/environ-selftests.c'.
11569 (SUBDIR_UNITTESTS_OBS): Add 'environ-selftests.o'.
11570 * charset.c (find_charset_names): Declare object 'iconv_env'.
11571 Update code to use 'iconv_env' object. Remove call to
11572 'free_environ'.
11573 * common/environ.c: Include <utility>.
11574 (make_environ): Delete function.
11575 (free_environ): Delete function.
11576 (gdb_environ::clear): New function.
11577 (gdb_environ::operator=): New function.
11578 (gdb_environ::get): Likewise.
11579 (environ_vector): Delete function.
11580 (set_in_environ): Delete function.
11581 (gdb_environ::set): New function.
11582 (unset_in_environ): Delete function.
11583 (gdb_environ::unset): New function.
11584 (gdb_environ::envp): Likewise.
11585 * common/environ.h: Include <vector>.
11586 (struct gdb_environ): Delete; transform into...
11587 (class gdb_environ): ... this class.
11588 (free_environ): Delete prototype.
11589 (init_environ, get_in_environ, set_in_environ, unset_in_environ,
11590 environ_vector): Likewise.
11591 * infcmd.c (run_command_1): Update code to call
11592 'envp' from 'gdb_environ' class.
11593 (environment_info): Update code to call methods from 'gdb_environ'
11594 class.
11595 (unset_environment_command): Likewise.
11596 (path_info): Likewise.
11597 (path_command): Likewise.
11598 * inferior.c (inferior::~inferior): Delete call to 'free_environ'.
11599 (inferior::inferior): Initialize 'environment' using the host's
11600 information.
11601 * inferior.h: Remove forward declaration of 'struct gdb_environ'.
11602 Include "environ.h".
11603 (class inferior) <environment>: Change type from 'struct
11604 gdb_environ' to 'gdb_environ'.
11605 * mi/mi-cmd-env.c (mi_cmd_env_path): Update code to call
11606 methods from 'gdb_environ' class.
11607 * solib.c (solib_find_1): Likewise
11608 * unittests/environ-selftests.c: New file.
11609
11610 2017-06-20 Yao Qi <yao.qi@linaro.org>
11611
11612 * features/i386/i386-linux.xml: Exchange the order of including
11613 32bit-linux.xml and 32bit-sse.xml.
11614 * features/i386/i386-linux.c: Regenerated.
11615
11616 2017-06-20 Yao Qi <yao.qi@linaro.org>
11617
11618 * target-descriptions.c (tdesc_reg): Add ctor, dtor.
11619 Delete copy ctor and assignment operator.
11620 (tdesc_type): Likewise.
11621 (tdesc_feature): Likewise.
11622 (tdesc_free_reg): Remove.
11623 (tdesc_create_reg): Use new.
11624 (tdesc_free_type): Remove.
11625 (tdesc_create_vector): Use new.
11626 (tdesc_create_union): Likewise.
11627 (tdesc_create_flags): Likewise.
11628 (tdesc_create_enum): Likewise.
11629 (tdesc_free_feature): Delete.
11630 (free_target_description): Use delete.
11631
11632 2017-06-19 John Baldwin <jhb@FreeBSD.org>
11633
11634 * mips-tdep.c (print_gp_register_row): Don't error for unavailable
11635 registers.
11636
11637 2017-06-19 Pedro Alves <palves@redhat.com>
11638
11639 * dwarf2read.c (write_psymtabs_to_index): Construct file_closer
11640 after gdb::unlinker.
11641
11642 2017-06-19 Sergio Durigan Junior <sergiodj@redhat.com>
11643
11644 * mi/mi-cm-env.c (_initialize_mi_cmd_env): Use getenv instead of
11645 gdb_environ to access an environment variable.
11646
11647 2017-06-18 Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
11648
11649 * nat/linux-ptrace.c (linux_fork_to_function): Add cast to
11650 gdb_byte*.
11651
11652 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
11653
11654 * nat/fork-inferior.h (trace_start_error): Add ATTRIBUTE_PRINTF.
11655
11656 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
11657
11658 * configure: Re-generate.
11659 * warning.m4 (build_warnings): Add -Wno-mismatched-tags.
11660
11661 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
11662
11663 * configure: Re-generate.
11664 * warning.m4: Pass -Werror to compiler when checking for
11665 supported warning flags.
11666
11667 2017-06-17 Simon Marchi <simon.marchi@ericsson.com>
11668
11669 * Makefile.in (COMPILE.pre): Add "-x c++".
11670
11671 2017-06-16 Alan Hayward <alan.hayward@arm.com>
11672 Pedro Alves <palves@redhat.com>
11673 Yao Qi <yao.qi@linaro.org>
11674
11675 * defs.h (RequireLongest): New.
11676 (extract_integer): Declare function template.
11677 (extract_signed_integer): Remove the declaration, but define it
11678 static inline.
11679 (extract_unsigned_integer): Likewise.
11680 (store_integer): Declare function template.
11681 (store_signed_integer): Remove the declaration, but define it
11682 static inline.
11683 (store_unsigned_integer): Likewise.
11684 * findvar.c (extract_integer): New function template.
11685 (extract_signed_integer): Remove.
11686 (extract_unsigned_integer): Remove.
11687 (extract_integer<LONGEST>, extract_integer<ULONGEST>): Explicit
11688 instantiations.
11689 (store_integer): New function template.
11690 (store_signed_integer): Remove.
11691 (store_unsigned_integer): Remove.
11692 (store_integer): Explicit instantiations.
11693 * regcache.c (regcache_raw_read_signed): Update.
11694 (regcache::raw_read): New function.
11695 (regcache::raw_read_signed): Remove.
11696 (regcache::raw_read_unsigned): Remove.
11697 (regcache_raw_read_unsigned): Update.
11698 (regcache_raw_write_unsigned): Update.
11699 (regcache::raw_write_signed): Remove.
11700 (regcache::raw_write): New function.
11701 (regcache_cooked_read_signed): Update.
11702 (regcache::raw_write_unsigned): Remove.
11703 (regcache::cooked_read_signed): Remove.
11704 (regcache_cooked_read_unsigned): Update.
11705 (regcache::cooked_read_unsigned): Remove.
11706 (regcache_cooked_write_signed): Update.
11707 (regcache_cooked_write_unsigned): Update.
11708 * regcache.h (regcache) <raw_read_signed>: Remove.
11709 <raw_write_signed, raw_read_unsigned, raw_write_unsigned>: Remove.
11710 <raw_read, raw_write>: New.
11711 <cooked_read_signed, cooked_write_signed>: Remove.
11712 <cooked_write_unsigned, cooked_read_unsigned>: Remove.
11713 <cooked_read, cooked_write>: New.
11714 * sh64-tdep.c (sh64_pseudo_register_read): Update.
11715 (sh64_pseudo_register_write): Update.
11716
11717 2017-06-16 Anton Kolesov <anton.kolesov@synopsys.com>
11718
11719 * arc-tdep.c (arc_disassembler_options): New variable.
11720 (arc_gdbarch_init): Set and use it. Use arc_delayed_print_insn instead
11721 of default_print_insn.
11722 (arc_delayed_print_insn): Set info->section when needed,
11723 use default_print_insn to retrieve a disassembler.
11724
11725 2017-06-14 Sergio Durigan Junior <sergiodj@redhat.com>
11726
11727 PR gdb/21574
11728 * infcmd.c (_initialize_infcmd): Expand "help run" documentation
11729 to mention $SHELL and startup-with-shell.
11730
11731 2017-06-14 Max Filippov <jcmvbkbc@gmail.com>
11732
11733 * MAINTAINERS: Move Maxim Grigoriev to the Past Maintainers.
11734
11735 2017-06-14 Yao Qi <yao.qi@linaro.org>
11736
11737 * aarch64-tdep.c (aarch64_gdb_print_insn): Call
11738 default_print_insn instead of print_insn_aarch64.
11739 * arm-tdep.c (gdb_print_insn_arm): Call
11740 default_print_insn instead of print_insn_big_arm
11741 and print_insn_little_arm.
11742 * i386-tdep.c (i386_print_insn): Call default_print_insn
11743 instead of print_insn_i386.
11744 * ia64-tdep.c (ia64_print_insn): Call
11745 default_print_insn instead of print_insn_ia64.
11746 * mips-tdep.c (gdb_print_insn_mips): Call
11747 default_print_insn instead of print_insn_big_mips
11748 and print_insn_little_mips.
11749 * spu-tdep.c (gdb_print_insn_spu): Call default_print_insn
11750 instead of print_insn_spu.
11751
11752 2017-06-14 Pedro Alves <palves@redhat.com>
11753
11754 * ada-lang.c: Include "common/byte-vector.h".
11755 (ada_value_primitive_packed_val): Use gdb::byte_vector.
11756 * charset.c (wchar_iterator::iterate): Resize the vector instead
11757 of reserving it.
11758 * common/byte-vector.h: Include "common/def-vector.h".
11759 (wchar_iterator::m_out): Now a gdb::def_vector<gdb_wchar_t>.
11760 * cli/cli-dump.c: Include "common/byte-vector.h".
11761 (dump_memory_to_file, restore_binary_file): Use gdb::byte_vector.
11762 * common/byte-vector.h: New file.
11763 * common/def-vector.h: New file.
11764 * common/default-init-alloc.h: New file.
11765 * dwarf2loc.c: Include "common/byte-vector.h".
11766 (rw_pieced_value): Use gdb::byte_vector, and resize the vector
11767 instead of reserving it.
11768 * dwarf2read.c: Include "common/byte-vector.h".
11769 (data_buf::m_vec): Now a gdb::byte_vector.
11770 * gdb_regex.c: Include "common/def-vector.h".
11771 (compiled_regex::compiled_regex): Use gdb::def_vector<char>.
11772 * mi/mi-main.c: Include "common/byte-vector.h".
11773 (mi_cmd_data_read_memory): Use gdb::byte_vector.
11774 * printcmd.c: Include "common/byte-vector.h".
11775 (print_scalar_formatted): Use gdb::byte_vector.
11776 * valprint.c: Include "common/byte-vector.h".
11777 (maybe_negate_by_bytes, print_decimal_chars): Use
11778 gdb::byte_vector.
11779
11780 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
11781
11782 * darwin-nat.c: Include "nat/fork-inferior.h".
11783
11784 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
11785
11786 * configure.nat: Factor out Darwin bits that are not
11787 architecture-specific. Add fork-inferior.o.
11788
11789 2017-06-13 Simon Marchi <simon.marchi@ericsson.com>
11790
11791 * configure.nat: Factor out AIX bits that are not
11792 architecture-specific. Add fork-inferior.o.
11793
11794 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11795
11796 * dwarf2loc.c (rw_pieced_value): New. Merge logic from...
11797 (read_pieced_value, write_pieced_value): ...here. Reduce to
11798 wrappers that just call rw_pieced_value.
11799
11800 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11801
11802 * dwarf2loc.c (write_pieced_value): When writing the data for a
11803 memory piece, use write_memory_with_notification instead of
11804 write_memory.
11805
11806 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11807
11808 * valops.c (read_value_memory): Change embedded_offset to
11809 represent a bit offset instead of a byte offset.
11810 * value.h (read_value_memory): Adjust comment.
11811
11812 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11813
11814 * dwarf2loc.c (read_pieced_value): Remove unnecessary variables
11815 dest_offset_bits and source_offset_bits.
11816 (write_pieced_value): Likewise.
11817
11818 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11819
11820 * dwarf2loc.c (read_pieced_value): Respect the piece offset, as
11821 given by DW_OP_bit_piece.
11822 (write_pieced_value): Likewise.
11823
11824 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11825
11826 * dwarf2loc.c (read_pieced_value): Move the buffer allocation and
11827 some other preparations to the places where sufficient information
11828 is available.
11829 (write_pieced_value): Likewise.
11830
11831 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11832
11833 * dwarf2loc.c (bits_to_bytes): New function.
11834 (read_pieced_value): Fix offset calculations for register pieces
11835 on big-endian targets.
11836 (write_pieced_value): Likewise.
11837
11838 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11839
11840 * dwarf2loc.c (read_pieced_value): Remove buffer_size variable.
11841 (write_pieced_value): Likewise.
11842
11843 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11844
11845 * dwarf2loc.c (write_pieced_value): When writing to a bit-field,
11846 transfer the source value's least significant bits, instead of its
11847 lowest-addressed ones. Rename type_len to max_offset.
11848 (read_pieced_value): Mirror above changes to write_pieced_value as
11849 applicable.
11850
11851 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11852
11853 * dwarf2loc.c (write_pieced_value): In DWARF_VALUE_MEMORY,
11854 truncate full bytes from dest_offset_bits before using it as an
11855 offset into the buffer.
11856
11857 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11858
11859 * dwarf2loc.c (write_pieced_value): Include transfer size in
11860 byte-wise check.
11861
11862 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11863
11864 * dwarf2loc.c (write_pieced_value): Fix copy/paste error in the
11865 calculation of this_size.
11866
11867 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11868
11869 * dwarf2loc.c (read_pieced_value): Respect parent value's offset
11870 when targeting a bit-field.
11871 (write_pieced_value): Likewise.
11872
11873 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11874
11875 * dwarf2loc.c (struct piece_closure) <addr_size>: Remove field.
11876 (allocate_piece_closure): Drop addr_size parameter.
11877 (dwarf2_evaluate_loc_desc_full): Adjust call to
11878 allocate_piece_closure.
11879
11880 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11881
11882 PR gdb/21226
11883 * dwarf2loc.c (read_pieced_value): Anchor stack value pieces at
11884 the LSB end, independent of endianness.
11885
11886 2017-06-13 Andreas Arnez <arnez@linux.vnet.ibm.com>
11887
11888 * dwarf2loc.c (write_pieced_value): Fix order of calculations for
11889 size capping.
11890
11891 2017-06-13 Yao Qi <yao.qi@linaro.org>
11892
11893 * mips-linux-nat.c: Move include features/mips*-linux.c to
11894 mips-linux-tdep.c.
11895 (_initialize_mips_linux_nat): Move initialize_tdesc_mips* calls
11896 to mips-linux-tdep.c.
11897 * mips-linux-tdep.c: Include features/mips*-linux.c
11898 (_initialize_mips_linux_tdep): Call initialize_tdesc_mips*
11899 functions.
11900 * mips-linux-tdep.h (tdesc_mips_linux): Declare.
11901 (tdesc_mips_dsp_linux, tdesc_mips64_linux): Declare.
11902 (tdesc_mips64_dsp_linux): Declare.
11903
11904 2017-06-12 Tom Tromey <tom@tromey.com>
11905
11906 * valprint.h (val_print_type_code_int): Remove.
11907 * valprint.c (generic_val_print_int): Always call
11908 val_print_scalar_formatted.
11909 (val_print_type_code_int): Remove.
11910 * printcmd.c (print_scalar_formatted): Handle options->format==0.
11911 * f-valprint.c (f_val_print): Use val_print_scalar_formatted.
11912 * c-valprint.c (c_val_print_int): Use val_print_scalar_formatted.
11913 * ada-valprint.c (ada_val_print_num): Use
11914 val_print_scalar_formatted.
11915
11916 2017-06-12 Tom Tromey <tom@tromey.com>
11917
11918 * printcmd.c (print_scalar_formatted): Unify the two switches.
11919 Don't convert scalars to LONGEST.
11920
11921 2017-06-12 Tom Tromey <tom@tromey.com>
11922
11923 PR exp/16225:
11924 * valprint.h (print_decimal_chars): Update.
11925 * valprint.c (maybe_negate_by_bytes): New function.
11926 (print_decimal_chars): Add "is_signed" argument.
11927 * printcmd.c (print_scalar_formatted): Update.
11928
11929 2017-06-12 Tom Tromey <tom@tromey.com>
11930
11931 PR exp/16225:
11932 * valprint.h (print_binary_chars, print_hex_chars): Update.
11933 * valprint.c (val_print_type_code_int): Update.
11934 (print_binary_chars): Add "zero_pad" argument.
11935 (emit_octal_digit): New function.
11936 (print_octal_chars): Don't zero-pad.
11937 (print_decimal_chars): Likewise.
11938 (print_hex_chars): Add "zero_pad" argument.
11939 * sh64-tdep.c (sh64_do_fp_register): Update.
11940 * regcache.c (regcache::dump): Update.
11941 * printcmd.c (print_scalar_formatted): Update.
11942 * infcmd.c (default_print_one_register_info): Update.
11943
11944 2017-06-12 Pedro Alves <palves@redhat.com>
11945 Alan Hayward <alan.hayward@arm.com>
11946
11947 * mips-tdep.c (MAX_MIPS_ABI_REGSIZE): New.
11948 (mips_eabi_push_dummy_call): Rename local 'regsize' to
11949 'abi_regsize'. Rename local array 'valbuf' to 'ref_valbuf', and
11950 use MAX_MIPS_ABI_REGSIZE instead of MAX_REGISTER_SIZE to size it.
11951 Assert that abi_regsize bytes fit in 'ref_valbuf'.
11952
11953 2017-06-12 Pedro Alves <palves@redhat.com>
11954
11955 * dwarf2read.c (mapped_symtab::data): Now a vector of
11956 symtab_index_entry instead of vector of
11957 std::unique_ptr<symtab_index_entry>. All users adjusted to check
11958 whether an element's name is NULL instead of checking whether the
11959 element itself is NULL.
11960 (find_slot): Change return type. Adjust.
11961 (hash_expand, , add_index_entry, uniquify_cu_indices)
11962 (write_hash_table): Adjust.
11963
11964 2017-06-12 Pedro Alves <palves@redhat.com>
11965
11966 * dwarf2read.c (recursively_count_psymbols): New function.
11967 (write_psymtabs_to_index): Call it to compute number of psyms and
11968 pass estimate size of psyms_seen to unordered_set's ctor.
11969
11970 2017-06-12 Pedro Alves <palves@redhat.com>
11971
11972 * dwarf2read.c (write_hash_table): Check if key already exists
11973 before emplacing.
11974
11975 2017-06-12 Pedro Alves <palves@redhat.com>
11976
11977 * dwarf2read.c (data_buf::append_space): Rename to...
11978 (data_buf::grow): ... this, and make private. Adjust all callers.
11979 (data_buf::append_uint): New method.
11980 (add_address_entry, write_one_signatured_type)
11981 (write_psymtabs_to_index): Use it.
11982
11983 2017-06-12 Pedro Alves <palves@redhat.com>
11984
11985 * dwarf2read.c (file_write(FILE *, const void *, size_t)): Delete.
11986 (file_write (FILE *, const std::vector<Elem>&)): Delete.
11987 (data_buf::file_write): Call ::fwrite directly.
11988
11989 2017-06-12 Pedro Alves <palves@redhat.com>
11990
11991 * dwarf2read.c (uniquify_cu_indices): Use std::unique and
11992 std::vector::erase.
11993
11994 2017-06-12 Jan Kratochvil <jan.kratochvil@redhat.com>
11995
11996 Code cleanup: C++ify .gdb_index producer.
11997 * dwarf2read.c: Include <unordered_set> and <unordered_map>.
11998 (MAYBE_SWAP) [WORDS_BIGENDIAN]: Cast to offset_type.
11999 (struct strtab_entry, hash_strtab_entry, eq_strtab_entry)
12000 (create_strtab, add_string): Remove.
12001 (file_write, data_buf): New.
12002 (struct symtab_index_entry): Use std::vector for cu_indices.
12003 (struct mapped_symtab): Use std::vector for data.
12004 (hash_symtab_entry, eq_symtab_entry, delete_symtab_entry)
12005 (create_symbol_hash_table, create_mapped_symtab, cleanup_mapped_symtab):
12006 Remove.
12007 (find_slot): Change return type. Update it to the new data structures.
12008 (hash_expand, add_index_entry): Update it to the new data structures.
12009 (offset_type_compare): Remove.
12010 (uniquify_cu_indices): Update it to the new data structures.
12011 (c_str_view, c_str_view_hasher, vector_hasher): New.
12012 (add_indices_to_cpool): Remove.
12013 (write_hash_table): Update it to the new data structures.
12014 (struct psymtab_cu_index_map, hash_psymtab_cu_index)
12015 (eq_psymtab_cu_index): Remove.
12016 (psym_index_map): New typedef.
12017 (struct addrmap_index_data): Change addr_obstack pointer to data_buf
12018 reference and std::unordered_map for cu_index_htab.
12019 (add_address_entry, add_address_entry_worker, write_address_map)
12020 (write_psymbols): Update it to the new data structures.
12021 (write_obstack): Remove.
12022 (struct signatured_type_index_data): Change types_list to a data_buf
12023 reference and psyms_seen to a std::unordered_set reference.
12024 (write_one_signatured_type, recursively_write_psymbols)
12025 (write_psymtabs_to_index): Update it to the new data structures.
12026
12027 2017-06-11 Simon Marchi <simon.marchi@ericsson.com>
12028
12029 * NEWS (Changes since GDB 8.0): Announce {set,show} debug
12030 separate-debug-file commands.
12031 * symfile.h (separate_debug_file_debug): New global.
12032 * symfile.c (separate_debug_file_debug): New global.
12033 (separate_debug_file_exists, find_separate_debug_file): Add
12034 debug output.
12035 (_initialize_symfile): Add "set debug separate-debug-file"
12036 command.
12037 * build-id.c (build_id_to_debug_bfd,
12038 find_separate_debug_file_by_buildid): Add debug output.
12039
12040 2017-06-10 Simon Marchi <simon.marchi@polymtl.ca>
12041
12042 * gdbarch.sh (displaced_step_free_closure): Remove.
12043 * gdbarch.h, gdbarch.c: Re-generate.
12044 * aarch64-linux-tdep.c (aarch64_linux_init_abi): Don't set
12045 displaced_step_free_closure.
12046 * amd64-linux-tdep.c (amd64_linux_init_abi_common): Likewise.
12047 * arm-linux-tdep.c (arm_linux_init_abi): Likewise.
12048 * i386-linux-tdep.c (i386_linux_init_abi): Likewise.
12049 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
12050 * rs6000-tdep.c (rs6000_gdbarch_init): Likewise.
12051 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
12052 * arch-utils.h (simple_displaced_step_free_closure): Remove.
12053 * arch-utils.c (simple_displaced_step_free_closure): Remove.
12054 * infrun.c (displaced_step_clear): Call xfree instead of
12055 gdbarch_displaced_step_free_closure.
12056
12057 2017-06-08 Sergio Durigan Junior <sergiodj@redhat.com>
12058
12059 * common/common-utils.c (stringify_argv): Check for "arg[0] !=
12060 NULL".
12061
12062 2017-06-08 Alan Hayward <alan.hayward@arm.com>
12063
12064 * mn10300-tdep.c (MN10300_MAX_REGISTER_SIZE): Add.
12065 (mn10300_extract_return_value): Use MN10300_MAX_REGISTER_SIZE.
12066 (mn10300_push_dummy_call): Likewise.
12067
12068 2017-06-08 Alan Hayward <alan.hayward@arm.com>
12069
12070 * mi/mi-main.c (register_changed_p): Use value_contents_eq.
12071
12072 2017-06-08 Alan Hayward <alan.hayward@arm.com>
12073
12074 * mi/mi-main.c (register_changed_p): Use cooked_read_value.
12075
12076 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
12077
12078 * NEWS (Changes since GDB 8.0): Announce that GDBserver is now
12079 able to start inferiors using a shell.
12080 (New remote packets): Announce new packet "QStartupWithShell".
12081 * remote.c: Add PACKET_QStartupWithShell.
12082 (extended_remote_create_inferior): Handle new
12083 PACKET_QStartupWithShell.
12084 (remote_protocol_features) <QStartupWithShell>: New entry for
12085 PACKET_QStartupWithShell.
12086 (_initialize_remote): Call "add_packet_config_cmd" for
12087 QStartupShell.
12088
12089 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
12090 Pedro Alves <palves@redhat.com>
12091
12092 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-inferior.h"
12093 and "nat/fork-inferior.h".
12094 * common/common-inferior.h: New file, with contents from
12095 "gdb/inferior.h".
12096 * commom/common-utils.c: Include "common-utils.h".
12097 (stringify_argv): New function.
12098 * common/common-utils.h (stringify_argv): New prototype.
12099 * configure.nat: Add "fork-inferior.o" as a dependency for
12100 "*linux*", "fbsd*" and "nbsd*" hosts.
12101 * corefile.c (get_exec_file): Update comment.
12102 * darwin-nat.c (darwin_ptrace_him): Call "gdb_startup_inferior"
12103 instead of "startup_inferior".
12104 (darwin_create_inferior): Call "add_thread_silent" after
12105 "fork_inferior".
12106 * fork-child.c: Cleanup unnecessary includes.
12107 (SHELL_FILE): Move to "common/common-fork-child.c".
12108 (environ): Likewise.
12109 (exec_wrapper): Initialize.
12110 (get_exec_wrapper): New function.
12111 (breakup_args): Move to "common/common-fork-child.c"; rename to
12112 "breakup_args_for_exec".
12113 (escape_bang_in_quoted_argument): Move to
12114 "common/common-fork-child.c".
12115 (saved_ui): New variable.
12116 (prefork_hook): New function.
12117 (postfork_hook): Likewise.
12118 (postfork_child_hook): Likewise.
12119 (gdb_startup_inferior): Likewise.
12120 (fork_inferior): Move to "common/common-fork-child.c". Update
12121 function to support gdbserver.
12122 (startup_inferior): Likewise.
12123 * gdbcore.h (get_exec_file): Remove declaration.
12124 * gnu-nat.c (gnu_create_inferior): Call "gdb_startup_inferior"
12125 instead of "startup_inferior". Call "add_thread_silent" after
12126 "fork_inferior".
12127 * inf-ptrace.c: Include "nat/fork-inferior.h" and "utils.h".
12128 (inf_ptrace_create_inferior): Call "gdb_startup_inferior"
12129 instead of "startup_inferior". Call "add_thread_silent" after
12130 "fork_inferior".
12131 * inferior.h: Include "common-inferior.h".
12132 (trace_start_error): Move to "common/common-utils.h".
12133 (trace_start_error_with_name): Likewise.
12134 (fork_inferior): Move prototype to "nat/fork-inferior.h".
12135 (startup_inferior): Likewise.
12136 (gdb_startup_inferior): New prototype.
12137 * nat/fork-inferior.c: New file, with contents from "fork-child.c".
12138 * nat/fork-inferior.h: New file.
12139 * procfs.c (procfs_init_inferior): Call "gdb_startup_inferior"
12140 instead of "startup_inferior". Call "add_thread_silent" after
12141 "fork_inferior".
12142 * target.h (target_terminal_init): Move prototype to
12143 "target/target.h".
12144 (target_terminal_inferior): Likewise.
12145 (target_terminal_ours): Likewise.
12146 * target/target.h (target_terminal_init): New prototype, moved
12147 from "target.h".
12148 (target_terminal_inferior): Likewise.
12149 (target_terminal_ours): Likewise.
12150 * utils.c (gdb_flush_out_err): New function.
12151
12152 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
12153
12154 * Makefile.in (HFILES_NO_SRCDIR): Add "common/common-gdbthread.h".
12155 * common/common-gdbthread.h: New file, with parts from
12156 "gdb/gdbthread.h".
12157 * gdbthread.h: Include "common-gdbthread.h".
12158 (switch_to_thread): Moved to "common/common-gdbthread.h".
12159
12160 2017-06-07 Sergio Durigan Junior <sergiodj@redhat.com>
12161
12162 * Makefile.in (SFILES): Add "common/job-control.c".
12163 (HFILES_NO_SRCDIR): Add "common/job-control.h".
12164 (COMMON_OBS): Add "job-control.o".
12165 * common/job-control.c: New file, with contents from
12166 "gdb/inflow.c".
12167 * common/job-control.h: New file, with contents from "terminal.h".
12168 * fork-child.c: Include "job-control.h".
12169 * inflow.c: Include "job-control.h".
12170 (gdb_setpgid): Move to "common/common-inflow.c".
12171 (_initialize_inflow): Move setting of "job_control" to
12172 "handle_job_control".
12173 * terminal.h (job_control): Moved to "common/common-terminal.h".
12174 (gdb_setpgid): Likewise.
12175 * top.c: Include "job_control.h".
12176 * utils.c: Likewise.
12177 (job_control): Moved to "job-control.c".
12178
12179 2017-06-07 Pedro Alves <palves@redhat.com>
12180
12181 * Makefile.in (SFILES): Add gdb_regex.c.
12182 (COMMON_OBS): Add gdb_regex.o.
12183 * ada-lang.c (ada_add_standard_exceptions)
12184 (ada_add_exceptions_from_frame, name_matches_regex)
12185 (ada_add_global_exceptions, ada_exceptions_list_1): Change regex
12186 parameter type to compiled_regex. Adjust.
12187 (ada_exceptions_list): Use compiled_regex.
12188 * break-catch-throw.c (exception_catchpoint::pattern): Now a
12189 std::unique_ptr<compiled_regex>.
12190 (exception_catchpoint::~exception_catchpoint): Remove regfree
12191 call.
12192 (check_status_exception_catchpoint): Adjust to use compiled_regex.
12193 (handle_gnu_v3_exceptions): Adjust to use compiled_regex.
12194 * breakpoint.c (solib_catchpoint::compiled): Now a
12195 std::unique_ptr<compiled_regex>.
12196 (solib_catchpoint::~solib_catchpoint): Remove regfree call.
12197 (check_status_catch_solib): Adjust to use compiled_regex.
12198 (add_solib_catchpoint): Adjust to use compiled_regex.
12199 * cli/cli-cmds.c (apropos_command): Use compiled_regex.
12200 * cli/cli-decode.c (apropos_cmd): Change regex parameter to
12201 compiled_regex reference. Adjust to use it.
12202 * cli/cli-decode.h: Remove struct re_pattern_buffer forward
12203 declaration. Include "gdb_regex.h".
12204 (apropos_cmd): Change regex parameter to compiled_regex reference.
12205 * gdb_regex.c: New file.
12206 * gdb_regex.h (make_regfree_cleanup, get_regcomp_error): Delete
12207 declarations.
12208 (class compiled_regex): New.
12209 * linux-tdep.c: Include "common/gdb_optional.h".
12210 (struct mapping_regexes): New, factored out from
12211 mapping_is_anonymous_p, and adjusted to use compiled_regex.
12212 (mapping_is_anonymous_p): Use mapping_regexes wrapped in a
12213 gdb::optional and remove cleanups. Adjust to compiled_regex.
12214 * probe.c: Include "common/gdb_optional.h".
12215 (collect_probes): Use compiled_regex and gdb::optional and remove
12216 cleanups.
12217 * skip.c: Include "common/gdb_optional.h".
12218 (skiplist_entry::compiled_function_regexp): Now a
12219 gdb::optional<compiled_regex>.
12220 (skiplist_entry::compiled_function_regexp_is_valid): Delete field.
12221 (free_skiplist_entry): Remove regfree call.
12222 (compile_skip_regexp, skip_rfunction_p): Adjust to use
12223 compiled_regex and gdb::optional.
12224 * symtab.c: Include "common/gdb_optional.h".
12225 (search_symbols): Use compiled_regex and gdb::optional.
12226 * utils.c (do_regfree_cleanup, make_regfree_cleanup)
12227 (get_regcomp_error, compile_rx_or_error): Delete. Some bits moved
12228 to gdb_regex.c.
12229
12230 2017-06-07 Alan Hayward <alan.hayward@arm.com>
12231
12232 * regcache.c (regcache::save): Avoid buffer use.
12233 (regcache::dump): Likewise.
12234
12235 2017-06-07 Alan Hayward <alan.hayward@arm.com>
12236
12237 * sh-tdep.c (sh_pseudo_register_read): Remove
12238 MAX_REGISTER_SIZE.
12239 (sh_pseudo_register_write): Likewise.
12240 * sh64-tdep.c (sh64_pseudo_register_read): Likewise.
12241 (sh64_pseudo_register_write): Likewise
12242
12243 2017-06-07 Alan Hayward <alan.hayward@arm.com>
12244
12245 * aarch64-tdep.c (aarch64_store_return_value): Use
12246 V_REGISTER_SIZE.
12247 (aarch64_pseudo_read_value): Likewise.
12248 (aarch64_pseudo_write): Likewise.
12249
12250 2017-06-06 Yao Qi <yao.qi@linaro.org>
12251
12252 * regformats/regdef.h (set_register_cache): Remove the
12253 declaration.
12254
12255 2017-06-06 Alan Hayward <alan.hayward@arm.com>
12256
12257 * frame.c (frame_unwind_register_signed): Use
12258 frame_unwind_register_value.
12259
12260 2017-06-06 Pedro Alves <palves@redhat.com>
12261
12262 PR breakpoints/21553
12263 * breakpoint.c (create_breakpoints_sal_default)
12264 (init_breakpoint_sal, create_breakpoint_sal): Use
12265 gdb::unique_xmalloc_ptr for string parameters.
12266 (create_breakpoint): Constify 'extra_string' and 'cond_string'
12267 parameters. Replace cleanups with gdb::unique_xmalloc_ptr.
12268 (base_breakpoint_create_breakpoints_sal)
12269 (bkpt_create_breakpoints_sal, tracepoint_create_breakpoints_sal)
12270 (strace_marker_create_breakpoints_sal)
12271 (create_breakpoints_sal_default): Use gdb::unique_xmalloc_ptr for
12272 string parameters.
12273 * breakpoint.h (breakpoint_ops::create_breakpoints_sal): Use
12274 gdb::unique_xmalloc_ptr for string parameters.
12275 (create_breakpoint): Constify 'extra_string' and 'cond_string'
12276 parameters.
12277
12278 2017-06-06 Alan Hayward <alan.hayward@arm.com>
12279
12280 * alpha-tdep.c (alpha_register_to_value): Use
12281 get_frame_register_value.
12282 (alpha_value_to_register): Use ALPHA_REGISTER_SIZE.
12283
12284 2017-06-06 Alan Hayward <alan.hayward@arm.com>
12285
12286 * ia64-tdep.c (IA64_MAX_FP_REGISTER_SIZE) Add.
12287 (ia64_register_to_value): Use IA64_MAX_FP_REGISTER_SIZE.
12288 (ia64_value_to_register): Likewise.
12289 (ia64_extract_return_value): Likewise.
12290 (ia64_store_return_value): Likewise.
12291 (ia64_push_dummy_call): Likewise.
12292
12293 2017-06-04 Joel Brobecker <brobecker@adacore.com>
12294
12295 GDB 8.0 released.
12296
12297 2017-06-03 Simon Marchi <simon.marchi@ericsson.com>
12298
12299 * x86-linux-nat.c (struct arch_lwp_info): Remove.
12300
12301 2017-06-03 Simon Marchi <simon.marchi@polymtl.ca>
12302
12303 * linux-nat.c (linux_nat_post_attach_wait): Remove FIRST
12304 parameter.
12305 (linux_nat_attach): Adjust call to linux_nat_post_attach_wait.
12306
12307 2017-06-02 Simon Marchi <simon.marchi@ericsson.com>
12308
12309 * event-loop.c (poll_timers): Unallocate timer using delete
12310 instead of xfree.
12311
12312 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
12313
12314 * breakpoint.h (struct breakpoint_ops) <dtor>: Remove.
12315 (struct breakpoint) <~breakpoint>: New.
12316 (struct watchpoint): Inherit from breakpoint.
12317 <~watchpoint>: New.
12318 <base>: Remove.
12319 (struct tracepoint): Inherit from breakpoint.
12320 <base>: Remove.
12321 * breakpoint.c (longjmp_breakpoint_ops): Remove.
12322 (struct longjmp_breakpoint): Inherit from breakpoint.
12323 <~longjmp_breakpoint>: New.
12324 <base>: Remove.
12325 (new_breakpoint_from_type): Remove casts.
12326 (watchpoint_in_thread_scope): Remove reference to base field.
12327 (watchpoint_del_at_next_stop): Likewise.
12328 (update_watchpoint): Likewise.
12329 (watchpoint_check): Likewise.
12330 (bpstat_check_watchpoint): Likewise.
12331 (set_longjmp_breakpoint): Likewise.
12332 (struct fork_catchpoint): Inherit from breakpoint.
12333 <base>: Remove.
12334 (struct solib_catchpoint): Inherit from breakpoint.
12335 <~solib_catchpoint>: New.
12336 <base>: Remove.
12337 (dtor_catch_solib): Change to ...
12338 (solib_catchpoint::~solib_catchpoint): ... this.
12339 (breakpoint_hit_catch_solib): Remove reference to base field.
12340 (add_solib_catchpoint): Likewise.
12341 (create_fork_vfork_event_catchpoint): Likewise.
12342 (struct exec_catchpoint): Inherit from breakpoint.
12343 <~exec_catchpoint>: New.
12344 <base>: Remove.
12345 (dtor_catch_exec): Change to ...
12346 (exec_catchpoint::~exec_catchpoint): ... this.
12347 (dtor_watchpoint): Change to ...
12348 (watchpoint::~watchpoint): ... this.
12349 (watch_command_1): Remove reference to base field.
12350 (catch_exec_command_1): Likewise.
12351 (base_breakpoint_dtor): Change to ...
12352 (breakpoint::~breakpoint): ... this.
12353 (base_breakpoint_ops): Remove dtor field value.
12354 (longjmp_bkpt_dtor): Change to ...
12355 (longjmp_breakpoint::~longjmp_breakpoint): ... this.
12356 (strace_marker_create_breakpoints_sal): Remove reference to base
12357 field.
12358 (delete_breakpoint): Don't manually call breakpoint destructor.
12359 (create_tracepoint_from_upload): Remove reference to base field.
12360 (trace_pass_set_count): Likewise.
12361 (initialize_breakpoint_ops): Don't initialize
12362 momentary_breakpoint_ops, don't set dtors.
12363 * ada-lang.c (struct ada_catchpoint): Inherit from breakpoint.
12364 <~ada_catchpoint>: New.
12365 <base>: Remove.
12366 (create_excep_cond_exprs): Remove reference to base field.
12367 (dtor_exception): Change to ...
12368 (ada_catchpoint::~ada_catchpoint): ... this.
12369 (dtor_catch_exception): Remove.
12370 (dtor_catch_exception_unhandled): Remove.
12371 (dtor_catch_assert): Remove.
12372 (create_ada_exception_catchpoint): Remove reference to base
12373 field.
12374 (initialize_ada_catchpoint_ops): Don't set dtors.
12375 * break-catch-sig.c (struct signal_catchpoint): Inherit from
12376 breakpoint.
12377 <~signal_catchpoint>: New.
12378 <base>: Remove.
12379 (signal_catchpoint_dtor): Change to ...
12380 (signal_catchpoint::~signal_catchpoint): ... this.
12381 (create_signal_catchpoint): Remove reference to base field.
12382 (initialize_signal_catchpoint_ops): Don't set dtor.
12383 * break-catch-syscall.c (struct syscall_catchpoint): Inherit
12384 from breakpoint.
12385 <~syscall_catchpoint>: New.
12386 <base>: Remove.
12387 (dtor_catch_syscall): Change to ...
12388 (syscall_catchpoint::~syscall_catchpoint): ... this.
12389 (create_syscall_event_catchpoint): Remove reference to base
12390 field.
12391 (initialize_syscall_catchpoint_ops): Don't set dtor.
12392 * break-catch-throw.c (struct exception_catchpoint): Inherit
12393 from breakpoint.
12394 <~exception_catchpoint>: New.
12395 <base>: Remove.
12396 (dtor_exception_catchpoint): Change to ...
12397 (exception_catchpoint::~exception_catchpoint): ... this.
12398 (handle_gnu_v3_exceptions): Remove reference to base field.
12399 (initialize_throw_catchpoint_ops): Don't set dtor.
12400 * ctf.c (ctf_get_traceframe_address): Remove reference to base
12401 field.
12402 * remote.c (remote_get_tracepoint_status): Likewise.
12403 * tracefile-tfile.c (tfile_get_traceframe_address): Likewise.
12404 * tracefile.c (tracefile_fetch_registers): Likewise.
12405 * tracepoint.c (actions_command): Likewise.
12406 (validate_actionline): Likewise.
12407 (tfind_1): Likewise.
12408 (get_traceframe_location): Likewise.
12409 (find_matching_tracepoint_location): Likewise.
12410 (parse_tracepoint_status): Likewise.
12411 * mi/mi-cmd-break.c (mi_cmd_break_passcount): Likewise.
12412
12413 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
12414
12415 * breakpoint.c (struct longjmp_breakpoint): New struct.
12416 (is_tracepoint_type): Change return type to bool.
12417 (is_longjmp_type): New function.
12418 (new_breakpoint_from_type): Handle longjmp kinds of breakpoints.
12419 (set_raw_breakpoint_without_location): Use
12420 new_breakpoint_from_type.
12421 (set_raw_breakpoint): Likewise.
12422
12423 2017-06-02 Simon Marchi <simon.marchi@polymtl.ca>
12424
12425 * breakpoint.c (new_breakpoint_from_type): New function.
12426 (create_breakpoint_sal): Use new_breakpoint_from_type and
12427 unique_ptr.
12428 (create_breakpoint): Likewise.
12429
12430 2017-05-31 Simon Marchi <simon.marchi@ericsson.com>
12431
12432 * memattr.c (mem_info_command): Rename to ...
12433 (info_mem_command): ... this.
12434 (mem_enable_command): Rename to ...
12435 (enable_mem_command): ... this.
12436 (mem_disable_command): Rename to ...
12437 (disable_mem_command): ... this.
12438 (mem_delete_command): Rename to ...
12439 (delete_mem_command): ... this.
12440 (_initialize_mem): Adjust function names.
12441
12442 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
12443
12444 * btrace.c (handle_pt_insn_events): New.
12445 (ftrace_add_pt): Call handle_pt_insn_events. Rename ERRCODE into
12446 STATUS. Split into this and ...
12447 (handle_pt_insn_event_flags): ... this.
12448
12449 2017-05-31 Markus Metzger <markus.t.metzger@intel.com>
12450
12451 * configure.ac: Check for pt_insn_event, struct pt_insn.enabled,
12452 and struct pt_insn.resynced.
12453 * configure: Regenerated.
12454 * config.in: Regenerated.
12455
12456 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12457
12458 * btrace.c (ftrace_find_call_by_number): New function.
12459 (ftrace_new_function): Store objects, not pointers.
12460 (ftrace_find_call_by_number, ftrace_new_return, ftrace_new_switch,
12461 ftrace_new_gap, ftrace_update_function,
12462 ftrace_compute_global_level_offset, btrace_stich_bts, btrace_clear,
12463 btrace_insn_get, btrace_insn_get_error, btrace_insn_end,
12464 btrace_insn_next, btrace_insn_prev, ptrace_find_insn_by_number,
12465 btrace_ends_with_single_insn, btrace_call_get): Account for
12466 btrace_thread_info::functions now storing objects.
12467 * btrace.h (struct btrace_thread_info): Add constructor.
12468 (struct btrace_thread_info) <functions>: Make std::vector.
12469 (struct btrace_thread_info) <prev, next, up, insn, errcode, flags):
12470 Initialize with default values.
12471 * record-btrace.c (record_btrace_frame_sniffer): Account for
12472 btrace_thread_info::functions now storing objects.
12473
12474 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12475
12476 * btrace.c: Remove typedef bfun_s.
12477 (ftrace_new_gap): Directly add gaps to the list of gaps.
12478 (btrace_bridge_gaps, btrace_compute_ftrace_bts, pt_btrace_insn_flags,
12479 ftrace_add_pt, btrace_compute_ftrace_pt, btrace_compute_ftrace_1,
12480 btrace_finalize_ftrace, btrace_compute_ftrace): Use std::vector
12481 instead of gdb VEC.
12482
12483 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12484
12485 * btrace.c (ftrace_fixup_caller, ftrace_new_return, ftrace_connect_bfun,
12486 ftrace_bridge_gap): Replace references to btrace_thread_info::segment
12487 with btrace_thread_info::next_segment and
12488 btrace_thread_info::prev_segment.
12489 * btrace.h: Remove struct btrace_func_link.
12490 (struct btrace_function): Replace pair of function segment pointers
12491 with pair of indices.
12492 * python/py-record-btrace.c (btpy_call_prev_sibling,
12493 btpy_call_next_sibling): Replace references to
12494 btrace_thread_info::segment with btrace_thread_info::next_segment and
12495 btrace_thread_info::prev_segment.
12496 * record-btrace.c (record_btrace_frame_this_id): Use
12497 btrace_find_call_by_number.
12498
12499 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12500
12501 * btrace.c (ftrace_new_function, ftrace_fixup_level,
12502 ftrace_connect_bfun, ftrace_bridge_gap, btrace_bridge_gaps,
12503 btrace_insn_next, btrace_insn_prev): Remove references to
12504 btrace_thread_info::flow.
12505 * btrace.h (struct btrace_function): Remove FLOW.
12506
12507 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12508
12509 * btrace.c (ftrace_find_call_by_number): New function.
12510 (ftrace_update_caller, ftrace_new_call, ftrace_new_tailcall,
12511 ftrace_get_caller, ftrace_find_call, ftrace_new_return,
12512 ftrace_match_backtrace, ftrace_connect_bfun, ftrace_connect_backtrace,
12513 ftrace_bridge_gap, btrace_bridge_gaps): Use btrace_function::up as an
12514 index.
12515 * btrace.h (struct btrace_function): Turn UP into an index.
12516 * python/py-record-btrace.c (btpy_call_up): Use btrace_function::up
12517 as an index.
12518 * record-btrace.c (record_btrace_frame_unwind_stop_reason,
12519 record_btrace_frame_prev_register, record_btrace_frame_sniffer,
12520 record_btrace_tailcall_frame_sniffe): Use btrace_find_call_by_number.
12521
12522 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12523
12524 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
12525 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
12526 ftrace_update_function, ftrace_compute_global_level_offset,
12527 btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt,
12528 btrace_stitch_bts, btrace_fetch, btrace_clear, btrace_insn_number,
12529 btrace_insn_end, btrace_is_empty): Remove references to
12530 btrace_thread_info::begin and btrace_thread_info::end.
12531 * btrace.h (struct btrace_thread_info): Remove BEGIN and END.
12532 (struct btrace_thread_info) <functions>: Adjust comment.
12533 * record-btrace.c (record_btrace_start_replaying): Remove reference to
12534 btrace_thread_info::begin.
12535
12536 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12537
12538 * btrace.c (ftrace_new_function, ftrace_new_call, ftrace_new_tailcall,
12539 ftrace_new_return, ftrace_new_switch, ftrace_new_gap,
12540 ftrace_update_function): Remove arguments that implicitly were always
12541 BTINFO->END.
12542 (btrace_compute_ftrace_bts, ftrace_add_pt, btrace_compute_ftrace_pt):
12543 Don't pass BTINFO->END.
12544
12545 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12546
12547 * btrace.c: (btrace_insn_get, btrace_insn_get_error, btrace_insn_number,
12548 btrace_insn_begin, btrace_insn_end, btrace_insn_next, btrace_insn_prev,
12549 btrace_find_insn_by_number): Replace function segment pointer with
12550 index.
12551 (btrace_insn_cmp): Simplify.
12552 * btrace.h: (struct btrace_insn_iterator) Rename index to
12553 insn_index. Replace function segment pointer with index into function
12554 segment vector.
12555 * record-btrace.c (record_btrace_call_history): Replace function
12556 segment pointer use with index.
12557 (record_btrace_frame_sniffer): Retrieve function call segment through
12558 vector.
12559 (record_btrace_set_replay): Remove defunc't safety check.
12560
12561 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12562
12563 * btrace.c (btrace_ends_with_single_insn): New function.
12564 (btrace_call_get, btrace_call_number, btrace_call_begin,
12565 btrace_call_end, btrace_call_next, btrace_call_prev,
12566 btrace_find_call_by_number): Use index into call segment vector
12567 instead of pointer.
12568 (btrace_call_cmp): Simplify.
12569 * btrace.h (struct btrace_call_iterator): Replace function call segment
12570 pointer with index into vector.
12571 * record-btrace.c (record_btrace_call_history): Use index instead of
12572 pointer.
12573
12574 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12575
12576 * btrace.c (btrace_insn_begin, btrace_insn_end,
12577 btrace_find_insn_by_number): Add btinfo to iterator.
12578 * btrace.h (struct btrace_insn_iterator): Add btinfo.
12579
12580 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12581
12582 * btrace.c (ftrace_new_function): Add btrace_thread_info to arguments
12583 and save pointers directly.
12584 (ftrace_new_call, ftrace_new_tailcall, ftrace_new_return,
12585 ftrace_new_switch, ftrace_new_gap, ftrace_update_function,
12586 ftrace_add_pt): Add btrace_thread_info to arguments. Adjust for
12587 changed signature of functions.
12588 (btrace_compute_ftrace_pt): Adjust for changed signature of functions.
12589 (btrace_fetch): Remove code that adds btrace_function pointers to
12590 vector of btrace_functions.
12591 (btrace_clear): Simplify freeing vector of btrace_functions.
12592
12593 2017-05-30 Tim Wiederhake <tim.wiederhake@intel.com>
12594
12595 * btrace.c (btrace_fetch, btrace_clear, btrace_find_insn_by_number):
12596 Replace VEC_* with std::vector functions.
12597 * btrace.h: Add include: vector. Remove typedef for DEF_VEC_P.
12598 (struct btrace_thread_info)<functions>: Change type to std::vector.
12599
12600 2017-05-30 Simon Marchi <simon.marchi@ericsson.com>
12601
12602 * NEWS (Changes in GDB 8.0): Remove extra empty line. Move
12603 "Removed targets and native configurations" up. Merge duplicate
12604 "New commands" sub-sections. Add "New options" sub-sections.
12605
12606 2017-05-26 Alan Hayward <alan.hayward@arm.com>
12607
12608 * defs.h (copy_integer_to_size): New declaration.
12609 * findvar.c (copy_integer_to_size): New function.
12610 (do_cint_test): New selftest function.
12611 (copy_integer_to_size_test): Likewise.
12612 (_initialize_findvar): Likewise.
12613 * mips-fbsd-tdep.c (mips_fbsd_supply_reg): Use raw_supply_integer.
12614 (mips_fbsd_collect_reg): Use raw_collect_integer.
12615 * mips-linux-tdep.c (supply_32bit_reg): Use raw_supply_integer.
12616 (mips64_fill_gregset): Use raw_collect_integer
12617 (mips64_fill_fpregset): Use raw_supply_integer.
12618 * regcache.c (regcache::raw_supply_integer): New function.
12619 (regcache::raw_collect_integer): Likewise.
12620 * regcache.h: (regcache::raw_supply_integer): New declaration.
12621 (regcache::raw_collect_integer): Likewise.
12622
12623 2017-05-24 Yao Qi <yao.qi@linaro.org>
12624
12625 * Makefile.in (SFILES): Add gdbarch-selftests.c.
12626 (COMMON_OBS): Add gdbarch-selftests.o.
12627 * frame.c [GDB_SELF_TESTS] (create_new_frame): New function.
12628 * frame.h [GDB_SELF_TESTS] (create_new_frame): Declare.
12629 * gdbarch-selftests.c: New file.
12630 * regcache.h (regcache) <~regcache>: Mark it virtual if
12631 GDB_SELF_TEST.
12632 <raw_write>: Likewise.
12633
12634 2017-05-24 Yao Qi <yao.qi@linaro.org>
12635
12636 * regcache.c (current_regcache): Change it to
12637 regcache::current_regcache.
12638 (regcache_observer_target_changed): Update.
12639 (regcache_thread_ptid_changed): Make it a regcache static
12640 method.
12641 (regcache_thread_ptid_changed): Update.
12642 (class regcache_access): New.
12643 (current_regcache_test): Update.
12644 (_initialize_regcache): Update.
12645 * regcache.h: Include forward_list.
12646 (regcache): Declare regcache_thread_ptid_changed and declare
12647 registers_changed_ptid as friend.
12648
12649 2017-05-24 Yao Qi <yao.qi@linaro.org>
12650
12651 * i387-tdep.c (i387_register_to_value): Use register_size
12652 instead of TYPE_LENGTH.
12653 * m68k-tdep.c (m68k_register_to_value): Likewise.
12654
12655 2017-05-24 Yao Qi <yao.qi@linaro.org>
12656
12657 * i387-tdep.c (i387_convert_register_p): Return false if type
12658 code isn't TYPE_CODE_FLT.
12659
12660 2017-05-24 Yao Qi <yao.qi@linaro.org>
12661
12662 * alpha-tdep.c (alpha_convert_register_p): Return true if type
12663 length is 4.
12664 (alpha_register_to_value): Remove type length check.
12665 (alpha_value_to_register): Likewise.
12666
12667 2017-05-24 Yao Qi <yao.qi@linaro.org>
12668
12669 * ia64-tdep.c (ia64_convert_register_p): Check type's code is
12670 TYPE_CODE_FLT.
12671
12672 2017-05-24 Yao Qi <yao.qi@linaro.org>
12673
12674 * m68k-tdep.c (m68k_convert_register_p): Check type's code is
12675 TYPE_CODE_FLT or not.
12676
12677 2017-05-24 Yao Qi <yao.qi@linaro.org>
12678
12679 * alpha-tdep.c (alpha_gdbarch_init): Use XCNEW instead of XNEW.
12680 * avr-tdep.c (avr_gdbarch_init): Likewise.
12681 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
12682 * cris-tdep.c (cris_gdbarch_init): Likewise.
12683 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
12684 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
12685 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
12686 * m68hc11-tdep.c (m68hc11_gdbarch_init): Likewise.
12687 * mep-tdep.c (mep_gdbarch_init): Likewise.
12688 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
12689 * mips-tdep.c (mips_gdbarch_init): Likewise.
12690 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
12691 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
12692 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
12693 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
12694 * v850-tdep.c (v850_gdbarch_init): Likewise.
12695
12696 2017-05-24 Yao Qi <yao.qi@linaro.org>
12697
12698 * selftest-arch.c (tests_with_arch): Call registers_changed
12699 and reinit_frame_cache.
12700 * selftest.c (run_self_tests): Likewise.
12701
12702 2017-05-24 Yao Qi <yao.qi@linaro.org>
12703
12704 * rs6000-tdep.c (gdb_print_insn_powerpc): Remove.
12705 (rs6000_gdbarch_init): Don't call set_gdbarch_print_insn.
12706
12707 2017-05-24 Yao Qi <yao.qi@linaro.org>
12708
12709 * rl78-tdep.c (rl78_gdbarch_init): Don't call
12710 set_gdbarch_print_insn.
12711
12712 2017-05-24 Yao Qi <yao.qi@linaro.org>
12713
12714 * h8300-tdep.c (h8300_gdbarch_init): Don't call
12715 set_gdbarch_print_insn.
12716
12717 2017-05-24 Yao Qi <yao.qi@linaro.org>
12718
12719 * alpha-tdep.c (alpha_gdbarch_init): Don't call
12720 set_gdbarch_print_insn.
12721 * arc-tdep.c (arc_gdbarch_init): Likewise.
12722 * arch-utils.c: include dis-asm.h.
12723 (default_print_insn): New function.
12724 * arch-utils.h (default_print_insn): Declare.
12725 * avr-tdep.c (avr_gdbarch_init): Don't call set_gdbarch_print_insn.
12726 * bfin-tdep.c (bfin_gdbarch_init): Likewise.
12727 * cris-tdep.c (cris_delayed_get_disassembler): Remove.
12728 (cris_gdbarch_init): Don't call set_gdbarch_print_insn.
12729 * frv-tdep.c (frv_gdbarch_init): Likewise.
12730 * ft32-tdep.c (ft32_gdbarch_init): Likewise.
12731 * gdbarch.sh (print_insn): Use default_print_insn.
12732 * gdbarch.c: Regenerated.
12733 * hppa-tdep.c (hppa_gdbarch_init): Likewise.
12734 * iq2000-tdep.c (iq2000_gdbarch_init): Likewise.
12735 * lm32-tdep.c (lm32_gdbarch_init): Likewise.
12736 * m32c-tdep.c (m32c_gdbarch_init): Likewise.
12737 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
12738 * m68hc11-tdep.c (gdb_print_insn_m68hc11): Remove.
12739 (m68hc11_gdbarch_init): Don't call set_gdbarch_print_insn.
12740 * m68k-tdep.c (m68k_gdbarch_init): Likewise.
12741 * m88k-tdep.c (m88k_gdbarch_init): Likewise.
12742 * microblaze-tdep.c (microblaze_gdbarch_init): Likewise.
12743 * mn10300-tdep.c (mn10300_gdbarch_init): Likewise.
12744 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
12745 * msp430-tdep.c (msp430_gdbarch_init): Likewise.
12746 * mt-tdep.c (mt_gdbarch_init): Likewise.
12747 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
12748 * nios2-tdep.c (nios2_print_insn): Remove.
12749 (nios2_gdbarch_init): Don't call set_gdbarch_print_insn.
12750 * rx-tdep.c (rx_gdbarch_init): Likewise.
12751 * s390-linux-tdep.c (s390_gdbarch_init): Likewise.
12752 * score-tdep.c (score_print_insn): Remove.
12753 (score_gdbarch_init): Don't call set_gdbarch_print_insn.
12754 * sh-tdep.c (sh_gdbarch_init): Likewise.
12755 * sh64-tdep.c (sh64_gdbarch_init): Likewise.
12756 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
12757 * tic6x-tdep.c (tic6x_print_insn): Remove.
12758 (tic6x_gdbarch_init): Don't call set_gdbarch_print_insn.
12759 * tilegx-tdep.c (tilegx_gdbarch_init): Likewise.
12760 * v850-tdep.c (v850_gdbarch_init): Likewise.
12761 * vax-tdep.c (vax_gdbarch_init): Likewise.
12762 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
12763 * xtensa-tdep.c (xtensa_gdbarch_init): Likewise.
12764
12765 2017-05-23 John Baldwin <jhb@FreeBSD.org>
12766
12767 * mips-fbsd-tdep.c (MIPS_PC_REGNUM): Remove.
12768 (MIPS_FP0_REGNUM): Remove.
12769 (MIPS_FSR_REGNUM): Remove.
12770 (mips_fbsd_supply_fpregs): Use mips_regnum.
12771 (mips_fbsd_supply_gregs): Likewise.
12772 (mips_fbsd_collect_fpregs): Likewise.
12773 (mips_fbsd_collect_gregs): Likewise.
12774
12775 2017-05-23 John Baldwin <jhb@FreeBSD.org>
12776
12777 * mips-fbsd-nat.c (getregs_supplies): Fix upper bound comparison.
12778 (getpfpregs_supplies): New function.
12779 (mips_fbsd_fetch_inferior_registers): Remove early exit and use
12780 getfpregs_supplies.
12781 (mips_fbsd_store_inferior_registers): Likewise.
12782
12783 2017-05-22 Pedro Alves <palves@redhat.com>
12784
12785 * MAINTAINERS (Host/Native): Add John Baldwin as FreeBSD
12786 maintainer.
12787
12788 2017-05-22 Alan Hayward <alan.hayward@arm.com>
12789
12790 * ppc-linux-nat.c (fetch_register): Use PPC_MAX_REGISTER_SIZE.
12791 (store_register): Likewise.
12792 * ppc-sysv-tdep.c (ppc_sysv_abi_push_dummy_call): Likewise.
12793 (get_decimal_float_return_value): Likewise.
12794 (do_ppc_sysv_return_value): Likewise.
12795 (ppc64_sysv_abi_push_integer): Likewise.
12796 (ppc64_sysv_abi_push_freg): Likewise.
12797 (ppc64_sysv_abi_return_value_base): Likewise.
12798 (ppc64_sysv_abi_return_value): Likewise.
12799 * rs6000-aix-tdep.c (rs6000_push_dummy_call): Likewise.
12800 * rs6000-lynx178-tdep.c (rs6000_lynx178_push_dummy_call): Likewise.
12801 * rs6000-nat.c: Likewise.
12802 * rs6000-tdep.c (rs6000_register_to_value): Likewise.
12803 (rs6000_value_to_register): Likewise.
12804 * ppc-tdep.h (PPC_MAX_REGISTER_SIZE): Add.
12805
12806 2017-05-21 Tom Tromey <tom@tromey.com>
12807
12808 PR rust/21466:
12809 * rust-lang.c (rust_print_type) <TYPE_CODE_ARRAY>: Print unsized
12810 arrays as "[T]", not "[T; ]".
12811
12812 2017-05-19 Tom Tromey <tom@tromey.com>
12813
12814 PR rust/21484:
12815 * rust-lang.c (exp_descriptor_rust): New function.
12816 (rust_language_defn): Use it.
12817 * p-lang.c (pascal_language_defn): Update.
12818 * opencl-lang.c (opencl_language_defn): Update.
12819 * objc-lang.c (objc_language_defn): Update.
12820 * m2-lang.c (m2_language_defn): Update.
12821 * language.h (struct language_defn)
12822 <la_watch_location_expression>: New member.
12823 * language.c (unknown_language_defn, auto_language_defn)
12824 (local_language_defn): Update.
12825 * go-lang.c (go_language_defn): Update.
12826 * f-lang.c (f_language_defn): Update.
12827 * d-lang.c (d_language_defn): Update.
12828 * c-lang.h (c_watch_location_expression): Declare.
12829 * c-lang.c (c_watch_location_expression): New function.
12830 (c_language_defn, cplus_language_defn, asm_language_defn)
12831 (minimal_language_defn): Use it.
12832 * breakpoint.c (watch_command_1): Call
12833 la_watch_location_expression.
12834 * ada-lang.c (ada_language_defn): Update.
12835
12836 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12837
12838 PR tui/21482
12839 * gdb_curses.h (NOMACROS): Define.
12840 (NCURSES_NOMACROS): Define.
12841
12842 2017-05-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12843
12844 PR tui/21482
12845 * tui/tui-windata.c (tui_erase_data_content): Cast last mvwaddstr
12846 arg to char *.
12847 * tui/tui-wingeneral.c (box_win): Likewise.
12848 * tui/tui-winsource.c (tui_erase_source_content): Likewise.
12849 (tui_show_source_line): Likewise.
12850 (tui_show_exec_info_content): Likewise.
12851
12852 2017-05-19 Vladimir Mezentsev <vladimir.mezentsev@oracle.com>
12853
12854 * sparc-tdep.c (sparc_structure_return_p)
12855 (sparc_arg_on_registers_p): New functions.
12856 (sparc32_store_arguments): Use them.
12857 * sparc64-tdep.c (sparc64_16_byte_align_p)
12858 (sparc64_store_floating_fields, sparc64_extract_floating_fields):
12859 Handle TYPE_CODE_ARRAY.
12860
12861 2017-05-17 Yao Qi <yao.qi@linaro.org>
12862
12863 * cli/cli-decode.c (add_alias_cmd): New function.
12864 * command.h (add_alias_cmd): Declare.
12865 * infcmd.c (_initialize_infcmd): Don't call add_com_alias,
12866 instead call add_alias_cmd.
12867
12868 2017-05-17 Pedro Alves <palves@redhat.com>
12869
12870 * Makefile.in (nat_extra_makefile_frag): Rename to ...
12871 (nat_makefile_frag): ... this. All references updated.
12872 * configure.ac: Likewise.
12873 * configure.nat: Likewise. Enhance comments.
12874 * configure: Regenerate.
12875
12876 2017-05-15 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
12877
12878 * procfs.c (procfs_create_inferior): Change prototype to match
12879 definition.
12880
12881 2017-05-13 Eli Zaretskii <eliz@gnu.org>
12882
12883 * tui/tui.c (tui_enable): Cast "unknown" to 'char *' to avoid a
12884 C++ compiler warning.
12885
12886 2017-05-12 Tom Tromey <tom@tromey.com>
12887
12888 PR rust/21483:
12889 * rust-lang.c (rust_evaluate_subexp) <STRUCTOP_STRUCT>: Don't
12890 recurse, just call value_struct_elt directly.
12891
12892 2017-05-12 Tom Tromey <tom@tromey.com>
12893
12894 * rust-lang.c (rust_dump_subexp_body) <STRUCTOP_ANONYMOUS,
12895 OP_RUST_ARRAY>: Fix.
12896
12897 2017-05-12 Tom Tromey <tom@tromey.com>
12898
12899 * rust-lang.c (rust_print_subexp): Replace "return" with "break".
12900
12901 2017-05-09 Yao Qi <yao.qi@linaro.org>
12902
12903 * regcache.c: Include <forward_list>.
12904 (struct regcache_list): Remove.
12905 (current_regcache): Update.
12906 (get_thread_arch_aspace_regcache): Update for std::forward_list.
12907 (regcache_thread_ptid_changed): Likewise.
12908 (registers_changed_ptid): Likewise.
12909 (current_regcache_size): Likewise.
12910
12911 2017-05-09 Yao Qi <yao.qi@linaro.org>
12912
12913 * regcache.c [GDB_SELF_TEST]: Include selftest.h.
12914 (current_regcache_size): New function.
12915 (current_regcache_test): New function.
12916 (_initialize_regcache) [GDB_SELF_TEST]: Register the unit test.
12917
12918 2017-05-08 Alan Hayward <alan.hayward@arm.com>
12919
12920 * mips-tdep.c (mips_o32_return_value): Remove unused buffer.
12921 (print_gp_register_row): Use get_frame_register_value.
12922
12923 2017-05-08 Alan Hayward <alan.hayward@arm.com>
12924
12925 * mips-linux-tdep.c (mips_supply_gregset): Use raw_supply_zeroed.
12926 (mips_supply_fpregset): Likewise.
12927 (mips64_supply_gregset): Likewise.
12928
12929 2017-05-08 Alan Hayward <alan.hayward@arm.com>
12930
12931 * mn10300-linux-tdep.c (am33_supply_gregset_method): Use
12932 regcache->raw_supply_zeroed.
12933
12934 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
12935
12936 * configure.nat: Rearrange 'case' statements to match
12937 host before cpu.
12938
12939 2017-05-06 Sergio Durigan Junior <sergiodj@redhat.com>
12940
12941 * Makefile.in: Remove "@host_makefile_frag@". Add variables
12942 NAT_FILE, NATDEPFILES, NAT_CDEPS, LOADLIBES, MH_CFLAGS, XM_CLIBS,
12943 NAT_GENERATED_FILES, HAVE_NATIVE_GCORE_HOST. Add
12944 "@nat_extra_makefile_frag@".
12945 (Makefile): Remove dependency on "@frags@".
12946 ($(GNULIB_BUILDDIR)/Makefile): Likewise.
12947 (data-directory/Makefile): Likewise.
12948 * config/aarch64/linux.mh: Deleted; moved contents to
12949 "gdb/configure.nat".
12950 * config/alpha/alpha-linux.mh: Likewise.
12951 * config/alpha/nbsd.mh: Likewise.
12952 * config/arm/linux.mh: Likewise.
12953 * config/arm/nbsdelf.mh: Likewise.
12954 * config/i386/cygwin.mh: Likewise.
12955 * config/i386/cygwin64.mh: Likewise.
12956 * config/i386/darwin.mh: Likewise.
12957 * config/i386/fbsd.mh: Likewise.
12958 * config/i386/fbsd64.mh: Likewise.
12959 * config/i386/go32.mh: Likewise.
12960 * config/i386/i386gnu.mh: Likewise.
12961 * config/i386/i386sol2.mh: Likewise.
12962 * config/i386/linux.mh: Likewise.
12963 * config/i386/linux64.mh: Likewise.
12964 * config/i386/mingw.mh: Likewise.
12965 * config/i386/mingw64.mh: Likewise.
12966 * config/i386/nbsd64.mh: Likewise.
12967 * config/i386/nbsdelf.mh: Likewise.
12968 * config/i386/nto.mh: Likewise.
12969 * config/i386/obsd.mh: Likewise.
12970 * config/i386/obsd64.mh: Likewise.
12971 * config/i386/sol2-64.mh: Likewise.
12972 * config/ia64/linux.mh: Likewise.
12973 * config/m32r/linux.mh: Likewise.
12974 * config/m68k/linux.mh: Likewise.
12975 * config/m68k/nbsdelf.mh: Likewise.
12976 * config/m68k/obsd.mh: Likewise.
12977 * config/m88k/obsd.mh: Likewise.
12978 * config/mips/fbsd.mh: Likewise.
12979 * config/mips/linux.mh: Likewise.
12980 * config/mips/nbsd.mh: Likewise.
12981 * config/mips/obsd64.mh: Likewise.
12982 * config/pa/linux.mh: Likewise.
12983 * config/pa/nbsd.mh: Likewise.
12984 * config/pa/obsd.mh: Likewise.
12985 * config/powerpc/aix.mh: Likewise.
12986 * config/powerpc/fbsd.mh: Likewise.
12987 * config/powerpc/linux.mh: Likewise.
12988 * config/powerpc/nbsd.mh: Likewise.
12989 * config/powerpc/obsd.mh: Likewise.
12990 * config/powerpc/ppc64-linux.mh: Likewise.
12991 * config/powerpc/spu-linux.mh: Likewise.
12992 * config/s390/linux.mh: Likewise.
12993 * config/sh/nbsd.mh: Likewise.
12994 * config/sparc/fbsd.mh: Likewise.
12995 * config/sparc/linux.mh: Likewise.
12996 * config/sparc/linux64.mh: Likewise.
12997 * config/sparc/nbsd64.mh: Likewise.
12998 * config/sparc/nbsdelf.mh: Likewise.
12999 * config/sparc/obsd64.mh: Likewise.
13000 * config/sparc/sol2.mh: Likewise.
13001 * config/tilegx/linux.mh: Likewise.
13002 * config/vax/nbsdelf.mh: Likewise.
13003 * config/vax/obsd.mh: Likewise.
13004 * config/xtensa/linux.mh: Likewise.
13005 * config/i386/i386gnu.mn: New file, with excerpts from
13006 "config/i386/i386gnu.mh".
13007 * configure: Regenerate.
13008 * configure.ac: Rewrite code to use "gdb/configure.nat" instead of
13009 *.mh files under "gdb/config".
13010 * configure.nat: New file, with contents from the
13011 "gdb/config/*/*.mh" files.
13012
13013 2017-05-05 Tim Wiederhake <tim.wiederhake@intel.com>
13014
13015 * btrace.c (btrace_clear): Free insn vector.
13016
13017 2017-05-05 Pedro Alves <palves@redhat.com>
13018
13019 * warning.m4 (build_warnings): Add -Wno-error=maybe-uninitialized.
13020 * configure: Regenerate.
13021
13022 2017-05-04 Pedro Alves <palves@redhat.com>
13023
13024 * Makefile.in (SFILES): Add progspace-and-thread.c.
13025 (HFILES_NO_SRCDIR): Add progspace-and-thread.h.
13026 (COMMON_OBS): Add progspace-and-thread.o.
13027 * breakpoint.c: Include "progspace-and-thread.h".
13028 (update_inserted_breakpoint_locations)
13029 (insert_breakpoint_locations, create_longjmp_master_breakpoint):
13030 Use scoped_restore_current_pspace_and_thread.
13031 (create_std_terminate_master_breakpoint): Use
13032 scoped_restore_current_program_space.
13033 (remove_breakpoint): Use scoped_restore_current_pspace_and_thread.
13034 (print_breakpoint_location): Use
13035 scoped_restore_current_program_space.
13036 (bp_loc_is_permanent): Use
13037 scoped_restore_current_pspace_and_thread.
13038 (resolve_sal_pc): Use scoped_restore_current_pspace_and_thread.
13039 (download_tracepoint_locations): Use
13040 scoped_restore_current_pspace_and_thread.
13041 (breakpoint_re_set): Use scoped_restore_current_pspace_and_thread.
13042 * exec.c (exec_close_1): Use scoped_restore_current_program_space.
13043 (enum step_over_calls_kind): Moved from inferior.h.
13044 (class scoped_restore_current_thread): New class.
13045 * gdbthread.h (make_cleanup_restore_current_thread): Delete
13046 declaration.
13047 (scoped_restore_current_thread): New class.
13048 * infcmd.c: Include "common/gdb_optional.h".
13049 (continue_1, proceed_after_attach): Use
13050 scoped_restore_current_thread.
13051 (notice_new_inferior): Use scoped_restore_current_thread.
13052 * inferior.c: Include "progspace-and-thread.h".
13053 (restore_inferior, save_current_inferior): Delete.
13054 (add_inferior_command, clone_inferior_command): Use
13055 scoped_restore_current_pspace_and_thread.
13056 * inferior.h (scoped_restore_current_inferior): New class.
13057 * infrun.c: Include "progspace-and-thread.h" and
13058 "common/gdb_optional.h".
13059 (follow_fork_inferior): Use
13060 scoped_restore_current_pspace_and_thread.
13061 (scoped_restore_exited_inferior): New class.
13062 (handle_vfork_child_exec_or_exit): Use
13063 scoped_restore_exited_inferior,
13064 scoped_restore_current_pspace_and_thread,
13065 scoped_restore_current_thread and scoped_restore.
13066 (fetch_inferior_event): Use scoped_restore_current_thread.
13067 * linespec.c (decode_line_full, decode_line_1): Use
13068 scoped_restore_current_program_space.
13069 * mi/mi-main.c: Include "progspace-and-thread.h".
13070 (exec_continue): Use scoped_restore_current_thread.
13071 (mi_cmd_exec_run): Use scoped_restore_current_pspace_and_thread.
13072 (mi_cmd_trace_frame_collected): Use scoped_restore_current_thread.
13073 * proc-service.c (ps_pglobal_lookup): Use
13074 scoped_restore_current_program_space.
13075 * progspace-and-thread.c: New file.
13076 * progspace-and-thread.h: New file.
13077 * progspace.c (release_program_space, clone_program_space): Use
13078 scoped_restore_current_program_space.
13079 (restore_program_space, save_current_program_space)
13080 (save_current_space_and_thread): Delete.
13081 (switch_to_program_space_and_thread): Moved to
13082 progspace-and-thread.c.
13083 * progspace.h (save_current_program_space)
13084 (save_current_space_and_thread): Delete declarations.
13085 (scoped_restore_current_program_space): New class.
13086 * remote.c (remote_btrace_maybe_reopen): Use
13087 scoped_restore_current_thread.
13088 * symtab.c: Include "progspace-and-thread.h".
13089 (skip_prologue_sal): Use scoped_restore_current_pspace_and_thread.
13090 * thread.c (print_thread_info_1): Use
13091 scoped_restore_current_thread.
13092 (struct current_thread_cleanup): Delete.
13093 (do_restore_current_thread_cleanup)
13094 (restore_current_thread_cleanup_dtor): Rename/convert both to ...
13095 (scoped_restore_current_thread::~scoped_restore_current_thread):
13096 ... this new dtor.
13097 (make_cleanup_restore_current_thread): Rename/convert to ...
13098 (scoped_restore_current_thread::scoped_restore_current_thread):
13099 ... this new ctor.
13100 (thread_apply_all_command): Use scoped_restore_current_thread.
13101 (thread_apply_command): Use scoped_restore_current_thread.
13102 * tracepoint.c (tdump_command): Use scoped_restore_current_thread.
13103 * varobj.c (value_of_root_1): Use scoped_restore_current_thread.
13104
13105 2017-05-04 Pedro Alves <palves@redhat.com>
13106
13107 * thread.c (make_cleanup_restore_current_thread): Move
13108 find_thread_ptid call before the is_stopped call. Assert that the
13109 thread is found. Replace is_stopped call by checking the thread's
13110 state directly. Remove unnecessary NULL-thread check.
13111
13112 2017-05-04 Pedro Alves <palves@redhat.com>
13113
13114 * corelow.c (thread_section_name): New class.
13115 (get_core_register_section, get_core_siginfo): Use it.
13116
13117 2017-05-04 Andreas Arnez <arnez@linux.vnet.ibm.com>
13118
13119 * corelow.c (sniff_core_bfd): Remove extra semicolon.
13120 (get_core_register_section): Remove xfree of NULL pointer.
13121
13122 2017-05-03 Alan Hayward <alan.hayward@arm.com>
13123
13124 * frv-linux-tdep.c (frv_linux_supply_gregset): Use raw_supply_zeroed.
13125 * regcache.c (regcache::raw_supply_zeroed): New function.
13126 * regcache.h (regcache::raw_supply_zeroed): New declaration.
13127
13128 2017-05-03 Simon Marchi <simon.marchi@ericsson.com>
13129
13130 * gdbarch.sh: Remove commented out definition of
13131 TARGET_CHAR_BIT.
13132 * gdbarch.h: Re-generate.
13133
13134 2017-05-03 Sergio Durigan Junior <sergiodj@redhat.com>
13135
13136 * configure: Regenerate.
13137
13138 2017-05-02 Simon Marchi <simon.marchi@ericsson.com>
13139
13140 * solib-target.c (solib_target_relocate_section_addresses):
13141 Remove num_section_bases, num_bases, segment_bases variables.
13142
13143 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
13144
13145 * common/gdb_vecs.h (DEF_VEC_I (CORE_ADDR)): Remove.
13146
13147 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
13148
13149 * solib-target.c: Include <vector>
13150 (struct lm_info_target) <~lm_info_target>: Remove.
13151 <segment_bases, section_bases>: Change type to
13152 std::vector<CORE_ADDR>.
13153 (library_list_start_segment, library_list_start_section,
13154 library_list_end_library,
13155 solib_target_relocate_section_addresses): Adjust.
13156
13157 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
13158
13159 * gdbarch.sh (software_single_step): Change return type to
13160 std::vector<CORE_ADDR>.
13161 * gdbarch.c, gdbarch.h: Re-generate.
13162 * arch/arm-get-next-pcs.c (thumb_deal_with_atomic_sequence_raw):
13163 Adjust.
13164 (arm_deal_with_atomic_sequence_raw): Adjust.
13165 (thumb_get_next_pcs_raw): Adjust.
13166 (arm_get_next_pcs_raw): Adjust.
13167 (arm_get_next_pcs): Adjust.
13168 * arch/arm-get-next-pcs.h (arm_get_next_pcs): Adjust.
13169 * aarch64-tdep.c (aarch64_software_single_step): Adjust.
13170 * alpha-tdep.c (alpha_deal_with_atomic_sequence): Adjust.
13171 (alpha_software_single_step): Adjust.
13172 * alpha-tdep.h (alpha_software_single_step): Adjust.
13173 * arm-linux-tdep.c (arm_linux_software_single_step): Adjust.
13174 * arm-tdep.c (arm_software_single_step): Adjust.
13175 (arm_breakpoint_kind_from_current_state): Adjust.
13176 * arm-tdep.h (arm_software_single_step): Adjust.
13177 * breakpoint.c (insert_single_step_breakpoint): Adjust.
13178 * cris-tdep.c (cris_software_single_step): Adjust.
13179 * mips-tdep.c (mips_deal_with_atomic_sequence): Adjust.
13180 (micromips_deal_with_atomic_sequence): Adjust.
13181 (deal_with_atomic_sequence): Adjust.
13182 (mips_software_single_step): Adjust.
13183 * mips-tdep.h (mips_software_single_step): Adjust.
13184 * moxie-tdep.c (moxie_software_single_step): Adjust.
13185 * nios2-tdep.c (nios2_software_single_step): Adjust.
13186 * ppc-tdep.h (ppc_deal_with_atomic_sequence): Adjust.
13187 * rs6000-aix-tdep.c (rs6000_software_single_step): Adjust.
13188 * rs6000-tdep.c (ppc_deal_with_atomic_sequence): Adjust.
13189 * s390-linux-tdep.c (s390_software_single_step): Adjust.
13190 * sparc-tdep.c (sparc_software_single_step): Adjust.
13191 * spu-tdep.c (spu_software_single_step): Adjust.
13192 * tic6x-tdep.c (tic6x_software_single_step): Adjust.
13193
13194 2017-05-02 Simon Marchi <simon.marchi@polymtl.ca>
13195
13196 * gdbarch.sh: Use semi-colon as field separator instead of colon.
13197 * gdbarch.h: Re-generate.
13198
13199 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
13200
13201 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-instruction.o.
13202 (SUBDIR_PYTHON_SRCS): Add py-instruction.c.
13203 * python/py-instruction.c, python/py-instruction.h: New file.
13204 * python/py-record.c: Add py-instruction.h include.
13205 (gdbpy_initialize_record): Make gdb.Instruction a super class of
13206 gdb.RecordInstruction.
13207 * python/python-internal.h: Add gdbpy_initialize_instruction
13208 declaration.
13209 * python/python.c (do_start_initialization): Add
13210 gdbpy_initialize_instruction.
13211
13212 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
13213
13214 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_CALL, btpy_call_type):
13215 Remove.
13216 (btrace_func_from_recpy_func): New function.
13217 (btpy_call_new, btpy_number, btpy_hash, btpy_richcompare): Remove.
13218 (btpy_call_level, btpy_call_symbol, btpy_call_instructions,
13219 btpy_call_up, btpy_call_prev_sibling, btpy_call_next_sibling): Rename to ...
13220 (recpy_bt_func_level, recpy_bt_func_symbol, recpy_bt_func_instructions,
13221 recpy_bt_func_up, recpy_bt_func_prev, recpy_bt_func_next): This.
13222 Also, use new helper functions.
13223 (btpy_list_item): Use new helper functions.
13224 (recpy_bt_function_call_history): Use new type name.
13225 (btpy_call_getset): Remove.
13226 (gdbpy_initialize_btrace): Remove code to initialize
13227 gdb.BtraceFunctionCall.
13228 * python/py-record-btrace.h (recpy_bt_func_number, recpy_btb_func_level,
13229 recpy_btb_func_symbol, recpy_bt_func_instructions, recpy_bt_func_up,
13230 recpy_bt_func_prev, recpy_bt_func_next): New export.
13231 * python/py-record.c (recpy_func_type): New static object.
13232 (recpy_func_new, recpy_func_level, recpy_func_symbol,
13233 recpy_func_instructions, recpy_func_up, recpy_func_prev,
13234 recpy_func_next): New function.
13235 (recpy_element_hash, recpy_element_richcompare): Updated comment.
13236 (recpy_func_getset): New static object.
13237 (gdbpy_initialize_record): Add code to initialize gdb.RecordInstruction.
13238 * python/py-record.h (recpy_func_type, recpy_func_new): New export.
13239
13240 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
13241
13242 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN): Remove.
13243 (btpy_object, btpy_insn_type, btpy_new): Remove.
13244 (btpy_list_object): Use gdb.RecordInstruction type instead of
13245 gdb.BtraceInstruction type.
13246 (btrace_insn_from_recpy_insn): New function.
13247 (btpy_insn_or_gap_new): Adjust comment. Use recpy_insn_new instead of
13248 btpy_new.
13249 (btpy_call_new, btpy_list_item): Do not use btpy_new anymore.
13250 (btpy_number, btpy_hash, btpy_call_level, btpy_call_symbol,
13251 btpy_call_instructions, btpy_call_up, btpy_call_prev_sibling,
13252 btpy_call_next_sibling, btpy_richcompare): Use recpy_element_object
13253 instead of btpy_object.
13254 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
13255 btpy_insn_data, btpy_insn_decode): Rename to ...
13256 (recpy_bt_insn_sal, recpy_bt_insn_pc, recpy_bt_insn_size,
13257 recpy_bt_insn_is_speculative, recpy_bt_insn_data,
13258 recpy_bt_insn_decode): This. Also, use new helper functions.
13259 (btpy_list_position, recpy_bt_goto): Use recpy_element_object and
13260 recpy_insn_type.
13261 (btpy_insn_getset): Remove.
13262 (gdbpy_initialize_btrace): Remove code to initialize
13263 gdb.BtraceInstruction. Use recpy_element_object.
13264 * python/py-record-btrace.h (recpy_bt_insn_number, recpy_bt_insn_sal,
13265 recpy_bt_insn_pc, recpy_bt_insn_data, recpy_bt_insn_decoded,
13266 recpy_bt_insn_size, recpy_bt_insn_is_speculative): New export.
13267 * python/py-record.c (recpy_insn_type): New static object.
13268 (recpy_insn_new, recpy_insn_sal, recpy_insn_pc, recpy_insn_data,
13269 recpy_insn_decoded, recpy_insn_size, recpy_insn_is_speculative,
13270 recpy_element_number, recpy_element_hash, recpy_element_richcompare):
13271 New function.
13272 (recpy_insn_getset): New static object.
13273 (gdbpy_initialize_record): Initialize gdb.RecordInstruction.
13274 * python/py-record.h (recpy_element_object): New typedef.
13275 (recpy_insn_type, recpy_insn_new): New export.
13276
13277 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
13278
13279 * py-record-btrace.c (btpy_insn_new): Removed.
13280 (btpy_insn_or_gap_new): New function.
13281 (btpy_insn_error): Removed.
13282 (btpy_insn_sal, btpy_insn_pc, btpy_insn_size, btpy_insn_is_speculative,
13283 btpy_insn_data, btpy_insn_decode): Remove code path for gaps.
13284 (recpy_bt_replay_position, recpy_bt_begin, recpy_bt_end): Call
13285 btpy_insn_or_gap_new instead of btpy_insn_new.
13286 (btpy_insn_getset): Remove btpy_insn_error.
13287 * py-record.c (recpy_gap_type): New static object.
13288 (recpy_gap_object): New typedef.
13289 (recpy_gap_new, recpy_gap_number, recpy_gap_reason_code,
13290 recpy_gap_reason_string): New function.
13291 (recpy_gap_getset): New static object.
13292 (gdbpy_initialize_record): Initialize gdb.RecordGap type.
13293 * py-record.h (recpy_gap_new): New export.
13294
13295 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
13296
13297 * python/py-record.c (recpy_ptid): Remove.
13298 (recpy_record_getset): Remove recpy_ptid.
13299
13300 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
13301
13302 * btrace.c (btrace_fetch): Set inferior_ptid.
13303 * python/py-record-btrace.c: Add "py-record.h" include.
13304 (recpy_bt_format, recpy_bt_replay_position, recpy_bt_begin,
13305 recpy_bt_end, recpy_bt_instruction_history,
13306 recpy_bt_function_call_history, recpy_bt_goto): Use ptid stored
13307 in gdb.Record object instead of current ptid.
13308 * python/py-record.c: Include new "py-record.h" file.
13309 (recpy_record_object): Moved to py-record.h.
13310 * python/py-record.h: New file.
13311
13312 2017-05-01 Tim Wiederhake <tim.wiederhake@intel.com>
13313
13314 * python/py-record-btrace.c (BTPY_REQUIRE_VALID_INSN,
13315 BTPY_REQUIRE_VALID_CALL, recpy_bt_function_call_history): Fix
13316 indentation.
13317
13318 2017-05-01 Joel Brobecker <brobecker@adacore.com>
13319
13320 * MAINTAINERS: Move Daniel Jacobowitz and Mark Kettenis to
13321 the past maintainers section.
13322
13323 2017-04-28 Yao Qi <yao.qi@linaro.org>
13324
13325 * infcmd.c (get_return_value): Use regcache ctor, and remove
13326 cleanup.
13327
13328 2017-04-28 Yao Qi <yao.qi@linaro.org>
13329 Pedro Alves <palves@redhat.com>
13330
13331 * regcache.c (regcache::regcache): New tag dispatch ctor.
13332 (do_cooked_read): Moved above.
13333 (regcache_dup): Use the tag dispatch ctor..
13334 * regcache.h (regcache): Declare ctor, delete copy ctor and
13335 assignment operator, remove friend regcache_dup.
13336
13337 2017-04-28 Yao Qi <yao.qi@linaro.org>
13338
13339 * regcache.c (regcache_dup): Assert !src->m_readonly_p and
13340 call method save instead of regcache_cpy.
13341 * regcache.h (struct regcache): Make regcache_dup a friend.
13342
13343 2017-04-28 Yao Qi <yao.qi@linaro.org>
13344
13345 * regcache.c (struct regcache): Move to regcache.h
13346 (regcache::arch): New method.
13347 (regcache_get_ptid): Update.
13348 (get_regcache_arch): Call arch method.
13349 (get_regcache_aspace): Call method aspace.
13350 (register_buffer): Change it to method.
13351 (regcache_save): Change it to regcache::save.
13352 (regcache_restore): Likewise.
13353 (regcache_cpy_no_passthrough): Remove the declaration.
13354 (regcache_cpy): Call methods restore and cpy_no_passthrough.
13355 (regcache_cpy_no_passthrough): Change it to method
13356 cpy_no_passthrough.
13357 (regcache_register_status): Change it to method
13358 get_register_status.
13359 (regcache_invalidate): Change it to method invalidate.
13360 (regcache_thread_ptid_changed): Use methods ptid and set_ptid.
13361 (regcache_raw_update): Change it to method raw_update.
13362 (regcache_raw_read): Likewise.
13363 (regcache_raw_read_signed): Likewise.
13364 (regcache_raw_read_unsigned): Likewise.
13365 (regcache_raw_write_signed): Likewise.
13366 (regcache_raw_write_unsigned): Likewise.
13367 (regcache_cooked_read): Likewise.
13368 (regcache_cooked_read_value): Likewise.
13369 (regcache_cooked_read_signed): Likewise.
13370 (regcache_cooked_read_unsigned): Likewise.
13371 (regcache_cooked_write_signed): Likewise.
13372 (regcache_cooked_write_unsigned): Likewise.
13373 (regcache_raw_set_cached_value): Likewise.
13374 (regcache_raw_write): Likewise.
13375 (regcache_cooked_write): Likewise.
13376 (regcache_xfer_part): Likewise.
13377 (regcache_raw_read_part): Likewise.
13378 (regcache_raw_write_part): Likewise.
13379 (regcache_cooked_read_part): Likewise.
13380 (regcache_cooked_write_part): Likewise.
13381 (regcache_raw_supply): Likewise.
13382 (regcache_raw_collect): Likewise.
13383 (regcache_transfer_regset): Likewise.
13384 (regcache_supply_regset): Likewise.
13385 (regcache_collect_regset): Likewise.
13386 (regcache_debug_print_register): Likewise.
13387 (enum regcache_dump_what): Move it to regcache.h.
13388 (regcache_dump): Change it to method dump.
13389 * regcache.h (enum regcache_dump_what): New.
13390 (class regcache): New.
13391 * target.c (target_fetch_registers): Call method
13392 debug_print_register.
13393 (target_store_registers): Likewise.
13394
13395 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13396
13397 * windows-nat.c (struct lm_info_windows): Initialize field.
13398 (windows_make_so): Allocate lm_info_windows with new.
13399 (windows_free_so): Free lm_info_windows with delete.
13400
13401 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13402
13403 * solib-darwin.c (struct lm_info_darwin): Initialize field.
13404 (darwin_current_sos): Allocate lm_info_darwin with new, remove
13405 cleanup.
13406 (darwin_free_so): Free lm_info_darwin with delete.
13407
13408 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13409
13410 * solib-svr4.h (struct lm_info_svr4): Initialize fields.
13411 <l_addr_p>: Change type to bool.
13412 * solib-svr4.c (lm_info_read): Allocate lm_info_svr4 with new.
13413 (svr4_free_so): Free lm_info_svr4 with delete.
13414 (svr4_copy_library_list): Replace memcpy with call to copy
13415 constructor.
13416 (library_list_start_library, svr4_default_sos): Allocate
13417 lm_info_svr4 with new.
13418
13419 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13420
13421 * solib-target.c (struct lm_info_target): Add destructor,
13422 initialize fields.
13423 <name>: Change type to std::string.
13424 (library_list_start_library): Allocate lm_info_target with new.
13425 (solib_target_free_library_list): Free lm_info_target with
13426 delete.
13427 (solib_target_current_sos): Adapt to std::string.
13428 (solib_target_free_so): Free lm_info_target with delete.
13429
13430 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13431
13432 * solib-frv.c (struct lm_info_frv): Add destructor, initialize
13433 fields.
13434 (frv_current_sos): Allocate lm_info_frv with new.
13435 (frv_relocate_main_executable): Free lm_info_frv with delete,
13436 allocate with new.
13437 (frv_clear_solib, frv_free_so): Free lm_info_frv with delete.
13438
13439 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13440
13441 * solib-frv.c (struct lm_info_frv): Fix indentation.
13442
13443 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13444
13445 * solib-dsbt.c (struct lm_info_dsbt): Add destructor, initialize
13446 map field.
13447 (dsbt_current_sos): Allocate lm_info_dsbt with new.
13448 (dsbt_relocate_main_executable): Free lm_info_dsbt with delete
13449 and allocate with new.
13450 (dsbt_clear_solib, dsbt_free_so): Free lm_info_dsbt with delete.
13451
13452 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13453
13454 * solib-aix.c (struct lm_info_aix): Initialize fields in-class.
13455 <filename, member_name>: Change type to std::string.
13456 (solib_aix_new_lm_info, solib_aix_xfree_lm_info): Remove.
13457 (library_list_start_library): Allocate lm_info_aix with new.
13458 (solib_aix_free_library_list, solib_aix_free_so): Free with delete.
13459 (solib_aix_current_sos): Adapt to std::string, copy lm_info_aix
13460 with copy constructor.
13461
13462 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13463
13464 * solist.h (struct lm_info): Remove.
13465 (struct lm_info_base): New class.
13466 (struct so_list) <lm_info>: Change type to lm_info_base *.
13467 * nto-tdep.c (struct lm_info): Remove.
13468 (lm_addr): Adjust.
13469 * solib-aix.c (struct lm_info): Rename to ...
13470 (struct lm_info_aix): ... this. Extend lm_info_base.
13471 (lm_info_p): Rename to ...
13472 (lm_info_aix_p): ... this, and adjust.
13473 (solib_aix_new_lm_info, solib_aix_xfree_lm_info,
13474 solib_aix_parse_libraries, library_list_start_library,
13475 solib_aix_free_library_list, solib_aix_parse_libraries,
13476 solib_aix_get_library_list,
13477 solib_aix_relocate_section_addresses, solib_aix_free_so,
13478 solib_aix_get_section_offsets,
13479 solib_aix_solib_create_inferior_hook, solib_aix_current_sos):
13480 Adjust.
13481 (struct solib_aix_inferior_data) <library_list>: Adjust.
13482 * solib-darwin.c (struct lm_info): Rename to ...
13483 (struct lm_info_darwin): ... this. Extend lm_info_base.
13484 (darwin_current_sos, darwin_relocate_section_addresses): Adjust.
13485 * solib-dsbt.c (struct lm_info): Rename to ...
13486 (struct lm_info_dsbt): ... this. Extend lm_info_base.
13487 (struct dsbt_info) <main_executable_lm_info): Adjust.
13488 (dsbt_current_sos, dsbt_relocate_main_executable, dsbt_free_so,
13489 dsbt_relocate_section_addresses): Adjust.
13490 * solib-frv.c (struct lm_info): Rename to ...
13491 (struct lm_info_frv): ... this. Extend lm_info_base.
13492 (main_executable_lm_info): Adjust.
13493 (frv_current_sos, frv_relocate_main_executable, frv_free_so,
13494 frv_relocate_section_addresses, frv_fdpic_find_global_pointer,
13495 find_canonical_descriptor_in_load_object,
13496 frv_fdpic_find_canonical_descriptor): Adjust.
13497 * solib-svr4.c (struct lm_info): Move to solib-svr4.h, renamed
13498 to lm_info_svr4.
13499 (lm_info_read, lm_addr_check, svr4_keep_data_in_core,
13500 svr4_clear_so, svr4_copy_library_list,
13501 library_list_start_library, svr4_default_sos, svr4_read_so_list,
13502 svr4_current_sos, svr4_fetch_objfile_link_map,
13503 solist_update_incremental): Adjust.
13504 * solib-svr4.h (struct lm_info_svr4): Move here from
13505 solib-svr4.c.
13506 * solib-target.c (struct lm_info): Rename to ...
13507 (struct lm_info_target): ... this. Extend lm_info_base.
13508 (lm_info_p): Rename to ...
13509 (lm_info_target_p): ... this.
13510 (solib_target_parse_libraries, library_list_start_segment,
13511 library_list_start_section, library_list_start_library,
13512 library_list_end_library, solib_target_free_library_list,
13513 solib_target_current_sos, solib_target_free_so,
13514 solib_target_relocate_section_addresses): Adjust.
13515 * windows-nat.c (struct lm_info): Rename to ...
13516 (struct lm_info_windows): ... this. Extend lm_info_base.
13517 (windows_make_so, handle_load_dll, handle_unload_dll,
13518 windows_xfer_shared_libraries): Adjust.
13519
13520 2017-04-28 Simon Marchi <simon.marchi@ericsson.com>
13521
13522 * solib-darwin.c (struct darwin_so_list): Remove.
13523 (darwin_current_sos): Allocate an so_list object instead of a
13524 darwin_so_list, separately allocate an lm_info object.
13525 (darwin_free_so): Free lm_info.
13526
13527 2017-04-28 John Baldwin <jhb@FreeBSD.org>
13528
13529 * mips-tdep.c (print_gp_register_row): Replace printf_filtered
13530 with fprintf_filtered.
13531
13532 2017-04-28 Yao Qi <yao.qi@linaro.org>
13533
13534 * regcache.c (regcache::regcache): New function.
13535 (regcache::~regcache): New function.
13536 (regcache_xmalloc_1): Remove.
13537 (regcache_xmalloc): Call new regcache.
13538 (regcache_xfree): Call delete regcache.
13539 (get_thread_arch_aspace_regcache): Call new regcache.
13540
13541 2017-04-28 Yao Qi <yao.qi@linaro.org>
13542
13543 * mips-linux-nat.c (mips_linux_new_thread): Use ptid method
13544 lwp instead of ptid_get_lwp.
13545
13546 2017-04-28 Yao Qi <yao.qi@linaro.org>
13547
13548 * mips-linux-nat.c (mips_linux_new_thread): Get lwpid from
13549 lwp_info instead of getting from inferior_ptid.
13550
13551 2017-04-27 Keith Seitz <keiths@redhat.com>
13552
13553 * gdbtypes.c (LVALUE_REFERENCE_TO_RVALUE_BINDING_BADNESS)
13554 DIFFERENT_REFERENCE_TYPE_BADNESS): Remove.
13555 (CV_CONVERSION_BADNESS): Define.
13556 (rank_one_type): Remove overly restrictive rvalue reference
13557 rank checks.
13558 Add cv-qualifier checks and subranks for type equality.
13559 * gdbtypes.h (REFERENCE_CONVERSION_RVALUE,
13560 REFERENCE_CONVERSION_CONST_LVALUE, CV_CONVERSION_BADNESS,
13561 CV_CONVERSION_CONST, CV_CONVERSION_VOLATILE): Declare.
13562
13563 2017-04-27 Simon Marchi <simon.marchi@ericsson.com>
13564
13565 * python/py-inferior.c (inferior_to_inferior_object): Increment reference
13566 count when creating the object.
13567
13568 2017-04-27 Sangamesh Mallayya <sangamesh.swamy@in.ibm.com>
13569 Ulrich Weigand <uweigand@de.ibm.com>
13570
13571 * xcoffread.c (read_xcoff_symtab): Read correct function auxiliary
13572 entry if xlc -qfuncsect or gcc -ffunction-sections compiler option
13573 is used in AIX.
13574 (read_xcoff_symtab): Handle C_WEAKEXT storage class.
13575 (process_xcoff_symbol): Likewise.
13576 (scan_xcoff_symtab): Likewise.
13577
13578 2017-04-26 Alan Hayward <alan.hayward@arm.com>
13579
13580 * ia64-tdep.c (examine_prologue): Use get_frame_register_unsigned.
13581 (ia64_sigtramp_frame_prev_register): Use read_memory_unsigned_integer.
13582 (ia64_access_reg): Use get_frame_register_unsigned.
13583 (ia64_access_rse_reg): Likewise.
13584 (ia64_libunwind_frame_prev_register): Likewise.
13585
13586 2017-04-26 Jiong Wang <jiong.wang@arm.com>
13587
13588 * gdbarch.sh: New gdbarch method execute_dwarf_cfa_vendor_op.
13589 * gdbarch.c: Regenerated.
13590 * gdbarch.h: Regenerated.
13591 * dwarf2-frame.c (dwarf2_frame_state_alloc_regs): Made the
13592 visibility external.
13593 (execute_cfa_program): Call execute_dwarf_cfa_vendor_op for CFI
13594 between DW_CFA_lo_user and DW_CFA_high_user inclusive.
13595 (enum cfa_how_kind): Move to ...
13596 (struct dwarf2_frame_state_reg_info): Likewise.
13597 (struct dwarf2_frame_state): Likewise.
13598 * dwarf2-frame.h: ... here.
13599 (dwarf2_frame_state_alloc_regs): New declaration.
13600 * sparc-tdep.c (sparc_execute_dwarf_cfa_vendor_op): New function.
13601 (sparc32_gdbarch_init): Register execute_dwarf_cfa_vendor_op hook.
13602
13603 2017-04-26 Alan Hayward <alan.hayward@arm.com>
13604
13605 * xtensa-tdep.c (xtensa_pseudo_register_read): Use
13606 regcache_raw_read_unsigned.
13607 (xtensa_pseudo_register_write): Likewise.
13608
13609 2017-04-26 Alan Hayward <alan.hayward@arm.com>
13610
13611 * nds32-tdep.c (nds32_pseudo_register_read): Abort on errors.
13612 (nds32_pseudo_register_write): Likewise.
13613
13614 2017-04-25 Yao Qi <yao.qi@linaro.org>
13615
13616 * regcache.c (struct regcache) <readonly_p>: Change its type
13617 to bool.
13618 (regcache_xmalloc_1): Update parameter type and callers update.
13619
13620 2017-04-25 Yao Qi <yao.qi@linaro.org>
13621
13622 * aarch64-tdep.c (aarch64_gdbarch_init): Don't call
13623 set_gdbarch_wchar_bit.
13624 * arm-tdep.c (arm_gdbarch_init): Likewise.
13625
13626 2017-04-25 Pedro Alves <palves@redhat.com>
13627
13628 * common/poison.h [!HAVE_IS_TRIVIALLY_COPYABLE] (IsRelocatable)
13629 (BothAreRelocatable, memcopy, memmove): Don't define.
13630 * common/traits.h (__has_feature, HAVE_IS_TRIVIALLY_COPYABLE): New
13631 macros.
13632
13633 2017-04-25 Pedro Alves <palves@redhat.com>
13634
13635 * common/common-defs.h: Include "common/poison.h".
13636 * common/function-view.h: (Not, Or, Requires): Move to traits.h
13637 and adjust.
13638 * common/poison.h: New file.
13639 * common/traits.h: Include <type_traits>.
13640 (Not, Or, Requires): New, moved from common/function-view.h.
13641
13642 2017-04-25 Pedro Alves <palves@redhat.com>
13643
13644 * breakpoint.h (struct breakpoint): In-class initialize all
13645 fields. Make boolean fields "bool".
13646 * breakpoint.c (init_raw_breakpoint_without_location): Remove
13647 memset call and initializations no longer necessary.
13648
13649 2017-04-25 Pedro Alves <palves@redhat.com>
13650
13651 * btrace.c (pt_btrace_insn_flags): Change parameter type to
13652 reference.
13653 (pt_btrace_insn): New function.
13654 (ftrace_add_pt): Remove memset call and use pt_btrace_insn.
13655
13656 2017-04-25 Pedro Alves <palves@redhat.com>
13657
13658 * ada-lang.c (ada_catchpoint_location): Now a "class". Remove
13659 "base" field and inherit from "bp_location" instead. Add
13660 non-default ctor.
13661 (allocate_location_exception): Use new non-default ctor.
13662 * breakpoint.c (get_first_locp_gte_addr): Remove memset call.
13663 (init_bp_location): Convert to ...
13664 (bp_location::bp_location): ... this new ctor, and remove memset
13665 call.
13666 (base_breakpoint_allocate_location): Use the new non-default ctor.
13667 * breakpoint.h (bp_location): Now a class. Declare default and
13668 non-default ctors. In-class initialize all members.
13669 (init_bp_location): Remove declaration.
13670
13671 2017-04-25 Pedro Alves <palves@redhat.com>
13672
13673 * common/enum-flags.h (enum_flags): Don't implement copy ctor and
13674 assignment operator.
13675
13676 2017-04-24 Yao Qi <yao.qi@linaro.org>
13677
13678 * doublest.c (convert_doublest_to_floatformat): Call
13679 floatformat_totalsize_bytes.
13680
13681 2017-04-22 Tom Tromey <tom@tromey.com>
13682
13683 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries): Use
13684 ui_out_emit_list.
13685 * stack.c (print_frame): Use ui_out_emit_list.
13686 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
13687 ui_out_emit_list.
13688 * mi/mi-main.c (print_one_inferior)
13689 (mi_cmd_data_list_register_names)
13690 (mi_cmd_data_list_register_values, mi_cmd_list_features)
13691 (mi_cmd_list_target_features, mi_cmd_trace_frame_collected): Use
13692 ui_out_emit_list.
13693 * mi/mi-interp.c (mi_on_normal_stop_1): Use ui_out_emit_list.
13694 (mi_output_solib_attribs): Use ui_out_emit_list,
13695 ui_out_emit_tuple.
13696 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_list.
13697 * mi/mi-cmd-stack.c (mi_cmd_stack_list_frames)
13698 (mi_cmd_stack_list_args, list_args_or_locals): Use
13699 ui_out_emit_list.
13700 * disasm.c (do_assembly_only): Use ui_out_emit_list.
13701 * breakpoint.c (print_solib_event, output_thread_groups): Use
13702 ui_out_emit_list.
13703
13704 2017-04-22 Tom Tromey <tom@tromey.com>
13705
13706 * mi/mi-main.c (print_variable_or_computed): Use ui_out_emit_tuple.
13707 * mi/mi-cmd-var.c (varobj_update_one): Use ui_out_emit_tuple.
13708 * mi/mi-cmd-stack.c (list_arg_or_local): Use ui_out_emit_tuple.
13709
13710 2017-04-22 Tom Tromey <tom@tromey.com>
13711
13712 * tracepoint.c (tvariables_info_1)
13713 (print_one_static_tracepoint_marker): Use ui_out_emit_tuple.
13714
13715 2017-04-22 Tom Tromey <tom@tromey.com>
13716
13717 * stack.c (print_frame_arg): Use ui_out_emit_tuple,
13718 annotate_arg_emitter.
13719 * breakpoint.c (print_mention_watchpoint)
13720 (print_mention_masked_watchpoint): Use ui_out_emit_tuple.
13721 * annotate.h (struct annotate_arg_emitter): New.
13722
13723 2017-04-22 Tom Tromey <tom@tromey.com>
13724
13725 * record-btrace.c (record_btrace_insn_history)
13726 (record_btrace_insn_history_range, record_btrace_call_history)
13727 (record_btrace_call_history_range): Use ui_out_emit_tuple.
13728 * thread.c (do_captured_list_thread_ids, print_thread_info_1): Use
13729 ui_out_emit_tuple.
13730 * stack.c (print_frame_info): Use ui_out_emit_tuple.
13731 * solib.c (info_sharedlibrary_command): Use ui_out_emit_tuple.
13732 * skip.c (skip_info): Use ui_out_emit_tuple.
13733 * remote.c (show_remote_cmd): Use ui_out_emit_tuple.
13734 * progspace.c (print_program_space): Use ui_out_emit_tuple.
13735 * probe.c (info_probes_for_ops): Use ui_out_emit_tuple.
13736 * osdata.c (info_osdata): Use ui_out_emit_tuple.
13737 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Use
13738 ui_out_emit_tuple.
13739 * mi/mi-main.c (print_one_inferior, list_available_thread_groups)
13740 (output_register, mi_cmd_data_read_memory)
13741 (mi_cmd_data_read_memory_bytes, mi_load_progress)
13742 (mi_cmd_trace_frame_collected): Use ui_out_emit_tuple.
13743 * mi/mi-cmd-var.c (mi_cmd_var_list_children, varobj_update_one):
13744 Use ui_out_emit_tuple.
13745 * mi/mi-cmd-stack.c (mi_cmd_stack_list_args): Use
13746 ui_out_emit_tuple.
13747 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
13748 (mi_cmd_info_gdb_mi_command): Use ui_out_emit_tuple.
13749 * linux-thread-db.c (info_auto_load_libthread_db): Use
13750 ui_out_emit_tuple.
13751 * inferior.c (print_inferior): Use ui_out_emit_tuple.
13752 * gdb_bfd.c (print_one_bfd): Use ui_out_emit_tuple.
13753 * disasm.c (do_mixed_source_and_assembly_deprecated)
13754 (do_mixed_source_and_assembly): Use ui_out_emit_tuple.
13755 * cp-abi.c (list_cp_abis): Use ui_out_emit_tuple.
13756 * cli/cli-setshow.c (cmd_show_list): Use ui_out_emit_tuple.
13757 * breakpoint.c (print_one_breakpoint_location)
13758 (print_one_breakpoint): Use ui_out_emit_tuple.
13759 * auto-load.c (print_script, info_auto_load_cmd): Use
13760 ui_out_emit_tuple.
13761 * ada-tasks.c (print_ada_task_info): Use ui_out_emit_tuple.
13762
13763 2017-04-21 Simon Marchi <simon.marchi@ericsson.com>
13764
13765 * thread.c (print_thread_info_1): Remove dead code.
13766
13767 2017-04-21 Jan Kratochvil <jan.kratochvil@redhat.com>
13768
13769 * aarch64-tdep.c (selftests::aarch64_process_record_test): Make it #if
13770 GDB_SELF_TEST.
13771 * arm-tdep.c (selftests::arm_record_test): Likewise.
13772
13773 2017-04-21 Yao Qi <yao.qi@linaro.org>
13774
13775 * regcache.c (regcache_restore): Remove argument 2. Replace
13776 argument 3 with regcache. Get register status from
13777 src->register_status and get register contents from
13778 register_buffer (src, regnum).
13779 (regcache_cpy): Update.
13780
13781 2017-04-19 Pedro Alves <palves@redhat.com>
13782
13783 * gdbthread.h (thread): Add missing closing parenthesis in
13784 comment.
13785
13786 2017-04-19 Pedro Alves <palves@redhat.com>
13787
13788 * common/refcounted-object.h: New file.
13789 * gdbthread.h: Include "common/refcounted-object.h".
13790 (thread_info): Inherit from refcounted_object and add comments.
13791 (thread_info::incref, thread_info::decref)
13792 (thread_info::m_refcount): Delete.
13793 (thread_info::deletable): Use the refcounted_object::refcount()
13794 method.
13795 * inferior.c (current_inferior_): Add comment.
13796 (set_current_inferior): Increment/decrement refcounts.
13797 (prune_inferiors, remove_inferior_command): Skip inferiors marked
13798 not-deletable instead of comparing with the current inferior.
13799 (initialize_inferiors): Increment the initial inferior's refcount.
13800 * inferior.h (struct inferior): Forward declare.
13801 Include "common/refcounted-object.h".
13802 (current_inferior, set_current_inferior): Move declaration to
13803 before struct inferior's definition, and fix comment.
13804 (inferior): Inherit from refcounted_object. Add comments.
13805 * thread.c (switch_to_thread_no_regs): Reference the thread's
13806 inferior pointer directly instead of doing a ptid lookup.
13807 (switch_to_no_thread): New function.
13808 (switch_to_thread(thread_info *)): New function, factored out
13809 from ...
13810 (switch_to_thread(ptid_t)): ... this.
13811 (restore_current_thread): Delete.
13812 (current_thread_cleanup): Remove 'inf_id' and 'was_removable'
13813 fields, and add 'inf' field.
13814 (do_restore_current_thread_cleanup): Check whether old->inf is
13815 alive instead of looking up an inferior by ptid. Use
13816 switch_to_thread and switch_to_no_thread.
13817 (restore_current_thread_cleanup_dtor): Use old->inf directly
13818 instead of lookup up an inferior by id. Decref the inferior.
13819 Don't restore 'removable'.
13820 (make_cleanup_restore_current_thread): Same the inferior pointer
13821 in old, instead of the inferior number. Incref the inferior.
13822 Don't save/clear 'removable'.
13823
13824 2017-04-19 Pedro Alves <palves@redhat.com>
13825
13826 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13827 unittests/scoped_restore-selftests.c.
13828 (SUBDIR_UNITTESTS_OBS): Add scoped_restore-selftests.o.
13829 * common/scoped_restore.h (scoped_restore_base): Make "class".
13830 (scoped_restore_base::release): New public method.
13831 (scoped_restore_base::scoped_restore_base): New protected ctor.
13832 (scoped_restore_base::m_saved_var): New protected field.
13833 (scoped_restore_tmpl::scoped_restore_tmpl(T*)): Initialize the
13834 scoped_restore_base base class instead of m_saved_var directly.
13835 (scoped_restore_tmpl::scoped_restore_tmpl(T*, T2)): Likewise.
13836 (scoped_restore_tmpl::scoped_restore_tmpl(const
13837 scoped_restore_tmpl<T>&)): Likewise.
13838 (scoped_restore_tmpl::~scoped_restore_tmpl): Use the saved_var
13839 method.
13840 (scoped_restore_tmpl::saved_var): New method.
13841 (scoped_restore_tmpl::m_saved_var): Delete.
13842 * inferior.h (inferior::detaching): Now a bool.
13843 * infrun.c (prepare_for_detach): Use a scoped_restore instead of a
13844 cleanup.
13845 * unittests/scoped_restore-selftests.c: New file.
13846
13847 2017-04-19 Pedro Alves <palves@redhat.com>
13848
13849 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS):
13850 Re-sort in alphabetic order.
13851
13852 2017-04-18 Pedro Alves <palves@redhat.com>
13853
13854 * xml-support.c (obstack_xml_printf): Delete.
13855 * xml-support.h (obstack_xml_printf): Delete.
13856
13857 2017-04-18 Pedro Alves <palves@redhat.com>
13858
13859 * xml-support.c (gdb_xml_parser) <use_dtd, dtd_name, parse,
13860 vdebug, verror, body_text, start_element, end_element, name,
13861 user_data, set_is_xinclude, set_error, expat_parser>: New methods.
13862 <name, user_data, expat_parser, scopes, error, last_line, dtd_name,
13863 is_xinclude>: Make private and add m_ prefix.
13864 (gdb_xml_parser::body_text): New method, based on ...
13865 (gdb_xml_body_text): ... this. Adjust.
13866 (gdb_xml_parser::vdebug): New method, based on ...
13867 (gdb_xml_debug): ... this. Adjust.
13868 (gdb_xml_parser::verror): New method, based on ...
13869 (gdb_xml_error): ... this. Adjust.
13870 (gdb_xml_parser::start_element): New method, based on ...
13871 (gdb_xml_start_element): ... this. Adjust.
13872 (gdb_xml_start_element_wrapper): Defer to
13873 gdb_xml_parser::start_element and gdb_xml_parser::set_error.
13874 (gdb_xml_parser::end_element): New method, based on ...
13875 (gdb_xml_end_element_wrapper): ... this. Adjust.
13876 (gdb_xml_parser::~gdb_xml_parser): Adjust.
13877 (gdb_xml_parser::gdb_xml_parser): Adjust to field renames.
13878 (gdb_xml_parser::use_dtd): New method, based on ...
13879 (gdb_xml_use_dtd): ... this. Adjust.
13880 (gdb_xml_parser::parse): New method, based on ...
13881 (gdb_xml_parse): ... this. Adjust.
13882 (gdb_xml_parse_quick): Adjust to call the parser's parse method.
13883 (xinclude_start_include): Adjust to call the parser's name method.
13884 (xml_xinclude_default, xml_xinclude_start_doctype)
13885 (xml_xinclude_end_doctype): Adjust to call the parser's user_data
13886 method.
13887 (xml_process_xincludes): Adjust to call parser methods.
13888 * xml-support.h (gdb_xml_use_dtd, gdb_xml_parse): Delete
13889 declarations.
13890
13891 2017-04-18 Pedro Alves <palves@redhat.com>
13892
13893 * tracefile-tfile.c (tfile_write_tdesc): Adjust to use
13894 gdb::optional<std::string>.
13895 * xml-support.c: Include <string>.
13896 (scope_level::scope_level(scope_level &&))
13897 (scope_level::~scope_level): Delete.
13898 (scope_level::body): Now a std::string.
13899 (gdb_xml_body_text, gdb_xml_end_element): Adjust.
13900 (xinclude_parsing_data::xinclude_parsing_data): Add 'output'
13901 parameter.
13902 (xinclude_parsing_data::~xinclude_parsing_data): Delete.
13903 (xinclude_parsing_data::output): Now a std::string reference.
13904 (xinclude_start_include): Adjust.
13905 (xml_xinclude_default): Adjust.
13906 (xml_process_xincludes): Add 'output' parameter, and return bool.
13907 * xml-support.h (xml_process_xincludes): Add 'output' parameter,
13908 and return bool.
13909 * xml-tdesc.c: Include <unordered_map> and <string>.
13910 (tdesc_xml_cache): Delete.
13911 (tdesc_xml_cache_s): Delete.
13912 (xml_cache): Now an std::unordered_map.
13913 (tdesc_parse_xml): Adjust to use std::string and unordered_map.
13914 (target_fetch_description_xml): Change return type to
13915 gdb::optional<std::string>, and adjust.
13916 * xml-tdesc.h: Include "common/gdb_optional.h" and <string>.
13917 (target_fetch_description_xml): Change return type to
13918 gdb::optional<std::string>.
13919
13920 2017-04-18 Pedro Alves <palves@redhat.com>
13921
13922 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
13923 unittests/optional-selftests.c.
13924 (SUBDIR_UNITTESTS_OBS): Add optional-selftests.o.
13925 * unittests/optional-selftests.c: New file.
13926 * unittests/optional/assignment/1.cc: New file.
13927 * unittests/optional/assignment/2.cc: New file.
13928 * unittests/optional/assignment/3.cc: New file.
13929 * unittests/optional/assignment/4.cc: New file.
13930 * unittests/optional/assignment/5.cc: New file.
13931 * unittests/optional/assignment/6.cc: New file.
13932 * unittests/optional/assignment/7.cc: New file.
13933 * unittests/optional/cons/copy.cc: New file.
13934 * unittests/optional/cons/default.cc: New file.
13935 * unittests/optional/cons/move.cc: New file.
13936 * unittests/optional/cons/value.cc: New file.
13937 * unittests/optional/in_place.cc: New file.
13938 * unittests/optional/observers/1.cc: New file.
13939 * unittests/optional/observers/2.cc: New file.
13940
13941 2017-04-18 Pedro Alves <palves@redhat.com>
13942
13943 * common/gdb_optional.h: Include common/traits.h.
13944 (in_place_t): New type.
13945 (in_place): New constexpr variable.
13946 (optional::optional): Remove member initialization of
13947 m_instantiated.
13948 (optional::optional(in_place_t...)): New constructor.
13949 (optional::~optional): Use reset.
13950 (optional::optional(const optional&)): New.
13951 (optional::optional(const optional&&)): New.
13952 (optional::optional(T &)): New.
13953 (optional::optional(T &&)): New.
13954 (operator::operator=(const optional &)): New.
13955 (operator::operator=(optional &&)): New.
13956 (operator::operator= (const T &))
13957 (operator::operator= (T &&))
13958 (operator::emplace (Args &&... args)): Return a T&. Use reset.
13959 (operator::reset): New.
13960 (operator::m_instantiated):: Add in-class initializer.
13961 * common/traits.h: Include <type_traits>.
13962 (struct And): New types.
13963
13964 2017-04-18 Pedro Alves <palves@redhat.com>
13965
13966 * xml-support.c: Include <vector>.
13967 (scope_level::scope_level(const gdb_xml_element *))
13968 (scope_level::scope_level(scope_level&&)): New.
13969 (scope_level::~scope_level): New.
13970 (scope_level_s): Delete.
13971 (gdb_xml_parser::scopes): Now a std::vector.
13972 (gdb_xml_body_text, gdb_xml_start_element, gdb_xml_end_element):
13973 Use std::vector.
13974 (gdb_xml_parser::~gdb_xml_parser): Remove now unnecessary
13975 scope cleanup code.
13976 (gdb_xml_parser::gdb_xml_parser): Remove explicit initialization
13977 of the scopes member. Use std::vector::emplace_back.
13978
13979 2017-04-18 Pedro Alves <palves@redhat.com>
13980
13981 * xml-support.c (gdb_xml_parser): Add ctor/dtor. Make is_xinclude
13982 a bool.
13983 (gdb_xml_end_element): Change type of first parameter.
13984 (gdb_xml_cleanup): Rename to ...
13985 (gdb_xml_parser::~gdb_xml_parser): ... this.
13986 (gdb_xml_create_parser_and_cleanup): Delete with ...
13987 (gdb_xml_parser::gdb_xml_parser): ... creation parts factored out
13988 to this new ctor.
13989 (gdb_xml_parse_quick): Create a local gdb_xml_parser instead of
13990 using gdb_xml_create_parser_and_cleanup.
13991 (xinclude_parsing_data): Add ctor/dtor.
13992 (xml_xinclude_cleanup): Delete.
13993 (xml_process_xincludes): Create a local xinclude_parsing_data
13994 instead of heap-allocating one. Create a local gdb_xml_parser
13995 instead of heap-allocating one with
13996 gdb_xml_create_parser_and_cleanup.
13997
13998 2017-04-18 John Baldwin <jhb@FreeBSD.org>
13999
14000 PR threads/20743
14001 * fbsd-nat.c (resume_one_thread_cb): Remove.
14002 (resume_all_threads_cb): Remove.
14003 (fbsd_resume): Use ALL_NON_EXITED_THREADS instead of
14004 iterate_over_threads.
14005
14006 2017-04-17 Joel Brobecker <brobecker@adacore.com>
14007
14008 * NEWS: Create a new section for the next release branch.
14009 Rename the section of the current branch, now that it has
14010 been cut.
14011
14012 2017-04-17 Joel Brobecker <brobecker@adacore.com>
14013
14014 GDB 8.0 branch created (725bf5cf125783c2a7ca4ab63d3768e220bab2db):
14015 * version.in: Bump version to 8.0.50.DATE-git.
14016
14017 2017-04-13 Sergio Durigan Junior <sergiodj@redhat.com>
14018
14019 PR gdb/21385
14020 * windows-nat.c (windows_create_inferior): Declare 'allargs'
14021 independently of the host, and fix build breakage on Cygwin.
14022
14023 2017-04-13 Pedro Alves <palves@redhat.com>
14024
14025 * inferior.c (free_inferior): Convert to ...
14026 (inferior::~inferior): ... this dtor.
14027 (inferior::inferior): New ctor, factored out from ...
14028 (add_inferior_silent): ... here. Allocate the inferior with a new
14029 expression.
14030 (delete_inferior): Call delete instead of free_inferior.
14031 * inferior.h (gdb_environ, continuation): Forward declare.
14032 (inferior): Now a class. Add in-class initialization to all
14033 members. Make boolean fields bool, except 'detaching'.
14034 (inferior::inferior): New explicit ctor.
14035 (inferior::~inferior): New.
14036
14037 2017-04-13 Pedro Alves <palves@redhat.com>
14038
14039 * inferior.c (init_inferior_list): Delete.
14040 * inferior.h (init_inferior_list): Delete.
14041
14042 2017-04-13 Pedro Alves <palves@redhat.com>
14043
14044 PR threads/13217
14045 * gdb.threads/threadapply.exp (thr_apply_detach): New procedure.
14046 (top level): Call it twice, with different thread sets.
14047
14048 2017-04-13 Pedro Alves <palves@redhat.com>
14049
14050 * thread.c: Include <algorithm>.
14051 (thread_array_cleanup): Delete.
14052 (scoped_inc_dec_ref): New class.
14053 (live_threads_count): New function.
14054 (set_thread_refcount): Delete.
14055 (tp_array_compar_ascending): Now a bool.
14056 (tp_array_compar): Convert to a std::sort comparison function.
14057 (thread_apply_all_command): Use std::vector and scoped_inc_dec_ref
14058 and live_threads_count.
14059
14060 2017-04-13 Pedro Alves <palves@redhat.com>
14061
14062 * infrun.c (follow_fork_inferior): Also switch the current
14063 inferior.
14064
14065 2017-04-13 Pedro Alves <palves@redhat.com>
14066
14067 * breakpoint.c (watch_command_1): Save watchpoint-frame info
14068 before calling create_internal_breakpoint.
14069
14070 2017-04-13 Pedro Alves <palves@redhat.com>
14071
14072 * fork-child.c (execv_argv): New class.
14073 (breakup_args): Refactored as ...
14074 (execv_argv::init_for_no_shell): .. this method of execv_argv.
14075 Copy arguments to storage and replace separators with NULL
14076 terminators in place.
14077 (escape_bang_in_quoted_argument): Adjust to return bool.
14078 (execv_argv::execv_argv): New ctor.
14079 (execv_argv::init_for_shell): New method, factored out from
14080 fork_inferior. Don't strdup strings into the vector.
14081 (fork_inferior): Eliminate "shell" local and use execv_argv. Use
14082 Remove free_vector_argv call.
14083
14084 2017-04-13 Yao Qi <yao.qi@linaro.org>
14085
14086 * rx-tdep.c (rx_fpsw_type): Check tdep->rx_fpsw_type instead of
14087 tdep->rx_psw_type.
14088
14089 2017-04-13 Yao Qi <yao.qi@linaro.org>
14090
14091 * rl78-tdep.c (rl78_gdbarch_init): Use XCNEW instead of XNEW.
14092 * rx-tdep.c (rx_gdbarch_init): Likewise.
14093
14094 2017-04-13 Pedro Alves <palves@redhat.com>
14095
14096 * breakpoint.h (struct breakpoint): Reindent.
14097
14098 2017-04-13 Pedro Alves <palves@redhat.com>
14099
14100 * breakpoint.c (bp_location): Rename to ...
14101 (bp_locations): ... this. All references updated.
14102 (bp_location_count): Rename to ...
14103 (bp_locations_count): ... this. All references updated.
14104 (bp_location_placed_address_before_address_max): Rename to ...
14105 (bp_locations_placed_address_before_address_max): ... this. All
14106 references updated.
14107 (bp_location_shadow_len_after_address_max): Rename to ...
14108 (bp_locations_shadow_len_after_address_max): ... this. All
14109 references updated.
14110 (bp_location_compare_addrs): Rename to ...
14111 (bp_locations_compare_addrs): ... this. All references updated.
14112 (bp_location_compare):Rename to ...
14113 (bp_locations_compare): ... this. All references updated.
14114 (bp_location_target_extensions_update): Rename to ...
14115 (bp_locations_target_extensions_update): ... this. All references
14116 updated.
14117
14118 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
14119
14120 * Makefile.in (HFILES_NO_SRCDIR): Add "common/gdb_termios.h".
14121 * common/common.m4: Check headers 'termios.h', 'termio.h' and
14122 'sgtty.h'.
14123 * common/gdb_termios.h: New file, with parts of "terminal.h".
14124 * inflow.c: Include "gdb_termios.h".
14125 * ser-unix.c: Include "gdb_termios.h".
14126 * terminal.h: Move terminal-related defines to
14127 "common/gdb_termios.h".
14128
14129 2017-04-12 Tom Tromey <tom@tromey.com>
14130
14131 * probe.c (parse_probes): Update.
14132 * location.h (delete_event_location): Don't declare.
14133 (event_location_deleter::operator()): Update.
14134 * location.c (event_location_deleter::operator()): Rename from
14135 delete_event_location.
14136 * linespec.h (linespec_result) <location>: Change type to
14137 event_location_up.
14138 * linespec.c (canonicalize_linespec, event_location_to_sals)
14139 (decode_objc): Update.
14140 (linespec_result): Don't call delete_event_location.
14141 * breakpoint.c (create_breakpoints_sal)
14142 (bkpt_probe_create_sals_from_location)
14143 (strace_marker_create_sals_from_location): Update.
14144
14145 2017-04-12 Tom Tromey <tom@tromey.com>
14146
14147 * linespec.h (struct linespec_result): Add constructor and
14148 destructor.
14149 (init_linespec_result, destroy_linespec_result)
14150 (make_cleanup_destroy_linespec_result): Don't declare.
14151 * linespec.c (init_linespec_result): Remove.
14152 (linespec_result::~linespec_result): Rename from
14153 destroy_linespec_result. Update.
14154 (cleanup_linespec_result, make_cleanup_destroy_linespec_result):
14155 Remove.
14156 * breakpoint.c (create_breakpoint, break_range_command)
14157 (decode_location_default): Update.
14158 * ax-gdb.c (agent_command_1): Update.
14159
14160 2017-04-12 Tom Tromey <tom@tromey.com>
14161
14162 * remote.c (remote_download_tracepoint): Update.
14163 * python/py-breakpoint.c (bppy_get_location): Update.
14164 * guile/scm-breakpoint.c (bpscm_print_breakpoint_smob)
14165 (gdbscm_breakpoint_location): Update.
14166 * elfread.c (elf_gnu_ifunc_resolver_return_stop): Update.
14167 * breakpoint.h (struct breakpoint) <location, location_range_end>:
14168 Change type to event_location_up.
14169 * breakpoint.c (create_overlay_event_breakpoint)
14170 (create_longjmp_master_breakpoint)
14171 (create_std_terminate_master_breakpoint)
14172 (create_exception_master_breakpoint)
14173 (breakpoint_event_location_empty_p, print_breakpoint_location)
14174 (print_one_breakpoint_location, create_thread_event_breakpoint)
14175 (init_breakpoint_sal, create_breakpoint)
14176 (print_recreate_ranged_breakpoint, break_range_command)
14177 (init_ada_exception_breakpoint, say_where): Update.
14178 (base_breakpoint_dtor): Don't call delete_event_location.
14179 (bkpt_print_recreate, tracepoint_print_recreate)
14180 (dprintf_print_recreate, update_static_tracepoint)
14181 (breakpoint_re_set_default): Update.
14182
14183 2017-04-12 Tom Tromey <tom@tromey.com>
14184
14185 * compile/compile-loc2c.c (compute_stack_depth_worker): Change
14186 type of "to_do". Update.
14187 (compute_stack_depth): Use std::vector.
14188
14189 2017-04-12 Tom Tromey <tom@tromey.com>
14190
14191 * printcmd.c (find_instruction_backward): Use std::vector.
14192
14193 2017-04-12 Tom Tromey <tom@tromey.com>
14194
14195 * symfile.c (objfilep): Remove typedef.
14196 (reread_symbols): Use a std::vector.
14197
14198 2017-04-12 Tom Tromey <tom@tromey.com>
14199
14200 * mi/mi-main.c (exec_direction_forward): Remove.
14201 (exec_reverse_continue, mi_execute_command): Use scoped_restore.
14202 * guile/scm-ports.c (ioscm_with_output_to_port_worker): Use
14203 scoped_restore.
14204 * guile/guile.c (guile_repl_command, guile_command)
14205 (gdbscm_execute_gdb_command): Use scoped_restore.
14206 * go-exp.y (go_parse): Use scoped_restore.
14207 * d-exp.y (d_parse): Use scoped_restore.
14208 * cli/cli-decode.c (cmd_func): Use scoped_restore.
14209 * c-exp.y (c_parse): Use scoped_restore.
14210
14211 2017-04-12 Tom Tromey <tom@tromey.com>
14212
14213 * mi/mi-parse.h (struct mi_parse): Add constructor, destructor.
14214 (mi_parse): Update return type.
14215 (mi_parse_free): Remove.
14216 * mi/mi-parse.c (mi_parse::mi_parse): New constructor.
14217 (mi_parse::~mi_parse): Rename from mi_parse_free.
14218 (mi_parse_cleanup): Remove.
14219 (mi_parse): Return a unique_ptr. Use new.
14220 * mi/mi-main.c (mi_execute_command): Update.
14221
14222 2017-04-12 Tom Tromey <tom@tromey.com>
14223
14224 * location.c (explicit_location_lex_one): Return a
14225 unique_xmalloc_ptr.
14226 (string_to_explicit_location): Update. Remove cleanups.
14227
14228 2017-04-12 Tom Tromey <tom@tromey.com>
14229
14230 * gnu-v3-abi.c (value_and_voffset_p): Remove typedef.
14231 (compare_value_and_voffset): Change type. Update.
14232 (compute_vtable_size): Change type of "offset_vec".
14233 (gnuv3_print_vtable): Use std::vector. Remove cleanups.
14234 (gnuv3_get_typeid): Remove extraneous declaration.
14235
14236 2017-04-12 Tom Tromey <tom@tromey.com>
14237
14238 * charset.h (wchar_iterator): Fix comment.
14239
14240 2017-04-12 Tom Tromey <tom@tromey.com>
14241
14242 * charset.c (iconv_wrapper): New class.
14243 (cleanup_iconv): Remove.
14244 (convert_between_encodings): Use it.
14245
14246 2017-04-12 Tom Tromey <tom@tromey.com>
14247
14248 * symfile.h (increment_reading_symtab): Update type.
14249 * symfile.c (decrement_reading_symtab): Remove.
14250 (increment_reading_symtab): Return a scoped_restore_tmpl<int>.
14251 * psymtab.c (psymtab_to_symtab): Update.
14252 * dwarf2read.c (dw2_instantiate_symtab): Update.
14253
14254 2017-04-12 Tom Tromey <tom@tromey.com>
14255
14256 * jit.c (struct jit_reader): Declare separately. Add constructor
14257 and destructor. Change type of "handle".
14258 (loaded_jit_reader): Define separately.
14259 (jit_reader_load): Update. New "new".
14260 (jit_reader_unload_command): Use "delete".
14261 * gdb-dlfcn.h (struct dlclose_deleter): New.
14262 (gdb_dlhandle_up): New typedef.
14263 (gdb_dlopen, gdb_dlsym): Update types.
14264 (gdb_dlclose): Remove.
14265 * gdb-dlfcn.c (gdb_dlopen): Return a gdb_dlhandle_up.
14266 (gdb_dlsym): Change type of "handle".
14267 (make_cleanup_dlclose): Remove.
14268 (dlclose_deleter::operator()): Rename from gdb_dlclose.
14269 * compile/compile-c-support.c (load_libcc): Update.
14270
14271 2017-04-12 Tom Tromey <tom@tromey.com>
14272
14273 * symtab.h (find_pcs_for_symtab_line): Change return type.
14274 * symtab.c (find_pcs_for_symtab_line): Change return type.
14275 * python/py-linetable.c (build_line_table_tuple_from_pcs): Change
14276 type of "vec". Update.
14277 (ltpy_get_pcs_for_line): Update.
14278 * linespec.c (decode_digits_ordinary): Update.
14279
14280 2017-04-12 Tom Tromey <tom@tromey.com>
14281
14282 * tracepoint.c (actions_command): Update.
14283 * python/python.c (python_command, python_interactive_command):
14284 Update.
14285 * mi/mi-cmd-break.c (mi_cmd_break_commands): Update.
14286 * guile/guile.c (guile_command): Update.
14287 * defs.h (read_command_lines, read_command_lines_1): Return
14288 command_line_up.
14289 (command_lines_deleter): New struct.
14290 (command_line_up): New typedef.
14291 * compile/compile.c (compile_code_command)
14292 (compile_print_command): Update.
14293 * cli/cli-script.h (get_command_line, copy_command_lines): Return
14294 command_line_up.
14295 (make_cleanup_free_command_lines): Remove.
14296 * cli/cli-script.c (get_command_line, read_command_lines_1)
14297 (copy_command_lines): Return command_line_up.
14298 (while_command, if_command, read_command_lines, define_command)
14299 (document_command): Update.
14300 (do_free_command_lines_cleanup, make_cleanup_free_command_lines):
14301 Remove.
14302 * breakpoint.h (breakpoint_set_commands): Change type of
14303 "commands".
14304 * breakpoint.c (breakpoint_set_commands): Change type of
14305 "commands". Update.
14306 (do_map_commands_command, update_dprintf_command_list)
14307 (create_tracepoint_from_upload): Update.
14308
14309 2017-04-12 Tom Tromey <tom@tromey.com>
14310
14311 * tracepoint.c (scope_info): Update.
14312 * spu-tdep.c (spu_catch_start): Update.
14313 * python/python.c (gdbpy_decode_line): Update.
14314 * python/py-finishbreakpoint.c (bpfinishpy_init): Update.
14315 * python/py-breakpoint.c (bppy_init): Update.
14316 * probe.c (parse_probes): Update.
14317 * mi/mi-cmd-break.c (mi_cmd_break_insert_1): Update.
14318 * location.h (event_location_deleter): New struct.
14319 (event_location_up): New typedef.
14320 (new_linespec_location, new_address_location, new_probe_location)
14321 (new_explicit_location, copy_event_location)
14322 (string_to_event_location, string_to_event_location_basic)
14323 (string_to_explicit_location): Update return type.
14324 (make_cleanup_delete_event_location): Remove.
14325 * location.c (new_linespec_location, new_address_location)
14326 (new_probe_location, new_explicit_location, copy_event_location):
14327 Return event_location_up.
14328 (delete_event_location_cleanup)
14329 (make_cleanup_delete_event_location): Remove.
14330 (string_to_explicit_location, string_to_event_location_basic)
14331 (string_to_event_location): Return event_location_up.
14332 * linespec.c (canonicalize_linespec, event_location_to_sals)
14333 (decode_line_with_current_source)
14334 (decode_line_with_last_displayed, decode_objc): Update.
14335 * guile/scm-breakpoint.c (gdbscm_register_breakpoint_x): Update.
14336 * completer.c (location_completer): Update.
14337 * cli/cli-cmds.c (edit_command, list_command): Update.
14338 * breakpoint.c (create_overlay_event_breakpoint)
14339 (create_longjmp_master_breakpoint)
14340 (create_std_terminate_master_breakpoint)
14341 (create_exception_master_breakpoint)
14342 (create_thread_event_breakpoint): Update.
14343 (init_breakpoint_sal): Update. Remove some dead code.
14344 (create_breakpoint_sal): Change type of "location". Update.
14345 (create_breakpoints_sal, create_breakpoint, break_command_1)
14346 (dprintf_command, break_range_command, until_break_command)
14347 (init_ada_exception_breakpoint)
14348 (strace_marker_create_sals_from_location)
14349 (update_static_tracepoint, trace_command, ftrace_command)
14350 (strace_command, create_tracepoint_from_upload): Update.
14351 * break-catch-throw.c (re_set_exception_catchpoint): Update.
14352 * ax-gdb.c (agent_command_1): Update.
14353
14354 2017-04-12 Pedro Alves <palves@redhat.com>
14355
14356 * Makefile.in (ALL_TARGET_OBS): Add i386-go32-tdep.o.
14357 * configure.tgt: Handle i[34567]86-*-go32* and
14358 i[34567]86-*-msdosdjgpp*.
14359 * i386-tdep.c (i386_svr4_reg_to_regnum):
14360 Make extern.
14361 (i386_go32_init_abi, i386_coff_osabi_sniffer): Moved to
14362 i386-go32-tdep.c.
14363 (_initialize_i386_tdep): DJGPP bits moved to i386-go32-tdep.c.
14364 * i386-go32-tdep.c: New file.
14365 * i386-tdep.h (tdesc_i386_mmx, i386_svr4_reg_to_regnum): New
14366 declarations.
14367
14368 2017-04-12 Simon Marchi <simon.marchi@ericsson.com>
14369
14370 * aix-thread.c (pd_status2str): Change return type to const char *.
14371
14372 2017-04-12 Pedro Alves <palves@redhat.com>
14373
14374 * i386-tdep.c (i386_elf_init_abi, i386_go32_init_abi): Remove
14375 calls to set_gdbarch_gnu_triplet_regexp.
14376
14377 2017-04-12 Pedro Alves <palves@redhat.com>
14378
14379 PR gdb/21323
14380 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_wchar_t>:
14381 New enum value.
14382 (cplus_language_arch_info): Register cplus_primitive_type_wchar_t.
14383 * gdbtypes.h (struct builtin_type) <builtin_wchar>: New field.
14384 * gdbtypes.c (gdbtypes_post_init): Create the "wchar_t" type.
14385 * gdbarch.sh (wchar_bit, wchar_signed): New per-arch values.
14386 * gdbarch.h, gdbarch.c: Regenerate.
14387 * aarch64-tdep.c (aarch64_gdbarch_init): Override
14388 gdbarch_wchar_bit and gdbarch_wchar_signed.
14389 * alpha-tdep.c (alpha_gdbarch_init): Likewise.
14390 * arm-tdep.c (arm_gdbarch_init): Likewise.
14391 * avr-tdep.c (avr_gdbarch_init): Likewise.
14392 * h8300-tdep.c (h8300_gdbarch_init): Likewise.
14393 * i386-nto-tdep.c (i386nto_init_abi): Likewise.
14394 * i386-tdep.c (i386_go32_init_abi): Likewise.
14395 * m32r-tdep.c (m32r_gdbarch_init): Likewise.
14396 * moxie-tdep.c (moxie_gdbarch_init): Likewise.
14397 * nds32-tdep.c (nds32_gdbarch_init): Likewise.
14398 * rs6000-aix-tdep.c (rs6000_aix_init_osabi): Likewise.
14399 * sh-tdep.c (sh_gdbarch_init): Likewise.
14400 * sparc-tdep.c (sparc32_gdbarch_init): Likewise.
14401 * sparc64-tdep.c (sparc64_init_abi): Likewise.
14402 * windows-tdep.c (windows_init_abi): Likewise.
14403 * xstormy16-tdep.c (xstormy16_gdbarch_init): Likewise.
14404
14405 2017-04-12 Pedro Alves <palves@redhat.com>
14406
14407 PR c++/21323
14408 * c-lang.c (cplus_primitive_types) <cplus_primitive_type_char16_t,
14409 cplus_primitive_type_char32_t>: New enum values.
14410 (cplus_language_arch_info): Register cplus_primitive_type_char16_t
14411 and cplus_primitive_type_char32_t.
14412 * dwarf2read.c (read_base_type) <DW_ATE_UTF>: If bit size is 16 or
14413 32, use the archtecture's built-in type for char16_t and char32_t,
14414 respectively. Otherwise, fallback to init_integer_type as before,
14415 but make the type unsigned, and issue a complaint.
14416 * gdbtypes.c (gdbtypes_post_init): Make char16_t and char32_t unsigned.
14417
14418 2017-04-12 Alan Hayward <alan.hayward@arm.com>
14419
14420 * m32r-tdep.c (M32R_ARG_REGISTER_SIZE): Added.
14421 (m32r_push_dummy_call): Use M32R_ARG_REGISTER_SIZE.
14422
14423 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
14424
14425 * windows-nat.c (windows_create_inferior): Declare 'toexec' as
14426 'const char *'.
14427
14428 2017-04-12 Sergio Durigan Junior <sergiodj@redhat.com>
14429
14430 * common/common-utils.c (free_vector_argv): New function.
14431 * common/common-utils.h: Include <vector>.
14432 (free_vector_argv): New prototype.
14433 * darwin-nat.c (darwin_create_inferior): Rewrite function
14434 prototype in order to constify "exec_file" and accept a
14435 "std::string" for "allargs".
14436 * fork-child.c: Include <vector>.
14437 (breakup_args): Rewrite function, using C++.
14438 (fork_inferior): Rewrite function header, constify "exec_file_arg"
14439 and accept "std::string" for "allargs". Update the code to
14440 calculate "argv" based on "allargs". Update calls to "exec_fun"
14441 and "execvp".
14442 * gnu-nat.c (gnu_create_inferior): Rewrite function prototype in
14443 order to constify "exec_file" and accept a "std::string" for
14444 "allargs".
14445 * go32-nat.c (go32_create_inferior): Likewise.
14446 * inf-ptrace.c (inf_ptrace_create_inferior): Likewise.
14447 * infcmd.c (run_command_1): Constify "exec_file". Use
14448 "std::string" for inferior arguments.
14449 * inferior.h (fork_inferior): Update prototype.
14450 * linux-nat.c (linux_nat_create_inferior): Rewrite function
14451 prototype in order to constify "exec_file" and accept a
14452 "std::string" for "allargs".
14453 * nto-procfs.c (procfs_create_inferior): Likewise.
14454 * procfs.c (procfs_create_inferior): Likewise.
14455 * remote-sim.c (gdbsim_create_inferior): Likewise.
14456 * remote.c (extended_remote_run): Update code to accept
14457 "std::string" as argument.
14458 (extended_remote_create_inferior): Rewrite function prototype in
14459 order to constify "exec_file" and accept a "std::string" for
14460 "allargs".
14461 * rs6000-nat.c (super_create_inferior): Likewise.
14462 (rs6000_create_inferior): Likewise.
14463 * target.h (struct target_ops) <to_create_inferior>: Likewise.
14464 * windows-nat.c (windows_create_inferior): Likewise.
14465
14466 2017-04-11 Pedro Alves <palves@redhat.com>
14467
14468 * thread.c: Fix whitespace throughout.
14469
14470 2017-04-11 Philipp Rudo <prudo@linux.vnet.ibm.com>
14471
14472 * linux-nat.c (linux_nat_detach): Remove delete_lwp call.
14473
14474 2017-04-11 Alan Hayward <alan.hayward@arm.com>
14475
14476 * arm-tdep.c (arm_store_return_value): Use FP_REGISTER_SIZE
14477
14478 2017-04-10 Sergio Durigan Junior <sergiodj@redhat.com>
14479
14480 PR gdb/21364
14481 * osdata.c (info_osdata): Check if 'type' is an empty string
14482 instead of NULL.
14483
14484 2017-04-10 Pedro Alves <palves@redhat.com>
14485
14486 * thread.c (add_thread_silent, delete_thread_1, find_thread_ptid)
14487 (ptid_to_global_thread_id, in_thread_list)
14488 (do_captured_list_thread_ids, set_resumed, set_running)
14489 (set_executing, set_stop_requested, finish_thread_state)
14490 (validate_registers_access, can_access_registers_ptid)
14491 (print_thread_info_1, switch_to_thread)
14492 (do_restore_current_thread_cleanup)
14493 (make_cleanup_restore_current_thread, thread_command)
14494 (thread_name_command): Use operator== instead of ptid_equal.
14495
14496 2017-04-10 Pedro Alves <palves@redhat.com>
14497
14498 * thread.c (struct current_thread_cleanup) <next>: Delete field.
14499 (current_thread_cleanup_chain): Delete.
14500 (restore_current_thread_cleanup_dtor)
14501 (make_cleanup_restore_current_thread): Remove references to
14502 current_thread_cleanup_chain.
14503
14504 2017-04-10 Alan Hayward <alan.hayward@arm.com>
14505
14506 * msp430-tdep.c (msp430_pseudo_register_read): Never return
14507 REG_UNKNOWN.
14508
14509 2017-04-10 Yao Qi <yao.qi@linaro.org>
14510
14511 PR gdb/19942
14512 * gdbthread.h (thread_info::deletable): New method.
14513 (thread_info::incref): New method.
14514 (thread_info::decref): New method.
14515 (thread_info::refcount): Move it to private.
14516 * infrun.c (save_stop_context): Call inc_refcount.
14517 (release_stop_context_cleanup): Likewise.
14518 * thread.c (set_thread_exited): New function.
14519 (init_thread_list): Delete "tp" only it is deletable, otherwise
14520 call set_thread_exited.
14521 (delete_thread_1): Call set_thread_exited.
14522 (current_thread_cleanup) <inferior_pid>: Remove.
14523 <thread>: New field.
14524 (restore_current_thread_ptid_changed): Removed.
14525 (do_restore_current_thread_cleanup): Adjust.
14526 (restore_current_thread_cleanup_dtor): Don't call
14527 find_thread_ptid.
14528 (set_thread_refcount): Use dec_refcount.
14529 (make_cleanup_restore_current_thread): Adjust.
14530 (thread_apply_all_command): Call inc_refcount.
14531 (_initialize_thread): Don't call
14532 observer_attach_thread_ptid_changed.
14533
14534 2017-04-10 Yao Qi <yao.qi@linaro.org>
14535
14536 * thread.c (delete_thread_1): Hoist code on marking thread as
14537 exited.
14538
14539 2017-04-09 Simon Marchi <simon.marchi@polymtl.ca>
14540
14541 * windows-nat.c (windows_detach): Initialize ptid with
14542 minus_one_ptid.
14543
14544 2017-04-07 Simon Marchi <simon.marchi@ericsson.com>
14545
14546 * unittests/ptid-selftests.c: Fix erroneous assert messages.
14547
14548 2017-04-07 Alan Hayward <alan.hayward@arm.com>
14549
14550 * bfin-tdep.c (BFIN_MAX_REGISTER_SIZE): Add.
14551 (bfin_pseudo_register_read): Use BFIN_MAX_REGISTER_SIZE.
14552 (bfin_pseudo_register_write): Likewise
14553
14554 2017-04-06 Simon Marchi <simon.marchi@ericsson.com>
14555
14556 * common/ptid.h (struct ptid): Change to...
14557 (class ptid_t): ... this.
14558 <ptid_t>: New constructors.
14559 <pid, lwp_p, lwp, tid_p, tid, is_pid, operator==, operator!=,
14560 matches>: New methods.
14561 <make_null, make_minus_one>: New static methods.
14562 <pid>: Rename to...
14563 <m_pid>: ...this.
14564 <lwp>: Rename to...
14565 <m_lwp>: ...this.
14566 <tid>: Rename to...
14567 <m_tid>: ...this.
14568 (ptid_build, ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal,
14569 ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match): Take ptid arguments
14570 as references, move comment to class ptid_t.
14571 * common/ptid.c (null_ptid, minus_one_ptid): Initialize with
14572 ptid_t static methods.
14573 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_tid,
14574 ptid_equal, ptid_is_pid, ptid_lwp_p, ptid_tid_p, ptid_match):
14575 Take ptid arguments as references, implement using ptid_t methods.
14576 * unittests/ptid-selftests.c: New file.
14577 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
14578 unittests/ptid-selftests.c.
14579 (SUBDIR_UNITTESTS_OBS): Add unittests/ptid-selftests.o.
14580
14581 2017-04-06 Thomas Preud'homme <thomas.preudhomme@arm.com>
14582
14583 * python/python.c (python_run_simple_file): Cast mode literal to
14584 non-const char pointer as expected by PyFile_FromString.
14585
14586 2017-04-05 Simon Marchi <simon.marchi@ericsson.com>
14587
14588 * common/ptid.c (ptid_lwp_p, ptid_tid_p): Remove comparison with
14589 minus_one_ptid and null_ptid.
14590
14591 2017-04-05 Pedro Alves <palves@redhat.com>
14592
14593 * warning.m4 (build_warnings): Remove -Wno-write-strings.
14594 * configure: Regenerate.
14595
14596 2017-04-05 Pedro Alves <palves@redhat.com>
14597
14598 * ada-exp.y (yyerror): Constify.
14599 * ada-lang.c (bound_name, get_selections)
14600 (ada_variant_discrim_type)
14601 (ada_variant_discrim_name, ada_value_struct_elt)
14602 (ada_lookup_struct_elt_type, is_unchecked_variant)
14603 (ada_which_variant_applies, standard_exc, ada_get_next_arg)
14604 (catch_ada_exception_command_split)
14605 (catch_ada_assert_command_split, catch_assert_command)
14606 (ada_op_name): Constify.
14607 * ada-lang.h (ada_yyerror, get_selections)
14608 (ada_variant_discrim_name, ada_value_struct_elt): Constify.
14609 * arc-tdep.c (arc_print_frame_cache): Constify.
14610 * arm-tdep.c (arm_skip_stub): Constify.
14611 * ax-gdb.c (gen_binop, gen_struct_ref_recursive, gen_struct_ref)
14612 (gen_aggregate_elt_ref): Constify.
14613 * bcache.c (print_bcache_statistics): Constify.
14614 * bcache.h (print_bcache_statistics): Constify.
14615 * break-catch-throw.c (catch_exception_command_1):
14616 * breakpoint.c (struct ep_type_description::description):
14617 Constify.
14618 (add_solib_catchpoint): Constify.
14619 (catch_fork_command_1): Add cast.
14620 (add_catch_command): Constify.
14621 * breakpoint.h (add_catch_command, add_solib_catchpoint):
14622 Constify.
14623 * bsd-uthread.c (bsd_uthread_state): Constify.
14624 * buildsym.c (patch_subfile_names): Constify.
14625 * buildsym.h (next_symbol_text_func, patch_subfile_names):
14626 Constify.
14627 * c-exp.y (yyerror): Constify.
14628 (token::oper): Constify.
14629 * c-lang.h (c_yyerror, cp_print_class_member): Constify.
14630 * c-varobj.c (cplus_describe_child): Constify.
14631 * charset.c (find_charset_names): Add cast.
14632 (find_charset_names): Constify array and add const_cast.
14633 * cli/cli-cmds.c (complete_command, cd_command): Constify.
14634 (edit_command): Constify.
14635 * cli/cli-decode.c (lookup_cmd): Constify.
14636 * cli/cli-dump.c (dump_memory_command, dump_value_command):
14637 Constify.
14638 (struct dump_context): Constify.
14639 (add_dump_command, restore_command): Constify.
14640 * cli/cli-script.c (get_command_line): Constify.
14641 * cli/cli-script.h (get_command_line): Constify.
14642 * cli/cli-utils.c (check_for_argument): Constify.
14643 * cli/cli-utils.h (check_for_argument): Constify.
14644 * coff-pe-read.c (struct read_pe_section_data): Constify.
14645 * command.h (lookup_cmd): Constify.
14646 * common/print-utils.c (decimal2str): Constify.
14647 * completer.c (gdb_print_filename): Constify.
14648 * corefile.c (set_gnutarget): Constify.
14649 * cp-name-parser.y (yyerror): Constify.
14650 * cp-valprint.c (cp_print_class_member): Constify.
14651 * cris-tdep.c (cris_register_name, crisv32_register_name):
14652 Constify.
14653 * d-exp.y (yyerror): Constify.
14654 (struct token::oper): Constify.
14655 * d-lang.h (d_yyerror): Constify.
14656 * dbxread.c (struct header_file_location::name): Constify.
14657 (add_old_header_file, add_new_header_file, last_function_name)
14658 (dbx_next_symbol_text, add_bincl_to_list)
14659 (find_corresponding_bincl_psymtab, set_namestring)
14660 (find_stab_function_addr, read_dbx_symtab, start_psymtab)
14661 (dbx_end_psymtab, read_ofile_symtab, process_one_symbol):
14662 * defs.h (command_line_input, print_address_symbolic)
14663 (deprecated_readline_begin_hook): Constify.
14664 * dwarf2read.c (anonymous_struct_prefix, dwarf_bool_name):
14665 Constify.
14666 * event-top.c (handle_line_of_input): Constify and add cast.
14667 * exceptions.c (catch_errors): Constify.
14668 * exceptions.h (catch_errors): Constify.
14669 * expprint.c (print_subexp_standard, op_string, op_name)
14670 (op_name_standard, dump_raw_expression, dump_raw_expression):
14671 * expression.h (op_name, op_string, dump_raw_expression):
14672 Constify.
14673 * f-exp.y (yyerror): Constify.
14674 (struct token::oper): Constify.
14675 (struct f77_boolean_val::name): Constify.
14676 * f-lang.c (f_word_break_characters): Constify.
14677 * f-lang.h (f_yyerror): Constify.
14678 * fork-child.c (fork_inferior): Add cast.
14679 * frv-tdep.c (struct gdbarch_tdep::register_names): Constify.
14680 (new_variant): Constify.
14681 * gdbarch.sh (pstring_ptr, pstring_list): Constify.
14682 * gdbarch.c: Regenerate.
14683 * gdbcore.h (set_gnutarget): Constify.
14684 * go-exp.y (yyerror): Constify.
14685 (token::oper): Constify.
14686 * go-lang.h (go_yyerror): Constify.
14687 * go32-nat.c (go32_sysinfo): Constify.
14688 * guile/scm-breakpoint.c (gdbscm_breakpoint_expression): Constify.
14689 * guile/scm-cmd.c (cmdscm_function): Constify.
14690 * guile/scm-param.c (pascm_param_value): Constify.
14691 * h8300-tdep.c (h8300_register_name, h8300s_register_name)
14692 (h8300sx_register_name): Constify.
14693 * hppa-tdep.c (hppa32_register_name, hppa64_register_name):
14694 Constify.
14695 * ia64-tdep.c (ia64_register_names): Constify.
14696 * infcmd.c (construct_inferior_arguments): Constify.
14697 (path_command, attach_post_wait): Constify.
14698 * language.c (show_range_command, show_case_command)
14699 (unk_lang_error): Constify.
14700 * language.h (language_defn::la_error)
14701 (language_defn::la_name_of_this): Constify.
14702 * linespec.c (decode_line_2): Constify.
14703 * linux-thread-db.c (thread_db_err_str): Constify.
14704 * lm32-tdep.c (lm32_register_name): Constify.
14705 * m2-exp.y (yyerror): Constify.
14706 * m2-lang.h (m2_yyerror): Constify.
14707 * m32r-tdep.c (m32r_register_names): Constify and make static.
14708 * m68hc11-tdep.c (m68hc11_register_names): Constify.
14709 * m88k-tdep.c (m88k_register_name): Constify.
14710 * macroexp.c (appendmem): Constify.
14711 * mdebugread.c (fdr_name, add_data_symbol, parse_type)
14712 (upgrade_type, parse_external, parse_partial_symbols)
14713 (mdebug_next_symbol_text, cross_ref, mylookup_symbol, new_psymtab)
14714 (new_symbol): Constify.
14715 * memattr.c (mem_info_command): Constify.
14716 * mep-tdep.c (register_name_from_keyword): Constify.
14717 * mi/mi-cmd-env.c (mi_cmd_env_path, _initialize_mi_cmd_env):
14718 Constify.
14719 * mi/mi-cmd-stack.c (list_args_or_locals): Constify.
14720 * mi/mi-cmd-var.c (mi_cmd_var_show_attributes): Constify.
14721 * mi/mi-main.c (captured_mi_execute_command): Constify and add
14722 cast.
14723 (mi_execute_async_cli_command): Constify.
14724 * mips-tdep.c (mips_register_name): Constify.
14725 * mn10300-tdep.c (register_name, mn10300_generic_register_name)
14726 (am33_register_name, am33_2_register_name)
14727 * moxie-tdep.c (moxie_register_names): Constify.
14728 * nat/linux-osdata.c (osdata_type): Constify fields.
14729 * nto-tdep.c (nto_parse_redirection): Constify.
14730 * objc-lang.c (lookup_struct_typedef, lookup_objc_class)
14731 (lookup_child_selector): Constify.
14732 (objc_methcall::name): Constify.
14733 * objc-lang.h (lookup_objc_class, lookup_child_selector)
14734 (lookup_struct_typedef): Constify.
14735 * objfiles.c (pc_in_section): Constify.
14736 * objfiles.h (pc_in_section): Constify.
14737 * p-exp.y (struct token::oper): Constify.
14738 (yyerror): Constify.
14739 * p-lang.h (pascal_yyerror): Constify.
14740 * parser-defs.h (op_name_standard): Constify.
14741 (op_print::string): Constify.
14742 (exp_descriptor::op_name): Constify.
14743 * printcmd.c (print_address_symbolic): Constify.
14744 * psymtab.c (print_partial_symbols): Constify.
14745 * python/py-breakpoint.c (stop_func): Constify.
14746 (bppy_get_expression): Constify.
14747 * python/py-cmd.c (cmdpy_completer::name): Constify.
14748 (cmdpy_function): Constify.
14749 * python/py-event.c (evpy_add_attribute)
14750 (gdbpy_initialize_event_generic): Constify.
14751 * python/py-event.h (evpy_add_attribute)
14752 (gdbpy_initialize_event_generic): Constify.
14753 * python/py-evts.c (add_new_registry): Constify.
14754 * python/py-finishbreakpoint.c (outofscope_func): Constify.
14755 * python/py-framefilter.c (get_py_iter_from_func): Constify.
14756 * python/py-inferior.c (get_buffer): Add cast.
14757 * python/py-param.c (parm_constant::name): Constify.
14758 * python/py-unwind.c (fprint_frame_id): Constify.
14759 * python/python.c (gdbpy_parameter_value): Constify.
14760 * remote-fileio.c (remote_fio_func_map): Make 'name' const.
14761 * remote.c (memory_packet_config::name): Constify.
14762 (show_packet_config_cmd, remote_write_bytes)
14763 (remote_buffer_add_string):
14764 * reverse.c (exec_reverse_once): Constify.
14765 * rs6000-tdep.c (variant::name, variant::description): Constify.
14766 * rust-exp.y (rustyyerror): Constify.
14767 * rust-lang.c (rust_op_name): Constify.
14768 * rust-lang.h (rustyyerror): Constify.
14769 * serial.h (serial_ops::name): Constify.
14770 * sh-tdep.c (sh_sh_register_name, sh_sh3_register_name)
14771 (sh_sh3e_register_name, sh_sh2e_register_name)
14772 (sh_sh2a_register_name, sh_sh2a_nofpu_register_name)
14773 (sh_sh_dsp_register_name, sh_sh3_dsp_register_name)
14774 (sh_sh4_register_name, sh_sh4_nofpu_register_name)
14775 (sh_sh4al_dsp_register_name): Constify.
14776 * sh64-tdep.c (sh64_register_name): Constify.
14777 * solib-darwin.c (lookup_symbol_from_bfd): Constify.
14778 * spu-tdep.c (spu_register_name, info_spu_dma_cmdlist): Constify.
14779 * stabsread.c (patch_block_stabs, read_type_number)
14780 (ref_map::stabs, ref_add, process_reference)
14781 (symbol_reference_defined, define_symbol, define_symbol)
14782 (error_type, read_type, read_member_functions, read_cpp_abbrev)
14783 (read_one_struct_field, read_struct_fields, read_baseclasses)
14784 (read_tilde_fields, read_struct_type, read_array_type)
14785 (read_enum_type, read_sun_builtin_type, read_sun_floating_type)
14786 (read_huge_number, read_range_type, read_args, common_block_start)
14787 (find_name_end): Constify.
14788 * stabsread.h (common_block_start, define_symbol)
14789 (process_one_symbol, symbol_reference_defined, ref_add):
14790 * symfile.c (get_section_index, add_symbol_file_command):
14791 * symfile.h (get_section_index): Constify.
14792 * target-descriptions.c (tdesc_type::name): Constify.
14793 (tdesc_free_type): Add cast.
14794 * target.c (find_default_run_target):
14795 (add_deprecated_target_alias, find_default_run_target)
14796 (target_announce_detach): Constify.
14797 (do_option): Constify.
14798 * target.h (add_deprecated_target_alias): Constify.
14799 * thread.c (print_thread_info_1): Constify.
14800 * top.c (deprecated_readline_begin_hook, command_line_input):
14801 Constify.
14802 (init_main): Add casts.
14803 * top.h (handle_line_of_input): Constify.
14804 * tracefile-tfile.c (tfile_write_uploaded_tsv): Constify.
14805 * tracepoint.c (tvariables_info_1, trace_status_mi): Constify.
14806 (tfind_command): Rename to ...
14807 (tfind_command_1): ... this and constify.
14808 (tfind_command): New function.
14809 (tfind_end_command, tfind_start_command): Adjust.
14810 (encode_source_string): Constify.
14811 * tracepoint.h (encode_source_string): Constify.
14812 * tui/tui-data.c (tui_partial_win_by_name): Constify.
14813 * tui/tui-data.h (tui_partial_win_by_name): Constify.
14814 * tui/tui-source.c (tui_set_source_content_nil): Constify.
14815 * tui/tui-source.h (tui_set_source_content_nil): Constify.
14816 * tui/tui-win.c (parse_scrolling_args): Constify.
14817 * tui/tui-windata.c (tui_erase_data_content): Constify.
14818 * tui/tui-windata.h (tui_erase_data_content): Constify.
14819 * tui/tui-winsource.c (tui_erase_source_content): Constify.
14820 * tui/tui.c (tui_enable): Add cast.
14821 * utils.c (defaulted_query): Constify.
14822 (init_page_info): Add cast.
14823 (puts_debug, subset_compare): Constify.
14824 * utils.h (subset_compare): Constify.
14825 * varobj.c (varobj_format_string): Constify.
14826 * varobj.h (varobj_format_string): Constify.
14827 * vax-tdep.c (vax_register_name): Constify.
14828 * windows-nat.c (windows_detach): Constify.
14829 * xcoffread.c (process_linenos, xcoff_next_symbol_text): Constify.
14830 * xml-support.c (gdb_xml_end_element): Constify.
14831 * xml-tdesc.c (tdesc_start_reg): Constify.
14832 * xstormy16-tdep.c (xstormy16_register_name): Constify.
14833 * xtensa-tdep.c (xtensa_find_register_by_name): Constify.
14834 * xtensa-tdep.h (xtensa_register_t::name): Constify.
14835
14836 2017-04-05 Pedro Alves <palves@redhat.com>
14837
14838 * proc-api.c (struct trans): Constify.
14839 (procfs_note): Constify.
14840 * proc-events.c (struct trans, syscall_table):
14841 * proc-flags.c (struct trans): Constify.
14842 * proc-utils.h (procfs_note): Constify.
14843 * proc-why.c (struct trans): Constify.
14844 * procfs.c (dead_procinfo, find_syscall, proc_warn, proc_error)
14845 (procfs_detach): Constify.
14846 * sol-thread.c (struct string_map): Constify.
14847 (td_err_string, td_state_string): Constify.
14848
14849 2017-04-05 Pedro Alves <palves@redhat.com>
14850
14851 * proc-api.c (procfs_filename): Don't initialize
14852 procfs_filename.
14853 (prepare_to_trace): Assume procfs_filename is non-NULL.
14854 (_initialize_proc_api): Give procfs_filename a default value here.
14855
14856 2017-04-05 Pedro Alves <palves@redhat.com>
14857
14858 * break-catch-throw.c (handle_gnu_v3_exceptions): Constify
14859 'cond_string' parameter.
14860 (extract_exception_regexp): Constify 'string' parameter.
14861 (catch_exception_command_1): Constify.
14862 * breakpoint.c (init_catchpoint)
14863 (create_fork_vfork_event_catchpoint): Constify 'cond_string'
14864 parameter.
14865 (ep_parse_optional_if_clause, catch_fork_command_1)
14866 (catch_exec_command_1): Constify.
14867 * breakpoint.h (init_catchpoint): Constify 'cond_string'
14868 parameter.
14869 (ep_parse_optional_if_clause): Constify.
14870 * cli/cli-utils.c (remove_trailing_whitespace)
14871 (check_for_argument): Constify.
14872 * cli/cli-utils.h (remove_trailing_whitespace): Constify and add
14873 non-const overload.
14874 (check_for_argument): Likewise.
14875
14876 2017-04-05 Pedro Alves <palves@redhat.com>
14877
14878 * event-top.c (command_line_handler): Add cast to execute_command
14879 call.
14880 * record-btrace.c (cmd_record_btrace_bts_start)
14881 (cmd_record_btrace_pt_start, cmd_record_btrace_start)
14882 (cmd_record_btrace_start): Add cast to execute_command call.
14883 * record-full.c (record_full_goto_insn):
14884 * record.c (record_start, record_stop): Add cast to
14885 execute_command_to_string calls.
14886 (cmd_record_start): Add cast to execute_command calls.
14887
14888 2017-04-05 Pedro Alves <palves@redhat.com>
14889
14890 * python/python-internal.h (gdb_PyArg_ParseTupleAndKeywords): New
14891 static inline function.
14892 * python/py-arch.c (archpy_disassemble): Constify 'keywords'
14893 array and use gdb_PyArg_ParseTupleAndKeywords.
14894 * python/py-cmd.c (cmdpy_init): Likewise.
14895 * python/py-finishbreakpoint.c (bpfinishpy_init): Likewise.
14896 * python/py-inferior.c (infpy_read_memory, infpy_write_memory)
14897 (infpy_search_memory): Likewise.
14898 * python/py-objfile.c (objfpy_add_separate_debug_file)
14899 (gdbpy_lookup_objfile): Likewise.
14900 * python/py-symbol.c (gdbpy_lookup_symbol)
14901 (gdbpy_lookup_global_symbol): Likewise.
14902 * python/py-type.c (gdbpy_lookup_type): Likewise.
14903 * python/py-value.c (valpy_lazy_string, valpy_string): Likewise.
14904 * python/python.c (execute_gdb_command, gdbpy_write, gdbpy_flush):
14905 Likewise.
14906
14907 2017-04-05 Pedro Alves <palves@redhat.com>
14908
14909 * python/python-internal.h (gdb_PyGetSetDef): New type.
14910 * python/py-block.c (block_object_getset)
14911 (breakpoint_object_getset): Now a gdb_PyGetSetDef array.
14912 * python/py-event.c (event_object_getset)
14913 (finish_breakpoint_object_getset): Likewise.
14914 * python/py-inferior.c (inferior_object_getset): Likewise.
14915 * python/py-infthread.c (thread_object_getset): Likewise.
14916 * python/py-lazy-string.c (lazy_string_object_getset): Likewise.
14917 * python/py-linetable.c (linetable_entry_object_getset): Likewise.
14918 * python/py-objfile.c (objfile_getset): Likewise.
14919 * python/py-progspace.c (pspace_getset): Likewise.
14920 * python/py-record-btrace.c (btpy_insn_getset, btpy_call_getset):
14921 Likewise.
14922 * python/py-record.c (recpy_record_getset): Likewise.
14923 * python/py-symbol.c (symbol_object_getset): Likewise.
14924 * python/py-symtab.c (symtab_object_getset, sal_object_getset):
14925 Likewise.
14926 * python/py-type.c (type_object_getset, field_object_getset):
14927 Likewise.
14928 * python/py-value.c (value_object_getset): Likewise.
14929
14930 2017-04-05 Pedro Alves <palves@redhat.com>
14931
14932 * python/python-internal.h (gdb_PyObject_CallMethod)
14933 (gdb_PyErr_NewException, gdb_PySys_GetObject, gdb_PySys_SetPath):
14934 New functions.
14935 (GDB_PYSYS_SETPATH_CHAR, PyObject_CallMethod, PyErr_NewException)
14936 (PySys_GetObject, PySys_SetPath): New macros.
14937
14938 2017-04-05 Pedro Alves <palves@redhat.com>
14939
14940 * mi/mi-cmd-info.c (mi_cmd_info_os): Call info_osdata instead of
14941 info_osdata_command.
14942 * osdata.c (info_osdata_command): Rename to ...
14943 (info_osdata): ... this. Constify 'type' parameter, and remove
14944 the 'from_tty' parameter. Accept NULL TYPE.
14945 (info_osdata_command): New function.
14946 * osdata.h (info_osdata_command): Remove declaration.
14947 (info_osdata): New declaration.
14948
14949 2017-04-05 Pedro Alves <palves@redhat.com>
14950
14951 * mi/mi-cmd-break.c (mi_cmd_break_insert_1, mi_cmd_break_insert)
14952 (mi_cmd_dprintf_insert, mi_cmd_break_passcount)
14953 (mi_cmd_break_watch, mi_cmd_break_commands): Constify 'command'
14954 parameter.
14955 * mi/mi-cmd-catch.c (mi_cmd_catch_assert, mi_cmd_catch_exception)
14956 (mi_cmd_catch_load, mi_cmd_catch_unload): Constify cmd' parameter.
14957 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Constify 'command'
14958 parameter.
14959 * mi/mi-cmd-env.c (mi_cmd_env_pwd, mi_cmd_env_cd, mi_cmd_env_path)
14960 (mi_cmd_env_dir, mi_cmd_inferior_tty_set, _cmd_inferior_tty_show)
14961 * mi/mi-cmd-file.c (mi_cmd_file_list_exec_source_file)
14962 (mi_cmd_file_list_exec_source_files)
14963 (mi_cmd_file_list_shared_libraries): Constify 'command' parameter.
14964 * mi/mi-cmd-info.c (mi_cmd_info_ada_exceptions)
14965 (mi_cmd_info_gdb_mi_command, mi_cmd_info_os): Constify 'command'
14966 parameter.
14967 * mi/mi-cmd-stack.c (mi_cmd_enable_frame_filters)
14968 (mi_cmd_stack_list_frames, mi_cmd_stack_info_depth)
14969 (mi_cmd_stack_list_locals, mi_cmd_stack_list_args)
14970 (mi_cmd_stack_list_variables, mi_cmd_stack_select_frame)
14971 (mi_cmd_stack_info_frame): Constify 'command' parameter.
14972 * mi/mi-cmd-target.c (mi_cmd_target_file_get)
14973 (mi_cmd_target_file_put, mi_cmd_target_file_delete): Constify
14974 'command' parameter.
14975 * mi/mi-cmd-var.c (mi_cmd_var_create, mi_cmd_var_delete)
14976 (mi_cmd_var_set_format, mi_cmd_var_set_visualizer)
14977 (mi_cmd_var_set_frozen, mi_cmd_var_show_format)
14978 (mi_cmd_var_info_num_children, mi_cmd_var_list_children)
14979 (mi_cmd_var_info_type, mi_cmd_var_info_path_expression)
14980 (mi_cmd_var_info_expression, mi_cmd_var_show_attributes)
14981 (mi_cmd_var_evaluate_expression, mi_cmd_var_assign)
14982 (mi_cmd_var_update, mi_cmd_enable_pretty_printing)
14983 (mi_cmd_var_set_update_range): Constify 'command' parameter.
14984 * mi/mi-cmds.h (mi_cmd_argv_ftype): Constify 'command' parameter.
14985 * mi/mi-interp.c (mi_cmd_interpreter_exec): Constify 'command'
14986 parameter.
14987 * mi/mi-main.c (mi_cmd_gdb_exit, mi_cmd_exec_next)
14988 (mi_cmd_exec_next_instruction, mi_cmd_exec_step)
14989 (mi_cmd_exec_step_instruction, mi_cmd_exec_finish)
14990 (mi_cmd_exec_return ,mi_cmd_exec_jump, mi_cmd_exec_continue)
14991 (mi_cmd_exec_interrupt, mi_cmd_exec_run, mi_cmd_target_detach)
14992 (mi_cmd_target_flash_erase, mi_cmd_thread_select)
14993 (mi_cmd_thread_list_ids, mi_cmd_thread_info)
14994 (mi_cmd_list_thread_groups, mi_cmd_data_list_register_names)
14995 (mi_cmd_data_list_changed_registers)
14996 (mi_cmd_data_write_register_values)
14997 (mi_cmd_data_evaluate_expression, mi_cmd_data_read_memory)
14998 (mi_cmd_data_read_memory_bytes, mi_cmd_data_write_memory)
14999 (mi_cmd_data_write_memory_bytes, mi_cmd_enable_timings)
15000 (mi_cmd_list_features, mi_cmd_list_target_features)
15001 (mi_cmd_add_inferior, mi_cmd_remove_inferior)
15002 (mi_cmd_trace_define_variable, mi_cmd_trace_list_variables)
15003 (mi_cmd_trace_find, mi_cmd_trace_save, mi_cmd_trace_start)
15004 (mi_cmd_trace_status, mi_cmd_trace_stop, mi_cmd_ada_task_info)
15005 (mi_cmd_trace_frame_collected): Constify 'command'
15006 parameter.
15007 * mi/mi-symbol-cmds.c (mi_cmd_symbol_list_lines): Constify
15008 'command' parameter.
15009
15010 2017-04-05 Pedro Alves <palves@redhat.com>
15011
15012 * ada-lang.c (ada_completer_word_break_characters): Now a const
15013 array.
15014 (ada_get_gdb_completer_word_break_characters): Constify.
15015 * completer.c (gdb_completer_command_word_break_characters)
15016 (gdb_completer_file_name_break_characters)
15017 (gdb_completer_quote_characters): Now const arrays.
15018 (get_gdb_completer_quote_characters): Constify.
15019 (set_rl_completer_word_break_characters): New function.
15020 (set_gdb_completion_word_break_characters)
15021 (complete_line_internal): Use it.
15022 * completer.h (get_gdb_completer_quote_characters): Constify.
15023 (set_rl_completer_word_break_characters): Declare.
15024 * f-lang.c (f_word_break_characters): Constify.
15025 * language.c (default_word_break_characters): Constify.
15026 * language.h (language_defn::la_word_break_characters): Constify.
15027 (default_word_break_characters): Constify.
15028 * top.c (init_main): Use set_rl_completer_word_break_characters.
15029
15030 2017-04-05 Pedro Alves <palves@redhat.com>
15031
15032 * aix-thread.c (aix_thread_pid_to_str)
15033 (aix_thread_extra_thread_info): Constify.
15034 * bsd-kvm.c (bsd_kvm_pid_to_str): Constify.
15035 * bsd-uthread.c (bsd_uthread_extra_thread_info)
15036 (bsd_uthread_pid_to_str): Constify.
15037 * corelow.c (core_pid_to_str): Constify.
15038 * darwin-nat.c (darwin_pid_to_str): Constify.
15039 * fbsd-nat.c (fbsd_pid_to_str): Constify.
15040 * fbsd-tdep.c (fbsd_core_pid_to_str, gdbarch_core_pid_to_str):
15041 Constify.
15042 * gnu-nat.c (gnu_pid_to_str): Constify.
15043 * go32-nat.c (go32_pid_to_str): Constify.
15044 * i386-cygwin-tdep.c (i386_windows_core_pid_to_str): Constify.
15045 * inf-ptrace.c (inf_ptrace_pid_to_str): Constify.
15046 * inferior.c (inferior_pid_to_str): Constify.
15047 * linux-nat.c (linux_nat_pid_to_str): Constify.
15048 * linux-tdep.c (linux_core_pid_to_str): Constify.
15049 * linux-thread-db.c (thread_db_pid_to_str)
15050 (thread_db_extra_thread_info): Constify.
15051 * nto-tdep.c (nto_extra_thread_info): Constify.
15052 * nto-tdep.h (nto_extra_thread_info): Constify.
15053 * obsd-nat.c (obsd_pid_to_str): Constify.
15054 * procfs.c (procfs_pid_to_str): Constify.
15055 * ravenscar-thread.c (ravenscar_extra_thread_info)
15056 (ravenscar_pid_to_str): Constify.
15057 * remote-sim.c (gdbsim_pid_to_str): Constify.
15058 * remote.c (remote_threads_extra_info, remote_pid_to_str):
15059 Constify.
15060 * sol-thread.c (solaris_pid_to_str): Constify.
15061 * sol2-tdep.c (sol2_core_pid_to_str): Constify.
15062 * sol2-tdep.h (sol2_core_pid_to_str): Constify.
15063 * target.c (default_pid_to_str, target_pid_to_str)
15064 (normal_pid_to_str, default_pid_to_str): Constify.
15065 * target.h (target_ops::to_pid_to_str)
15066 (target_ops::to_extra_thread_info): Constify.
15067 (target_pid_to_str, normal_pid_to_str): Constify.
15068 * windows-nat.c (windows_pid_to_str): Constify.
15069 * gdbarch.sh (core_pid_to_str): Constify.
15070 * target-delegates.c: Regenerate.
15071 * gdbarch.h, gdbarch.c: Regenerate.
15072
15073 2017-04-05 Pedro Alves <palves@redhat.com>
15074
15075 * main.c (captured_main_1): Use gdb::unique_xmalloc_ptr to manage
15076 the memory of the temporary warning_pre_print override.
15077 * utils.c (warning_pre_print): Constify.
15078 * utils.h (warning_pre_print): Constify.
15079
15080 2017-04-05 Pedro Alves <palves@redhat.com>
15081
15082 * cli/cli-cmds.c (shell_escape): Constify 'arg' parameter.
15083 (shell_command): New function.
15084 (make_command): Use std::string.
15085 (init_cli_cmds): Register shell_command instead of shell_escape.
15086
15087 2017-04-05 Pedro Alves <palves@redhat.com>
15088
15089 * breakpoint.c (dprintf_function, dprintf_channel): Don't initialize.
15090 * tracepoint.c (default_collect): Don't initialize.
15091
15092 2017-04-05 Pedro Alves <palves@redhat.com>
15093
15094 * macroexp.c (macro_buffer::shared): Now a bool.
15095 (init_buffer): Update.
15096 (init_shared_buffer): Constify 'addr' parameter.
15097 (substitute_args, expand, macro_expand, macro_expand_next): Remove
15098 casts.
15099
15100 2017-04-05 Pedro Alves <palves@redhat.com>
15101
15102 * arm-tdep.c (show_disassembly_style_sfunc): Constify local.
15103 * disasm.c (set_disassembler_options): Constify local.
15104 * i386-tdep.c (i386_print_insn): Remove cast and FIXME comment.
15105
15106 2017-04-05 Sergio Durigan Junior <sergiodj@redhat.com>
15107
15108 PR gdb/21352
15109 * tracefile.c (tsave_command): Fix argument parsing for '-r'
15110 option.
15111
15112 2017-04-05 Yao Qi <yao.qi@linaro.org>
15113
15114 * frame.c (frame_unwind_register_unsigned): Call
15115 frame_unwind_register_value.
15116
15117 2017-04-05 Yao Qi <yao.qi@linaro.org>
15118
15119 * gdb.threads/thread-specific-bp.exp (check_thread_specific_breakpoint):
15120 Use gdb_test_multiple, and don't match anchor.
15121
15122 2017-04-05 Pedro Alves <palves@redhat.com>
15123
15124 * MAINTAINERS (Global Maintainers): Add Simon Marchi.
15125 (Write After Approval): Remove Simon Marchi.
15126
15127 2017-04-05 Pedro Alves <palves@redhat.com>
15128
15129 * common/gdb_optional.h (optional::optional): Make constexpr and
15130 initialize m_dummy.
15131
15132 2017-04-04 John Baldwin <jhb@FreeBSD.org>
15133
15134 * amd64-fbsd-tdep.c: Remove "bsd-uthread.h" include.
15135 (amd64fbsd_jmp_buf_reg_offset): Remove.
15136 (amd64fbsd_supply_uthread): Remove function.
15137 (amd64fbsd_collect_uthread): Remove function.
15138 (amd64fbsd_init_abi): Don't set bsd-uthread callbacks.
15139 * configure.tgt (i[34567]86-*-freebsd*): Remove bsd-uthread.o.
15140 (x86_64-*-freebsd*): Remove bsd-uthread.o.
15141 (fbsd-nat.c): Update comment.
15142 * i386-fbsd-tdep.c: Remove "bsd-uthread.h" include.
15143 (i386fbsd_jmp_buf_reg_offset): Remove.
15144 (i386fbsd_supply_uthread): Remove function.
15145 (i386fbsd_collect_uthread): Remove function.
15146 (i386fbsd_init_abi): Don't set bsd-uthread callbacks.
15147
15148 2017-04-04 John Baldwin <jhb@FreeBSD.org>
15149
15150 * Makefile.in (ALL_64_TARGET_OBS): Remove alpha-fbsd-tdep.o.
15151 (ALLDEPFILES): Remove alpha-fbsd-tdep.c
15152 * NEWS: Mention that support for FreeBSD/alpha was removed.
15153 * alpha-fbsd-tdep.c: Delete file.
15154 * config/alpha/fbsd.mh: Delete file.
15155 * configure.host: Delete alpha*-*-freebsd* and
15156 alpha*-*-kfreebsd*-gnu.
15157 * configure.tgt: Delete alpha*-*-freebsd* and
15158 alpha*-*-kfreebsd*-gnu.
15159
15160 2017-04-04 John Baldwin <jhb@FreeBSD.org>
15161
15162 * amd64-bsd-nat.c (amd64bsd_fetch_inferior_registers,
15163 amd64bsd_store_inferior_registers): Use ptid from regcache.
15164
15165 2017-04-04 Pedro Alves <palves@redhat.com>
15166
15167 * dwarf2read.c (lnp_state_machine): Now a class. Initialize all
15168 data fields, make them private and add "m_" prefixes.
15169 (lnp_state_machine::lnp_state_machine): New ctor.
15170 (record_line, check_line_address, handle_set_discriminator)
15171 (handle_set_address, handle_advance_pc, handle_special_opcode)
15172 (handle_advance_line, handle_set_file, handle_negate_stmt)
15173 (handle_const_add_pc, handle_fixed_advance_pc, handle_copy)
15174 (end_sequence, advance_line): New methods.
15175 (m_gdbarch, m_record_lines_p): New fields.
15176 (lnp_reader_state): Delete.
15177 (dwarf_record_line): Rename to ...
15178 (lnp_state_machine::record_line): ... adjust.
15179 (init_lnp_state_machine): Delete.
15180 (lnp_state_machine::lnp_state_machine): New.
15181 (check_line_address): Rename to ...
15182 (lnp_state_machine::check_line_address): This.
15183 (dwarf_decode_lines_1): Remove reference to "reader_state".
15184 Adjust lnp_state_machine having a non-default ctor. Use bool.
15185 State machine internal state manipulation moved to
15186 lnp_state_machine methods.
15187
15188 2017-04-04 Pedro Alves <palves@redhat.com>
15189
15190 * Makefile.in (SUBDIR_UNITTESTS_SRCS): Add
15191 unittests/offset-type-selftests.c.
15192 (SUBDIR_UNITTESTS_OBS): Add offset-type-selftests.o.
15193 * common/offset-type.h: New file.
15194 * common/preprocessor.h: New file.
15195 * common/traits.h: New file.
15196 * common/valid-expr.h: New file.
15197 * dwarf2expr.c: Include "common/underlying.h". Adjust to use
15198 sect_offset and cu_offset strong typedefs throughout.
15199 * dwarf2expr.h: Adjust to use sect_offset and cu_offset strong
15200 typedefs throughout.
15201 * dwarf2loc.c: Include "common/underlying.h". Adjust to use
15202 sect_offset and cu_offset strong typedefs throughout.
15203 * dwarf2read.c: Adjust to use sect_offset and cu_offset strong
15204 typedefs throughout.
15205 * gdbtypes.h: Include "common/offset-type.h".
15206 (cu_offset): Now an offset type (strong typedef) instead of a
15207 struct.
15208 (sect_offset): Likewise.
15209 (union call_site_parameter_u): Rename "param_offset" field to
15210 "param_cu_off".
15211 * unittests/offset-type-selftests.c: New file.
15212
15213 2017-04-04 Pedro Alves <palves@redhat.com>
15214
15215 * common/underlying.h: New file.
15216 * dwarf2read.c: Include "common/gdb_optional.h" and
15217 "common/underlying.h".
15218 (dir_index, file_name_index): New types.
15219 (file_entry): Use them.
15220 (file_entry::include): Use to_underlying.
15221 (line_header::add_file_name): Use dir_index.
15222 (read_formatted_entries): Use gdb::optional. Read form before
15223 writting to file_entry.
15224 (dwarf_decode_line_header): Use dir_index.
15225 (lnp_state_machine::current_file): Use to_underlying.
15226 (lnp_state_machine::file): Change type to file_name_index.
15227 (dwarf_record_line): Use to_underlying.
15228 (init_lnp_state_machine): Use file_name_index.
15229 (dwarf_decode_lines_1): Use dir_index and file_name_index.
15230
15231 2017-04-04 Pedro Alves <palves@redhat.com>
15232
15233 * common/gdb_optional.h (gdb::optiona): Add operator->, operator*,
15234 operator bool, has_value and get methods.
15235
15236 2017-04-04 Pedro Alves <palves@redhat.com>
15237
15238 * dwarf2read.c (struct file_entry): Add ctors, and initialize all
15239 fields.
15240 (line_header): Initialize all data fields. Change type of
15241 standard_opcode_lengths to std::unique_ptr<unsigned char[]>.
15242 Change type of include_dirs to std::vector<const char *>. Remove
15243 num_include_dirs, include_dirs_size. Change type of file_names to
15244 std::vector<file_entry>. Remove num_file_names, file_names_size.
15245 (line_header::line_header): New.
15246 (line_header::add_include_dir, line_header::add_file_name): New
15247 methods.
15248 (line_header::include_dir_at): Remove NULL check.
15249 (line_header::file_name_at): Add const overload.
15250 (line_header_up): New unique_ptr typedef.
15251 (dw2_get_file_names_reader): Use line_header_up. Adjust to use
15252 std::vector. Remove free_line_header call.
15253 (dwarf2_build_include_psymtabs): Use line_header_up. Remove
15254 free_line_header call.
15255 (free_cu_line_header): Delete.
15256 (handle_DW_AT_stmt_list, handle_DW_AT_stmt_list)
15257 (setup_type_unit_groups): Use line_header_up instead of cleanups.
15258 Adjust to use std::vector.
15259 (free_line_header): Delete.
15260 (free_line_header_voidp): Use delete.
15261 (add_include_dir): Replace with ...
15262 (line_header::add_include_dir): ... this method. Use std::vector.
15263 (add_file_name): Replace with ...
15264 (line_header::add_file_name): ... this method. Use std::vector.
15265 (add_include_dir_stub): Delete.
15266 (read_formatted_entries): Remove memset.
15267 (dwarf_decode_line_header): Return a line_header_up instead of a
15268 raw pointer. Remove cleanup handling. Pass lambdas to
15269 read_formatted_entries. Adjust to use line_header methods.
15270 (dwarf_decode_lines_1): Adjust to use line_header methods.
15271 (dwarf_decode_lines, file_file_name, file_full_name): Adjust to
15272 use std::vector.
15273
15274 2017-04-04 Simon Marchi <simon.marchi@polymtl.ca>
15275
15276 * remote.c (set_general_thread, set_continue_thread): Use ptid_t
15277 instead of struct ptid.
15278
15279 2017-05-04 Alan Hayward <alan.hayward@arm.com>
15280
15281 * frame.c (get_frame_register_bytes): Unwind using value.
15282 (put_frame_register_bytes): Likewise.
15283
15284 2017-03-30 Iain Buclaw <ibuclaw@gdcproject.org>
15285
15286 * d-exp.y (type_aggregate_p): Treat TYPE_CODE_MODULE as being
15287 aggregate-like.
15288
15289 2017-03-29 Jan Kratochvil <jan.kratochvil@redhat.com>
15290
15291 * auto-load.c (auto_load_section_scripts): Check SEC_HAS_CONTENTS.
15292
15293 2017-03-29 Yao Qi <yao.qi@linaro.org>
15294
15295 * gdbthread.h (struct thread_info): Declare constructor and
15296 destructor. Add some in-class member initializers.
15297 * thread.c (free_thread): Remove.
15298 (init_thread_list): Call delete instead of free_thread.
15299 (new_thread): Call thread_info constructor.
15300 (thread_info::thread_info): New function.
15301 (thread_info::~thread_info): New function.
15302 (delete_thread_1): Call delete instead of free_thread.
15303 (make_cleanup_restore_current_thread): Move tp and frame to
15304 inner block.
15305
15306 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
15307
15308 * arc-tdep.c (arc_frame_cache): Add support for prologue analysis.
15309 (arc_skip_prologue): Likewise.
15310 (arc_make_frame_cache): Likewise.
15311 (arc_pv_get_operand): New function.
15312 (arc_is_in_prologue): Likewise.
15313 (arc_analyze_prologue): Likewise.
15314 (arc_print_frame_cache): Likewise.
15315 (MAX_PROLOGUE_LENGTH): New constant.
15316
15317 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
15318
15319 * configure.tgt: Add arc-insn.o.
15320 * arc-tdep.c (arc_delayed_print_insn): Make non-static.
15321 (dump_arc_instruction_command): New function.
15322 (arc_fprintf_disasm): Likewise.
15323 (arc_disassemble_info): Likewise.
15324 (arc_insn_get_operand_value): Likewise.
15325 (arc_insn_get_operand_value_signed): Likewise.
15326 (arc_insn_get_memory_base_reg): Likewise.
15327 (arc_insn_get_memory_offset): Likewise.
15328 (arc_insn_get_branch_target): Likewise.
15329 (arc_insn_dump): Likewise.
15330 (arc_insn_get_linear_next_pc): Likewise.
15331 * arc-tdep.h (arc_delayed_print_insn): Add function declaration.
15332 (arc_disassemble_info): Likewise.
15333 (arc_insn_get_branch_target): Likewise.
15334 (arc_insn_get_linear_next_pc): Likewise.
15335 * NEWS: Mention new "maint print arc arc-instruction".
15336
15337 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
15338
15339 * arc-tdep (maintenance_print_arc_list): New variable.
15340 (maintenance_print_arc_command): New function.
15341
15342 2017-03-28 Anton Kolesov <anton.kolesov@synopsys.com>
15343
15344 * arc-tdep.c (core_v2_register_names, core_arcompact_register_names)
15345 Add "limm" and "reserved".
15346 (arc_cannot_fetch_register, arc_cannot_store_register): Add
15347 ARC_RESERVED_REGNUM and ARC_LIMM_REGNUM.
15348 * arc-tdep.h (arc_regnum): Likewise.
15349
15350 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
15351
15352 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
15353 for THREADPTR register.
15354 (supply_gregset_reg): Call regcache_raw_supply for THREADPTR
15355 register.
15356 * xtensa-tdep.c (XTENSA_DBREGN_UREG): New definition.
15357 (xtensa_derive_tdep): Initialize tdep->threadptr_regnum.
15358 * xtensa-tdep.h (gdbarch_tdep::threadptr_regnum): New field.
15359
15360 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
15361
15362 * xtensa-tdep.c (xtensa_pseudo_register_read): Treat all
15363 registers above gdbarch_num_regs (gdbarch) as privileged in
15364 call0 ABI.
15365
15366 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
15367
15368 * xtensa-linux-nat.c (fill_gregset): Call regcache_raw_collect
15369 for a single specified register or for all registers in
15370 a0_base..a0_base + C0_NREGS range.
15371 (supply_gregset_reg): Call regcache_raw_supply for a single
15372 specified register or for all registers in a0_base..a0_base +
15373 C0_NREGS range.
15374
15375 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
15376
15377 * arch/xtensa.h (C0_NREGS): Add definition.
15378 * xtensa-tdep.c (C0_NREGS): Remove definition.
15379
15380 2017-03-27 Max Filippov <jcmvbkbc@gmail.com>
15381
15382 * xtensa-tdep.c (xtensa_scan_prologue, call0_analyze_prologue):
15383 Drop xtensa_default_isa initialization.
15384 (xtensa_gdbarch_init): Initialize xtensa_default_isa.
15385
15386 2017-03-27 Pedro Alves <palves@redhat.com>
15387
15388 * dwarf2read.c (file_entry) <dir_index>: Add comment.
15389 (file_entry::include_dir): New method.
15390 (line_header::include_dir_at, line_header::file_name_at): New
15391 methods.
15392 (setup_type_unit_groups, setup_type_unit_groups)
15393 (psymtab_include_file_name): Simplify using the new methods.
15394 (lnp_state_machine) <the_line_header>: New field.
15395 <file>: Add comment.
15396 (lnp_state_machine::current_file): New method.
15397 (dwarf_record_line): Simplify using the new methods.
15398 (init_lnp_state_machine): Initialize the "the_line_header" field.
15399 (dwarf_decode_lines_1, dwarf_decode_lines, file_file_name):
15400 Simplify using the new methods.
15401
15402 2017-03-27 Pedro Alves <palves@redhat.com>
15403
15404 * cp-name-parser.y (make_empty): Delete.
15405 (demangler_special, nested_name, ptr_operator, array_indicator)
15406 (direct_declarator, declarator_1): Use fill_comp instead of
15407 make_empty.
15408
15409 2017-03-27 Pedro Alves <palves@redhat.com>
15410
15411 * xml-support.h (gdb_xml_debug): Pass a "first-to-check" argument
15412 to ATTRIBUTE_PRINTF.
15413 * solib-target.c (library_list_start_list): Print "string" not
15414 "version".
15415 * xml-tdesc.c (tdesc_start_field): Pass "field_name" to
15416 gdb_xml_error call.
15417
15418 2017-03-27 Pedro Alves <palves@redhat.com>
15419
15420 * dwarf2read.c (struct file_and_directory): New.
15421 (dwarf2_get_dwz_file): Adjust to use std::string.
15422 (dw2_get_file_names_reader): Adjust to use file_and_directory.
15423 (find_file_and_directory): Adjust to return a file_and_directory
15424 object.
15425 (read_file_scope): Adjust to use file_and_directory. Remove
15426 make_cleanup/do_cleanups calls.
15427 (open_and_init_dwp_file): Adjust to use std::string. Remove
15428 make_cleanup/do_cleanups calls.
15429 * python/python.c (do_start_initialization): Adjust to ldirname
15430 returning a std::string.
15431 * utils.c (ldirname): Now returns a std::string.
15432 * utils.h (ldirname): Change return type to std::string.
15433 * xml-syscall.c (xml_init_syscalls_info): Adjust to ldirname
15434 returning a std::string.
15435 * xml-tdesc.c (file_read_description_xml): Likewise.
15436
15437 2017-03-24 Alan Hayward <alan.hayward@arm.com>
15438
15439 * regcache.c (regcache_debug_print_register): New function.
15440 * regcache.h (regcache_debug_print_register): New declaration.
15441 * target.c (debug_print_register): Remove.
15442 (target_fetch_registers): Call regcache_debug_print_register.
15443 (target_store_registers): Likewise.
15444
15445 2017-03-24 Pádraig Brady <pbrady@fb.com>
15446
15447 * dwarf2read.c (setup_type_unit_groups): Ensure dir_index doesn't
15448 reference beyond the 'lh->include_dirs' array before accessing to
15449 it.
15450 (psymtab_include_file_name): Likewise.
15451 (dwarf_decode_lines_1): Likewise.
15452 (dwarf_decode_lines): Likewise.
15453 (file_file_name): Likewise.
15454
15455 2017-03-23 Simon Marchi <simon.marchi@ericsson.com>
15456
15457 * fbsd-tdep.c (fbsd_corefile_thread): Don't set/restore
15458 inferior_ptid.
15459 * proc-service.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
15460 ps_lsetfpregs): Likewise.
15461 * regcache.c (regcache_raw_update, regcache_raw_write): Likewise.
15462 * sol-thread.c (ps_lgetregs, ps_lsetregs, ps_lgetfpregs,
15463 ps_lsetfpregs): Likewise.
15464 * target.c (target_fetch_registers, target_store_registers):
15465 Remove asserts.
15466
15467 2017-03-23 Alan Hayward <alan.hayward@arm.com>
15468
15469 * sol-thread.c (sol_thread_store_registers): Remove regcache calls.
15470
15471 2017-03-23 Yao Qi <yao.qi@linaro.org>
15472
15473 * aarch64-tdep.c (aarch64_process_record_test): Declare.
15474 (_initialize_aarch64_tdep): Register it.
15475 (aarch64_record_load_store): Handle PRFM instruction.
15476 (aarch64_process_record_test): New function.
15477
15478 2017-03-23 Yao Qi <yao.qi@linaro.org>
15479
15480 * aarch64-tdep.c (aarch64_record_load_store): Fix code
15481 indentation.
15482
15483 2017-03-23 Yao Qi <yao.qi@linaro.org>
15484
15485 * aarch64-tdep.c: Remove AARCH64_RECORD_FAILURE.
15486
15487 2017-03-23 Philipp Rudo <prudo@linux.vnet.ibm.com>
15488
15489 python/python.c (do_start_initialization): Fix memory leak.
15490
15491 2017-03-22 Simon Marchi <simon.marchi@polymtl.ca>
15492
15493 * inf-ptrace.c (inf_ptrace_xfer_partial): Get pid from ptid
15494 using get_ptrace_pid.
15495 * linux-nat.c (linux_nat_xfer_partial): Don't set/restore
15496 inferior_ptid.
15497 (linux_proc_xfer_partial, linux_proc_xfer_spu): Use lwp of
15498 inferior_ptid instead of pid.
15499
15500 2017-03-22 Yao Qi <yao.qi@linaro.org>
15501
15502 * aarch64-tdep.c: Wrap locally used classes in anonymous
15503 namespace.
15504 * arm-tdep.c: Likewise.
15505 * linespec.c: Likewise.
15506 * ui-out.c: Likewise.
15507
15508 2017-03-22 Jonah Graham <jonah@kichwacoders.com>
15509
15510 PR gdb/19637
15511 * python/lib/gdb/printer/bound_registers.py: Import sys.
15512
15513 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
15514
15515 * windows-nat.c (do_windows_fetch_inferior_registers): Add
15516 windows_thread_info parameter and use it instead of
15517 current_thread.
15518 (windows_fetch_inferior_registers): Don't set current_thread,
15519 pass the thread to do_windows_fetch_inferior_registers. Use
15520 ptid from regcache instead of inferior_ptid.
15521 (do_windows_store_inferior_registers): Add windows_thread_info
15522 parameter and use it instead of current_thread.
15523 (windows_store_inferior_registers): Don't set current_thread,
15524 pass the thread to do_windows_store_inferior_registers. Use
15525 ptid from regcache instead of inferior_ptid.
15526
15527 2017-03-21 Simon Marchi <simon.marchi@ericsson.com>
15528
15529 * ser-mingw.c (ser_windows_raw): Remove reference to
15530 struct serial::current_timeout.
15531
15532 2017-03-21 Ivo Raisr <ivo.raisr@oracle.com>
15533
15534 PR tdep/20928
15535 * gdb/sparc-tdep.h (gdbarch_tdep) <sparc64_ccr_type>: New field.
15536 * gdb/sparc64-tdep.c (sparc64_ccr_type): New function.
15537 (sparc64_fsr_type): Fix %fsr decoding.
15538
15539 2017-03-21 Tim Wiederhake <tim.wiederhake@intel.com>
15540
15541 * python/py-record-btrace.c (btpy_insn_data): Change return type
15542 for Python 2.
15543
15544 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
15545
15546 * spu-linux-nat.c (spu_fetch_inferior_registers,
15547 spu_store_inferior_registers): Use ptid from regcache, set and
15548 restore inferior_ptid.
15549 * spu-multiarch.c (spu_fetch_registers, spu_store_registers):
15550 Likewise.
15551
15552 2017-03-20 Simon Marchi <simon.marchi@polymtl.ca>
15553
15554 * i386-linux-nat.c (fetch_register, store_register,
15555 i386_linux_fetch_inferior_registers,
15556 i386_linux_store_inferior_registers): Use ptid from regcache.
15557 * ia64-linux-nat.c (ia64_linux_fetch_register,
15558 ia64_linux_store_register): Likewise.
15559 * inf-ptrace.c (inf_ptrace_fetch_register,
15560 inf_ptrace_store_register): Likewise.
15561 * m32r-linux-nat.c (m32r_linux_fetch_inferior_registers,
15562 m32r_linux_store_inferior_registers): Likewise.
15563 * m68k-bsd-nat.c (m68kbsd_fetch_inferior_registers,
15564 m68kbsd_store_inferior_registers): Likewise.
15565 * m68k-linux-nat.c (fetch_register, store_register,
15566 m68k_linux_fetch_inferior_registers,
15567 m68k_linux_store_inferior_registers): Likewise.
15568 * m88k-bsd-nat.c (m88kbsd_fetch_inferior_registers,
15569 m88kbsd_store_inferior_registers): Likewise.
15570 * mips-fbsd-nat.c (mips_fbsd_fetch_inferior_registers,
15571 mips_fbsd_store_inferior_registers): Likewise.
15572 * mips-linux-nat.c (mips64_linux_regsets_fetch_registers,
15573 mips64_linux_regsets_store_registers): Likewise.
15574 * mips-nbsd-nat.c (mipsnbsd_fetch_inferior_registers,
15575 mipsnbsd_store_inferior_registers): Likewise.
15576 * mips-obsd-nat.c (mips64obsd_fetch_inferior_registers,
15577 mips64obsd_store_inferior_registers): Likewise.
15578 * nto-procfs.c (procfs_fetch_registers, procfs_store_registers):
15579 Likewise.
15580 * ppc-fbsd-nat.c (ppcfbsd_fetch_inferior_registers,
15581 ppcfbsd_store_inferior_registers): Likewise.
15582 * ppc-linux-nat.c (ppc_linux_fetch_inferior_registers,
15583 ppc_linux_store_inferior_registers): Likewise.
15584 * ppc-nbsd-nat.c (ppcnbsd_fetch_inferior_registers,
15585 ppcnbsd_store_inferior_registers): Likewise.
15586 * ppc-obsd-nat.c (ppcobsd_fetch_registers,
15587 ppcobsd_store_registers): Likewise.
15588 * procfs.c (procfs_fetch_registers, procfs_store_registers):
15589 Likewise.
15590 * ravenscar-thread.c (ravenscar_fetch_registers,
15591 ravenscar_store_registers, ravenscar_prepare_to_store):
15592 Likewise.
15593 * record-btrace.c (record_btrace_fetch_registers,
15594 record_btrace_store_registers, record_btrace_prepare_to_store):
15595 Likewise.
15596 * remote-sim.c (gdbsim_fetch_register, gdbsim_store_register):
15597 Lookup inferior using ptid from regcache, instead of
15598 current_inferior.
15599 * remote.c (remote_fetch_registers, remote_store_registers): Use
15600 ptid from regcache.
15601 * rs6000-nat.c (fetch_register, store_register): Likewise.
15602 * s390-linux-nat.c (s390_linux_fetch_inferior_registers,
15603 s390_linux_store_inferior_registers): Likewise.
15604 * sh-nbsd-nat.c (shnbsd_fetch_inferior_registers,
15605 shnbsd_store_inferior_registers): Likewise.
15606 * sol-thread.c (sol_thread_fetch_registers,
15607 sol_thread_store_registers): Likewise.
15608 * sparc-nat.c (sparc_fetch_inferior_registers,
15609 sparc_store_inferior_registers): Likewise.
15610 * tilegx-linux-nat.c (fetch_inferior_registers,
15611 store_inferior_registers): Likewise.
15612 * vax-bsd-nat.c (vaxbsd_fetch_inferior_registers,
15613 vaxbsd_store_inferior_registers): Likewise.
15614 * xtensa-linux-nat.c (fetch_gregs, store_gregs, fetch_xtregs,
15615 store_xtregs): Likewise.
15616
15617 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15618
15619 PR gdb/14441
15620 * NEWS: Mention support for rvalue references in GDB and python.
15621 * doc/gdb.texinfo (C Plus Plus Expressions): Mention that GDB
15622 supports both lvalue and rvalue references.
15623
15624 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15625
15626 PR gdb/14441
15627 * gdbtypes.c (rank_one_type): Implement overloading
15628 resolution rules regarding rvalue references.
15629
15630 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15631
15632 PR gdb/14441
15633 * aarch64-tdep.c (aarch64_type_align)
15634 (aarch64_extract_return_value, aarch64_store_return_value): Change
15635 lvalue reference type checks to general reference type checks.
15636 * amd64-tdep.c (amd64_classify): Likewise.
15637 * amd64-windows-tdep.c (amd64_windows_passed_by_integer_register):
15638 Likewise.
15639 * arm-tdep.c (arm_type_align, arm_extract_return_value)
15640 (arm_store_return_value): Likewise.
15641 * ax-gdb.c (gen_fetch, gen_cast): Likewise.
15642 * c-typeprint.c (c_print_type): Likewise.
15643 * c-varobj.c (adjust_value_for_child_access, c_value_of_variable)
15644 (cplus_number_of_children, cplus_describe_child): Likewise.
15645 * compile/compile-c-symbols.c (generate_vla_size): Likewise.
15646 * completer.c (expression_completer): Likewise.
15647 * cp-support.c (make_symbol_overload_list_adl_namespace):
15648 Likewise.
15649 * darwin-nat-info.c (info_mach_region_command): Likewise.
15650 * dwarf2loc.c (entry_data_value_coerce_ref)
15651 (value_of_dwarf_reg_entry): Likewise.
15652 * eval.c (ptrmath_type_p, evaluate_subexp_standard)
15653 (evaluate_subexp_for_address, evaluate_subexp_for_sizeof):
15654 Likewise.
15655 * findvar.c (extract_typed_address, store_typed_address):
15656 Likewise.
15657 * gdbtypes.c (rank_one_type): Likewise.
15658 * hppa-tdep.c (hppa64_integral_or_pointer_p): Likewise.
15659 * infcall.c (value_arg_coerce): Likewise.
15660 * language.c (pointer_type): Likewise.
15661 * m32c-tdep.c (m32c_reg_arg_type, m32c_m16c_address_to_pointer):
15662 Likewise.
15663 * m88k-tdep.c (m88k_integral_or_pointer_p): Likewise.
15664 * mn10300-tdep.c (mn10300_type_align): Likewise.
15665 * msp430-tdep.c (msp430_push_dummy_call): Likewise.
15666 * ppc-sysv-tdep.c (do_ppc_sysv_return_value)
15667 (ppc64_sysv_abi_push_param, ppc64_sysv_abi_return_value):
15668 Likewise.
15669 * printcmd.c (print_formatted, x_command): Likewise.
15670 * python/py-type.c (typy_get_composite, typy_template_argument):
15671 Likewise.
15672 * python/py-value.c (valpy_referenced_value)
15673 (valpy_get_dynamic_type, value_has_field): Likewise.
15674 * s390-linux-tdep.c (s390_function_arg_integer): Likewise.
15675 * sparc-tdep.c (sparc_integral_or_pointer_p): Likewise.
15676 * sparc64-tdep.c (sparc64_integral_or_pointer_p): Likewise.
15677 * spu-tdep.c (spu_scalar_value_p): Likewise.
15678 * symtab.c (lookup_symbol_aux): Likewise.
15679 * typeprint.c (whatis_exp, print_type_scalar): Likewise.
15680 * valarith.c (binop_types_user_defined_p, unop_user_defined_p):
15681 Likewise.
15682 * valops.c (value_cast_pointers, value_cast)
15683 (value_reinterpret_cast, value_dynamic_cast, value_addr, typecmp)
15684 (value_struct_elt, value_struct_elt_bitpos)
15685 (value_find_oload_method_list, find_overload_match)
15686 (value_rtti_indirect_type): Likewise.
15687 * valprint.c (val_print_scalar_type_p, generic_val_print):
15688 Likewise.
15689 * value.c (value_actual_type, value_as_address, unpack_long)
15690 (pack_long, pack_unsigned_long, coerce_ref_if_computed)
15691 (coerce_ref): Likewise.
15692 * varobj.c (varobj_get_value_type): Likewise.
15693
15694 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15695
15696 PR gdb/14441
15697 * doc/python.texi (Types in Python): Add TYPE_CODE_RVALUE_REF to
15698 table of constants.
15699 * python/lib/gdb/command/explore.py: Support exploring values
15700 of rvalue reference types.
15701 * python/lib/gdb/types.py: Implement get_basic_type() for
15702 rvalue reference types.
15703 * python/py-type.c (pyty_codes) <TYPE_CODE_RVALUE_REF>: New
15704 constant.
15705 * python/py-value.c (valpy_getitem): Add an rvalue reference
15706 check.
15707 (valpy_reference_value): Add new parameter "refcode".
15708 (valpy_lvalue_reference_value, valpy_rvalue_reference_value):
15709 New wrappers for valpy_reference_value().
15710 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
15711 (gdbpy_invoke_xmethod): Likewise.
15712
15713 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15714
15715 PR gdb/14441
15716 * dwarf2read.c (process_die, read_type_die_1): Handle the
15717 DW_TAG_rvalue_reference_type DIE.
15718 (read_tag_reference_type): Add new parameter "refcode".
15719
15720 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15721
15722 PR gdb/14441
15723 * c-typeprint.c (c_print_type, c_type_print_varspec_prefix)
15724 (c_type_print_modifier, c_type_print_varspec_suffix)
15725 (c_type_print_base): Support printing rvalue reference types.
15726 * c-valprint.c (c_val_print, c_value_print): Support printing
15727 rvalue reference values.
15728
15729 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15730
15731 PR gdb/14441
15732 * cp-name-parser.y (ptr_operator): Handle the '&&' token in
15733 typename.
15734 * cp-support.c (replace_typedefs): Handle
15735 DEMANGLE_COMPONENT_RVALUE_REFERENCE.
15736 * python/py-type.c (typy_lookup_type): Likewise.
15737
15738 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15739
15740 PR gdb/14441
15741 * c-exp.y (ptr_operator): Handle the '&&' token in the typename.
15742 * parse.c (insert_type): Change assert statement.
15743 (follow_types): Handle rvalue reference types.
15744 * parser-defs.h (enum type_pieces) <tp_rvalue_reference>: New
15745 constant.
15746
15747 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15748
15749 PR gdb/14441
15750 * ada-lang.c (ada_evaluate_subexp): Adhere to the new
15751 value_ref() interface.
15752 * c-valprint.c (c_value_print): Likewise.
15753 * infcall.c (value_arg_coerce): Likewise.
15754 * python/py-value.c (valpy_reference_value): Likewise.
15755 * valops.c (value_cast, value_reinterpret_cast)
15756 (value_dynamic_cast, typecmp): Likewise.
15757 (value_ref): Parameterize by kind of return value reference type.
15758 * value.h (value_ref): Add new parameter "refcode".
15759
15760 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15761
15762 PR gdb/14441
15763 * dwarf2read.c (read_tag_reference_type): Use
15764 lookup_lvalue_reference_type() instead of lookup_reference_type().
15765 * eval.c (evaluate_subexp_standard): Likewise.
15766 * f-exp.y: Likewise.
15767 * gdbtypes.c (make_reference_type, lookup_reference_type):
15768 Generalize with rvalue reference types.
15769 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): New
15770 convenience wrappers for lookup_reference_type().
15771 * gdbtypes.h (make_reference_type, lookup_reference_type): Add a
15772 reference kind parameter.
15773 (lookup_lvalue_reference_type, lookup_rvalue_reference_type): Add
15774 wrappers for lookup_reference_type().
15775 * guile/scm-type.c (gdbscm_type_reference): Use
15776 lookup_lvalue_reference_type() instead of lookup_reference_type().
15777 * guile/scm-value.c (gdbscm_value_dynamic_type): Likewise.
15778 * parse.c (follow_types): Likewise.
15779 * python/py-type.c (typy_reference, typy_lookup_type): Likewise.
15780 * python/py-value.c (valpy_get_dynamic_type, valpy_getitem):
15781 Likewise.
15782 * python/py-xmethods.c (gdbpy_get_xmethod_result_type)
15783 (gdbpy_invoke_xmethod): Likewise.
15784 * stabsread.c: Provide extra argument to make_reference_type()
15785 call.
15786 * valops.c (value_ref, value_rtti_indirect_type): Use
15787 lookup_lvalue_reference_type() instead of lookup_reference_type().
15788
15789 2017-03-20 Artemiy Volkov <artemiyv@acm.org>
15790
15791 PR gdb/14441
15792 * gdbtypes.h (enum type_code) <TYPE_CODE_RVALUE_REF>: New constant.
15793 (TYPE_IS_REFERENCE): New macro.
15794 (struct type): Add rvalue_reference_type field.
15795 (TYPE_RVALUE_REFERENCE_TYPE): New macro.
15796
15797 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
15798
15799 * NEWS: Add an entry about new '-file-list-shared-libraries' command.
15800 * mi/mi-cmd-file.c (mi_cmd_file_list_shared_libraries):
15801 New function definition.
15802 * mi/mi-cmds.c (mi_cmds): Add -file-list-shared-libraries command.
15803 * mi/mi-cmds.h (mi_cmd_file_list_shared_libraries):
15804 New function declaration.
15805 * mi/mi-interp.c (mi_output_solib_attribs): New Function.
15806 * mi/mi-interp.h: New file.
15807 * solib.c (info_sharedlibrary_command): Replace for loop with
15808 ALL_SO_LIBS macro
15809 * solib.h (update_solib_list): New function declaration.
15810 (so_list_head): Move macro.
15811 * solist.h (ALL_SO_LIBS): New macro.
15812
15813 2017-03-20 Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
15814
15815 * infcmd.c (post_create_inferior): Remove unused argument in
15816 call to solib_add.
15817 * remote.c (remote_start_remote): Likewise.
15818 * solib-frv.c (frv_fetch_objfile_link_map): Likewise.
15819 * solib-svr4.c: (svr4_fetch_objfile_link_map): Likewise.
15820 (enable_break): Likewise.
15821 * solib.c (update_solib_list): Remove unused target argument
15822 and its documentation.
15823 (solib_add): Remove unused target argument. Remove unused
15824 argument in call to update_solib_list.
15825 (info_sharedlibrary_command): Remove unused argument in call
15826 to update_solib_list.
15827 (sharedlibrary_command): Remove unused argument in call to
15828 solib_add.
15829 (handle_solib_event): Likewise.
15830 (reload_shared_libraries): Likewise.
15831 * solib.h (solib_add): Remove unused target argument.
15832
15833 2017-03-20 Andreas Arnez <arnez@linux.vnet.ibm.com>
15834
15835 * s390-linux-tdep.c (is_rsi, is_rie): Remove functions.
15836 (s390_displaced_step_fixup): Cover relative branches with the
15837 default fixup handling. This fixes lack of support for some
15838 relative branch instructions.
15839
15840 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15841
15842 * i386-gnu-nat.c (gnu_fetch_registers, gnu_store_registers): Use
15843 ptid from regcache.
15844
15845 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15846
15847 * i386-darwin-nat.c (i386_darwin_fetch_inferior_registers,
15848 i386_darwin_store_inferior_registers): Use ptid from regcache.
15849
15850 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15851
15852 * i386-bsd-nat.c (i386bsd_fetch_inferior_registers,
15853 i386bsd_store_inferior_registers): Use ptid from regcache.
15854
15855 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15856
15857 * hppa-obsd-nat.c (hppaobsd_fetch_registers,
15858 hppaobsd_store_registers): Use ptid from regcache.
15859
15860 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15861
15862 * hppa-nbsd-nat.c (hppanbsd_fetch_registers,
15863 hppanbsd_store_registers): Use ptid from regcache.
15864
15865 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15866
15867 * hppa-linux-nat.c (fetch_register, store_register): Use ptid
15868 from regcache. Use get_ptrace_pid.
15869
15870 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15871
15872 * corelow.c (get_core_register_section): Use ptid from regcache,
15873 update doc.
15874
15875 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15876
15877 * bsd-uthread.c (bsd_uthread_fetch_registers,
15878 bsd_uthread_store_registers): Use ptid from regcache, set and
15879 restore inferior_ptid.
15880
15881 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15882
15883 * arm-nbsd-nat.c (fetch_register, fetch_regs, fetch_fp_register,
15884 fetch_fp_regs, store_register, store_regs, store_fp_register,
15885 store_fp_regs): Use ptid from regcache.
15886
15887 2017-03-17 Simon Marchi <simon.marchi@polymtl.ca>
15888
15889 * arm-linux-nat.c (fetch_fpregs, store_fpregs, fetch_regs,
15890 store_regs, fetch_wmmx_regs, store_wmmx_regs, fetch_vfp_regs,
15891 store_vfp_regs): Use ptid from regcache.
15892
15893 2017-03-17 Pedro Alves <palves@redhat.com>
15894
15895 PR remote/21188
15896 * ser-base.c (ser_base_wait_for): Add comment.
15897 (do_ser_base_readchar): Improve comment based on the ser-unix.c's
15898 version.
15899 * ser-unix.c (hardwire_raw): Remove reference to
15900 scb->current_timeout.
15901 (wait_for, do_hardwire_readchar, hardwire_readchar): Delete.
15902 (hardwire_ops): Install ser_base_readchar instead of
15903 hardwire_readchar.
15904 * serial.h (struct serial) <current_timeout, timeout_remaining>:
15905 Remove fields.
15906
15907 2017-03-17 Jonah Graham <jonah@kichwacoders.com>
15908
15909 PR gdb/19637
15910 * python/lib/gdb/printer/bound_registers.py: Add support for
15911 Python 3.
15912
15913 2017-03-16 Andreas Arnez <arnez@linux.vnet.ibm.com>
15914
15915 * dwarf2loc.c (indirect_synthetic_pointer): Get data type of
15916 pointed-to DIE and pass it to dwarf2_evaluate_loc_desc_full.
15917 (dwarf2_evaluate_loc_desc_full): New parameter subobj_type; rename
15918 byte_offset to subobj_byte_offset. Fix the handling of
15919 DWARF_VALUE_STACK on big-endian targets when coming via an
15920 implicit pointer.
15921 (dwarf2_evaluate_loc_desc): Adjust call to
15922 dwarf2_evaluate_loc_desc_full.
15923 * dwarf2loc.h (dwarf2_fetch_die_type_sect_off): New declaration.
15924 * dwarf2read.c (dwarf2_fetch_die_type_sect_off): New function.
15925
15926 2017-03-16 Yao Qi <yao.qi@linaro.org>
15927
15928 * arm-tdep.c (thumb_record_misc): Decode CBNZ, CBZ, REV16,
15929 and REVSH instructions.
15930
15931 2017-03-16 Yao Qi <yao.qi@linaro.org>
15932
15933 * arm-tdep.c [GDB_SELF_TEST]: include "selftests.h".
15934 (arm_record_test): Declare.
15935 (_initialize_arm_tdep) [GDB_SELF_TEST]: call register_self_test.
15936 (thumb_record_ld_st_reg_offset): Rewrite the opcode matching to
15937 align with the manual.
15938 (thumb_record_misc): Adjust the code order to align with the
15939 manual.
15940 (thumb2_record_decode_insn_handler): Fix instruction matching.
15941 (instruction_reader_thumb): New class.
15942 (arm_record_test): New function.
15943
15944 2017-03-16 Yao Qi <yao.qi@linaro.org>
15945
15946 * arm-tdep.c (abstract_memory_reader): New class.
15947 (instruction_reader): New class.
15948 (extract_arm_insn): Add argument 'reader'. Callers updated.
15949 (decode_insn): Likewise.
15950
15951 2017-03-16 Doug Evans <dje@google.com>
15952
15953 * guile/scm-lazy-string.c (lazy_string_smob): Clarify use of LENGTH
15954 member. Change type of TYPE member to SCM. All uses updated.
15955 (lsscm_make_lazy_string_smob): Add assert.
15956 (lsscm_make_lazy_string): Flag bad length values.
15957 (lsscm_elt_type): New function.
15958 (gdbscm_lazy_string_to_value): Rewrite to use
15959 lsscm_safe_lazy_string_to_value.
15960 (lsscm_safe_lazy_string_to_value): Fix handling of TYPE_CODE_PTR.
15961 * guile/scm-value.c (gdbscm_value_to_lazy_string): Flag bad length
15962 values. Fix TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle typedefs
15963 in incoming type.
15964 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
15965 * guile/scm-type.c (tyscm_scm_to_type): New function.
15966
15967 2017-03-15 Doug Evans <dje@google.com>
15968
15969 PR python/17728, python/18439, python/18779
15970 * python/py-lazy-string.c (lazy_string_object): Clarify use of LENGTH
15971 member. Change type of TYPE member to PyObject *. All uses updated.
15972 (stpy_convert_to_value): Fix handling of TYPE_CODE_PTR.
15973 (gdbpy_create_lazy_string_object): Flag bad length values.
15974 Handle TYPE_CODE_ARRAY with possibly different user-provided length.
15975 Handle typedefs in incoming type.
15976 (stpy_lazy_string_elt_type): New function.
15977 (gdbpy_extract_lazy_string): Call it.
15978 * python/py-value.c (valpy_lazy_string): Flag bad length values.
15979 Fix handling of TYPE_CODE_PTR. Handle TYPE_CODE_ARRAY. Handle
15980 typedefs in incoming type.
15981
15982 2017-03-16 Doug Evans <dje@google.com>
15983
15984 * guile/guile-internal.h (tyscm_scm_to_type): Declare.
15985 * guile/scm-type.c (tyscm_scm_to_type): New function.
15986
15987 2017-03-16 Jiong Wang <jiong.wang@arm.com>
15988
15989 * inf-ptrace.c (inf_ptrace_peek_poke): Change the type to
15990 "ULONGEST" for "skip".
15991
15992 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
15993
15994 PR gdb/21220
15995 * inf-ptrace.c (inf_ptrace_xfer_partial): In "case
15996 TARGET_OBJECT_MEMORY", extract the logic for ptrace peek/poke...
15997 (inf_ptrace_peek_poke): ...here. New function. Now also loop
15998 over ptrace peek/poke until end of buffer or error.
15999
16000 2017-03-14 Simon Marchi <simon.marchi@ericsson.com>
16001
16002 * parse.c (length_of_subexp): Make static.
16003 * parser-defs.h (length_of_subexp): Remove.
16004
16005 2017-03-14 Andreas Arnez <arnez@linux.vnet.ibm.com>
16006
16007 * linux-nat.c (linux_proc_xfer_partial): Handle write operations
16008 as well.
16009
16010 2017-03-14 Pedro Alves <palves@redhat.com>
16011
16012 * cp-name-parser.y (cp_demangled_name_to_comp): Update comment.
16013 (main): Use std::unique_ptr. Remove calls to
16014 cp_demangled_name_parse_free.
16015
16016 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
16017
16018 * alpha-bsd-nat.c (alphabsd_fetch_inferior_registers,
16019 alphabsd_store_inferior_registers): Use regcache->ptid instead
16020 of inferior_ptid.
16021
16022 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
16023
16024 * aix-thread.c (aix_thread_fetch_registers,
16025 aix_thread_store_registers): Use regcache->ptid instead of
16026 inferior_ptid.
16027
16028 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
16029
16030 * aarch64-linux-nat.c (fetch_gregs_from_thread,
16031 store_gregs_to_thread, fetch_fpregs_from_thread,
16032 store_fpregs_to_thread): Use regcache->ptid instead of
16033 inferior_ptid.
16034
16035 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
16036
16037 * amd64-linux-nat.c (amd64_linux_fetch_inferior_registers,
16038 amd64_linux_fetch_inferior_registers): Use regcache->ptid
16039 instead of inferior_ptid.
16040
16041 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
16042
16043 * target.c (target_fetch_registers, target_store_registers): Add
16044 assert.
16045
16046 2017-03-13 Simon Marchi <simon.marchi@polymtl.ca>
16047
16048 * regcache.h (regcache_get_ptid): New function.
16049 * regcache.c (regcache_get_ptid): New function.
16050
16051 2017-03-13 Mark Wielaard <mark@klomp.org>
16052
16053 * cp-name-parser.y (make_empty): Initialize d_printing to zero.
16054
16055 2017-03-10 Keith Seitz <keiths@redhat.com>
16056
16057 PR c++/8218
16058 * c-typeprint.c (cp_type_print_method_args): Skip artificial arguments.
16059
16060 2017-03-08 Pedro Alves <palves@redhat.com>
16061
16062 PR gdb/18360
16063 * infrun.c (start_step_over, do_target_resume, resume)
16064 (restart_threads): Assert we're not resuming a thread that is
16065 meant to be stopped.
16066 (infrun_thread_stop_requested_callback): Delete.
16067 (infrun_thread_stop_requested): If the thread is internally
16068 stopped, queue a pending stop event and clear the thread's
16069 inline-frame state.
16070 (handle_stop_requested): New function.
16071 (handle_syscall_event, handle_inferior_event_1): Use
16072 handle_stop_requested.
16073 (handle_stop_requested): New function.
16074 (handle_signal_stop): Set the thread's stop_signal here instead of
16075 at caller.
16076 (finish_step_over): Clear step over info unconditionally.
16077 (handle_signal_stop): If the user had interrupted the event
16078 thread, consider the stop a random signal.
16079 (handle_signal_stop) <signal arrived while stepping over
16080 breakpoint>: Don't restart threads here.
16081 (stop_waiting): Don't clear step-over info here.
16082
16083 2017-03-08 Pedro Alves <palves@redhat.com>
16084
16085 PR 21206
16086 * common/gdb_unlinker.h (unlinker::unlinker): Attribute nonnull
16087 goes to argument 2, not 1.
16088
16089 2017-03-08 Pedro Alves <palves@redhat.com>
16090
16091 PR cli/21218
16092 * top.c (gdb_readline_wrapper): Avoid passing NULL to
16093 display_gdb_prompt.
16094 (command_line_input): Add comment.
16095
16096 2017-03-08 Pedro Alves <palves@redhat.com>
16097
16098 PR tui/21216
16099 * tui/tui-file.c (tui_file::write): New.
16100 * tui/tui-file.h (tui_file): Override "write".
16101 * tui/tui-io.c (do_tui_putc, update_start_line): New functions,
16102 factored out from ...
16103 (tui_puts): ... here.
16104 (tui_putc): Use them.
16105 (tui_write): New function.
16106 * tui/tui-io.h (tui_write): Declare.
16107
16108 2017-03-07 Sergio Durigan Junior <sergiodj@redhat.com>
16109
16110 * Makefile.in (SFILES): Replace "environ.c" with
16111 "common/environ.c".
16112 (HFILES_NO_SRCDIR): Likewise, for "environ.h".
16113 * environ.c: Include "common-defs.h" instead of "defs.h. Moved
16114 to...
16115 * common/environ.c: ... here.
16116 * environ.h: Moved to...
16117 * common/environ.h: ... here.
16118
16119 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
16120
16121 * gdbarch.sh (pstring_ptr): New static function.
16122 (gdbarch_disassembler_options): Use it.
16123 (gdbarch_verify_disassembler_options): Print valid_disassembler_options,
16124 not valid_disassembler_option->name.
16125 * gdbarch.c: Regenerate.
16126
16127 2017-03-07 Peter Bergner <bergner@vnet.ibm.com>
16128
16129 * config/powerpc/ppc64-linux.mh (MH_CFLAGS): Delete.
16130
16131 2017-03-07 Pedro Alves <palves@redhat.com>
16132
16133 * tui/tui-regs.c (tui_restore_gdbout): Don't delete gdb_stdout.
16134
16135 2017-03-07 Walfred Tedeschi <walfred.tedeschi@intel.com>
16136
16137 * i387-tdep.h (i387_reset_bnd_regs): Add function definition.
16138 * i387-tdep.c (i387_reset_bnd_regs): Add function implementation.
16139 * i386-tdep.c (i386_push_dummy_call): Call i387_reset_bnd_regs.
16140 * amd64-tdep.c (amd64_push_dummy_call): Call i387_reset_bnd_regs.
16141
16142 2017-03-06 Simon Marchi <simon.marchi@ericsson.com>
16143
16144 * xtensa-linux-nat.c (fetch_gregs): Remove const.
16145
16146 2017-03-03 Simon Marchi <simon.marchi@ericsson.com>
16147
16148 * remote.c (remote_add_target_side_commands): Use range-based
16149 for loop.
16150
16151 2017-03-03 Yao Qi <yao.qi@linaro.org>
16152
16153 PR gdb/21165
16154 * ada-valprint.c (ada_val_print_ref): Call value_fetch_lazy if
16155 value is lazy.
16156 * valprint.c (common_val_print): Likewise.
16157
16158 2017-02-28 Peter Bergner <bergner@vnet.ibm.com>
16159
16160 * NEWS: Mention new set/show disassembler-options commands.
16161 * doc/gdb.texinfo: Document new set/show disassembler-options commands.
16162 * disasm.c: Include "arch-utils.h", "gdbcmd.h" and "safe-ctype.h".
16163 (prospective_options): New static variable.
16164 (gdb_disassembler::gdb_disassembler): Initialize
16165 m_di.disassembler_options.
16166 (gdb_buffered_insn_length_init_dis): Initilize di->disassembler_options.
16167 (get_disassembler_options): New function.
16168 (set_disassembler_options): Likewise.
16169 (set_disassembler_options_sfunc): Likewise.
16170 (show_disassembler_options_sfunc): Likewise.
16171 (disassembler_options_completer): Likewise.
16172 (_initialize_disasm): Likewise.
16173 * disasm.h (get_disassembler_options): New prototype.
16174 (set_disassembler_options): Likewise.
16175 * gdbarch.sh (gdbarch_disassembler_options): New variable.
16176 (gdbarch_verify_disassembler_options): Likewise.
16177 * gdbarch.c: Regenerate.
16178 * gdbarch.h: Likewise.
16179 * arm-tdep.c (num_disassembly_options): Delete.
16180 (set_disassembly_style): Likewise.
16181 (arm_disassembler_options): New static variable.
16182 (set_disassembly_style_sfunc): Convert short style name into long
16183 option name. Call set_disassembler_options.
16184 (show_disassembly_style_sfunc): New function.
16185 (arm_gdbarch_init): Call set_gdbarch_disassembler_options and
16186 set_gdbarch_verify_disassembler_options.
16187 (_initialize_arm_tdep): Delete regnames variable and update callers.
16188 (arm_disassembler_options): Initialize.
16189 (disasm_options): New variable.
16190 (num_disassembly_options): Rename from this...
16191 (num_disassembly_styles): ...to this. Compute by scanning through
16192 disasm_options.
16193 (valid_disassembly_styles): Initialize using disasm_options.
16194 Remove calls to parse_arm_disassembler_option, get_arm_regnames and
16195 set_arm_regname_option.
16196 Pass show_disassembly_style_sfunc to the "disassembler" setshow command.
16197 * rs6000-tdep.c (powerpc_disassembler_options): New static variable.
16198 (rs6000_gdbarch_init): Call set_gdbarch_disassembler_options and
16199 set_gdbarch_verify_disassembler_options.
16200 * s390-tdep.c (s390_disassembler_options): New static variable.
16201 (s390_gdbarch_init):all set_gdbarch_disassembler_options and
16202 set_gdbarch_verify_disassembler_options.
16203
16204 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
16205
16206 * remote.c (remote_add_target_side_condition): Remove "struct"
16207 keyword from range-based for loop.
16208
16209 2017-02-27 Simon Marchi <simon.marchi@ericsson.com>
16210
16211 * remote.c (remote_add_target_side_condition): Use range-based
16212 for loop. Update comment.
16213
16214 2017-02-27 Yao Qi <yao.qi@linaro.org>
16215
16216 * f-typeprint.c (f_print_type): Check "varstring" is empty first.
16217
16218 2017-02-26 Alan Hayward <alan.hayward@arm.com>
16219
16220 * regcache.c (regcache_raw_update): New function.
16221 (regcache_raw_read): Move code to regcache_raw_update.
16222 * regcache.h (regcache_raw_update): New declaration.
16223 * remote.c (remote_prepare_to_store): Call regcache_raw_update.
16224
16225 2017-02-26 Jan Kratochvil <jan.kratochvil@redhat.com>
16226
16227 * dwarf2read.c (create_debug_type_hash_table): Initialize
16228 header.signature and header.type_offset_in_tu.
16229
16230 2017-02-24 Pedro Alves <palves@redhat.com>
16231
16232 * symtab.c (make_file_symbol_completion_list_1): Use
16233 add_symtab_completions.
16234
16235 2017-02-24 Alan Hayward <alan.hayward@arm.com>
16236
16237 * stack.c (frame_info): Use frame_unwind_register_value to avoid buf.
16238
16239 2017-02-24 Alan Hayward <alan.hayward@arm.com>
16240
16241 * i386-tdep.c (i386_pseudo_register_read_into_value): Use
16242 I386_MAX_REGISTER_SIZE.
16243 (i386_pseudo_register_write): Likewise.
16244 (i386_process_record): Likewise.
16245 * i387-tdep.c (i387_supply_xsave): Likewise.
16246 * m68k-linux-nat.c (fetch_register): Use M68K_MAX_REGISTER_SIZE.
16247 (store_register): Likewise.
16248
16249 2017-02-23 Pedro Alves <palves@redhat.com>
16250
16251 * ada-lang.c: Include "common/function-view.h".
16252 (ada_iterate_over_symbols): Adjust to use function_view as
16253 callback type.
16254 (struct add_partial_datum, ada_complete_symbol_matcher): Delete.
16255 (ada_make_symbol_completion_list): Use a lambda.
16256 (ada_exc_search_name_matches): Delete.
16257 (name_matches_regex): New.
16258 (ada_add_global_exceptions): Use a lambda and name_matches_regex.
16259 * compile/compile-c-support.c: Include "common/function-view.h".
16260 (print_one_macro): Change prototype to accept a ui_file pointer.
16261 (write_macro_definitions): Use a lambda.
16262 * dwarf2read.c: Include "common/function-view.h".
16263 (dw2_map_expand_apply, dw2_map_symtabs_matching_filename)
16264 (dw2_expand_symtabs_matching): Adjust to use function_view as
16265 callback type.
16266 * language.h: Include "common/function-view.h".
16267 (struct language_defn) <la_iterate_over_symbols>: Adjust to use
16268 function_view as callback type.
16269 (LA_ITERATE_OVER_SYMBOLS): Remove DATA parameter.
16270 * linespec.c: Include "common/function-view.h".
16271 (collect_info::add_symbol): New method.
16272 (struct symbol_and_data_callback, iterate_inline_only, struct
16273 symbol_matcher_data, iterate_name_matcher): Delete.
16274 (iterate_over_all_matching_symtabs): Adjust to use function_view
16275 as callback type and lambdas.
16276 (iterate_over_file_blocks): Adjust to use function_view as
16277 callback type.
16278 (decode_compound_collector): Now a class with private fields.
16279 (decode_compound_collector::release_symbols): New method.
16280 (collect_one_symbol): Rename to...
16281 (decode_compound_collector::operator()): ... this and adjust.
16282 (lookup_prefix_sym): decode_compound_collector construction bits
16283 move to decode_compound_collector ctor. Pass the
16284 decode_compound_collector object directly as callback. Remove
16285 cleanups and use decode_compound_collector::release_symbols
16286 instead.
16287 (symtab_collector): Now a class with private fields.
16288 (symtab_collector::release_symtabs): New method.
16289 (add_symtabs_to_list): Rename to...
16290 (symtab_collector::operator()): ... this and adjust.
16291 (collect_symtabs_from_filename): symtab_collector construction
16292 bits move to symtab_collector ctor. Pass the symtab_collector
16293 object directly as callback. Remove cleanups and use
16294 symtab_collector::release_symtabs instead.
16295 (collect_symbols): Delete.
16296 (add_matching_symbols_to_info): Use lambdas.
16297 * macrocmd.c (print_macro_callback): Delete.
16298 (info_macro_command): Use a lambda.
16299 (info_macros_command): Pass print_macro_definition as callable
16300 directly.
16301 (print_one_macro): Remove 'ignore' parameter.
16302 (macro_list_command): Adjust.
16303 * macrotab.c (macro_for_each_data::fn): Now a function_view.
16304 (macro_for_each_data::user_data): Delete field.
16305 (foreach_macro): Adjust to call the function_view.
16306 (macro_for_each): Adjust to use function_view as callback type.
16307 (foreach_macro_in_scope): Adjust to call the function_view.
16308 (macro_for_each_in_scope): Adjust to use function_view as callback
16309 type.
16310 * macrotab.h: Include "common/function-view.h".
16311 (macro_callback_fn): Declare a prototype instead of a pointer.
16312 Remove "user_data" parameter.
16313 (macro_for_each, macro_for_each_in_scope): Adjust to use
16314 function_view as callback type.
16315 * psymtab.c (partial_map_expand_apply)
16316 (psym_map_symtabs_matching_filename, recursively_search_psymtabs):
16317 Adjust to use function_view as callback type and to return bool.
16318 (psym_expand_symtabs_matching): Adjust to use function_view as
16319 callback types.
16320 * symfile-debug.c (debug_qf_map_symtabs_matching_filename): Adjust
16321 to use function_view as callback type and to return bool.
16322 (debug_qf_expand_symtabs_matching): Adjust to use function_view as
16323 callback types.
16324 * symfile.c (expand_symtabs_matching): Adjust to use function_view
16325 as callback types.
16326 * symfile.h: Include "common/function-view.h".
16327 (expand_symtabs_file_matcher_ftype)
16328 (expand_symtabs_symbol_matcher_ftype)
16329 (expand_symtabs_exp_notify_ftype): Remove "data" parameter and
16330 return bool.
16331 (quick_symbol_functions::map_symtabs_matching_filename)
16332 (quick_symbol_functions::expand_symtabs_matching): Adjust to use
16333 function_view as callback type and return bool.
16334 (expand_symtabs_matching): Adjust to use function_view as callback
16335 type.
16336 (maintenance_expand_name_matcher)
16337 (maintenance_expand_file_matcher): Delete.
16338 (maintenance_expand_symtabs): Use lambdas.
16339 * symtab.c (iterate_over_some_symtabs): Adjust to use
16340 function_view as callback types and return bool.
16341 (iterate_over_symtabs): Likewise. Use unique_xmalloc_ptr instead
16342 of a cleanup.
16343 (lookup_symtab_callback): Delete.
16344 (lookup_symtab): Use a lambda.
16345 (iterate_over_symbols): Adjust to use function_view as callback
16346 type.
16347 (struct search_symbols_data, search_symbols_file_matches)
16348 (search_symbols_name_matches): Delete.
16349 (search_symbols): Use a pair of lambdas.
16350 (struct add_name_data, add_macro_name, symbol_completion_matcher)
16351 (symtab_expansion_callback): Delete.
16352 (default_make_symbol_completion_list_break_on_1): Use lambdas.
16353 * symtab.h: Include "common/function-view.h".
16354 (iterate_over_some_symtabs): Adjust to use function_view as
16355 callback type and return bool.
16356 (iterate_over_symtabs): Adjust to use function_view as callback
16357 type.
16358 (symbol_found_callback_ftype): Remove 'data' parameter and return
16359 bool.
16360 (iterate_over_symbols): Adjust to use function_view as callback
16361 type.
16362
16363 2017-02-23 Pedro Alves <palves@redhat.com>
16364
16365 * Makefile.in (SUBDIR_UNITTESTS_SRCS, SUBDIR_UNITTESTS_OBS): New.
16366 (%.o) <unittests/%.c>: New pattern.
16367 * configure.ac ($development): Add $(SUBDIR_UNITTESTS_OBS) to
16368 CONFIG_OBS, and $(SUBDIR_UNITTESTS_SRCS) to CONFIG_SRCS.
16369 * common/function-view.h: New file.
16370 * unittests/function-view-selftests.c: New file.
16371 * configure: Regenerate.
16372
16373 2017-02-23 Simon Marchi <simon.marchi@ericsson.com>
16374
16375 * bsd-uthread.c (bsd_uthread_thread_alive): Use ptid instead of
16376 inferior_ptid.
16377 * go32-nat.c (go32_thread_alive): Likewise.
16378
16379 2017-02-23 Yao Qi <yao.qi@linaro.org>
16380
16381 * varobj-iter.h (varobj_iter_delete): Call xfree instead of
16382 delete.
16383
16384 2017-02-23 Yao Qi <yao.qi@linaro.org>
16385
16386 * varobj.c (varobj_clear_saved_item): Use delete instead of
16387 xfree.
16388 (update_dynamic_varobj_children): Likewise.
16389
16390 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
16391
16392 * dwarf2read.c (dwarf2_record_block_ranges): Add forgotten BASEADDR.
16393
16394 2017-02-21 Simon Marchi <simon.marchi@ericsson.com>
16395
16396 * common/enum-flags.h (enum_flags::enum_flags): Initialize
16397 m_enum_value to 0 in default constructor.
16398
16399 2017-02-21 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
16400
16401 * rs6000-tdep.c (LOAD_AND_RESERVE_MASK): Rename from LWARX_MASK.
16402 (STORE_CONDITIONAL_MASK): Rename from STWCX_MASK.
16403 (LBARX_INSTRUCTION, LHARX_INSTRUCTION, LQARX_INSTRUCTION,
16404 STBCX_INSTRUCTION, STHCX_INSTRUCTION, STQCX_INSTRUCTION): New defines.
16405 (IS_LOAD_AND_RESERVE_INSN, IS_STORE_CONDITIONAL_INSN): New macros.
16406 (ppc_displaced_step_copy_insn): Use IS_LOAD_AND_RESERVE_INSN.
16407 (ppc_deal_with_atomic_sequence): Use IS_LOAD_AND_RESERVE_INSN and
16408 IS_STORE_CONDITIONAL_INSN.
16409
16410 2017-02-21 Jan Kratochvil <jan.kratochvil@redhat.com>
16411
16412 * dwarf2_rnglists_process: Initialize range_beginning and range_end.
16413
16414 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
16415
16416 * NEWS (Changes since GDB 7.12): Add DWARF-5.
16417
16418 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
16419
16420 * dwarf2read.c (skip_one_die, read_attribute_value)
16421 (dwarf2_const_value_attr, dump_die_shallow)
16422 (dwarf2_get_attr_constant_value, dwarf2_fetch_constant_bytes)
16423 (skip_form_bytes, attr_form_is_constant): Handle DW_FORM_data16.
16424
16425 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
16426
16427 * dwarf2read.c (read_file_scope): Rename DW_MACRO_GNU_*.
16428 (dwarf_parse_macro_header): Accept DWARF version 5.
16429 (dwarf_decode_macro_bytes, dwarf_decode_macros): Rename DW_MACRO_GNU_*.
16430
16431 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
16432
16433 * block.c (call_site_for_pc): Rename DW_OP_GNU_*, DW_TAG_GNU_* and
16434 DW_AT_GNU_*.
16435 * common/common-exceptions.h (enum errors): Likewise.
16436 * dwarf2-frame.c (class dwarf_expr_executor): Likewise.
16437 * dwarf2expr.c (dwarf_block_to_dwarf_reg)
16438 (dwarf_expr_context::execute_stack_op): Likewise.
16439 * dwarf2expr.h (struct dwarf_expr_context, struct dwarf_expr_piece):
16440 Likewise.
16441 * dwarf2loc.c (dwarf_evaluate_loc_desc::get_base_type)
16442 (dwarf_evaluate_loc_desc::push_dwarf_reg_entry_value)
16443 (show_entry_values_debug, call_site_to_target_addr)
16444 (func_addr_to_tail_call_list, func_verify_no_selftailcall)
16445 (dwarf_expr_reg_to_entry_parameter, dwarf_entry_parameter_to_value)
16446 (entry_data_value_free_closure, value_of_dwarf_reg_entry)
16447 (value_of_dwarf_block_entry, indirect_pieced_value)
16448 (symbol_needs_eval_context::push_dwarf_reg_entry_value):
16449 (disassemble_dwarf_expression): Likewise.
16450 * dwarf2read.c (process_die, inherit_abstract_dies)
16451 (read_call_site_scope): Likewise.
16452 * gdbtypes.h (struct func_type, struct call_site_parameter)
16453 (struct call_site): Likewise.
16454 * stack.c (read_frame_arg): Likewise.
16455 * std-operator.def (OP_VAR_ENTRY_VALUE): Likewise.
16456
16457 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
16458
16459 * defs.h (read_unsigned_leb128): New declaration.
16460 * dwarf2loc.c (decode_debug_loclists_addresses): New function.
16461 (decode_debug_loc_dwo_addresses): Update DEBUG_LOC_* to DW_LLE_*.
16462 (dwarf2_find_location_expression): Call also
16463 decode_debug_loclists_addresses. Handle DWARF-5 ULEB128 length.
16464 * dwarf2loc.h (dwarf2_version): New declaration.
16465 * dwarf2read.c (struct dwarf2_per_objfile): Add loclists, line_str,
16466 rnglists.
16467 (dwarf2_elf_names): Add .debug_loclists, .debug_line_str,
16468 .debug_rnglists.
16469 (struct dwop_section_names): Add loclists_dwo.
16470 (dwop_section_names): Add .debug_loclists.dwo.
16471 (struct comp_unit_head): Add unit_type, signature, type_offset_in_tu.
16472 (struct dwarf2_per_cu_data): Add dwarf_version.
16473 (struct dwo_sections): Add loclists.
16474 (struct attr_abbrev): Add implicit_const.
16475 (read_indirect_line_string): New declaration.
16476 (read_unsigned_leb128): Delete declaration.
16477 (rcuh_kind): New definition.
16478 (read_and_check_comp_unit_head): Change parameter
16479 is_debug_types_section to section_kind.
16480 (dwarf2_locate_sections): Handle loclists, line_str and rnglists.
16481 (read_comp_unit_head): Change parameter abfd to section, add parameter
16482 section_kind. Handle DWARF-5.
16483 (error_check_comp_unit_head): Accept also DWARF version 5.
16484 (read_and_check_comp_unit_head): Change parameter
16485 is_debug_types_section to section_kind.
16486 (read_and_check_type_unit_head): Delete function.
16487 (read_abbrev_offset): Handle DWARF-5.
16488 (create_debug_type_hash_table): Add parameter section_kind. Process
16489 only DW_UT_type. Use signature and type_offset_in_tu from struct
16490 comp_unit_head.
16491 (create_debug_types_hash_table): Update create_debug_type_hash_table
16492 caller.
16493 (create_all_type_units): Call create_debug_type_hash_table.
16494 (read_cutu_die_from_dwo, init_cutu_and_read_dies): Change
16495 read_and_check_type_unit_head caller to read_and_check_comp_unit_head
16496 caller.
16497 (skip_one_die): Handle DW_FORM_implicit_const.
16498 (dwarf2_rnglists_process): New function.
16499 (dwarf2_ranges_process): Call dwarf2_rnglists_process for DWARF-5.
16500 (abbrev_table_read_table): Handle DW_FORM_implicit_const.
16501 (read_attribute_value): Handle DW_FORM_implicit_const,
16502 DW_FORM_line_strp.
16503 (read_attribute): Handle DW_FORM_implicit_const.
16504 (read_indirect_string_at_offset_from): New function from
16505 read_indirect_string_at_offset.
16506 (read_indirect_string_at_offset): Call
16507 read_indirect_string_at_offset_from.
16508 (read_indirect_line_string_at_offset): New function.
16509 (read_indirect_string): New function comment.
16510 (read_indirect_line_string): New function.
16511 (read_unsigned_leb128): Make it global.
16512 (dwarf2_string_attr): Handle DWARF-5.
16513 (add_include_dir_stub, read_formatted_entries): New functions.
16514 (dwarf_decode_line_header, dump_die_shallow, cu_debug_loc_section):
16515 Handle DWARF-5.
16516 (per_cu_header_read_in): Update read_comp_unit_head caller.
16517 (dwarf2_version): New function.
16518 * symfile.h (struct dwarf2_debug_sections): Add loclists, line_str and
16519 rnglists.
16520 * xcoffread.c (dwarf2_xcoff_names): Update struct dwarf2_debug_sections
16521 fields.
16522
16523 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
16524
16525 * dwarf2read.c (abbrev_table_read_table): Read the data only once.
16526
16527 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
16528
16529 * dwarf2read.c (dwarf2_ranges_process): New function from
16530 dwarf2_ranges_read.
16531 (dwarf2_ranges_read, dwarf2_record_block_ranges): Use
16532 dwarf2_ranges_process.
16533
16534 2017-02-20 Jan Kratochvil <jan.kratochvil@redhat.com>
16535
16536 * dwarf2read.c (create_debug_type_hash_table): New function from
16537 create_debug_types_hash_table.
16538 (create_debug_types_hash_table): Call create_debug_type_hash_table.
16539 (create_all_type_units, open_and_init_dwo_file): Update
16540 create_debug_types_hash_table callers.
16541
16542 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
16543
16544 PR gdb/16188
16545 * fork-child.c (trace_start_error): Fix thinko. va_end should
16546 refer to 'ap', not 'args'.
16547
16548 2017-02-20 Sergio Durigan Junior <sergiodj@redhat.com>
16549 Pedro Alves <palves@redhat.com>
16550
16551 PR gdb/16188
16552 * darwin-nat.c (darwin_ptrace_me): Check if calls to system
16553 calls succeeded.
16554 * fork-child.c (trace_start_error): New function.
16555 (trace_start_error_with_name): Likewise.
16556 * gnu-nat.c (gnu_ptrace_me): Check if call to PTRACE succeeded.
16557 * inf-ptrace.c (inf_ptrace_me): Likewise.
16558 * inferior.h (trace_start_error): New prototype.
16559 (trace_start_error_with_name): Likewise.
16560
16561 2017-02-15 Sergio Durigan Junior <sergiodj@redhat.com>
16562
16563 PR gdb/21164
16564 * psymtab.c (maintenance_print_psymbols): Verify if 'argv' is not
16565 NULL before using it.
16566 * symmisc.c (maintenance_print_symbols): Likewise.
16567 (maintenance_print_msymbols): Likewise.
16568
16569 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16570
16571 * NEWS: Add record Python bindings entry.
16572
16573 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16574
16575 * Makefile.in (SUBDIR_PYTHON_OBS): Add py-record-btrace.o,
16576 py-record-full.o.
16577 (SUBDIR_PYTHON_SRCS): Add py-record-btrace.c, py-record-full.c.
16578 * python/py-record-btrace.c, python/py-record-btrace.h,
16579 python/py-record-full.c, python/py-record-full.h: New file.
16580 * python/py-record.c: Add include for py-record-btrace.h and
16581 py-record-full.h.
16582 (recpy_method, recpy_format, recpy_goto, recpy_replay_position,
16583 recpy_instruction_history, recpy_function_call_history, recpy_begin,
16584 recpy_end): Use functions from py-record-btrace.c and py-record-full.c.
16585 * python/python-internal.h (PyInt_FromSsize_t, PyInt_AsSsize_t):
16586 New definition.
16587 (gdbpy_initialize_btrace): New export.
16588 * python/python.c (_initialize_python): Add gdbpy_initialize_btrace.
16589
16590 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16591
16592 * Makefile.in (SUBDIR_PYTHON_OBS): Add python/py-record.o.
16593 (SUBDIR_PYTHON_SRCS): Add python/py-record.c.
16594 * python/py-record.c: New file.
16595 * python/python-internal.h (gdbpy_start_recording,
16596 gdbpy_current_recording, gdpy_stop_recording,
16597 gdbpy_initialize_record): New export.
16598 * python/python.c (_initialize_python): Add gdbpy_initialize_record.
16599 (python_GdbMethods): Add gdbpy_start_recording,
16600 gdbpy_current_recording and gdbpy_stop_recording.
16601
16602 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16603
16604 * record-btrace.c (record_btrace_record_method): New function.
16605 (init_record_btrace_ops): Initialize to_record_method.
16606 * record-full.c (record_full_record_method): New function.
16607 (init_record_full_ops, init_record_full_core_ops): Add
16608 record_full_record_method.
16609 * record.h (enum record_method): New enum.
16610 * target-debug.h (target_debug_print_enum_record_method: New define.
16611 * target-delegates.c: Regenerate.
16612 * target.c (target_record_method): New function.
16613 * target.h: Include record.h.
16614 (struct target_ops) <to_record_method>: New field.
16615 (target_record_method): New export.
16616
16617 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16618
16619 * record.h (record_start, record_stop): New export.
16620 * record.c (record_start, record_stop): New function.
16621
16622 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16623
16624 * btrace.c (btrace_fetch): Copy function call segments pointer
16625 into a vector.
16626 (btrace_clear): Clear the vector.
16627 (btrace_find_insn_by_number): Use binary search to find the correct
16628 function call segment.
16629 * btrace.h (brace_fun_p): New typedef.
16630 (struct btrace_thread_info) <functions>: New field.
16631
16632 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16633
16634 * record-btrace.c (btrace_ui_out_decode_error): Move most of it ...
16635 * btrace.c (btrace_decode_error): ... here. New function.
16636 * btrace.h (btrace_decode_error): New export.
16637
16638 2017-02-14 Tim Wiederhake <tim.wiederhake@intel.com>
16639
16640 * btrace.c (ftrace_call_num_insn, btrace_insn_get_error): New function.
16641 (ftrace_new_function, btrace_insn_number, btrace_insn_cmp,
16642 btrace_find_insn_by_number): Remove special case for gaps.
16643 * btrace.h (btrace_insn_get_error): New export.
16644 (btrace_insn_number, btrace_find_insn_by_number): Adjust comment.
16645 * record-btrace.c (btrace_insn_history): Print number for gaps.
16646 (record_btrace_info, record_btrace_goto): Handle gaps.
16647
16648 2017-02-14 Tom Tromey <tom@tromey.com>
16649
16650 PR python/13598:
16651 * python/python.c (gdbpy_before_prompt_hook): Emit before_prompt
16652 event.
16653 * python/py-evts.c (gdbpy_initialize_py_events): Add
16654 before_prompt registry.
16655 * python/py-events.h (events_object) <before_prompt>: New field.
16656
16657 2017-02-14 Markus Metzger <markus.t.metzger@intel.com>
16658
16659 * btrace.c (ftrace_new_switch): Preserve up link and flags.
16660
16661 2017-02-13 Luis Machado <lgustavo@codesourcery.com>
16662
16663 * symfile (_initialize_symfile): Add usage text to the load command's
16664 help text.
16665
16666 2017-02-10 Simon Marchi <simon.marchi@ericsson.com>
16667
16668 * utils.c (defaulted_query): Don't query on secondary UIs.
16669
16670 2017-02-10 Tom Tromey <tom@tromey.com>
16671
16672 * rust-lang.c (rust_get_disr_info): Remove unused variable.
16673
16674 2017-02-10 Tom Tromey <tom@tromey.com>
16675
16676 * python/py-value.c (valpy_richcompare_throw): Remove unnecessary
16677 "cleanup" local.
16678 * python/py-type.c (typy_legacy_template_argument): Remove
16679 unnecessary "cleanup" local.
16680
16681 2017-02-10 Tom Tromey <tom@tromey.com>
16682
16683 * python/python.c (do_start_initialization): New function, from
16684 _initialize_python.
16685 (_initialize_python): Call do_start_initialization.
16686 * python/py-linetable.c (ltpy_iternext): Use explicit returns, not
16687 goto.
16688
16689 2017-02-10 Tom Tromey <tom@tromey.com>
16690
16691 * python/py-prettyprint.c (pretty_print_one_value): Use
16692 gdbpy_ref.
16693
16694 2017-02-10 Tom Tromey <tom@tromey.com>
16695
16696 * python/py-cmd.c (cmdpy_destroyer): Use gdbpy_ref.
16697 * python/py-breakpoint.c (gdbpy_breakpoint_deleted): Use
16698 gdbpy_ref.
16699 * python/py-type.c (field_new): Use gdbpy_ref.
16700 * python/py-symtab.c (symtab_and_line_to_sal_object): Use
16701 gdbpy_ref.
16702 * python/py-progspace.c (pspy_new): Use gdbpy_ref.
16703 (py_free_pspace): Likewise.
16704 (pspace_to_pspace_object): Likewise.
16705 * python/py-objfile.c (objfpy_new): Use gdbpy_ref.
16706 (py_free_objfile): Likewise.
16707 (objfile_to_objfile_object): Likewise.
16708 * python/py-inferior.c (delete_thread_object): Use
16709 gdbpy_ref.
16710 (infpy_read_memory): Likewise.
16711 (py_free_inferior): Likewise.
16712 * python/py-evtregistry.c (create_eventregistry_object): Use
16713 gdbpy_ref.
16714 * python/py-event.c (create_event_object): Use gdbpy_ref.
16715
16716 2017-02-10 Tom Tromey <tom@tromey.com>
16717
16718 * python/py-ref.h (gdbpy_ref_policy): Now a template.
16719 (gdbpy_ref): Now a template; allow subclasses of PyObject to be
16720 used.
16721 * python/py-arch.c, python/py-bpevent.c, python/py-breakpoint.c,
16722 python/py-cmd.c, python/py-continueevent.c, python/py-event.c,
16723 python/py-exitedevent.c, python/py-finishbreakpoint.c,
16724 python/py-framefilter.c, python/py-function.c,
16725 python/py-inferior.c, python/py-infevents.c,
16726 python/py-linetable.c, python/py-newobjfileevent.c,
16727 python/py-param.c, python/py-prettyprint.c, python/py-ref.h,
16728 python/py-signalevent.c, python/py-stopevent.c,
16729 python/py-symbol.c, python/py-threadevent.c, python/py-type.c,
16730 python/py-unwind.c, python/py-utils.c, python/py-value.c,
16731 python/py-varobj.c, python/py-xmethods.c, python/python.c,
16732 varobj.c: Change gdbpy_ref to gdbpy_ref<>.
16733
16734 2017-02-10 Tom Tromey <tom@tromey.com>
16735
16736 * ui-out.h (ui_out_emit_type): New class.
16737 (ui_out_emit_tuple, ui_out_emit_list): New typedefs.
16738 * python/py-framefilter.c (py_print_single_arg): Use gdb::optional
16739 and ui_out_emit_tuple.
16740 (enumerate_locals): Likewise.
16741 (py_mi_print_variables, py_print_locals, py_print_args): Use
16742 ui_out_emit_list.
16743 (py_print_frame): Use gdb::optional, ui_out_emit_tuple,
16744 ui_out_emit_list.
16745 * common/gdb_optional.h: New file.
16746
16747 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
16748
16749 * MAINTAINERS (Write After Approval): Update my e-mail address.
16750
16751 2017-02-10 Martin Galvan <martingalvan@sourceware.org>
16752
16753 PR gdb/21122
16754 * breakpoint.c (_initialize_breakpoint): Update the help description
16755 of the 'commands' command to indicate that it takes a list argument.
16756
16757 2017-02-09 Simon Marchi <simon.marchi@ericsson.com>
16758
16759 * interps.c (current_interp_set_logging): Remove "return".
16760
16761 2017-02-09 Gary Benson <gbenson@redhat.com>
16762
16763 * symtab.c (add_symtab_completions): Prevent NULL pointer
16764 dereference.
16765
16766 2017-02-08 Pedro Alves <palves@redhat.com>
16767
16768 * interps.c (interp::interp): Remove reference to quiet_p.
16769 (interp_set): Make static. Remove dead "Switching to" output
16770 code.
16771 (interp_quiet_p, interp_set_quiet): Delete.
16772 (interpreter_exec_cmd): Don't set the interpreter quiet.
16773 * interps.h (interp_quiet_p): Make static.
16774 (class interp) <quiet_p>: Remove field
16775
16776 2017-02-08 Jerome Guitton <guitton@adacore.com>
16777
16778 * cli/cli-decode.c (find_command_name_length): Make it extern.
16779 * cli/cli-decode.h (find_command_name_length): Declare.
16780 * cli/cli-script.c (command_name_equals, line_first_arg):
16781 New functions.
16782 (process_next_line): Use cli-decode to parse command names.
16783 (build_command_line): Make args a constant pointer.
16784
16785 2017-02-08 Jerome Guitton <guitton@adacore.com>
16786
16787 * cli-decode.c (lookup_cmd_1, lookup_cmd_composition):
16788 Remove case-insensitive search.
16789
16790 2017-02-07 Jose E. Marchesi <jose.marchesi@oracle.com>
16791
16792 * sparc-tdep.c (sparc32_gdbarch_init): Do not place a + operator
16793 at the end of the line. Avoids an ARI warning.
16794
16795 2017-02-06 Luis Machado <lgustavo@codesourcery.com>
16796
16797 * NEWS: Mention support for record/replay of Intel 64 rdrand and
16798 rdseed instructions.
16799 i386-tdep.c (i386_process_record): Handle Intel 64 rdrand and rseed.
16800
16801 2017-02-06 Ivo Raisr <ivo.raisr@oracle.com>
16802
16803 PR tdep/20936
16804 Provide and use sparc32 and sparc64 target description XML files.
16805 * features/sparc/sparc32-cp0.xml, features/sparc/sparc32-cpu.xml,
16806 features/sparc/sparc32-fpu.xml: New files for sparc 32-bit.
16807 * features/sparc/sparc64-cp0.xml, features/sparc/sparc64-cpu.xml,
16808 features/sparc/sparc64-fpu.xml: New files for sparc 64-bit.
16809 * features/sparc/sparc32-solaris.xml: New file.
16810 * features/sparc/sparc64-solaris.xml: New file.
16811 * features/sparc/sparc32-solaris.c: Generated.
16812 * features/sparc/sparc64-solaris.c: Generated.
16813 * sparc-tdep.h: Account for differences in target descriptions.
16814 * sparc-tdep.c (sparc32_register_name): Use target provided registers.
16815 (sparc32_register_type): Use target provided registers.
16816 (validate_tdesc_registers): New function.
16817 (sparc32_gdbarch_init): Use tdesc_has_registers.
16818 Set pseudoregister functions.
16819 * sparc64-tdep.c (sparc64_register_name): Use target provided registers.
16820 (sparc64_register_type): Use target provided registers.
16821 (sparc64_init_abi): Set pseudoregister functions.
16822
16823 2017-02-03 Tom Tromey <tom@tromey.com>
16824
16825 PR rust/21097:
16826 * rust-lang.c (rust_print_type) <TYPE_CODE_UNION>: Handle enums
16827 with a single member.
16828
16829 2017-02-03 Pedro Alves <palves@redhat.com>
16830
16831 * cli/cli-interp.c (cli_interp_base::cli_interp_base)
16832 (cli_interp_base::~cli_interp_base): New.
16833 (cli_interp): New struct.
16834 (as_cli_interp): Cast the interp itself to cli_interp.
16835 (cli_interpreter_pre_command_loop): Rename to ...
16836 (cli_interp_base::pre_command_loop): ... this. Remove 'self'
16837 parameter.
16838 (cli_interpreter_init): Rename to ...
16839 (cli_interp::init): ... this. Remove 'self' parameter. Use
16840 boolean. Make extern.
16841 (cli_interpreter_resume): Rename to ...
16842 (cli_interp::resume): ... this. Remove 'data' parameter. Make
16843 extern.
16844 (cli_interpreter_suspend): Rename to ...
16845 (cli_interp::suspend): ... this. Remove 'data' parameter. Make
16846 extern.
16847 (cli_interpreter_exec): Rename to ...
16848 (cli_interp::exec): ... this. Remove 'data' parameter. Make
16849 extern.
16850 (cli_interpreter_supports_command_editing): Rename to ...
16851 (cli_interp_base::supports_command_editing): ... this. Remove
16852 'interp' parameter. Make extern.
16853 (cli_ui_out): Rename to ...
16854 (cli_interp::interp_ui_out): ... this. Remove 'interp' parameter.
16855 Make extern.
16856 (cli_set_logging): Rename to ...
16857 (cli_interp_base::set_logging): ... this. Remove 'interp'
16858 parameter. Make extern.
16859 (cli_interp_procs): Delete.
16860 (cli_interp_factory): Adjust to use "new".
16861 * cli/cli-interp.h: Include "interps.h".
16862 (struct cli_interp_base): New struct.
16863 * interps.c (struct interp): Delete. Fields moved to interps.h.
16864 (interp_new): Delete.
16865 (interp::interp, interp::~interp): New.
16866 (interp_set): Use bool, and return void. Assume the interpreter
16867 has suspend, init and resume methods, and that the all return
16868 void.
16869 (set_top_level_interpreter): interp_set returns void.
16870 (interp_ui_out): Adapt.
16871 (current_interp_set_logging): Adapt.
16872 (interp_data): Delete.
16873 (interp_pre_command_loop, interp_supports_command_editing): Adapt.
16874 (interp_exec): Adapt.
16875 (top_level_interpreter_data): Delete.
16876 * interps.h (interp_init_ftype, interp_resume_ftype)
16877 (interp_suspend_ftype, interp_exec_ftype)
16878 (interp_pre_command_loop_ftype, interp_ui_out_ftype): Delete.
16879 (class interp): New.
16880 (interp_new): Delete.
16881 (interp_set): Now returns void. Use bool.
16882 (interp_data, top_level_interpreter_data): Delete.
16883 * mi/mi-common.h: Include interps.h.
16884 (class mi_interp): Inherit from interp. Define a ctor. Declare
16885 init, resume, suspect, exec, interp_ui_out, set_logging and
16886 pre_command_loop methods.
16887 * mi/mi-interp.c (as_mi_interp): Cast the interp itself.
16888 (mi_interpreter_init): Rename to ...
16889 (mi_interp::init): ... this. Remove the 'interp' parameter, use
16890 bool, return void and make extern. Adjust.
16891 (mi_interpreter_resume): ... Rename to ...
16892 (mi_interp::resume): ... this. Remove the 'data' parameter,
16893 return void and make extern. Adjust.
16894 (mi_interpreter_suspend): ... Rename to ...
16895 (mi_interp::suspend): ... this. Remove the 'data' parameter,
16896 return void and make extern. Adjust.
16897 (mi_interpreter_exec): ... Rename to ...
16898 (mi_interp::exec): ... this. Remove the 'data' parameter and make
16899 extern. Adjust.
16900 (mi_interpreter_pre_command_loop): ... Rename to ...
16901 (mi_interp::pre_command_loop): ... this. Remove the 'self'
16902 parameter and make extern.
16903 (mi_on_normal_stop_1): Adjust.
16904 (mi_ui_out): Rename to ...
16905 (mi_interp::interp_ui_out): ... this. Remove the 'interp'
16906 parameter and make extern. Adjust.
16907 (mi_set_logging): Rename to ...
16908 (mi_interp::set_logging): ... this. Remove the 'interp'
16909 parameter and make extern. Adjust.
16910 (mi_interp_procs): Delete.
16911 (mi_interp_factory): Adjust to use 'new'.
16912 * mi/mi-main.c (mi_cmd_gdb_exit, captured_mi_execute_command)
16913 (mi_print_exception, mi_execute_command, mi_load_progress):
16914 Adjust.
16915 * tui/tui-interp.c (tui_interp): New class.
16916 (as_tui_interp): Return a tui_interp pointer.
16917 (tui_on_normal_stop, tui_on_signal_received)
16918 (tui_on_end_stepping_range, tui_on_signal_exited, tui_on_exited)
16919 (tui_on_no_history, tui_on_user_selected_context_changed): Adjust
16920 to use interp::interp_ui_out.
16921 (tui_init): Rename to ...
16922 (tui_interp::init): ... this. Remove the 'self' parameter, use
16923 bool, return void and make extern. Adjust.
16924 (tui_resume): Rename to ...
16925 (tui_interp::resume): ... this. Remove the 'data' parameter,
16926 return void and make extern. Adjust.
16927 (tui_suspend): Rename to ...
16928 (tui_interp::suspend): ... this. Remove the 'data' parameter,
16929 return void and make extern. Adjust.
16930 (tui_ui_out): Rename to ...
16931 (tui_interp::interp_ui_out): ... this. Remove the 'self'
16932 parameter, and make extern. Adjust.
16933 (tui_exec): Rename to ...
16934 (tui_interp::exec): ... this. Remove the 'data' parameter and
16935 make extern.
16936 (tui_interp_procs): Delete.
16937 (tui_interp_factory): Use "new".
16938
16939 2017-02-02 Tom Tromey <tom@tromey.com>
16940
16941 * rust-exp.y (ends_raw_string, space_then_number)
16942 (rust_identifier_start_p): Return bool.
16943 * rust-lang.c (rust_tuple_type_p, rust_underscore_fields)
16944 (rust_tuple_struct_type_p, rust_tuple_variant_type_p)
16945 (rust_slice_type_p, rust_range_type_p, rust_u8_type_p)
16946 (rust_chartype_p): Return bool.
16947 (val_print_struct, rust_print_struct_def, rust_print_type):
16948 Update.
16949 * rust-lang.h (rust_tuple_type_p, rust_tuple_struct_type_p):
16950 Return bool.
16951
16952 2017-02-02 Tom Tromey <tom@tromey.com>
16953
16954 * rust-lang.c: Reindent.
16955
16956 2017-02-02 Tom Tromey <tom@tromey.com>
16957
16958 * rust-lang.h (rust_crate_for_block): Update.
16959 * rust-lang.c (rust_crate_for_block): Return std::string.
16960 (rust_get_disr_info): Use std:;string, not
16961 gdb::unique_xmalloc_ptr.
16962 * rust-exp.y (crate_name): Update.
16963
16964 2017-02-02 Pedro Alves <palves@redhat.com>
16965
16966 * disasm-selftests.c (print_one_insn_test): Move the "verbose"
16967 field out of gdb_disassembler_test and make it static.
16968
16969 2017-02-02 Pedro Alves <palves@redhat.com>
16970
16971 * mi/mi-common.h (struct mi_interp): Delete the mi2_interp,
16972 mi1_interp and mi_interp fields.
16973
16974 2017-02-02 Pedro Alves <palves@redhat.com>
16975
16976 * cli/cli-interp.c (struct saved_output_files, saved_output):
16977 Moved from cli/cli-logging.c.
16978 (cli_set_logging): New function.
16979 (cli_interp_procs): Install cli_set_logging.
16980 * cli/cli-interp.h (make_logging_output, cli_set_logging):
16981 Declare.
16982 * cli/cli-logging.c (struct saved_output_files, saved_output):
16983 Moved to cli/cli-interp.c.
16984 (pop_output_files): Don't save outputs here.
16985 (make_logging_output): New function.
16986 (handle_redirections): Don't build tee nor save previous outputs
16987 here.
16988 * interps.c (current_interp_set_logging): Change prototype.
16989 Assume there's always a set_logging_proc method installed.
16990 * interps.h (interp_set_logging_ftype): Change prototype.
16991 (current_interp_set_logging): Change prototype and adjust comment.
16992 * mi/mi-interp.c (mi_set_logging): Change protototype. Adjust to
16993 use make_logging_output.
16994 * tui/tui-interp.c (tui_interp_procs): Install cli_set_logging.
16995 2017-02-02 Pedro Alves <palves@redhat.com>
16996
16997 * cli/cli-logging.c (maybe_warn_already_logging): New factored out
16998 from ...
16999 (set_logging_overwrite): ... here.
17000 (logging_no_redirect_file): Delete.
17001 (set_logging_redirect): Don't handle redirection on the fly.
17002 Instead warn that "logging off" / "logging on" is necessary.
17003 (pop_output_files): Delete references to logging_no_redirect_file.
17004 (show_logging_command): Always speak in terms of what will happen
17005 once logging is reenabled.
17006
17007 2017-02-02 Pedro Alves <palves@redhat.com>
17008
17009 * disasm.h (gdb_pretty_print_disassembler): Tweak intro comment.
17010
17011 2017-02-02 Pedro Alves <palves@redhat.com>
17012
17013 * disasm.c (gdb_pretty_print_insn): Rename to ...
17014 (gdb_pretty_print_disassembler::pretty_print_insn): ... this.
17015 Remove gdbarch parameter. Adapt to clear the object's buffers
17016 instead of allocating new buffers, and to print using the object's
17017 gdb_disassembler instead of calling gdb_print_insn.
17018 (dump_insns): Use gdb_pretty_print_disassembler.
17019 * disasm.h (gdb_pretty_print_insn): Delete declaration.
17020 (gdb_pretty_print_disassembler): New class.
17021 * record-btrace.c (btrace_insn_history): Use
17022 gdb_pretty_print_disassembler.
17023
17024 2017-02-02 Pedro Alves <palves@redhat.com>
17025
17026 * ada-lang.c (type_as_string): Use string_file.
17027 * ada-valprint.c (ada_print_floating): Use string_file.
17028 * ada-varobj.c (ada_varobj_scalar_image)
17029 (ada_varobj_get_value_image): Use string_file.
17030 * aix-thread.c (aix_thread_extra_thread_info): Use string_file.
17031 * arm-tdep.c (_initialize_arm_tdep): Use string_printf.
17032 * breakpoint.c (update_inserted_breakpoint_locations)
17033 (insert_breakpoint_locations, reattach_breakpoints)
17034 (print_breakpoint_location, print_one_detail_ranged_breakpoint)
17035 (print_it_watchpoint): Use string_file.
17036 (save_breakpoints): Use stdio_file.
17037 * c-exp.y (oper): Use string_file.
17038 * cli/cli-logging.c (set_logging_redirect): Use ui_file_up and
17039 tee_file.
17040 (pop_output_files): Use delete.
17041 (handle_redirections): Use stdio_file and tee_file.
17042 * cli/cli-setshow.c (do_show_command): Use string_file.
17043 * compile/compile-c-support.c (c_compute_program): Use
17044 string_file.
17045 * compile/compile-c-symbols.c (generate_vla_size): Take a
17046 'string_file &' instead of a 'ui_file *'.
17047 (generate_c_for_for_one_variable): Take a 'string_file &' instead
17048 of a 'ui_file *'. Use string_file.
17049 (generate_c_for_variable_locations): Take a 'string_file &'
17050 instead of a 'ui_file *'.
17051 * compile/compile-internal.h (generate_c_for_for_one_variable):
17052 Take a 'string_file &' instead of a 'ui_file *'.
17053 * compile/compile-loc2c.c (push, pushf, unary, binary)
17054 (print_label, pushf_register_address, pushf_register)
17055 (do_compile_dwarf_expr_to_c): Take a 'string_file &' instead of a
17056 'ui_file *'. Adjust.
17057 * compile/compile.c (compile_to_object): Use string_file.
17058 * compile/compile.h (compile_dwarf_expr_to_c)
17059 (compile_dwarf_bounds_to_c): Take a 'string_file &' instead of a
17060 'ui_file *'.
17061 * cp-support.c (inspect_type): Use string_file and obstack_copy0.
17062 (replace_typedefs_qualified_name): Use string_file and
17063 obstack_copy0.
17064 * disasm.c (gdb_pretty_print_insn): Use string_file.
17065 (gdb_disassembly): Adjust reference the null_stream global.
17066 (do_ui_file_delete): Delete.
17067 (gdb_insn_length): Use null_stream.
17068 * dummy-frame.c (maintenance_print_dummy_frames): Use stdio_file.
17069 * dwarf2loc.c (dwarf2_compile_property_to_c)
17070 (locexpr_generate_c_location, loclist_generate_c_location): Take a
17071 'string_file &' instead of a 'ui_file *'.
17072 * dwarf2loc.h (dwarf2_compile_property_to_c): Likewise.
17073 * dwarf2read.c (do_ui_file_peek_last): Delete.
17074 (dwarf2_compute_name): Use string_file.
17075 * event-top.c (gdb_setup_readline): Use stdio_file.
17076 * gdbarch.sh (verify_gdbarch): Use string_file.
17077 * gdbtypes.c (safe_parse_type): Use null_stream.
17078 * guile/scm-breakpoint.c (gdbscm_breakpoint_commands): Use
17079 string_file.
17080 * guile/scm-disasm.c (gdbscm_print_insn_from_port): Take a
17081 'string_file *' instead of a 'ui_file *'.
17082 (gdbscm_arch_disassemble): Use string_file.
17083 * guile/scm-frame.c (frscm_print_frame_smob): Use string_file.
17084 * guile/scm-ports.c (class ioscm_file_port): Now a class that
17085 inherits from ui_file.
17086 (ioscm_file_port_delete, ioscm_file_port_rewind)
17087 (ioscm_file_port_put): Delete.
17088 (ioscm_file_port_write): Rename to ...
17089 (ioscm_file_port::write): ... this. Remove file_port_magic
17090 checks.
17091 (ioscm_file_port_new): Delete.
17092 (ioscm_with_output_to_port_worker): Use ioscm_file_port and
17093 ui_file_up.
17094 * guile/scm-type.c (tyscm_type_name): Use string_file.
17095 * guile/scm-value.c (vlscm_print_value_smob, gdbscm_value_print):
17096 Use string_file.
17097 * infcmd.c (print_return_value_1): Use string_file.
17098 * infrun.c (print_target_wait_results): Use string_file.
17099 * language.c (add_language): Use string_file.
17100 * location.c (explicit_to_string_internal): Use string_file.
17101 * main.c (captured_main_1): Use null_file.
17102 * maint.c (maintenance_print_architecture): Use stdio_file.
17103 * mi/mi-cmd-stack.c (list_arg_or_local): Use string_file.
17104 * mi/mi-common.h (struct mi_interp) <out, err, log, targ,
17105 event_channel>: Change type to mi_console_file pointer.
17106 * mi/mi-console.c (mi_console_file_fputs, mi_console_file_flush)
17107 (mi_console_file_delete): Delete.
17108 (struct mi_console_file): Delete.
17109 (mi_console_file_magic): Delete.
17110 (mi_console_file_new): Delete.
17111 (mi_console_file::mi_console_file): New.
17112 (mi_console_file_delete): Delete.
17113 (mi_console_file_fputs): Delete.
17114 (mi_console_file::write): New.
17115 (mi_console_raw_packet): Delete.
17116 (mi_console_file::flush): New.
17117 (mi_console_file_flush): Delete.
17118 (mi_console_set_raw): Rename to ...
17119 (mi_console_file::set_raw): ... this.
17120 * mi/mi-console.h (class mi_console_file): New class.
17121 (mi_console_file_new, mi_console_set_raw): Delete.
17122 * mi/mi-interp.c (mi_interpreter_init): Use mi_console_file.
17123 (mi_set_logging): Use delete and tee_file. Adjust.
17124 * mi/mi-main.c (output_register): Use string_file.
17125 (mi_cmd_data_evaluate_expression): Use string_file.
17126 (mi_cmd_data_read_memory): Use string_file.
17127 (mi_cmd_execute, print_variable_or_computed): Use string_file.
17128 * mi/mi-out.c (mi_ui_out::main_stream): New.
17129 (mi_ui_out::rewind): Use main_stream and
17130 string_file.
17131 (mi_ui_out::put): Use main_stream and string_file.
17132 (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
17133 Allocate a 'string_file' instead.
17134 (mi_out_new): Don't allocate a mem_fileopen stream here.
17135 * mi/mi-out.h (mi_ui_out::mi_ui_out): Remove 'stream' parameter.
17136 (mi_ui_out::main_stream): Declare method.
17137 * printcmd.c (eval_command): Use string_file.
17138 * psymtab.c (maintenance_print_psymbols): Use stdio_file.
17139 * python/py-arch.c (archpy_disassemble): Use string_file.
17140 * python/py-breakpoint.c (bppy_get_commands): Use string_file.
17141 * python/py-frame.c (frapy_str): Use string_file.
17142 * python/py-framefilter.c (py_print_type, py_print_single_arg):
17143 Use string_file.
17144 * python/py-type.c (typy_str): Use string_file.
17145 * python/py-unwind.c (unwind_infopy_str): Use string_file.
17146 * python/py-value.c (valpy_str): Use string_file.
17147 * record-btrace.c (btrace_insn_history): Use string_file.
17148 * regcache.c (regcache_print): Use stdio_file.
17149 * reggroups.c (maintenance_print_reggroups): Use stdio_file.
17150 * remote.c (escape_buffer): Use string_file.
17151 * rust-lang.c (rust_get_disr_info): Use string_file.
17152 * serial.c (serial_open_ops_1): Use stdio_file.
17153 (do_serial_close): Use delete.
17154 * stack.c (print_frame_arg): Use string_file.
17155 (print_frame_args): Remove local mem_fileopen stream, not used.
17156 (print_frame): Use string_file.
17157 * symmisc.c (maintenance_print_symbols): Use stdio_file.
17158 * symtab.h (struct symbol_computed_ops) <generate_c_location>:
17159 Take a 'string_file *' instead of a 'ui_file *'.
17160 * top.c (new_ui): Use stdio_file and stderr_file.
17161 (free_ui): Use delete.
17162 (execute_command_to_string): Use string_file.
17163 (quit_confirm): Use string_file.
17164 * tracepoint.c (collection_list::append_exp): Use string_file.
17165 * tui/tui-disasm.c (tui_disassemble): Use string_file.
17166 * tui/tui-file.c: Don't include "ui-file.h".
17167 (enum streamtype, struct tui_stream): Delete.
17168 (tui_file_new, tui_file_delete, tui_fileopen, tui_sfileopen)
17169 (tui_file_isatty, tui_file_rewind, tui_file_put): Delete.
17170 (tui_file::tui_file): New method.
17171 (tui_file_fputs): Delete.
17172 (tui_file_get_strbuf): Delete.
17173 (tui_file::puts): New method.
17174 (tui_file_adjust_strbuf): Delete.
17175 (tui_file_flush): Delete.
17176 (tui_file::flush): New method.
17177 * tui/tui-file.h: Tweak intro comment.
17178 Include ui-file.h.
17179 (tui_fileopen, tui_sfileopen, tui_file_get_strbuf)
17180 (tui_file_adjust_strbuf): Delete declarations.
17181 (class tui_file): New class.
17182 * tui/tui-io.c (tui_initialize_io): Use tui_file.
17183 * tui/tui-regs.c (tui_restore_gdbout): Use delete.
17184 (tui_register_format): Use string_stream.
17185 * tui/tui-stack.c (tui_make_status_line): Use string_file.
17186 (tui_get_function_from_frame): Use string_file.
17187 * typeprint.c (type_to_string): Use string_file.
17188 * ui-file.c (struct ui_file, ui_file_magic, ui_file_new): Delete.
17189 (null_stream): New global.
17190 (ui_file_delete): Delete.
17191 (ui_file::ui_file): New.
17192 (null_file_isatty): Delete.
17193 (ui_file::~ui_file): New.
17194 (null_file_rewind): Delete.
17195 (ui_file::printf): New.
17196 (null_file_put): Delete.
17197 (null_file_flush): Delete.
17198 (ui_file::putstr): New.
17199 (null_file_write): Delete.
17200 (ui_file::putstrn): New.
17201 (null_file_read): Delete.
17202 (ui_file::putc): New.
17203 (null_file_fputs): Delete.
17204 (null_file_write_async_safe): Delete.
17205 (ui_file::vprintf): New.
17206 (null_file_delete): Delete.
17207 (null_file::write): New.
17208 (null_file_fseek): Delete.
17209 (null_file::puts): New.
17210 (ui_file_data): Delete.
17211 (null_file::write_async_safe): New.
17212 (gdb_flush, ui_file_isatty): Adjust.
17213 (ui_file_put, ui_file_rewind): Delete.
17214 (ui_file_write): Adjust.
17215 (ui_file_write_for_put): Delete.
17216 (ui_file_write_async_safe, ui_file_read): Adjust.
17217 (ui_file_fseek): Delete.
17218 (fputs_unfiltered): Adjust.
17219 (set_ui_file_flush, set_ui_file_isatty, set_ui_file_rewind)
17220 (set_ui_file_put, set_ui_file_write, set_ui_file_write_async_safe)
17221 (set_ui_file_read, set_ui_file_fputs, set_ui_file_fseek)
17222 (set_ui_file_data): Delete.
17223 (string_file::~string_file, string_file::write)
17224 (struct accumulated_ui_file, do_ui_file_xstrdup, ui_file_xstrdup)
17225 (do_ui_file_as_string, ui_file_as_string): Delete.
17226 (do_ui_file_obsavestring, ui_file_obsavestring): Delete.
17227 (struct mem_file): Delete.
17228 (mem_file_new): Delete.
17229 (stdio_file::stdio_file): New.
17230 (mem_file_delete): Delete.
17231 (stdio_file::stdio_file): New.
17232 (mem_fileopen): Delete.
17233 (stdio_file::~stdio_file): New.
17234 (mem_file_rewind): Delete.
17235 (stdio_file::set_stream): New.
17236 (mem_file_put): Delete.
17237 (stdio_file::open): New.
17238 (mem_file_write): Delete.
17239 (stdio_file_magic, struct stdio_file): Delete.
17240 (stdio_file_new, stdio_file_delete, stdio_file_flush): Delete.
17241 (stdio_file::flush): New.
17242 (stdio_file_read): Rename to ...
17243 (stdio_file::read): ... this. Adjust.
17244 (stdio_file_write): Rename to ...
17245 (stdio_file::write): ... this. Adjust.
17246 (stdio_file_write_async_safe): Rename to ...
17247 (stdio_file::write_async_safe) ... this. Adjust.
17248 (stdio_file_fputs): Rename to ...
17249 (stdio_file::puts) ... this. Adjust.
17250 (stdio_file_isatty): Delete.
17251 (stdio_file_fseek): Delete.
17252 (stdio_file::isatty): New.
17253 (stderr_file_write): Rename to ...
17254 (stderr_file::write) ... this. Adjust.
17255 (stderr_file_fputs): Rename to ...
17256 (stderr_file::puts) ... this. Adjust.
17257 (stderr_fileopen, stdio_fileopen, gdb_fopen): Delete.
17258 (stderr_file::stderr_file): New.
17259 (tee_file_magic): Delete.
17260 (struct tee_file): Delete.
17261 (tee_file::tee_file): New.
17262 (tee_file_new): Delete.
17263 (tee_file::~tee_file): New.
17264 (tee_file_delete): Delete.
17265 (tee_file_flush): Rename to ...
17266 (tee_file::flush): ... this. Adjust.
17267 (tee_file_write): Rename to ...
17268 (tee_file::write): ... this. Adjust.
17269 (tee_file::write_async_safe): New.
17270 (tee_file_fputs): Rename to ...
17271 (tee_file::puts): ... this. Adjust.
17272 (tee_file_isatty): Rename to ...
17273 (tee_file::isatty): ... this. Adjust.
17274 * ui-file.h (struct obstack, struct ui_file): Don't
17275 forward-declare.
17276 (ui_file_new, ui_file_flush_ftype, set_ui_file_flush)
17277 (ui_file_write_ftype)
17278 (set_ui_file_write, ui_file_fputs_ftype, set_ui_file_fputs)
17279 (ui_file_write_async_safe_ftype, set_ui_file_write_async_safe)
17280 (ui_file_read_ftype, set_ui_file_read, ui_file_isatty_ftype)
17281 (set_ui_file_isatty, ui_file_rewind_ftype, set_ui_file_rewind)
17282 (ui_file_put_method_ftype, ui_file_put_ftype, set_ui_file_put)
17283 (ui_file_delete_ftype, set_ui_file_data, ui_file_fseek_ftype)
17284 (set_ui_file_fseek): Delete.
17285 (ui_file_data, ui_file_delete, ui_file_rewind)
17286 (struct ui_file): New.
17287 (ui_file_up): New.
17288 (class null_file): New.
17289 (null_stream): Declare.
17290 (ui_file_write_for_put, ui_file_put): Delete.
17291 (ui_file_xstrdup, ui_file_as_string, ui_file_obsavestring):
17292 Delete.
17293 (ui_file_fseek, mem_fileopen, stdio_fileopen, stderr_fileopen)
17294 (gdb_fopen, tee_file_new): Delete.
17295 (struct string_file): New.
17296 (struct stdio_file): New.
17297 (stdio_file_up): New.
17298 (struct stderr_file): New.
17299 (class tee_file): New.
17300 * ui-out.c (ui_out::field_stream): Take a 'string_file &' instead
17301 of a 'ui_file *'. Adjust.
17302 * ui-out.h (class ui_out) <field_stream>: Likewise.
17303 * utils.c (do_ui_file_delete, make_cleanup_ui_file_delete)
17304 (null_stream): Delete.
17305 (error_stream): Take a 'string_file &' instead of a 'ui_file *'.
17306 Adjust.
17307 * utils.h (struct ui_file): Delete forward declaration..
17308 (make_cleanup_ui_file_delete, null_stream): Delete declarations.
17309 (error_stream): Take a 'string_file &' instead of a
17310 'ui_file *'.
17311 * varobj.c (varobj_value_get_print_value): Use string_file.
17312 * xtensa-tdep.c (xtensa_verify_config): Use string_file.
17313 * gdbarch.c: Regenerate.
17314
17315 2017-02-02 Pedro Alves <palves@redhat.com>
17316
17317 * disasm.c (gdb_disassembler::pretty_print_insn): Rename to...
17318 (gdb_pretty_print_insn): ... this. Now a free function. Add back
17319 a 'gdbarch' parameter. Allocate a mem_fileopen stream here.
17320 Adjust to call gdb_print_insn instead of
17321 gdb_disassembler::print_insn.
17322 (dump_insns, do_mixed_source_and_assembly_deprecated)
17323 (do_mixed_source_and_assembly, do_assembly_only): Add back a
17324 'gdbarch' parameter. Remove gdb_disassembler parameter.
17325 (gdb_disassembly): Don't allocate a gdb_disassembler here.
17326 * disasm.h (gdb_disassembler::pretty_print_insn): Delete
17327 declaration.
17328 (gdb_pretty_print_insn): Re-add declaration.
17329 * record-btrace.c (btrace_insn_history): Don't allocate a
17330 gdb_disassembler here. Adjust to call gdb_pretty_print_insn.
17331
17332 2017-02-01 Simon Marchi <simon.marchi@polymtl.ca>
17333
17334 * disasm.h (gdb_disassembly): Remove file_string parameter.
17335 * disasm.c (gdb_disassembly): Likewise.
17336 * cli/cli-cmds.c (print_disassembly): Adapt.
17337 * mi/mi-cmd-disas.c (mi_cmd_disassemble): Likewise.
17338 * stack.c (do_gdb_disassembly): Likewise.
17339
17340 2017-02-01 Andreas Arnez <arnez@linux.vnet.ibm.com>
17341
17342 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): For
17343 DWARF_VALUE_LITERAL, no longer ignore the offset on big-endian
17344 targets. And if the implicit value is longer than needed, extract
17345 the first bytes instead of the "least significant" ones.
17346
17347 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
17348
17349 * btrace.c (btrace_enable): Do not call btrace_add_pc for
17350 BTRACE_FORMAT_PT or if can_access_registers_ptid returns false.
17351 (btrace_fetch): Assert can_access_registers_ptid.
17352 * record-btrace.c (require_btrace_thread, record_btrace_info): Call
17353 validate_registers_access.
17354
17355 2017-02-01 Markus Metzger <markus.t.metzger@intel.com>
17356
17357 * gdbthread.h (can_access_registers_ptid): New.
17358 * thread.c (can_access_registers_ptid): New.
17359
17360 2017-02-01 Pedro Alves <palves@redhat.com>
17361
17362 * i386-tdep.c (i386_fast_tracepoint_valid_at): Use gdb_insn_length.
17363
17364 2017-01-31 Pedro Alves <palves@redhat.com>
17365
17366 * mi/mi-interp.c (mi_breakpoint_created, mi_breakpoint_modified):
17367 Fix typos.
17368
17369 2017-01-31 Pedro Alves <palves@redhat.com>
17370
17371 * stack.c (print_frame_args): Remove local mem_fileopen stream,
17372 not used.
17373
17374 2017-01-31 Pedro Alves <palves@redhat.com>
17375
17376 * varobj.c (varobj_value_get_print_value): Remove xstrdup call.
17377
17378 2017-01-31 Pedro Alves <palves@redhat.com>
17379
17380 * common/scoped_restore.h
17381 (scoped_restore_tmpl::scoped_restore_tmpl): Template on T2, and
17382 change the value's parameter type to T2.
17383 (make_scoped_restore): Likewise.
17384
17385 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
17386 Richard Henderson <rth@redhat.com>
17387
17388 * amd64-linux-nat.c (PTRACE_ARCH_PRCTL): New define.
17389 (amd64_linux_fetch_inferior_registers): Add case to fetch FS_BASE
17390 GS_BASE for older kernels.
17391 (amd64_linux_store_inferior_registers): Add case to store FS_BASE
17392 GS_BASE for older kernels.
17393 * amd64-linux-tdep.c (amd64_linux_gregset_reg_offset): Add FS_BASE
17394 and GS_BASE to the offset table.
17395 (amd64_linux_register_reggroup_p): Add FS_BASE and GS_BASE to the
17396 system register group.
17397 * amd64-nat.c (amd64_native_gregset_reg_offset): Implements case
17398 for older kernels.
17399 * amd64-tdep.c (amd64_init_abi): Add segment registers for the
17400 amd64 ABI.
17401 * amd64-tdep.h (amd64_regnum): Add AMD64_FSBASE_REGNUM and
17402 AMD64_GSBASE_REGNUM.
17403 (AMD64_NUM_REGS): Set to AMD64_GSBASE_REGNUM + 1.
17404 * features/Makefile (amd64-linux.dat, amd64-avx-linux.dat)
17405 (amd64-mpx-linux.dat, amd64-avx512-linux.dat, x32-linux.dat)
17406 (x32-avx-linux.dat, x32-avx512-linux.dat): Add
17407 i386/64bit-segments.xml in those rules.
17408 * features/i386/64bit-segments.xml: New file.
17409 * features/i386/amd64-avx-mpx-linux.xml: Add 64bit-segments.xml.
17410 * features/i386/amd64-avx-linux.xml: Add 64bit-segments.xml.
17411 * features/i386/amd64-avx512-linux.xml: Add 64bit-segments.xml.
17412 * features/i386/amd64-mpx-linux.xml: Add 64bit-segments.xml.
17413 * features/i386/x32-avx512-linux.xml: Add 64bit-segments.xml.
17414 * features/i386/x32-avx-linux.xml: Add 64bit-segments.xml.
17415 * features/i386/amd64-linux.xml: Add 64bit-segments.xml.
17416 * features/i386/amd64-avx-linux.c: Regenerated.
17417 * features/i386/amd64-avx-mpx-linux.c: Regenerated.
17418 * features/i386/amd64-avx-mpx.c: Regenerated.
17419 * features/i386/amd64-avx512-linux.c: Regenerated.
17420 * features/i386/amd64-linux.c: Regenerated.
17421 * features/i386/amd64-mpx-linux.c: Regenerated.
17422 * features/i386/i386-avx-mpx-linux.c: Regenerated.
17423 * features/i386/i386-avx-mpx.c: Regenerated.
17424 * features/i386/x32-avx-linux.c: Regenerated.
17425 * features/i386/x32-avx512-linux.c: Regenerated.
17426 * regformats/i386/amd64-avx-linux.dat: Regenerated.
17427 * regformats/i386/amd64-avx-mpx-linux.dat: Regenerated.
17428 * regformats/i386/amd64-avx512-linux.dat: Regenerated.
17429 * regformats/i386/amd64-linux.dat: Regenerated.
17430 * regformats/i386/amd64-mpx-linux.dat: Regenerated.
17431 * regformats/i386/x32-avx-linux.dat: Regenerated.
17432 * regformats/i386/x32-avx512-linux.dat: Regenerated.
17433 * regformats/i386/x32-linux.dat: Regenerated.
17434
17435 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
17436
17437 * amd64-linux-tdep.h (AMD64_LINUX_ORIG_RAX_REGNUM):
17438 Set to AMD64_NUM_REGS.
17439
17440 2017-01-27 Walfred Tedeschi <walfred.tedeschi@intel.com>
17441
17442 * amd64-nat.c (amd64_native_gregset_reg_offset): Simplify logic
17443 that checks validity of a register number.
17444
17445 2017-01-27 Kees Cook <keescook@google.com>
17446
17447 * gdb/arm-linux-nat.c (arm_linux_fetch_inferior_registers): Call
17448 fetch_fpregs if target has fpa registers.
17449 (arm_linux_store_inferior_registers): Call store_fpregs if target
17450 has fpa registers.
17451
17452 2017-01-26 Andreas Arnez <arnez@linux.vnet.ibm.com>
17453
17454 * cris-tdep.c (cris_gdbarch_init): Remove check for
17455 info.byte_order and force it to BFD_ENDIAN_LITTLE.
17456
17457 2017-01-26 Antoine Tremblay <antoine.tremblay@ericsson.com>
17458
17459 * corelow.c (get_core_register_section): Check for regset
17460 existence before checking for REGSET_VARIABLE_SIZE.
17461
17462 2017-01-26 Yao Qi <yao.qi@linaro.org>
17463 Pedro Alves <palves@redhat.com>
17464
17465 PR gdb/20939
17466 * disasm.c (gdb_disassembler::dis_asm_memory_error): Don't
17467 call memory_error, save memaddr instead.
17468 (gdb_disassembler::print_insn): If gdbarch_print_insn returns
17469 negative, cal memory_error.
17470 * disasm.h (gdb_disassembler) <m_err_memaddr>: New field.
17471
17472 2017-01-26 Yao Qi <yao.qi@linaro.org>
17473
17474 * disasm-selftests.c (memory_error_test): New function.
17475 (_initialize_disasm_selftests): Register memory_error_test.
17476
17477 2017-01-26 Yao Qi <yao.qi@linaro.org>
17478
17479 * Makefile.in (SFILES): Add disasm-selftests.c and
17480 selftest-arch.c.
17481 (COMMON_OBS): Add disasm-selftests.o and selftest-arch.o.
17482 * disasm-selftests.c: New file.
17483 * selftest-arch.c: New file.
17484 * selftest-arch.h: New file.
17485
17486 2017-01-26 Yao Qi <yao.qi@linaro.org>
17487
17488 * mep-tdep.c (mep_gdb_print_insn): Set info->arch
17489 to bfd_arch_mep. Don't return 0 if section is not
17490 found. Call print_insn_mep.
17491
17492 2017-01-26 Pedro Alves <palves@redhat.com>
17493 Yao Qi <yao.qi@linaro.org>
17494
17495 * arm-tdep.c: Include "disasm.h".
17496 (gdb_print_insn_arm): Update code to get gdbarch.
17497 * disasm.c (dis_asm_read_memory): Change it to
17498 gdb_disassembler::dis_asm_read_memory.
17499 (dis_asm_memory_error): Likewise.
17500 (dis_asm_print_address): Likewise.
17501 (gdb_pretty_print_insn): Change it to
17502 gdb_disassembler::pretty_print_insn.
17503 (dump_insns): Add one argument gdb_disassemlber. All
17504 callers updated.
17505 (do_mixed_source_and_assembly_deprecated): Likewise.
17506 (do_mixed_source_and_assembly): Likewise.
17507 (do_assembly_only): Likewise.
17508 (gdb_disassembler::gdb_disassembler): New.
17509 (gdb_disassembler::print_insn): New.
17510 * disasm.h (class gdb_disassembler): New.
17511 (gdb_pretty_print_insn): Remove declaration.
17512 (gdb_disassemble_info): Likewise.
17513 * guile/scm-disasm.c (class gdbscm_disassembler): New.
17514 (gdbscm_disasm_read_memory_worker): Update.
17515 (gdbscm_disasm_read_memory): Update.
17516 (gdbscm_disasm_memory_error): Remove.
17517 (gdbscm_disasm_print_address): Remove.
17518 (gdbscm_disassembler::gdbscm_disassembler): New.
17519 (gdbscm_print_insn_from_port): Update.
17520 * mips-tdep.c: Include disasm.h.
17521 (gdb_print_insn_mips): Update code to get gdbarch.
17522 * record-btrace.c (btrace_insn_history): Update.
17523 * spu-tdep.c: Include disasm.h.
17524 (struct spu_dis_asm_data): Remove.
17525 (struct spu_dis_asm_info): New.
17526 (spu_dis_asm_print_address): Use spu_dis_asm_info to get
17527 SPU id.
17528 (gdb_print_insn_spu): Cast disassemble_info to
17529 spu_dis_asm_info.
17530
17531 2017-01-26 Yao Qi <yao.qi@linaro.org>
17532
17533 * disasm.c (do_ui_file_delete): Delete.
17534 (gdb_insn_length): Move code creating stream to ...
17535 * utils.c (null_stream): ... here. New function.
17536 * utils.h (null_stream): Declare.
17537
17538 2017-01-23 Simon Marchi <simon.marchi@polymtl.ca>
17539
17540 * python/py-inferior.c (find_thread_object): Return directly
17541 from the loop. Remove "found" variable.
17542
17543 2017-01-21 Joel Brobecker <brobecker@adacore.com>
17544
17545 GDB 7.12.1 released.
17546
17547 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
17548
17549 * python/py-function.c (fnpy_call): Reorder declarations to have
17550 the gdbpy_enter object declared first.
17551 * python/py-xmethods.c (gdbpy_get_xmethod_arg_types): Likewise.
17552
17553 2017-01-20 Simon Marchi <simon.marchi@ericsson.com>
17554
17555 PR python/21068
17556 * python/python-internal.h (PyMem_RawMalloc): Define for
17557 Python < 3.4.
17558 * python/py-gdb-readline.c (gdbpy_readline_wrapper): Use
17559 PyMem_RawMalloc instead of PyMem_Malloc.
17560
17561 2017-01-20 Mike Wrighton <mike_wrighton@codesourcery.com>
17562 Luis Machado <lgustavo@codesourcery.com>
17563
17564 * NEWS (New commands): Mention flash-erase.
17565 (New MI commands): Mention target-flash-erase.
17566 * mi/mi-cmds.c (mi_cmd_target_flash_erase): Add target-flash-erase MI
17567 command.
17568 * mi/mi-cmds.h (mi_cmd_target_flash_erase): New declaration.
17569 * mi/mi-main.c (mi_cmd_target_flash_erase): New function.
17570 * target.c (flash_erase_command): New function.
17571 (initialize_targets): Add new flash-erase command.
17572 * target.h (flash_erase_command): New declaration.
17573
17574 2017-01-20 Joel Brobecker <brobecker@adacore.com>
17575
17576 * nat/linux-ptrace.c: Only include <sys/procfs.h> if
17577 HAVE_SYS_PROCFS_H is defined.
17578
17579 2017-01-18 Alan Hayward <alan.hayward@arm.com>
17580
17581 * remote.c (struct cached_reg): Change data into a pointer.
17582 * (stop_reply_dtr): Free data pointers before deleting vector.
17583 (process_stop_reply): Likewise.
17584 (remote_parse_stop_reply): Allocate space for data
17585
17586 2017-01-18 Alan Hayward <alan.hayward@arm.com>
17587
17588 * amd64-tdep.c (amd64_pseudo_register_read_value): remove
17589 MAX_REGISTER_SIZE.
17590 (amd64_pseudo_register_read_value): Likewise.
17591 * remote.c (fetch_register_using_p): Remove MAX_REGISTER_SIZE.
17592 (store_register_using_P): Likewise.
17593 * regcache.c (regcache_xfer_part): Likewise.
17594
17595 2017-01-16 Ivo Raisr <ivo.raisr@oracle.com>
17596
17597 Split real and pseudo registers.
17598 * sparc-tdep.h (SPARC_CORE_REGISTERS): New macro.
17599 (sparc32_pseudo_regnum): New enum.
17600 * sparc64-tdep.h (sparc64_pseudo_regnum): New enum.
17601 * sparc-tdep.c (SPARC32_FPU_REGISTERS): New macro.
17602 (SPARC32_CP0_REGISTERS): New macro.
17603 (sparc32_pseudo_register_name): New function.
17604 (sparc32_register_name): Use sparc32_pseudo_register_name.
17605 (sparc32_pseudo_register_type): New function.
17606 (sparc32_register_type): Use sparc32_pseudo_register_type.
17607 (sparc32_pseudo_register_read, sparc32_pseudo_register_write): Handle
17608 pseudo register numbers.
17609 * sparc64-tdep.c SPARC64_FPU_REGISTERS): New macro.
17610 (SPARC64_CP0_REGISTERS): New macro.
17611 (sparc64_pseudo_register_name): New function.
17612 (sparc64_register_name): Use sparc64_pseudo_register_name.
17613 (sparc64_pseudo_register_type): New function.
17614 (sparc64_register_type): Use sparc64_pseudo_register_type.
17615 (sparc64_pseudo_register_read, sparc64_pseudo_register_write): Handle
17616 pseudo register numbers.
17617 (sparc64_store_floating_fields, sparc64_extract_floating_fields,
17618 sparc64_store_arguments): Handle pseudo register numbers.
17619
17620 2017-01-13 Yao Qi <yao.qi@linaro.org>
17621
17622 * remote.c (REMOTE_DEBUG_MAX_CHAR): New macro.
17623 (putpkt_binary): Print only REMOTE_DEBUG_MAX_CHAR chars in debug
17624 output.
17625 (getpkt_or_notif_sane_1): Likewise.
17626
17627 2017-01-13 Yao Qi <yao.qi@linaro.org>
17628
17629 * Makefile.in (checker-headers): Use CXX and CXX_DIALET instead
17630 of CC. Pass "-x c++-header" instead of "-x c".
17631
17632 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
17633
17634 * remote.c (remote_can_async_p): Update comment.
17635
17636 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
17637
17638 * linux-nat.c (linux_nat_can_async_p): Update comment.
17639
17640 2017-01-12 Simon Marchi <simon.marchi@ericsson.com>
17641
17642 * serial.c (serial_open): Forget about "pc" and "lpt" serial interface.
17643
17644 2017-01-11 Simon Marchi <simon.marchi@ericsson.com>
17645
17646 * cli/cli-decode.c (lookup_cmd_1): Fix typo in comment.
17647
17648 2017-01-10 Tom Tromey <tom@tromey.com>
17649
17650 * python/py-type.c (typy_legacy_template_argument): Update.
17651 * cp-support.h (struct demangle_parse_info) (demangle_parse_info,
17652 ~demangle_parse_info): Declare new members.
17653 (cp_demangled_name_to_comp): Return unique_ptr.
17654 (cp_demangled_name_parse_free)
17655 (make_cleanup_cp_demangled_name_parse_free)
17656 (cp_new_demangle_parse_info): Remove.
17657 * cp-support.c (do_demangled_name_parse_free_cleanup)
17658 (make_cleanup_cp_demangled_name_parse_free): Remove.
17659 (inspect_type, cp_canonicalize_string_full)
17660 (cp_canonicalize_string): Update.
17661 (mangled_name_to_comp): Change return type.
17662 (cp_class_name_from_physname, method_name_from_physname)
17663 (cp_func_name, cp_remove_params): Update.
17664 * cp-name-parser.y (demangle_parse_info): New constructor, from
17665 cp_new_demangle_parse_info.
17666 (~demangle_parse_info): New destructor, from
17667 cp_demangled_name_parse_free.
17668 (cp_merge_demangle_parse_infos): Update.
17669 (cp_demangled_name_to_comp): Change return type.
17670
17671 2017-01-10 Tom Tromey <tom@tromey.com>
17672
17673 * top.c (prevent_dont_repeat): Change return type.
17674 * python/python.c (execute_gdb_command): Use std::string.
17675 Update.
17676 * guile/guile.c (gdbscm_execute_gdb_command): Update.
17677 * command.h (prevent_dont_repeat): Change return type.
17678 * breakpoint.c (bpstat_do_actions_1): Update.
17679
17680 2017-01-10 Tom Tromey <tom@tromey.com>
17681
17682 * value.h (scoped_value_mark::~scoped_value_mark): Call
17683 free_to_mark.
17684 (scoped_value_mark::free_to_mark): New method.
17685 * dwarf2loc.c (dwarf2_evaluate_loc_desc_full): Use
17686 scoped_value_mark.
17687
17688 2017-01-10 Tom Tromey <tom@tromey.com>
17689
17690 * python/py-value.c (valpy_dereference, valpy_referenced_value)
17691 (valpy_reference_value, valpy_const_value, valpy_get_address)
17692 (valpy_get_dynamic_type, valpy_lazy_string, valpy_do_cast)
17693 (valpy_getitem, valpy_call, valpy_binop_throw, valpy_negative)
17694 (valpy_absolute, valpy_richcompare_throw): Use scoped_value_mark.
17695 * dwarf2loc.c (dwarf2_loc_desc_get_symbol_read_needs): Use
17696 scoped_value_mark.
17697 * dwarf2-frame.c (execute_stack_op): Use scoped_value_mark.
17698 * value.h (scoped_value_mark): New class.
17699
17700 2017-01-10 Tom Tromey <tom@tromey.com>
17701
17702 * dwarf2read.c (dwarf2_build_psymtabs): Use psymtab_discarder.
17703 * psympriv.h (make_cleanup_discard_psymtabs): Don't declare.
17704 * psymtab.c (discard_psymtabs_upto): Remove.
17705 (make_cleanup_discard_psymtabs): Remove.
17706 (struct psymtab_state): Remove.
17707
17708 2017-01-10 Tom Tromey <tom@tromey.com>
17709
17710 * record-full.c (record_full_save_cleanups): Remove.
17711 (record_full_save): Use gdb::unlinker.
17712 * gcore.c (do_bfd_delete_cleanup): Remove.
17713 (gcore_command): Use gdb::unlinker, unique_xmalloc_ptr. Remove
17714 cleanups.
17715 * dwarf2read.c (unlink_if_set): Remove.
17716 (write_psymtabs_to_index): Use gdb::unlinker.
17717 * common/gdb_unlinker.h: New file.
17718
17719 2017-01-10 Tom Tromey <tom@tromey.com>
17720
17721 * windows-tdep.c (windows_xfer_shared_library): Update.
17722 * windows-nat.c (windows_make_so): Update.
17723 * utils.h (make_cleanup_bfd_unref): Remove.
17724 * utils.c (do_bfd_close_cleanup, make_cleanup_bfd_unref): Remove.
17725 * symfile.h (symfile_bfd_open)
17726 (find_separate_debug_file_in_section): Return gdb_bfd_ref_ptr.
17727 * symfile.c (read_symbols, symbol_file_add)
17728 (separate_debug_file_exists): Update.
17729 (symfile_bfd_open): Return gdb_bfd_ref_ptr.
17730 (generic_load, reread_symbols): Update.
17731 * symfile-mem.c (symbol_file_add_from_memory): Update.
17732 * spu-linux-nat.c (spu_bfd_open): Return gdb_bfd_ref_ptr.
17733 (spu_symbol_file_add_from_memory): Update.
17734 * solist.h (struct target_so_ops) <bfd_open>: Return
17735 gdb_bfd_ref_ptr.
17736 (solib_bfd_fopen, solib_bfd_open): Return gdb_bfd_ref_ptr.
17737 * solib.c (solib_bfd_fopen, solib_bfd_open): Return
17738 gdb_bfd_ref_ptr.
17739 (solib_map_sections, reload_shared_libraries_1): Update.
17740 * solib-svr4.c (enable_break): Update.
17741 * solib-spu.c (spu_bfd_fopen): Return gdb_bfd_ref_ptr.
17742 * solib-frv.c (enable_break2): Update.
17743 * solib-dsbt.c (enable_break): Update.
17744 * solib-darwin.c (gdb_bfd_mach_o_fat_extract): Return
17745 gdb_bfd_ref_ptr.
17746 (darwin_solib_get_all_image_info_addr_at_init): Update.
17747 (darwin_bfd_open): Return gdb_bfd_ref_ptr.
17748 * solib-aix.c (solib_aix_bfd_open): Return gdb_bfd_ref_ptr.
17749 * record-full.c (record_full_save): Update.
17750 * python/py-objfile.c (objfpy_add_separate_debug_file): Update.
17751 * procfs.c (insert_dbx_link_bpt_in_file): Update.
17752 * minidebug.c (find_separate_debug_file_in_section): Return
17753 gdb_bfd_ref_ptr.
17754 * machoread.c (macho_add_oso_symfile): Change abfd to
17755 gdb_bfd_ref_ptr.
17756 (macho_symfile_read_all_oso): Update.
17757 (macho_check_dsym): Return gdb_bfd_ref_ptr.
17758 (macho_symfile_read): Update.
17759 * jit.c (bfd_open_from_target_memory): Return gdb_bfd_ref_ptr.
17760 (jit_bfd_try_read_symtab): Update.
17761 * gdb_bfd.h (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
17762 (gdb_bfd_openw, gdb_bfd_openr_iovec)
17763 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
17764 gdb_bfd_ref_ptr.
17765 (gdb_bfd_ref_policy): New struct.
17766 (gdb_bfd_ref_ptr): New typedef.
17767 * gdb_bfd.c (gdb_bfd_open, gdb_bfd_fopen, gdb_bfd_openr)
17768 (gdb_bfd_openw, gdb_bfd_openr_iovec)
17769 (gdb_bfd_openr_next_archived_file, gdb_bfd_fdopenr): Return
17770 gdb_bfd_ref_ptr.
17771 * gcore.h (create_gcore_bfd): Return gdb_bfd_ref_ptr.
17772 * gcore.c (create_gcore_bfd): Return gdb_bfd_ref_ptr.
17773 (gcore_command): Update.
17774 * exec.c (exec_file_attach): Update.
17775 * elfread.c (elf_symfile_read): Update.
17776 * dwarf2read.c (dwarf2_get_dwz_file): Update.
17777 (try_open_dwop_file, open_dwo_file): Return gdb_bfd_ref_ptr.
17778 (open_and_init_dwo_file): Update.
17779 (open_dwp_file): Return gdb_bfd_ref_ptr.
17780 (open_and_init_dwp_file): Update.
17781 * corelow.c (core_open): Update.
17782 * compile/compile-object-load.c (compile_object_load): Update.
17783 * common/gdb_ref_ptr.h (ref_ptr::operator->): New operator.
17784 * coffread.c (coff_symfile_read): Update.
17785 * cli/cli-dump.c (bfd_openr_or_error, bfd_openw_or_error): Return
17786 gdb_bfd_ref_ptr. Rename.
17787 (dump_bfd_file, restore_command): Update.
17788 * build-id.h (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
17789 * build-id.c (build_id_to_debug_bfd): Return gdb_bfd_ref_ptr.
17790 (find_separate_debug_file_by_buildid): Update.
17791
17792 2017-01-10 Tom Tromey <tom@tromey.com>
17793
17794 * common/gdb_ref_ptr.h: New file.
17795 * python/py-ref.h (struct gdbpy_ref_policy): New.
17796 (gdbpy_ref): Now a typedef.
17797
17798 2017-01-10 Tom Tromey <tom@tromey.com>
17799
17800 * utils.h (make_cleanup_htab_delete): Don't declare.
17801 * utils.c (do_htab_delete_cleanup, make_cleanup_htab_delete):
17802 Remove.
17803 * linespec.c (decode_compound_collector): Add constructor,
17804 destructor.
17805 (lookup_prefix_sym): Remove cleanup.
17806 (symtab_collector): Add constructor, destructor.
17807 (collect_symtabs_from_filename): Remove cleanup.
17808 * disasm.c (do_mixed_source_and_assembly): Use htab_up.
17809 * compile/compile-c-symbols.c (generate_c_for_variable_locations):
17810 Use htab_up.
17811 * gnu-v3-abi.c (gnuv3_print_vtable): Use htab_up.
17812 * dwarf2read.c (dw2_expand_symtabs_matching)
17813 (dw2_map_symbol_filenames, dwarf_decode_macros)
17814 (write_psymtabs_to_index): Use htab_up.
17815 * dwarf2loc.c (func_verify_no_selftailcall)
17816 (call_site_find_chain_1, func_verify_no_selftailcall)
17817 (chain_candidate, call_site_find_chain_1): Use std::unordered_set,
17818 std::vector, gdb::unique_xmalloc_ptr.
17819 (call_sitep): Remove typedef.
17820 (dwarf2_locexpr_baton_eval): Remove unused variable.
17821
17822 2017-01-10 Tom Tromey <tom@tromey.com>
17823
17824 * python/python-internal.h (make_cleanup_py_decref)
17825 (make_cleanup_py_xdecref): Don't declare.
17826 * python/py-utils.c (py_decref, make_cleanup_py_decref)
17827 (py_xdecref, make_cleanup_py_xdecref): Remove.
17828
17829 2017-01-10 Tom Tromey <tom@tromey.com>
17830
17831 * python/py-framefilter.c (py_mi_print_variables): Use gdbpy_ref.
17832 (py_print_locals, enumerate_locals, py_print_args): Use gdbpy_ref.
17833
17834 2017-01-10 Tom Tromey <tom@tromey.com>
17835
17836 * python/py-framefilter.c (enumerate_args): Use gdbpy_ref.
17837
17838 2017-01-10 Tom Tromey <tom@tromey.com>
17839
17840 * python/py-utils.c (unicode_to_encoded_string)
17841 (python_string_to_target_string)
17842 (python_string_to_target_python_string)
17843 (python_string_to_host_string, gdbpy_obj_to_string)
17844 (get_addr_from_python): Use gdbpy_ref.
17845
17846 2017-01-10 Tom Tromey <tom@tromey.com>
17847
17848 * python/py-unwind.c (pyuw_object_attribute_to_pointer): Use
17849 gdbpy_ref.
17850
17851 2017-01-10 Tom Tromey <tom@tromey.com>
17852
17853 * python/python.c (eval_python_command, gdbpy_decode_line)
17854 (gdbpy_run_events, gdbpy_start_type_printers)
17855 (gdbpy_apply_type_printers): Use gdbpy_ref.
17856
17857 2017-01-10 Tom Tromey <tom@tromey.com>
17858
17859 * python/py-param.c (get_doc_string, compute_enum_values): Use
17860 gdbpy_ref.
17861
17862 2017-01-10 Tom Tromey <tom@tromey.com>
17863
17864 * python/py-inferior.c (find_thread_object, build_inferior_list):
17865 Use gdbpy_ref.
17866
17867 2017-01-10 Tom Tromey <tom@tromey.com>
17868
17869 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
17870
17871 2017-01-10 Tom Tromey <tom@tromey.com>
17872
17873 * python/py-finishbreakpoint.c (bpfinishpy_out_of_scope): Use
17874 gdbpy_ref.
17875
17876 2017-01-10 Tom Tromey <tom@tromey.com>
17877
17878 * python/py-cmd.c (cmdpy_completer_helper): Use gdbpy_ref. Remove
17879 extra incref.
17880 (cmdpy_completer_handle_brkchars, cmdpy_completer, cmdpy_init):
17881 Use gdbpy_ref.
17882
17883 2017-01-10 Tom Tromey <tom@tromey.com>
17884
17885 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
17886 gdbpy_ref.
17887
17888 2017-01-10 Tom Tromey <tom@tromey.com>
17889
17890 * python/py-arch.c (archpy_disassemble): Use gdbpy_ref. Don't
17891 decref results of PyArg_ParseTupleAndKeywords.
17892
17893 2017-01-10 Tom Tromey <tom@tromey.com>
17894
17895 * python/python.c (python_run_simple_file): Use
17896 unique_xmalloc_ptr, gdbpy_ref.
17897
17898 2017-01-10 Tom Tromey <tom@tromey.com>
17899
17900 * python/py-prettyprint.c (print_stack_unless_memory_error)
17901 (print_string_repr, print_children): Use gdbpy_ref.
17902 (dummy_python_frame): New class.
17903 (dummy_python_frame::dummy_python_frame): Rename from
17904 push_dummy_python_frame.
17905 (py_restore_tstate): Remove.
17906
17907 2017-01-10 Tom Tromey <tom@tromey.com>
17908
17909 * python/py-framefilter.c (py_print_frame): Use gdbpy_ref.
17910
17911 2017-01-10 Tom Tromey <tom@tromey.com>
17912
17913 * python/python.c (ensure_python_env, restore_python_env):
17914 Remove.
17915 * python/python-internal.h (ensure_python_env): Don't declare.
17916 * varobj.h (varobj_ensure_python_env): Don't declare.
17917 * varobj.c (varobj_ensure_python_env): Remove.
17918
17919 2017-01-10 Tom Tromey <tom@tromey.com>
17920
17921 * varobj.c (varobj_value_get_print_value): Use
17922 gdbpy_enter_varobj.
17923
17924 2017-01-10 Tom Tromey <tom@tromey.com>
17925
17926 * python/py-prettyprint.c (print_string_repr, print_children):
17927 Update.
17928 * python/py-lazy-string.c (gdbpy_extract_lazy_string): Change type
17929 of "encoding".
17930 * varobj.c (varobj_value_get_print_value): Update.
17931 * python/python-internal.h (gdbpy_extract_lazy_string): Update.
17932
17933 2017-01-10 Tom Tromey <tom@tromey.com>
17934
17935 * varobj.c (varobj_get_display_hint)
17936 (dynamic_varobj_has_child_method, install_new_value_visualizer)
17937 (varobj_set_visualizer, free_variable): Use
17938 gdbpy_enter_varobj.
17939
17940 2017-01-10 Tom Tromey <tom@tromey.com>
17941
17942 * python/python.c (python_command): Use gdbpy_enter, gdbpy_ref.
17943 (do_finish_initialization): New function. Use gdbpy_ref.
17944 (gdbpy_finish_initialization): Use gdbpy_enter. Call
17945 do_finish_initialization.
17946
17947 2017-01-10 Tom Tromey <tom@tromey.com>
17948
17949 * python/py-param.c (get_set_value, get_show_value): Use
17950 gdbpy_enter, gdbpy_ref.
17951
17952 2017-01-10 Tom Tromey <tom@tromey.com>
17953
17954 * python/py-function.c (fnpy_call): Use gdbpy_enter, gdbpy_ref.
17955
17956 2017-01-10 Tom Tromey <tom@tromey.com>
17957
17958 * python/py-cmd.c (cmdpy_function): Use gdbpy_enter, gdbpy_ref.
17959
17960 2017-01-10 Tom Tromey <tom@tromey.com>
17961
17962 * python/py-varobj.c (py_varobj_iter_dtor, py_varobj_iter_next):
17963 Use gdbpy_enter_varobj.
17964
17965 2017-01-10 Tom Tromey <tom@tromey.com>
17966
17967 * varobj.c (gdbpy_enter_varobj): New constructor.
17968 * python/python-internal.h (gdbpy_enter_varobj): New class.
17969 * python/py-varobj.c (py_varobj_get_iterator): Use
17970 gdbpy_enter_varobj.
17971
17972 2017-01-10 Tom Tromey <tom@tromey.com>
17973
17974 * python/py-xmethods.c (gdbpy_get_xmethod_result_type): Use
17975 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
17976 (gdbpy_invoke_xmethod): Use gdbpy_ref, gdbpy_enter.
17977 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref,
17978 unique_xmalloc_ptr.
17979 (gdbpy_get_xmethod_arg_types): Use gdbpy_ref, gdbpy_enter.
17980
17981 2017-01-10 Tom Tromey <tom@tromey.com>
17982
17983 * python/py-xmethods.c (invoke_match_method): Use
17984 gdbpy_ref.
17985
17986 2017-01-10 Tom Tromey <tom@tromey.com>
17987
17988 * python/py-xmethods.c (gdbpy_get_matching_xmethod_workers): use
17989 gdbpy_enter, gdbpy_ref.
17990
17991 2017-01-10 Tom Tromey <tom@tromey.com>
17992
17993 * python/python.c (python_interactive_command): Use gdbpy_enter.
17994
17995 2017-01-10 Tom Tromey <tom@tromey.com>
17996
17997 * python/python.c (gdbpy_before_prompt_hook): Use gdbpy_enter,
17998 gdbpy_ref.
17999
18000 2017-01-10 Tom Tromey <tom@tromey.com>
18001
18002 * python/py-prettyprint.c (gdbpy_apply_val_pretty_printer): Use
18003 gdbpy_enter, gdbpy_ref, unique_xmalloc_ptr.
18004
18005 2017-01-10 Tom Tromey <tom@tromey.com>
18006
18007 * utils.h (htab_deleter): New struct.
18008 (htab_up): New typedef.
18009 * python/py-framefilter.c (gdbpy_apply_frame_filter): Use
18010 gdbpy_enter, gdbpy_ref, htab_up.
18011
18012 2017-01-10 Tom Tromey <tom@tromey.com>
18013
18014 * python/py-unwind.c (pending_frame_invalidate): Remove.
18015 (pyuw_sniffer): Use gdbpy_enter and gdbpy_ref.
18016
18017 2017-01-10 Tom Tromey <tom@tromey.com>
18018
18019 * python/py-xmethods.c (gdbpy_free_xmethod_worker_data)
18020 (gdbpy_clone_xmethod_worker_data): Use gdbpy_enter.
18021
18022 2017-01-10 Tom Tromey <tom@tromey.com>
18023
18024 * python/py-type.c (save_objfile_types): Use gdbpy_enter.
18025
18026 2017-01-10 Tom Tromey <tom@tromey.com>
18027
18028 * python/python.c (gdbpy_eval_from_control_command)
18029 (gdbpy_source_script, gdbpy_run_events)
18030 (gdbpy_source_objfile_script, gdbpy_execute_objfile_script)
18031 (gdbpy_free_type_printers, gdbpy_finish_initialization): Use
18032 gdbpy_enter.
18033
18034 2017-01-10 Tom Tromey <tom@tromey.com>
18035
18036 * python/py-progspace.c (py_free_pspace): Use gdbpy_enter.
18037
18038 2017-01-10 Tom Tromey <tom@tromey.com>
18039
18040 * python/py-objfile.c (py_free_objfile): Use gdbpy_enter.
18041
18042 2017-01-10 Tom Tromey <tom@tromey.com>
18043
18044 * python/py-inferior.c (python_on_normal_stop, python_on_resume)
18045 (python_on_inferior_call_pre, python_on_inferior_call_post)
18046 (python_on_memory_change, python_on_register_change)
18047 (python_inferior_exit, python_new_objfile, add_thread_object)
18048 (delete_thread_object, py_free_inferior): Use gdbpy_enter.
18049
18050 2017-01-10 Tom Tromey <tom@tromey.com>
18051
18052 * python/py-finishbreakpoint.c (bpfinishpy_handle_stop)
18053 (bpfinishpy_handle_exit): Use gdbpy_enter.
18054
18055 2017-01-10 Tom Tromey <tom@tromey.com>
18056
18057 * python/py-cmd.c (cmdpy_destroyer)
18058 (cmdpy_completer_handle_brkchars, cmdpy_completer): Use
18059 gdbpy_enter.
18060
18061 2017-01-10 Tom Tromey <tom@tromey.com>
18062
18063 * python/py-breakpoint.c (gdbpy_breakpoint_cond_says_stop): Use
18064 gdbpy_enter.
18065 (gdbpy_breakpoint_has_cond): Likewise.
18066
18067 2017-01-10 Tom Tromey <tom@tromey.com>
18068
18069 * python/python.c (gdbpy_enter): New constructor.
18070 (~gdbpy_enter): New destructor.
18071 (restore_python_env, ensure_python_env): Rewrite.
18072 * python/python-internal.h (gdbpy_enter): New class.
18073
18074 2017-01-10 Tom Tromey <tom@tromey.com>
18075
18076 * python/py-symbol.c (gdbpy_lookup_symbol): Use gdbpy_ref.
18077
18078 2017-01-10 Tom Tromey <tom@tromey.com>
18079
18080 * python/py-value.c (value_has_field, get_field_flag)
18081 (get_field_type, valpy_getitem, convert_value_from_python): Use
18082 gdbpy_ref.
18083
18084 2017-01-10 Tom Tromey <tom@tromey.com>
18085
18086 * python/python.c (gdbpy_progspaces, gdbpy_objfiles): Use
18087 gdbpy_ref.
18088
18089 2017-01-10 Tom Tromey <tom@tromey.com>
18090
18091 * python/py-prettyprint.c (search_pp_list)
18092 (find_pretty_printer_from_objfiles)
18093 (find_pretty_printer_from_progspace)
18094 (find_pretty_printer_from_gdb, find_pretty_printer)
18095 (gdbpy_get_display_hint, gdbpy_get_varobj_pretty_printer): Use
18096 gdbpy_ref.
18097
18098 2017-01-10 Tom Tromey <tom@tromey.com>
18099
18100 * python/py-param.c (call_doc_function): Use gdbpy_ref.
18101
18102 2017-01-10 Tom Tromey <tom@tromey.com>
18103
18104 * python/py-linetable.c (build_line_table_tuple_from_pcs)
18105 (ltpy_get_all_source_lines): Use gdbpy_ref.
18106
18107 2017-01-10 Tom Tromey <tom@tromey.com>
18108
18109 * python/py-framefilter.c (extract_sym, extract_value)
18110 (get_py_iter_from_func, bootstrap_python_frame_filters): Use
18111 gdbpy_ref.
18112
18113 2017-01-10 Tom Tromey <tom@tromey.com>
18114
18115 * python/py-breakpoint.c (gdbpy_breakpoints): Use gdbpy_ref.
18116
18117 2017-01-10 Tom Tromey <tom@tromey.com>
18118
18119 * python/py-inferior.c (gdbpy_inferiors): Use gdbpy_ref.
18120
18121 2017-01-10 Tom Tromey <tom@tromey.com>
18122
18123 * python/py-function.c (convert_values_to_python, fnpy_init): Use
18124 gdbpy_ref.
18125
18126 2017-01-10 Tom Tromey <tom@tromey.com>
18127
18128 * python/py-cmd.c (gdbpy_string_to_argv): Use gdbpy_ref.
18129
18130 2017-01-10 Tom Tromey <tom@tromey.com>
18131
18132 * python/py-type.c (convert_field, make_fielditem, typy_fields)
18133 (typy_range): Use gdbpy_ref.
18134
18135 2017-01-10 Tom Tromey <tom@tromey.com>
18136
18137 * python/py-threadevent.c (create_thread_event_object): Use
18138 gdbpy_ref.
18139 * python/py-stopevent.c (create_stop_event_object): Simplify.
18140 (emit_stop_event): Use gdbpy_ref.
18141 * python/py-signalevent.c (create_signal_event_object): Use
18142 gdbpy_ref.
18143 * python/py-newobjfileevent.c (create_new_objfile_event_object)
18144 (emit_new_objfile_event, create_clear_objfiles_event_object)
18145 (emit_clear_objfiles_event): Use gdbpy_ref.
18146 * python/py-infevents.c (create_inferior_call_event_object)
18147 (create_register_changed_event_object)
18148 (create_memory_changed_event_object, emit_inferior_call_event)
18149 (emit_memory_changed_event, emit_register_changed_event): Use
18150 gdbpy_ref.
18151 * python/py-exitedevent.c (create_exited_event_object)
18152 (emit_exited_event): Use gdbpy_ref.
18153 * python/py-event.h (evpy_emit_event): Remove
18154 CPYCHECKER_STEALS_REFERENCE_TO_ARG annotation.
18155 * python/py-event.c (evpy_emit_event): Use gdbpy_ref.
18156 * python/py-continueevent.c (emit_continue_event): Use
18157 gdbpy_ref.
18158 * python/py-breakpoint.c (gdbpy_breakpoint_created)
18159 (gdbpy_breakpoint_deleted, gdbpy_breakpoint_modified): Use
18160 gdbpy_ref.
18161 * python/py-bpevent.c (create_breakpoint_event_object): Use
18162 gdbpy_ref.
18163
18164 2017-01-10 Tom Tromey <tom@tromey.com>
18165
18166 * python/py-ref.h: New file.
18167
18168 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
18169
18170 * cli-out.c (cli_ui_out::do_redirect): Change return type to
18171 void.
18172 * cli-out.h (cli_ui_out::do_redirect): Likewise.
18173 * mi/mi-out.c (mi_ui_out::do_redirect): Likewise.
18174 * mi/mi-out.h (mi_ui_out::do_redirect): Likewise.
18175 * ui-out.c (ui_out::redirect): Likewise.
18176 * ui-out.h (ui_out::redirect, ui_out::do_redirect): Likewise.
18177 * cli/cli-logging.c (set_logging_redirect): Update call site of
18178 ui_out::redirect.
18179 (handle_redirections): Likewise.
18180 * scm-ports.c (ioscm_with_output_to_port_worker): Likewise.
18181 * top.c (execute_command_to_string): Likewise.
18182 * utils.c (do_ui_out_redirect_pop): Likewise.
18183
18184 2017-01-10 Simon Marchi <simon.marchi@ericsson.com>
18185
18186 * stack.c (_initialize_stack): Update "frame" command help message.
18187
18188 2017-01-08 Iain Buclaw <ibuclaw@gdcproject.org>
18189
18190 * d-exp.y (CastExpression): Emit UNOP_CAST_TYPE.
18191
18192 2017-01-06 Yao Qi <yao.qi@linaro.org>
18193
18194 * x86-linux-nat.h: Include gdb_proc_service.h.
18195
18196 2017-01-06 Yao Qi <yao.qi@linaro.org>
18197
18198 * ser-base.h: Include serial.h.
18199
18200 2017-01-06 Yao Qi <yao.qi@linaro.org>
18201
18202 * ppc-linux-tdep.h: Include ppc-tdep.h.
18203
18204 2017-01-06 Yao Qi <yao.qi@linaro.org>
18205
18206 * nat/amd64-linux-siginfo.h: Include signal.h.
18207
18208 2017-01-06 Yao Qi <yao.qi@linaro.org>
18209
18210 * nat/aarch64-linux-hw-point.h: Include break-common.h.
18211
18212 2017-01-06 Yao Qi <yao.qi@linaro.org>
18213
18214 * mi/mi-parse.h: Include mi-cmds.h.
18215
18216 2017-01-06 Yao Qi <yao.qi@linaro.org>
18217
18218 * inf-loop.c: Don't include "target.h".
18219 * inf-loop.h: Include it here.
18220
18221 2017-01-06 Yao Qi <yao.qi@linaro.org>
18222
18223 * dfp.h: Include "dboulest.h" and "expression.h".
18224
18225 2017-01-06 Yao Qi <yao.qi@linaro.org>
18226
18227 * ax-gdb.h: Include "ax.h".
18228
18229 2017-01-06 Yao Qi <yao.qi@linaro.org>
18230
18231 * Makefile.in (HFILES_NO_SRCDIR): Replace gdb_ptrace.h
18232 with nat/gdb_ptrace.h.
18233
18234 2017-01-05 Yao Qi <yao.qi@linaro.org>
18235
18236 * mips-fbsd-tdep.c (mips_fbsd_sigframe_init): Move && to
18237 new line.
18238 (mips64_fbsd_sigframe_init): Likewise.
18239
18240 2017-01-04 John Baldwin <jhb@FreeBSD.org>
18241
18242 * mips-fbsd-tdep.c (_initialize_mips_fbsd_tdep): Use
18243 GDB_OSABI_FREEBSD instead of GDB_OSABI_FREEBSD_ELF.
18244
18245 2017-01-04 John Baldwin <jhb@FreeBSD.org>
18246
18247 * Makefile.in (ALLDEPFILES): Add mips-fbsd-nat.c.
18248 * NEWS: Mention new FreeBSD/mips native configuration.
18249 * config/mips/fbsd.mh: New file.
18250 * configure.host: Add mips*-*-freebsd*.
18251 * mips-fbsd-nat.c: New file.
18252
18253 2017-01-04 John Baldwin <jhb@FreeBSD.org>
18254
18255 * Makefile.in (ALL_TARGET_OBS): Add mips-fbsd-tdep.o.
18256 (ALLDEPFILES): Add mips-fbsd-tdep.c.
18257 * NEWS: Mention new FreeBSD/mips target.
18258 * configure.tgt: Add mips*-*-freebsd*.
18259 * mips-fbsd-tdep.c: New file.
18260 * mips-fbsd-tdep.h: New file.
18261
18262 2017-01-04 Yao Qi <yao.qi@linaro.org>
18263
18264 * dwarf2loc.c (write_pieced_value): Don't use VALUE_FRAME_ID (to),
18265 use c->frame_id when the piece location is DWARF_VALUE_REGISTER.
18266
18267 2017-01-01 Joel Brobecker <brobecker@adacore.com>
18268
18269 Update copyright year range in all GDB files.
18270
18271 2017-01-01 Joel Brobecker <brobecker@adacore.com>
18272
18273 * config/djgpp/fnchange.lst: Add entry for gdb/ChangeLog-2016.
18274
18275 For older changes see ChangeLog-2016.
18276 \f
18277 Local Variables:
18278 mode: change-log
18279 left-margin: 8
18280 fill-column: 74
18281 version-control: never
18282 coding: utf-8
18283 End:
This page took 0.422828 seconds and 4 git commands to generate.